/* ============================================================================
   Splice — cinematic dark design system.
   Aurora atmosphere, restrained typography, tame motion. One accent, used rarely.
   ========================================================================== */

:root {
  --bg: #06080f;
  --bg-2: #090c15;
  --panel: rgba(255, 255, 255, 0.026);
  --panel-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);

  --ink: #f4f6fb;
  --ink-2: rgba(244, 246, 251, 0.62);
  --ink-3: rgba(244, 246, 251, 0.4);

  --accent: #67e8c3;         /* aurora teal — used sparingly */
  --accent-2: #7dd3fc;
  --accent-glow: rgba(103, 232, 195, 0.35);

  --code-ink: #d7dce6;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(103, 232, 195, 0.24); }

a { color: inherit; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.container.narrow { max-width: 760px; }
.container.center { text-align: center; }

/* ── Aurora media layer (shared) ───────────────────────────────────────────── */

.media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #05070d;
}

.media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.82) contrast(1.05);
  animation: media-in 1.8s var(--ease) both;
}

@keyframes media-in {
  from { opacity: 0; transform: scale(1.07); }
  to   { opacity: 1; transform: scale(1); }
}

.media-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 100% at 50% 8%, rgba(6, 8, 15, 0) 32%, rgba(6, 8, 15, 0.55) 100%),
    linear-gradient(180deg,
      rgba(6, 8, 15, 0.6) 0%,
      rgba(6, 8, 15, 0.34) 32%,
      rgba(6, 8, 15, 0.55) 66%,
      var(--bg) 100%);
}

/* ── Nav ───────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.nav.scrolled {
  background: rgba(8, 11, 20, 0.58);
  backdrop-filter: saturate(190%) blur(22px);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px -24px rgba(0, 0, 0, 0.9);
}

/* a hairline of light along the top edge of the glass */
.nav.scrolled .nav-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14) 30%, rgba(255, 255, 255, 0.14) 70%, transparent);
}

/* reading progress — the bar fills as the page is consumed */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, rgba(103, 232, 195, 0) 0%, var(--accent) 85%, #fff 100%);
  box-shadow: 0 0 14px var(--accent-glow);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.nav.scrolled::after { opacity: 1; }

.nav-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 17px 28px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
}

.brand svg { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: #fff; }

.nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn-sm { padding: 9px 16px; font-size: 14px; }

.btn-primary {
  background: #fff;
  color: #0a0d16;
  box-shadow: 0 10px 34px -12px rgba(0, 0, 0, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-glass {
  color: #fff;
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }

.btn-arrow::after {
  content: "→";
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}
.btn:hover .btn-arrow::after,
.btn-arrow:hover::after { transform: translateX(3px); }

/* ── Pills / eyebrow ───────────────────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: dot-pulse 2.6s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Home hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 130px 0 100px;
  overflow: hidden;
  isolation: isolate;
}

.hero-content { animation: rise 1.1s var(--ease) both; animation-delay: 0.15s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); filter: blur(9px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.hero h1 {
  font-size: clamp(42px, 6.8vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.038em;
  font-weight: 700;
  margin-top: 26px;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 50px rgba(0, 0, 0, 0.4);
}

.hero .lede {
  max-width: 560px;
  margin: 24px auto 0;
  font-size: 18.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 38px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 22px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.48);
}

/* ── Inner page header band (aurora, shorter) ──────────────────────────────── */

.pagehead {
  position: relative;
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px 0 56px;
  overflow: hidden;
  isolation: isolate;
}

.pagehead .container { animation: rise 0.8s var(--ease) both; }

.pagehead h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-top: 20px;
  color: #fff;
  text-wrap: balance;
}

.pagehead .lede {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.72);
}

/* ── Sections ──────────────────────────────────────────────────────────────── */

.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }

.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }

.section h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.028em;
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}

.section-lede {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-2);
  max-width: 620px;
}
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }

.kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

code.inline {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: #e6ebf3;
}

/* ── Stats strip ───────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat {
  padding: 4px 24px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--line); }

.stat strong {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ── Feature bento ─────────────────────────────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 48px;
}

/* Borderless editorial cell: a hairline that lights up, standalone accent icon. */
.card {
  position: relative;
  padding: 28px 0 6px;
  border-top: 1px solid var(--line);
  transition: transform 0.35s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 40px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent-glow);
  opacity: 0;
  transition: opacity 0.4s ease, width 0.5s var(--ease);
  pointer-events: none;
}

.card:hover { transform: translateY(-3px); }
.card:hover::before { opacity: 1; width: 72%; }

.card-wide { grid-column: span 2; }

/* mono index instead of an icon — typographic, minimal */
.card-idx {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 20px;
  transition: color 0.3s ease, transform 0.3s var(--ease);
}
.card:hover .card-idx { color: #9df3da; transform: translateX(2px); }

.card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}

.card p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 44ch;
}

/* mini code visual inside the wide card */
.card-code {
  margin-top: 22px;
  max-width: 520px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--code-ink);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(103, 232, 195, 0.45);
  border-radius: 0 10px 10px 0;
  padding: 16px 18px;
  overflow-x: auto;
}
.card-code .tok-key { color: var(--accent-2); }
.card-code .tok-ok { color: var(--accent); }
.card-code .tok-dim { color: var(--ink-3); }

/* compact secondary feature list */
.mini-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 48px;
  margin-top: 20px;
}

.mini {
  padding: 26px 0 4px;
  border-top: 1px solid var(--line);
}

.mini-idx {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}
.mini strong { display: block; font-size: 15.5px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.mini span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }

/* ── Steps ─────────────────────────────────────────────────────────────────── */

.steps { display: grid; gap: 0; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 26px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  transition: transform 0.35s var(--ease);
}
.step:hover { transform: translateX(2px); }

.step-num {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
  padding-top: 3px;
  letter-spacing: 0.02em;
}
.step-num::before { content: "0"; opacity: 0.4; }

.step h3 { font-size: 18px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.step p { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 620px; }

/* ── Code blocks ───────────────────────────────────────────────────────────── */

.code {
  position: relative;
  margin-top: 18px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 195, 0.4), transparent);
}

.code pre { padding: 18px 20px; overflow-x: auto; }

.code code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--code-ink);
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.copy-btn.copied { color: var(--accent); border-color: rgba(103, 232, 195, 0.4); }

/* ── Film ──────────────────────────────────────────────────────────────────── */

/* The Remotion-rendered session. Its canvas is --bg, so it melts into the page
   with no frame, no border, no box. */
.film {
  position: relative;
  margin: 56px auto 0;
  max-width: 1180px;
}

.film video {
  display: block;
  width: 100%;
  height: auto;
}

.film-note {
  margin-top: 22px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Agent-readable contract ───────────────────────────────────────────────── */

.contract { display: grid; gap: 0; margin-top: 8px; }

.contract-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.contract-key {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.contract-val { font-size: 15px; color: var(--ink-2); }
.contract-val strong { color: #fff; font-weight: 600; }
.contract-val .cmd {
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--code-ink);
  margin-top: 6px;
}

/* ── Callout ───────────────────────────────────────────────────────────────── */

.callout {
  position: relative;
  border-top: 1px solid var(--line);
  background: radial-gradient(90% 150% at 50% 0%, rgba(103, 232, 195, 0.08), transparent 62%);
  padding: 84px 40px 20px;
  text-align: center;
}
.callout h2 { font-size: clamp(30px, 4vw, 46px); }

/* ── Footer ────────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0;
  background: var(--bg-2);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .brand { font-size: 15px; }

.footer-links { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }

.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: #fff; }

.footer-copy { width: 100%; font-size: 13px; color: var(--ink-3); }

/* ── Scroll reveal ─────────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.07s; }
[data-reveal][data-delay="2"] { transition-delay: 0.14s; }
[data-reveal][data-delay="3"] { transition-delay: 0.21s; }
[data-reveal][data-delay="4"] { transition-delay: 0.28s; }
[data-reveal][data-delay="5"] { transition-delay: 0.35s; }

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
  .card-wide { grid-column: span 2; }
  .mini-list { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .stat + .stat { border-left: none; }
  .stat:nth-child(n + 2) { border-left: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: none; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .bento { grid-template-columns: 1fr; gap: 4px; }
  .card-wide { grid-column: span 1; }
  .mini-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 0; }
  .stat { padding: 22px 0; text-align: left; }
  .stat:nth-child(n) { border-left: none; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .section { padding: 68px 0; }
  .hero { padding: 108px 0 84px; }
  .step { grid-template-columns: 40px 1fr; gap: 16px; padding: 26px 0; }
  .callout { padding: 60px 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}
