@font-face {
  font-family: Geist;
  src: url("/landing/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --hero-font: Geist, "PingFang SC", "Microsoft YaHei", sans-serif;
  --hero-ease: cubic-bezier(.22, 1, .36, 1);
}

#intro {
  --heading-1: 600 36px/40px var(--hero-font);
  --body-3: 400 16px/24px var(--hero-font);
  --button-md: 600 16px/24px var(--hero-font);
  --caption-4: 500 12px/16px var(--hero-font);
  --caption-5: 400 12px/16px var(--hero-font);
  --hero-ink: #fff;
  --hero-muted: #d2ccd8;
  --hero-line: rgb(205 205 249 / .22);
  --hero-raised: rgb(36 35 58 / .94);
  --hero-enter-distance: 8px;
  color-scheme: dark;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 96px 16px 48px;
  background: #151422;
  color: var(--hero-ink);
  font-family: var(--hero-font);
  letter-spacing: 0;
}

#intro .heading-1 { font: var(--heading-1); }
#intro .body-3 { font: var(--body-3); }
#intro .button-md { font: var(--button-md); }
#intro .caption-4 { font: var(--caption-4); }
#intro .caption-5 { font: var(--caption-5); }

/* Keep the shared key outside the sky's clipping and stacking context. */
.hero-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #101120;
}

.hero-sky::before,
.hero-sky-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-sky::before {
  content: "";
  background:
    radial-gradient(ellipse at 68% 45%, rgb(58 73 134 / .68), transparent 55%),
    radial-gradient(ellipse at 81% 63%, rgb(102 53 96 / .45), transparent 49%),
    linear-gradient(135deg, #141222, #151a32 62%, #1f1427);
  animation: sky-fallback-drift 18s cubic-bezier(.37, 0, .63, 1) infinite alternate;
}

.hero-sky.is-offscreen::before { animation-play-state: paused; }
.hero-sky.has-rendered::before { visibility: hidden; animation: none; }

.hero-sky-canvas {
  opacity: 0;
  transition: opacity 400ms var(--hero-ease);
}

.hero-sky.has-rendered .hero-sky-canvas { opacity: 1; }

.cta-panel > .hero-sky { z-index: -1; }

.cta-panel > .hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(12 10 24 / .28);
}

@keyframes sky-fallback-drift {
  from { transform: scale(1.03) translate3d(-1%, 0, 0); }
  to { transform: scale(1.16) translate3d(2%, -2%, 0); }
}

.intro-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: "copy" "scene" "actions";
  justify-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1360px;
}

.intro-copy {
  grid-area: copy;
  min-width: 0;
  text-align: center;
}

#introTitle {
  max-width: 680px;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-line {
  display: inline-block;
  max-width: 100%;
  color: var(--hero-ink);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-line {
    background-image: linear-gradient(90deg, #fff, #9b9b9b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.intro-sub {
  max-width: 680px;
  margin: 16px auto 0;
  color: var(--hero-muted);
  text-wrap: pretty;
}

.intro-cta {
  grid-area: actions;
  text-align: center;
}

#intro .intro-actions {
  flex-direction: row;
  gap: 8px;
  margin: 0;
}

.hero-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: transform 500ms var(--hero-ease), opacity 300ms var(--hero-ease);
}

.hero-action-primary {
  border-color: #f8eee8;
  background: #f8eee8;
  color: #281521;
}

.hero-action:active { transform: translateY(2px); }

.hero-action:focus-visible {
  outline-color: var(--hero-ink);
  outline-offset: 2px;
}

@media (hover: hover) {
  .hero-action-primary:hover { opacity: .82; }
}

.intro-note {
  margin-top: 8px;
  color: var(--hero-muted);
  text-wrap: pretty;
}

.intro-note strong { color: var(--hero-ink); }

.intro-stage {
  --orbit-size: min(512px, calc(100vw - 32px));
  --pill-width: 112px;
  --pill-height: 40px;
  --orbit-radius: calc((var(--orbit-size) - var(--pill-width)) / 2 - 4px);
  grid-area: scene;
  position: relative;
  width: var(--orbit-size);
  height: calc(var(--orbit-radius) * 2.6 + var(--pill-height));
  pointer-events: none;
}

.stage-slot {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: clamp(104px, calc(var(--orbit-radius) * 1.4142 - var(--pill-height) - 4px), 236px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.model-connections,
.hero-providers {
  position: absolute;
  inset: 0;
}

.model-connections {
  width: 100%;
  height: 100%;
  overflow: visible;
  visibility: hidden;
}

.hero-providers { z-index: 2; }

.cosmic-orbit {
  stroke: #bfaf98;
  stroke-opacity: .22;
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
}

.cosmic-orbit:nth-child(2) { stroke-opacity: .13; }

.model-link {
  stroke: #cdb58f;
  opacity: .54;
  stroke-width: 1;
  transition: opacity 300ms var(--hero-ease);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.model-link[data-featured] { opacity: .72; }

.model-link.is-dock-active {
  stroke: #fff0c8;
  opacity: 1;
}

.model-link-signal {
  stroke: #ffe6b4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 112;
  opacity: 0;
  animation: model-signal var(--signal-duration) cubic-bezier(.47, .43, .53, .57)
    var(--signal-delay) infinite paused;
}

@keyframes model-signal {
  from { stroke-dashoffset: 0; opacity: 0; }
  12%, 87% { opacity: 1; }
  to { stroke-dashoffset: -100; opacity: 0; }
}

.float-pill {
  position: absolute;
  left: calc(50% + var(--orbit-radius) * var(--orbit-mobile-x, var(--orbit-x)));
  top: calc(50% + var(--orbit-radius) * var(--orbit-mobile-y, var(--orbit-y)));
  display: flex;
  width: var(--pill-width);
  height: var(--pill-height);
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border: 1px solid var(--hero-line);
  border-radius: 999px;
  background: rgb(25 25 43 / .92);
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(calc(var(--pill-depth, 1) * var(--dock-scale, 1)));
  transition: transform 500ms var(--hero-ease);
  white-space: nowrap;
}

.float-pill::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #f7d5a5;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: pill-signal var(--signal-duration) var(--hero-ease) var(--signal-delay) infinite paused;
}

.intro-stage.is-signal-running .model-link-signal,
.intro-stage.is-signal-running .float-pill::after {
  animation-play-state: running;
}

@keyframes pill-signal {
  0%, 75%, 100% { opacity: 0; }
  89% { opacity: .72; }
}

.float-pill[data-emphasis="primary"] {
  border-color: rgb(211 210 255 / .34);
  background: var(--hero-raised);
}

.float-pill.is-dock-active {
  z-index: 1;
  border-color: #ead0b7;
  background: #332a42;
  box-shadow: 0 6px 20px rgb(12 8 16 / .42);
}

.float-pill img {
  width: 20px;
  height: 20px;
  flex: none;
  object-fit: contain;
}

.float-pill img[src*="/grok.svg"] { filter: invert(1); }
.float-pill img[src*="/openai.svg"] { border-radius: 50%; }

.provider-caption {
  display: grid;
  min-width: 0;
}

.provider-caption small { color: var(--hero-muted); }

.hero-enter {
  animation: hero-enter 500ms var(--hero-ease) var(--entry-delay, 0ms) backwards;
}

.hero-line ~ .hero-line { --entry-delay: 60ms; }
.intro-sub { --entry-delay: 120ms; }
.intro-cta { --entry-delay: 180ms; }

.hero-providers,
.model-connections.is-active {
  animation: hero-fade 500ms var(--hero-ease) 240ms backwards;
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(var(--hero-enter-distance)); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 1024px) {
  #intro {
    --hero-enter-distance: 16px;
    padding-inline: 48px;
    padding-bottom: 64px;
  }

  .intro-layout {
    grid-template-areas: "copy scene" "actions actions";
    grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
    align-items: center;
    column-gap: 40px;
    row-gap: 32px;
  }

  .intro-copy {
    justify-self: start;
    text-align: left;
  }

  .intro-sub { margin: 24px 0 0; }

  .intro-stage {
    --scene-height-budget: 264px;
    container-type: inline-size;
    width: 100%;
    max-width: min(720px, max(400px, calc((100vh - var(--scene-height-budget)) / .72)));
    max-width: min(720px, max(400px, calc((100svh - var(--scene-height-budget)) / .72)));
    height: auto;
    aspect-ratio: 25 / 18;
  }

  .stage-slot { width: min(43%, 310px); }

  .float-pill {
    --pill-width: clamp(92px, 15cqw, 112px);
    left: calc(50% + 100% * var(--desktop-x) / 720);
    top: calc(50% + 100% * var(--desktop-y) / 518.4);
    --pill-depth: var(--desktop-depth);
  }

  .float-pill[data-emphasis="primary"] {
    --pill-width: clamp(100px, 17.8cqw, 128px);
    --pill-height: 48px;
    padding-inline: 12px;
  }
}

@media (min-width: 1200px) {
  #intro { --heading-1: 600 48px/48px var(--hero-font); }
}

@media (min-width: 1400px) {
  #intro { --heading-1: 600 60px/60px var(--hero-font); }
}

@media (min-width: 1024px) and (max-height: 700px) {
  #intro { padding-block: 80px 48px; }
  .intro-layout { row-gap: 24px; }
  .intro-stage { --scene-height-budget: 224px; }
}

@media (max-width: 600px) {
  #intro { padding-bottom: 32px; }

  .intro-stage {
    --orbit-size: min(430px, calc(100vw - 32px));
    --pill-width: 84px;
    --pill-height: 40px;
  }

  .float-pill {
    justify-content: center;
    gap: 4px;
    padding-inline: 2px;
  }

  .float-pill img { width: 16px; height: 16px; }
}

@media (max-width: 375px) {
  .intro-stage {
    --pill-width: 80px;
    --pill-height: 32px;
  }

  .provider-caption small { display: none; }
}

@media (max-width: 359px) {
  #intro { --heading-1: 600 30px/36px var(--hero-font); }
  .float-pill img { width: 12px; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #intro .hero-enter,
  #intro .hero-providers,
  #intro .model-connections.is-active {
    animation: hero-fade 200ms var(--hero-ease) backwards !important;
  }

  #intro .hero-action:active { transform: none; }
}

@media (forced-colors: active) {
  .hero-sky { display: none; }

  .hero-line {
    background: none;
    color: CanvasText;
  }
}
