:root {
  --navy: #07122a;
  --navy-deep: #050c1c;
  --gold: #d4af37;
  --gold-bright: #f0d060;
  --red: #c41e3a;
  --ivory: #f4ebd0;
  --ink: #0b1d4a;
}

html,
body {
  background: var(--navy);
}

body {
  font-family: Barlow, system-ui, sans-serif;
  color: var(--ivory);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpolygon fill='%23D4AF37' points='16,2 19.4,11.2 29,12 21.5,18.2 24.2,28 16,22.6 7.8,28 10.5,18.2 3,12 12.6,11.2'/%3E%3C/svg%3E") 8 8, auto;
}

a,
button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpolygon fill='%23F4EBD0' stroke='%23C41E3A' stroke-width='2' points='16,2 19.4,11.2 29,12 21.5,18.2 24.2,28 16,22.6 7.8,28 10.5,18.2 3,12 12.6,11.2'/%3E%3C/svg%3E") 8 8, pointer;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--navy-deep);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0d060, #c41e3a);
  border-radius: 99px;
  border: 2px solid var(--navy-deep);
}

.flag-bar {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #c41e3a 0 16px,
    #ffffff 16px 32px,
    #0b1d4a 32px 48px
  );
}

.page-bg {
  background-color: var(--navy);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(212, 175, 55, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 40% at 85% 85%, rgba(196, 30, 58, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(7, 18, 42, 0.62) 0%, rgba(5, 12, 28, 0.88) 100%),
    url("banner.png");
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center 30%;
  background-attachment: scroll, scroll, scroll, fixed;
  background-repeat: no-repeat;
}

.wordmark {
  font-family: Anton, sans-serif;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  -webkit-text-stroke: 4px #0b1d4a;
  paint-order: stroke fill;
  text-shadow:
    0 0 12px rgba(212, 175, 55, 0.85),
    0 0 28px rgba(196, 30, 58, 0.45),
    0 6px 0 #7a1a28;
}

.section-title {
  font-family: Cinzel, serif;
  color: var(--gold);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.45), 0 3px 0 #3a2a08;
}

.pop-ring {
  background: radial-gradient(circle at 50% 70%, #7a1a28 0%, #c41e3a 32%, #d4af37 62%, #f4ebd0 86%);
  box-shadow:
    0 0 0 6px #f4ebd0,
    0 0 0 10px #d4af37,
    0 16px 0 #0b1d4a,
    0 0 50px rgba(212, 175, 55, 0.55);
  animation: idle-pop 2.4s ease-in-out infinite;
}

.pop-ring.is-popping {
  animation: boom 0.38s cubic-bezier(0.2, 1.6, 0.3, 1);
}

@keyframes idle-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.03);
  }
}

@keyframes boom {
  0% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.18) rotate(-6deg);
  }
  70% {
    transform: scale(0.96) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes glowpulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5), 0 10px 0 #7a1a28;
  }
  50% {
    box-shadow: 0 0 28px 8px rgba(212, 175, 55, 0.35), 0 10px 0 #7a1a28;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes army {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-22px) rotate(8deg);
  }
}

@keyframes pawdrift {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.55;
  }
  92% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(-20vh) rotate(220deg);
    opacity: 0;
  }
}

@keyframes flypop {
  0% {
    transform: translate(-50%, -40%) scale(0.4);
    opacity: 0;
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -90%) scale(1.1);
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-180% + var(--dy))) scale(0.8);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.15) rotate(12deg);
    opacity: 1;
  }
}

.marquee-track {
  animation: marquee 18s linear infinite;
}

.army-track {
  animation: army 28s linear infinite;
}

.float-cat {
  animation: floaty 7s ease-in-out infinite;
}

.paw-drift {
  animation: pawdrift 16s linear infinite;
}

.cat-card,
.pop-card {
  position: relative;
  background: linear-gradient(180deg, #fff8ea 0%, #e8d7b0 100%);
  color: var(--ink);
  border: 3px solid #d4af37;
  border-radius: 18px;
  box-shadow: 0 12px 0 #0b1d4a, 0 22px 36px rgba(0, 0, 0, 0.38);
}

.cat-card .ear,
.cat-frame .ear {
  position: absolute;
  top: -18px;
  z-index: 2;
  width: auto;
  height: auto;
  background: none;
  border: 0;
  color: #d4af37;
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: 0 2px 0 #0b1d4a;
  animation: twinkle 2.8s ease-in-out infinite;
}

.cat-card .ear.left,
.cat-frame .ear.left {
  left: 14%;
}

.cat-card .ear.right,
.cat-frame .ear.right {
  right: 14%;
  animation-delay: 0.4s;
}

.cat-card .ear::after,
.cat-frame .ear::after {
  content: none;
}

.cat-frame,
.pop-frame {
  position: relative;
  background: linear-gradient(180deg, #fff8ea, #e8d7b0);
  border: 4px solid #d4af37;
  border-radius: 18px;
  box-shadow:
    0 0 0 6px #0b1d4a,
    0 14px 0 #7a1a28,
    0 0 40px rgba(212, 175, 55, 0.28);
}

.speech {
  position: relative;
  background: #fff8ea;
  color: var(--ink);
  border: 4px solid #d4af37;
  border-radius: 18px;
  box-shadow: 0 8px 0 #7a1a28, 0 0 24px rgba(212, 175, 55, 0.28);
}

.speech .tail {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 28px;
  height: 28px;
  background: #fff8ea;
  border-left: 4px solid #d4af37;
  border-top: 4px solid #d4af37;
  transform: translateX(-50%) rotate(45deg);
}

#toast .tail {
  display: none;
}

.buy-btn {
  animation: glowpulse 2.2s ease-in-out infinite;
}

.rail {
  position: relative;
  padding-left: 1.25rem;
}

.rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: linear-gradient(180deg, #d4af37, #c41e3a);
}

.rail-step {
  position: relative;
  padding-left: 1.25rem;
}

.rail-num {
  display: block;
  font-family: Anton, sans-serif;
  letter-spacing: 0.08em;
  color: #c41e3a;
  font-size: 0.8rem;
  margin-bottom: 0.15rem;
}

.step-line {
  background-image: radial-gradient(circle, #d4af37 2.5px, transparent 3px);
  background-size: 18px 8px;
  background-repeat: repeat-x;
  background-position: center;
}

.nav-glass {
  background: rgba(5, 12, 28, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

.fly-pop {
  position: absolute;
  left: 50%;
  top: 18%;
  font-family: Anton, sans-serif;
  color: #d4af37;
  -webkit-text-stroke: 3px #0b1d4a;
  paint-order: stroke fill;
  font-size: 2.4rem;
  pointer-events: none;
  animation: flypop 0.9s ease-out forwards;
  z-index: 5;
}

.whisker {
  height: 3px;
  background: #d4af37;
  border-radius: 99px;
  box-shadow: 0 1px 0 #0b1d4a;
}

.icon-orb {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #000;
  color: #f4ebd0;
  border: 2px solid rgba(212, 175, 55, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.icon-orb:hover {
  transform: scale(1.1);
  border-color: #d4af37;
  color: #d4af37;
}

.icon-orb-sm {
  width: 36px;
  height: 36px;
}

.icon-orb-lg {
  width: 56px;
  height: 56px;
}

.icon-orb-xl {
  width: 96px;
  height: 96px;
  background: #050c1c;
  border: 4px solid #d4af37;
  color: #d4af37;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .wordmark {
    -webkit-text-stroke: 2px #0b1d4a;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.8), 0 4px 0 #7a1a28;
  }

  .page-bg {
    background-attachment: scroll, scroll, scroll, scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .army-track,
  .float-cat,
  .paw-drift,
  .pop-ring,
  .buy-btn,
  .cat-card .ear,
  .cat-frame .ear {
    animation: none !important;
  }
}
