:root {
  --bg: #05080e;
  --text: #e8f0f2;
  --muted: #8fa3a8;
  --accent: #64d8d0;
  --amber: #f4c06a;
  --glass: rgba(10, 16, 24, 0.55);
  --glass-border: rgba(140, 210, 230, 0.22);
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* —— Airframe examining plate (beside hero copy) —— */
.airframe-plate {
  position: relative;
  flex: 1 1 300px;
  min-width: min(100%, 300px);
  max-width: 580px;
  width: 100%;
  height: clamp(240px, 34vh, 360px);
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  opacity: 0;
  transform: translateY(18px) translateX(10px);
  animation: airframeIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
  align-self: stretch;
  margin-left: auto;
}

.airframe-plate:active {
  cursor: grabbing;
}

.airframe-canvas,
.airframe-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.airframe-canvas {
  opacity: 0;
  transition: opacity 0.7s ease;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.airframe-canvas.is-ready {
  opacity: 1;
}

.airframe-fallback {
  object-fit: contain;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4))
    saturate(0.9);
}

.airframe-fallback.is-shown {
  opacity: 0.85;
}

@keyframes airframeIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .airframe-plate {
    max-width: none;
    height: clamp(190px, 30vh, 280px);
    margin-left: 0;
  }

  .hero-copy {
    min-height: 0;
    justify-content: flex-start;
  }

  .hero-controls {
    margin-top: 1.75em;
  }
}

@media (max-width: 480px) {
  .airframe-plate {
    height: 210px;
  }
}

/* —— Full-bleed sky —— */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 70% at 50% -10%, #1a2a3e 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 80% 20%, rgba(40, 90, 110, 0.35), transparent 50%),
    linear-gradient(180deg, #0a121c 0%, #071018 42%, #0c1824 68%, #152028 100%);
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.aurora {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 8%;
  height: 42%;
  background:
    linear-gradient(
      105deg,
      transparent 10%,
      rgba(80, 200, 170, 0.12) 28%,
      rgba(100, 216, 208, 0.22) 42%,
      rgba(120, 180, 255, 0.1) 58%,
      transparent 78%
    );
  filter: blur(28px);
  transform-origin: 50% 100%;
  animation: auroraDrift 18s ease-in-out infinite alternate;
  opacity: 0.85;
}

.haze {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 40% at 50% 78%, rgba(180, 210, 220, 0.14), transparent 55%),
    linear-gradient(180deg, transparent 50%, rgba(8, 14, 20, 0.55) 100%);
  animation: hazePulse 12s ease-in-out infinite alternate;
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      rgba(20, 36, 48, 0.45) 35%,
      rgba(28, 44, 54, 0.85) 70%,
      #152028 100%
    );
  clip-path: polygon(
    0% 55%,
    8% 48%,
    18% 52%,
    28% 40%,
    38% 46%,
    48% 32%,
    58% 44%,
    68% 36%,
    78% 48%,
    88% 42%,
    100% 50%,
    100% 100%,
    0% 100%
  );
}

@keyframes auroraDrift {
  from {
    transform: translateX(-4%) skewX(-4deg) scaleY(1);
  }
  to {
    transform: translateX(5%) skewX(3deg) scaleY(1.08);
  }
}

@keyframes hazePulse {
  from {
    opacity: 0.85;
  }
  to {
    opacity: 1;
  }
}

/* —— Chrome —— */
.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.brand-logo-canvas {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-qiniruk {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.brand-sep {
  display: inline-block;
  width: 1px;
  height: 0.72em;
  margin: 0 2px;
  background: rgba(232, 240, 242, 0.35);
  flex-shrink: 0;
  align-self: center;
}

.brand-fly {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  font-style: normal;
  color: var(--amber);
  letter-spacing: 0.08em;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-toggle,
.back {
  position: relative;
  z-index: 4;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  animation: riseIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.lang-toggle {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  opacity: 0;
  animation: riseIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.16s forwards;
}

.lang-toggle:hover,
.back:hover {
  color: var(--text);
  border-color: rgba(100, 216, 208, 0.55);
}

.lang-toggle[aria-pressed='true'] {
  color: var(--accent);
  border-color: rgba(100, 216, 208, 0.55);
}

html[lang='iu'] body {
  font-family: "Noto Sans Canadian Aboriginal", var(--font-sans);
}

/* —— Stage —— */
.stage {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(8px, 2vh, 20px) 24px 56px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(10px, 1.6vh, 16px);
}

.hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 36px);
  flex-wrap: wrap;
  max-width: none;
  opacity: 0;
  transform: translateY(22px);
  animation: riseIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}

.hero-copy {
  flex: 1 1 280px;
  max-width: 34em;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(240px, 34vh, 360px);
}

.hero-kicker {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hero-line {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 32em;
}

.hero-controls {
  margin-top: 1.75em;
  margin-bottom: 14px;
  max-width: 32em;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Regions —— */
.regions {
  opacity: 0;
  transform: translateY(28px);
  animation: riseIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
}

.region-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.region {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  isolation: isolate;
}

.region--wide,
.region--live {
  min-height: clamp(280px, 44vh, 480px);
  width: 100%;
  transition:
    border-color 0.25s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
  /* Soft outer falloff + inner rim so the face reads slightly convex. */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -28px 48px rgba(0, 0, 0, 0.28),
    inset 0 0 72px rgba(0, 0, 0, 0.18),
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 2px 8px rgba(0, 0, 0, 0.28);
}

.region--live:hover,
.region--live:focus-within {
  border-color: rgba(100, 216, 208, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -28px 48px rgba(0, 0, 0, 0.26),
    inset 0 0 72px rgba(0, 0, 0, 0.16),
    0 22px 48px rgba(0, 0, 0, 0.45),
    0 0 36px rgba(100, 216, 208, 0.12);
}

.region-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(60, 110, 130, 0.45), transparent 60%),
    linear-gradient(145deg, #1a2834 0%, #0e161e 55%, #182430 100%);
}

.region-reel,
.region-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.region-reel {
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 0;
}

.region-visual.has-reel .region-reel.is-active {
  opacity: 1;
  z-index: 1;
}

.region-still {
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 0;
}

.region-still.is-loaded {
  opacity: 0.78;
}

.region-visual.has-reel .region-still {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .region-reel {
    transition: none;
  }
}

.region-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(
      ellipse 78% 62% at 48% 36%,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.04) 32%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 100% 100% at 50% 55%,
      transparent 42%,
      rgba(0, 0, 0, 0.22) 78%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    linear-gradient(90deg, rgba(6, 10, 16, 0.88) 0%, rgba(6, 10, 16, 0.35) 42%, rgba(6, 10, 16, 0.2) 70%, rgba(6, 10, 16, 0.45) 100%),
    linear-gradient(180deg, transparent 30%, rgba(5, 8, 14, 0.78) 100%);
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.region-body {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 3vw, 32px);
  gap: 10px;
}

.region-status {
  align-self: flex-start;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(100, 216, 208, 0.4);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(100, 216, 208, 0.1);
}

.region-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.05;
}

.region-syllabics {
  margin: 0;
  font-family: "Euphemia UCAS", "Noto Sans Canadian Aboriginal", "Aboriginal Sans", sans-serif;
  font-size: 1.15rem;
  color: rgba(155, 207, 208, 0.9);
  letter-spacing: 0.04em;
}

.region-blurb {
  margin: 4px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36em;
}

.region-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 14px;
}

.soon-line {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

@property --cta-chase-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes cta-chase-orbit {
  to {
    --cta-chase-angle: 360deg;
  }
}

.cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #061014;
  background: linear-gradient(180deg, #7ee8e0 0%, var(--accent) 100%);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  overflow: visible;
  box-shadow:
    0 0 18px rgba(100, 216, 208, 0.42),
    0 0 42px rgba(100, 216, 208, 0.22),
    0 10px 28px rgba(100, 216, 208, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.2s ease;
  animation: ctaPulse 3.2s ease-in-out infinite;
}

/* Teal chase light around Lift off. */
.cta::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--cta-chase-angle),
    transparent 0deg,
    transparent 240deg,
    rgb(160 255 245 / 0%) 270deg,
    rgb(180 255 248 / 45%) 300deg,
    #e8fffc 328deg,
    #64d8d0 348deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: cta-chase-orbit 2.2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(180, 255, 248, 0.85));
  pointer-events: none;
  z-index: 0;
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 0 22px rgba(100, 216, 208, 0.55),
    0 0 52px rgba(100, 216, 208, 0.3),
    0 14px 34px rgba(100, 216, 208, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: none;
  animation: none;
}

.cta:hover::before,
.cta:focus-visible::before {
  animation-duration: 1.35s;
}

@keyframes ctaPulse {
  0%,
  100% {
    box-shadow:
      0 0 18px rgba(100, 216, 208, 0.42),
      0 0 42px rgba(100, 216, 208, 0.22),
      0 10px 28px rgba(100, 216, 208, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow:
      0 0 26px rgba(100, 216, 208, 0.58),
      0 0 56px rgba(100, 216, 208, 0.32),
      0 12px 34px rgba(100, 216, 208, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    animation: none;
  }

  .cta::before {
    animation: none;
    --cta-chase-angle: 320deg;
  }
}

.cta-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 28em;
}

.cta-note.is-warn {
  color: #e8c48a;
}

@media (max-width: 820px) {
  .region--wide,
  .region--live {
    min-height: clamp(260px, 40vh, 400px);
  }
}

@media (max-width: 560px) {
  .top {
    padding: 16px 16px 0;
  }

  .stage {
    padding: 28px 16px 48px;
  }

  .region-body {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .haze,
  .cta,
  .brand,
  .lang-toggle,
  .back,
  .hero,
  .regions,
  .airframe-plate {
    animation: none !important;
  }

  .brand,
  .lang-toggle,
  .back,
  .hero,
  .regions,
  .airframe-plate {
    opacity: 1;
    transform: none;
  }

  .region--live {
    transition: none;
  }
}
