:root {
  /* Single point of change for the site's display font. Swap the value
     here (and the matching Google Fonts <link> in index.html) to re-theme
     all text in one place. */
  --font-display: "Rajdhani", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0c1a3d;
  overflow: hidden;
  font-family: var(--font-display);
}

/* ================= Background scene ================= */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0c1a3d;
}

.scene-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 78%;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 22, 0.22) 0%,
    rgba(6, 10, 22, 0.05) 30%,
    rgba(6, 10, 22, 0.1) 65%,
    rgba(6, 10, 22, 0.45) 100%
  );
}

.bird-flight {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: auto;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
}

.bird-2 { width: 32px; }
.bird-3 { width: 36px; }

.bird-1 { animation: flyReal1 27s linear infinite; }
.bird-2 { animation: flyReal2 35s linear infinite; animation-delay: -9s; }
.bird-3 { animation: flyReal3 31s linear infinite; animation-delay: -19s; }

@keyframes flyReal1 {
  0% { transform: translate(-10vw, 20vh); }
  50% { transform: translate(53vw, 13vh); }
  100% { transform: translate(116vw, 19vh); }
}

@keyframes flyReal2 {
  0% { transform: translate(-8vw, 30vh); }
  50% { transform: translate(50vw, 25vh); }
  100% { transform: translate(112vw, 31vh); }
}

@keyframes flyReal3 {
  0% { transform: translate(-9vw, 25vh); }
  50% { transform: translate(46vw, 19vh); }
  100% { transform: translate(114vw, 26vh); }
}

.wing-flap {
  transform-box: fill-box;
  transform-origin: center;
  animation: flap 0.45s ease-in-out infinite;
}

@keyframes flap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.35); }
}

/* ================= Layout stage ================= */

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0;
}

.title {
  position: absolute;
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff6e6;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 200, 120, 0.55), 0 2px 6px rgba(0, 0, 0, 0.5);
  margin: 0;
  max-width: 90vw;
  white-space: nowrap;
  transition: opacity 0.25s ease;
  text-align: center;
}

@media (max-width: 600px) {
  .title {
    white-space: normal;
  }
}

.stage.hide-ui .title,
.stage.hide-ui .orbit,
.stage.hide-ui .crest {
  opacity: 0;
  pointer-events: none;
}

/* ================= Crest headline ================= */

.crest {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 34px 52px;
  border-radius: 16px;
  background: rgba(8, 14, 28, 0.42);
  border: 1px solid rgba(255, 210, 150, 0.28);
  backdrop-filter: blur(3px);
  text-align: center;
  transition: opacity 0.25s ease;
  max-width: min(86vw, 720px);
}

.crest-headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.4vw, 2.5rem);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff2da;
  text-shadow: 0 0 18px rgba(255, 190, 110, 0.7), 0 2px 8px rgba(0, 0, 0, 0.55);
  line-height: 1.15;
}

.crest-rule {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 150, 0.9), transparent);
}

.crest-sub {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.75rem, 1.4vw, 1.05rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #cfd9ee;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ================= Medallion buttons ================= */

.orbit {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.explore-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  --btn-scale: 1;
  transform: translate(-50%, -50%) scale(var(--btn-scale));
  pointer-events: auto;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  width: clamp(230px, 23vw, 290px);
  height: clamp(230px, 23vw, 290px);
  border-radius: 50%;
  border: none;
  background:
    radial-gradient(circle at 32% 28%, rgba(90, 140, 220, 0.28), transparent 55%),
    rgba(9, 16, 34, 0.78);
  color: #eaf2ff;
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(255, 214, 140, 0.55),
    0 0 0 6px rgba(9, 16, 34, 0.85),
    0 0 0 8px rgba(140, 190, 255, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 0 22px rgba(120, 180, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.4s ease;
}

.explore-btn::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 214, 140, 0.4);
  pointer-events: none;
}

/* Fiery ring, hidden until hover — eight candle-flame shapes (real
   teardrop silhouettes, not blurry blobs) standing around the badge's
   circumference, swaying slowly and independently like real candle
   flames rather than flickering fast. See .btn-flames markup. */
.btn-flames {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.35s ease;
}

.flame-sway {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: flameSway 2.6s ease-in-out infinite alternate;
}

.flame-d1 { animation-delay: -0.1s; }
.flame-d2 { animation-delay: -0.5s; }
.flame-d3 { animation-delay: -0.9s; }
.flame-d4 { animation-delay: -1.3s; }
.flame-d5 { animation-delay: -1.7s; }
.flame-d6 { animation-delay: -2.1s; }
.flame-d7 { animation-delay: -0.3s; }
.flame-d8 { animation-delay: -0.7s; }

@keyframes flameSway {
  0%   { transform: rotate(-7deg) scaleY(0.95); }
  50%  { transform: rotate(3deg) scaleY(1.03); }
  100% { transform: rotate(8deg) scaleY(0.98); }
}

.btn-icon {
  width: 32%;
  height: 32%;
  overflow: visible;
}

.btn-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.explore-btn:hover {
  transform: translate(-50%, calc(-50% - 6px)) scale(calc(var(--btn-scale) * 1.9));
  z-index: 10;
  background:
    radial-gradient(circle at 32% 28%, rgba(120, 170, 255, 0.4), transparent 55%),
    rgba(18, 30, 58, 0.85);
  box-shadow:
    0 0 0 2px rgba(255, 224, 160, 0.85),
    0 0 0 6px rgba(9, 16, 34, 0.9),
    0 0 26px rgba(140, 190, 255, 0.65),
    0 12px 26px rgba(0, 0, 0, 0.5),
    inset 0 0 26px rgba(140, 190, 255, 0.3);
}

.explore-btn:hover .btn-flames,
.explore-btn.force-hover .btn-flames {
  opacity: 1;
}

.explore-btn:active,
.explore-btn.chosen {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 170, 90, 0.45), transparent 55%),
    rgba(50, 26, 12, 0.85);
  box-shadow:
    0 0 0 2px rgba(255, 180, 90, 0.95),
    0 0 0 6px rgba(9, 16, 34, 0.9),
    0 0 34px rgba(255, 160, 70, 0.75);
}

.explore-btn:disabled {
  cursor: default;
}

/* ================= Rocket ================= */

.rocket-wrap {
  position: relative;
  z-index: 1;
  height: min(58vh, 620px);
  width: auto;
  will-change: transform;
}

.rocket-photo-img {
  display: block;
  height: 100%;
  width: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.rocket-flame-svg {
  position: absolute;
  left: 57%;
  top: 99%;
  width: 44%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(1.2px) drop-shadow(0 0 10px rgba(255, 150, 60, 0.85)) drop-shadow(0 0 22px rgba(255, 100, 40, 0.5));
}

.flame-idle {
  animation: idleFlicker 1.4s ease-in-out infinite;
}

@keyframes idleFlicker {
  0%, 100% { transform: scaleY(0.85) scaleX(0.95); opacity: 0.85; }
  50% { transform: scaleY(1.05) scaleX(1.05); opacity: 1; }
}

.rocket-wrap.shaking {
  animation: shake 0.12s linear infinite;
}

@keyframes shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-2px, 1px) rotate(-0.6deg); }
  50% { transform: translate(2px, -1px) rotate(0.6deg); }
  75% { transform: translate(-1px, 2px) rotate(-0.4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.rocket-wrap.launching {
  animation: liftoff 3.4s cubic-bezier(0.35, 0, 0.65, 1) forwards;
}

@keyframes liftoff {
  0% { transform: translateY(0) scale(1); }
  15% { transform: translateY(-2vh) scale(1); }
  100% { transform: translateY(-160vh) scale(0.55); }
}

.rocket-wrap.launching .flame-idle {
  animation: launchFlame 0.18s ease-in-out infinite;
  transform-origin: 50px 10px;
}

@keyframes launchFlame {
  0%, 100% { transform: scaleY(2.6) scaleX(1.15); opacity: 1; }
  50% { transform: scaleY(3.2) scaleX(1.35); opacity: 0.9; }
}

.smoke-trail {
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 1px;
  height: 1px;
  z-index: -1;
  pointer-events: none;
}

.puff {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 230, 235, 0.85) 0%, rgba(200, 200, 210, 0.4) 60%, transparent 100%);
  animation: puffRise 1.6s ease-out forwards;
}

@keyframes puffRise {
  0% { transform: translate(-50%, 0) scale(0.4); opacity: 0.85; }
  100% { transform: translate(var(--drift), -220px) scale(2.6); opacity: 0; }
}

.status {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff2da;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 190, 110, 0.6), 0 2px 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 4;
}

.status.visible {
  opacity: 1;
}
