/* ============================================================
   MiniMax H3 on fal.ai — authored design system
   Palette: ink dark + volt signal, modality-coded accents
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (meta)
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07070b;
  --bg-raised: #0c0c13;
  --surface: #11111a;
  --surface-2: #161622;
  --line: rgba(244, 243, 239, 0.09);
  --line-strong: rgba(244, 243, 239, 0.16);
  --ink: #f4f3ef;
  --dim: #a5a4b2;
  --faint: #6d6c7c;

  --volt: #c8f53c;
  --volt-soft: rgba(200, 245, 60, 0.14);
  --m-text: #8e7bff;
  --m-image: #3fe0e8;
  --m-video: #ff8a4c;
  --m-audio: #ff5ca2;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --head-h: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.55s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
::selection { background: var(--volt); color: #0b0b10; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.dim { color: var(--dim); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.i { flex: none; }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  background: var(--volt); color: #0b0b10;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  padding: 0.55rem 0.9rem; border-radius: 8px;
  transform: translateY(-260%);
  transition: transform 0.25s var(--ease-out);
}
.skip-link:focus-visible { transform: none; outline: none; }

/* Film grain texture */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

.wrap { width: min(var(--wrap), calc(100% - clamp(2rem, 6vw, 5rem))); margin-inline: auto; }
.wrap--narrow { --wrap: 880px; }

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-size: 0.865rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.55rem 1.05rem; border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
              color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--ink); color: #0b0b10; }
.btn--primary:hover { background: var(--volt); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); border-color: rgba(244, 243, 239, 0.3); }
.btn--lg { padding: 0.8rem 1.5rem; font-size: 0.95rem; border-radius: 11px; }

.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.42rem 0.8rem; border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--dim);
  backdrop-filter: blur(6px);
}
.chip--volt { color: var(--volt); border-color: rgba(200, 245, 60, 0.35); background: var(--volt-soft); }

.tag {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  color: var(--dim); border: 1px solid var(--line);
  padding: 0.22rem 0.55rem; border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}

/* ---------- Topline announcement ---------- */
.topline {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
  font-size: 0.8rem;
  position: relative; z-index: 60;
}
.topline__link {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 1rem; color: var(--dim);
  transition: color 0.2s;
}
.topline__link:hover { color: var(--ink); }
.topline__link .mono { color: var(--volt); font-size: 0.72rem; }
.topline__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 8px var(--volt);
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-head.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); }
.site-head__inner { display: flex; align-items: center; gap: 2rem; height: var(--head-h); }

.brand { display: inline-flex; align-items: center; gap: 0.8rem; }
.brand__text { font-family: var(--font-display); font-size: 22px; font-weight: 700; fill: var(--ink); letter-spacing: -0.04em; }
.brand__sq { fill: var(--volt); }
.brand__sep { width: 1px; height: 18px; background: var(--line-strong); }
.brand__model { font-size: 0.78rem; color: var(--dim); }

.site-nav { display: flex; gap: 0.25rem; margin-inline: auto; }
.site-nav a {
  font-size: 0.87rem; color: var(--dim);
  padding: 0.45rem 0.75rem; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-head__actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 9px;
  align-items: center;
}
.nav-toggle span { width: 16px; height: 1.6px; background: var(--ink); transition: transform 0.25s var(--ease-out), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

.mobile-nav[hidden] { display: none; }
.mobile-nav {
  position: fixed; inset: 0; z-index: 99;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
  padding: calc(var(--head-h) + 42px) clamp(1.4rem, 6vw, 3rem) 2rem;
  display: flex; flex-direction: column; gap: 2rem;
}
.mobile-nav nav { display: flex; flex-direction: column; }
.mobile-nav nav a {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.mobile-nav nav a:hover { color: var(--volt); }
.mobile-nav__actions { display: flex; gap: 0.7rem; }
.mobile-nav__actions .btn { flex: 1; }

/* ---------- Section scaffolding ---------- */
section[id], main [id] { scroll-margin-top: calc(var(--head-h) + 16px); }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); position: relative; }
.section--raised { background: var(--bg-raised); border-block: 1px solid var(--line); }
.section > .wrap > * + * { margin-top: clamp(2.5rem, 5vw, 4rem); }

.eyebrow {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); display: flex; align-items: center; gap: 0.7rem;
  margin-bottom: 1.1rem;
}
.eyebrow__idx { color: var(--volt); }
.eyebrow::after { content: ""; height: 1px; flex: 1; max-width: 72px; background: var(--line-strong); }

.h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04; letter-spacing: -0.035em;
}
.h2 .dim { color: var(--faint); }
.h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15; letter-spacing: -0.025em;
}
.section__lede { max-width: 620px; color: var(--dim); margin-top: 1.2rem; font-size: 1.05rem; }
.grad {
  background: linear-gradient(100deg, var(--volt) 10%, var(--m-image) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reveal motion ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: min(94svh, 1020px);
  display: flex; align-items: center;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  padding-block: 4.5rem 4rem;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  opacity: 0.5;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(7, 7, 11, 0.94) 20%, transparent 65%),
    linear-gradient(180deg, rgba(7, 7, 11, 0.86) 0%, rgba(7, 7, 11, 0.42) 34%, rgba(7, 7, 11, 0.55) 62%, var(--bg) 100%);
}
.hero__aurora {
  position: absolute; width: 44vw; aspect-ratio: 1; border-radius: 50%;
  filter: blur(90px); opacity: 0.16; mix-blend-mode: screen;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero__aurora--a { background: var(--volt); top: -12%; left: -8%; }
.hero__aurora--b { background: var(--m-text); bottom: -6%; right: -6%; animation-delay: -8s; animation-duration: 20s; }
@keyframes drift {
  to { transform: translate3d(6vw, 4vh, 0) scale(1.15); }
}

.hero__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.4rem, 10.5vw, 7.2rem);
  letter-spacing: -0.045em; line-height: 0.98;
  margin-top: 1.6rem;
}
.hero__sub {
  max-width: 620px; color: var(--dim); font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  margin-top: 1.3rem; text-wrap: balance;
}

/* Composer */
.composer {
  width: min(760px, 100%);
  margin-top: 2.4rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0.65rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.9);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.composer:focus-within {
  border-color: rgba(200, 245, 60, 0.45);
  box-shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.9), 0 0 0 4px rgba(200, 245, 60, 0.08);
}
.composer__modes { display: flex; gap: 0.3rem; padding: 0.25rem 0.25rem 0.6rem; flex-wrap: wrap; }
.composer__mode {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--faint); border: 1px solid transparent;
  padding: 0.38rem 0.7rem; border-radius: 8px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.composer__mode:hover { color: var(--dim); }
.composer__mode.is-active { color: var(--volt); background: var(--volt-soft); border-color: rgba(200, 245, 60, 0.3); }
.composer__field {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 15px; padding: 0.45rem 0.45rem 0.45rem 1.1rem;
}
.composer__field input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  font-size: 1rem; padding-block: 0.55rem;
}
.composer__field input::placeholder { color: var(--faint); }
.composer__count { font-size: 0.68rem; color: var(--faint); flex: none; }
.composer__go {
  flex: none; display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--volt); color: #0b0b10;
  font-weight: 700; font-size: 0.92rem;
  padding: 0.7rem 1.25rem; border-radius: 10px;
  transition: filter 0.2s, transform 0.15s var(--ease-out), box-shadow 0.2s;
  box-shadow: 0 6px 24px -10px rgba(200, 245, 60, 0.55);
}
.composer__go:hover { filter: brightness(1.07); box-shadow: 0 10px 30px -10px rgba(200, 245, 60, 0.7); }
.composer__go:active { transform: translateY(1px); }
.composer__note { font-size: 0.72rem; color: var(--faint); text-align: left; padding: 0.65rem 0.5rem 0.15rem; }

/* Multimodality diagram */
.context-flow {
  margin-top: 2.6rem; width: min(680px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.context-flow__inputs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; }
.m-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; color: var(--dim);
  animation: chipPulse 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.m-chip i {
  font-style: normal; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.06em; padding: 0.18rem 0.42rem; border-radius: 5px;
  color: var(--bg); background: var(--dim);
}
.m-chip--text i { background: var(--m-text); }
.m-chip--image i { background: var(--m-image); }
.m-chip--video i { background: var(--m-video); }
.m-chip--audio i { background: var(--m-audio); }
@keyframes chipPulse {
  0%, 100% { opacity: 0.62; }
  12% { opacity: 1; text-shadow: 0 0 18px currentColor; }
  26% { opacity: 0.62; }
}
.context-flow__wires { width: 100%; height: 74px; margin-top: -2px; }
.wire {
  stroke: var(--faint); stroke-width: 1.1; opacity: 0.9;
  stroke-dasharray: 4 7;
  animation: wireFlow 2.4s linear infinite;
  animation-delay: var(--d, 0s);
}
.wire--out { stroke: var(--volt); }
@keyframes wireFlow { to { stroke-dashoffset: -22; } }
.context-flow__core {
  position: relative; display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.74rem; letter-spacing: 0.05em; color: var(--volt);
  border: 1px solid rgba(200, 245, 60, 0.35); border-radius: 99px;
  padding: 0.5rem 1.05rem; background: rgba(200, 245, 60, 0.07);
  backdrop-filter: blur(6px);
  white-space: nowrap; max-width: 100%; overflow: hidden;
}
@media (max-width: 620px) {
  .context-flow__core { font-size: 0.64rem; padding: 0.45rem 0.8rem; letter-spacing: 0.02em; }
}
.context-flow__pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--volt);
  animation: corePulse 1.8s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 245, 60, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(200, 245, 60, 0); }
}

/* Hero stats */
.hero__stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-raised) 70%, transparent);
  backdrop-filter: blur(8px);
  max-width: 100%;
}
.hero__stats > div {
  display: flex; flex-direction: column; gap: 0.15rem; align-items: center;
  padding: 0.9rem 1.6rem;
}
.hero__stats > div + div { border-left: 1px solid var(--line); }
.hero__stats dt { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); order: 2; }
.hero__stats dd { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; order: 1; }

/* ============================================================
   CAPABILITIES
   ============================================================ */
.caps { display: flex; flex-direction: column; gap: clamp(3.5rem, 7vw, 6rem); }
.cap {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center;
}
.cap--flip .cap__media { order: 2; }
.cap--flip .cap__body { order: 1; }

.cap__media { position: relative; }
.frame {
  position: relative; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}
.frame video, .frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.7s var(--ease-out);
}
.cap:hover .frame video { transform: scale(1.035); }
.cap__badge {
  position: absolute; top: 0.85rem; left: 0.85rem;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: rgba(7, 7, 11, 0.66);
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 0.34rem 0.6rem; backdrop-filter: blur(6px);
}
.cap__num { color: var(--volt); font-size: 0.74rem; letter-spacing: 0.1em; margin-bottom: 0.9rem; }
.cap__body p:not(.cap__num):not(.cap__meta) { color: var(--dim); margin-top: 1rem; max-width: 46ch; }
.cap__meta { margin-top: 1.3rem; font-size: 0.72rem; color: var(--faint); letter-spacing: 0.03em; }

/* ============================================================
   EXAMPLES GALLERY
   ============================================================ */
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  grid-column: span 6;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.card:nth-child(6n + 1), .card:nth-child(6n + 4) { grid-column: span 7; }
.card:nth-child(6n + 2), .card:nth-child(6n + 3) { grid-column: span 5; }
.card:nth-child(6n + 5), .card:nth-child(6n + 6) { grid-column: span 6; }
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 1);
}
.card__media { position: relative; }
.card__media .frame { border: 0; border-radius: 0; }
.card__media video { transition: transform 0.8s var(--ease-out); }
.card:hover .card__media video { transform: scale(1.045); }
.card__tag {
  position: absolute; top: 0.85rem; left: 0.85rem;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.34rem 0.6rem; border-radius: 7px;
  color: var(--bg); backdrop-filter: blur(6px);
}
.card__tag--text { background: var(--m-text); }
.card__tag--image { background: var(--m-image); }
.card__tag--video { background: var(--m-video); }
.card__tag--audio { background: var(--m-audio); }

.card__body { padding: 1.25rem 1.35rem 1.35rem; display: flex; flex-direction: column; gap: 0.85rem; flex: 1; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.02em; }

.card__prompt {
  position: relative;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.9rem 1rem 0.85rem;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.65; color: var(--dim);
  display: flex; flex-direction: column; gap: 0.7rem; flex: 1;
}
.card__prompt::before {
  content: "PROMPT"; position: absolute; top: -0.5rem; left: 0.8rem;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em;
  background: var(--surface); color: var(--faint);
  padding: 0 0.45rem; border-radius: 99px; border: 1px solid var(--line);
  line-height: 1rem; height: 1rem;
}
.card__prompt-text { margin: 0; }
.card__prompt-text.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card__prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; }
.card__expand {
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--faint);
  letter-spacing: 0.04em; text-decoration: underline; text-underline-offset: 3px;
}
.card__expand:hover { color: var(--ink); }

.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 0.4rem 0.7rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s var(--ease-out);
}
.copy-btn:hover { border-color: rgba(200, 245, 60, 0.5); color: var(--volt); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn.is-copied { background: var(--volt-soft); border-color: rgba(200, 245, 60, 0.5); color: var(--volt); }
.copy-btn .i--check { display: none; }
.copy-btn.is-copied .i--check { display: block; }
.copy-btn.is-copied .i--copy { display: none; }

/* ============================================================
   ENDPOINTS
   ============================================================ */
.ep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.ep {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.ep:hover {
  border-color: rgba(200, 245, 60, 0.35);
  transform: translateY(-5px);
  box-shadow: 0 34px 80px -46px rgba(0, 0, 0, 1), 0 0 0 1px rgba(200, 245, 60, 0.12);
}
.ep__media { border: 0; border-radius: 0; aspect-ratio: 4 / 3; }
.ep__media img { transition: transform 0.8s var(--ease-out); }
.ep:hover .ep__media img { transform: scale(1.04); }
.ep__body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.ep__provider { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; flex-wrap: wrap; }
.ep__logo { width: 18px; height: 18px; border-radius: 5px; background: #fff; padding: 2px; object-fit: contain; }
.ep__spec { font-size: 0.7rem; color: var(--volt); letter-spacing: 0.03em; }
.ep__desc { color: var(--dim); font-size: 0.92rem; line-height: 1.65; }
.ep__foot { margin-top: auto; display: flex; flex-direction: column; gap: 0.8rem; padding-top: 0.4rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ep__path {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: var(--faint);
  border-top: 1px solid var(--line); padding-top: 0.85rem;
  transition: color 0.2s; word-break: break-all;
}
.ep:hover .ep__path { color: var(--volt); }
.ep__path .i { transition: transform 0.25s var(--ease-out); }
.ep:hover .ep__path .i { transform: translate(2px, -2px); }

/* ============================================================
   API / CODEBOX
   ============================================================ */
.codebox {
  background: #0a0a10;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px -60px rgba(0, 0, 0, 1);
}
.codebox__bar {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.8rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.codebox__group { display: flex; align-items: center; gap: 0.5rem; }
.codebox__group:first-child { flex: 1; min-width: 0; }
.seg {
  display: inline-flex; gap: 0.2rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0.2rem;
}
.seg__btn {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--faint); padding: 0.4rem 0.75rem; border-radius: 7px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.seg__btn:hover { color: var(--dim); }
.seg__btn.is-active { background: var(--surface-2); color: var(--volt); }
.seg--lang .seg__btn { min-width: 44px; }
.codebox__file {
  font-size: 0.7rem; color: var(--faint); letter-spacing: 0.04em;
  padding: 0.65rem 1.2rem; border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}
.codebox__pre {
  margin: 0; padding: 1.3rem 1.4rem 1.5rem;
  overflow-x: auto; max-height: 560px;
  font-family: var(--font-mono); font-size: 0.79rem; line-height: 1.68;
  tab-size: 2;
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.codebox__pre code { white-space: pre; }
.tok-kw { color: #c792ea; }
.tok-str { color: var(--volt); }
.tok-num { color: #ff8a4c; }
.tok-fn { color: #3fe0e8; }
.tok-com { color: #565664; font-style: italic; }
.tok-pn { color: #8d8d9e; }
.api-meta { margin-top: 1.1rem; font-size: 0.72rem; color: var(--faint); text-align: center; }
.inline-link { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: color 0.2s; }
.inline-link:hover { color: var(--volt); }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: baseline; gap: 1rem; text-align: left;
  padding: 1.35rem 0.25rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -0.015em; line-height: 1.3;
  transition: color 0.2s;
}
.faq__q:hover { color: var(--volt); }
.faq__no { font-family: var(--font-mono); font-size: 0.68rem; color: var(--faint); letter-spacing: 0.08em; flex: none; transform: translateY(-2px); }
.faq__icon {
  margin-left: auto; flex: none; align-self: center;
  width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center;
  transition: transform 0.35s var(--ease-out), border-color 0.2s, background 0.2s;
}
.faq__icon svg { transition: transform 0.35s var(--ease-out); }
.faq__item.is-open .faq__icon { transform: rotate(45deg); border-color: rgba(200, 245, 60, 0.5); background: var(--volt-soft); }
.faq__item.is-open .faq__icon svg { stroke: var(--volt); }
.faq__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
.faq__a p {
  color: var(--dim); max-width: 62ch;
  padding: 0 0.25rem 1.5rem calc(2.1rem + 0.25rem);
}
.faq__a a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(200, 245, 60, 0.45); transition: color 0.2s; }
.faq__a a:hover { color: var(--volt); }

/* ============================================================
   EXPLORE MARQUEE
   ============================================================ */
.explore { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.explore__head { margin-bottom: 1.6rem; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; gap: 0.7rem; width: max-content;
  animation: marquee 42s linear infinite;
  padding-block: 0.2rem;
}
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.model-chip {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--dim); white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 99px;
  padding: 0.7rem 1.3rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.model-chip::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--faint); transition: background 0.2s; }
.model-chip:hover { color: var(--ink); border-color: rgba(200, 245, 60, 0.5); background: var(--volt-soft); }
.model-chip:hover::before { background: var(--volt); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding-bottom: clamp(5rem, 10vw, 9rem); }
.contact__card {
  position: relative; overflow: clip;
  border: 1px solid var(--line-strong); border-radius: calc(var(--radius-lg) + 6px);
  background: var(--bg-raised);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 5rem);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}
.contact__card .eyebrow { justify-content: center; }
.contact__card .eyebrow::before { content: ""; height: 1px; width: 40px; background: var(--line-strong); }
.contact__card .eyebrow::after { max-width: 40px; }
.contact__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 0%, rgba(200, 245, 60, 0.1), transparent 70%),
    radial-gradient(50% 50% at 85% 100%, rgba(142, 123, 255, 0.09), transparent 70%);
}
.contact__lede { color: var(--dim); max-width: 46ch; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 0.6rem; }
.contact__card > * { position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--bg-raised); }
.footer__top {
  display: grid; grid-template-columns: 220px 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 6vw, 5rem);
}
.footer__brand { display: flex; flex-direction: column; gap: 1.4rem; }
.footer__socials { display: flex; gap: 0.4rem; }
.footer__socials a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; color: var(--faint);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.footer__socials a:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-2px); }
.footer__cols {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
}
.footer__col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer__col h3 { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.5rem; }
.footer__col a { font-size: 0.86rem; color: var(--dim); width: fit-content; transition: color 0.15s; }
.footer__col a:hover { color: var(--volt); }
.footer__col a[aria-current="page"] { color: var(--volt); }
.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--line);
  padding-block: 1.4rem; font-size: 0.78rem; color: var(--faint);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer__legal a { transition: color 0.15s; }
.footer__legal a:hover { color: var(--ink); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .cap, .cap--flip { grid-template-columns: 1fr; }
  .cap--flip .cap__media { order: 0; }
  .cap--flip .cap__body { order: 1; }
  .ep-grid { grid-template-columns: 1fr; }
  .ep { flex-direction: row; }
  .ep__media { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-head__actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .gallery { grid-template-columns: 1fr; }
  .card, .card:nth-child(n) { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --head-h: 58px; }
  .hero { padding-block: 3rem; min-height: auto; }
  .hero__video { opacity: 0.34; }
  .composer__count { display: none; }
  .composer__go { padding: 0.7rem 0.95rem; }
  .context-flow__wires { height: 52px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .hero__stats > div { padding: 0.8rem 0.5rem; }
  .hero__stats > div + div { border-left: 0; }
  .hero__stats > div:nth-child(3n + 2), .hero__stats > div:nth-child(3n + 3) { border-left: 1px solid var(--line); }
  .hero__stats > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .codebox__bar { gap: 0.5rem; }
  .seg--lang { order: 3; }
  .codebox__group:first-child { order: 1; flex-basis: 100%; }
  .codebox__group:first-child .seg { overflow-x: auto; max-width: 100%; }
  .copy-btn { margin-left: auto; }
  .faq__a p { padding-left: 0.25rem; }
  .contact__actions .btn { width: 100%; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .hero__aurora { display: none; }
}
