/* StrataLLM landing. Graphite neutrals + one signal orange; one radius system: cards 22px, everything you click is a pill. */
:root {
  --bg: #f3f3f2;
  --bg-2: #ebebea;
  --surface: #ffffff;
  --fg: #151515;
  --muted: #62615e;
  --line: #e0dfdc;
  --accent: #e2480f;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --cell-3d: #cfceca;
  --plate-3d: #e6e5e2;
  --line-3d: #bdbcb8;
  --shadow: 0 24px 60px -28px rgb(40 30 20 / .28);
  --r: 22px;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0d;
    --bg-2: #111112;
    --surface: #161617;
    --fg: #ededec;
    --muted: #8d8c88;
    --line: #242426;
    --accent: #ff6a2b;
    --accent-ink: #160903;
    --cell-3d: #2e2e30;
    --plate-3d: #141415;
    --line-3d: #303033;
    --shadow: 0 30px 80px -30px rgb(0 0 0 / .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0d; --bg-2: #111112; --surface: #161617; --fg: #ededec; --muted: #8d8c88; --line: #242426;
  --accent: #ff6a2b; --accent-ink: #160903; --cell-3d: #2e2e30; --plate-3d: #141415; --line-3d: #303033;
  --shadow: 0 30px 80px -30px rgb(0 0 0 / .8); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; }
p { margin: 0; }
.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 500; font-size: 15px;
  transition: transform .4s var(--ease), background .2s, border-color .2s, box-shadow .3s;
  will-change: transform;
}
.btn i { font-size: 18px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 16px 40px -14px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-ghost { border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--fg) 30%, transparent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-inner { height: 64px; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; }
.logo-mark { display: grid; gap: 2px; width: 18px; }
.logo-mark i { height: 4px; border-radius: 1px; background: var(--accent); }
.logo-mark i:nth-child(1) { opacity: .4; } .logo-mark i:nth-child(2) { opacity: .7; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.gh { display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--mono); color: var(--muted); }
.gh i { font-size: 18px; }
.gh:hover { color: var(--fg); }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100dvh - 64px); display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 24px;
  padding-top: 32px; padding-bottom: 32px;
}
.eyebrow { font: 500 13px var(--mono); color: var(--accent); margin-bottom: 22px; }
/* token pills */
.token { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  font: 500 13px var(--mono); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--fg); white-space: nowrap;
}
.pill i { font-size: 15px; }
.pill-ticker { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.pill-ca { cursor: pointer; transition: border-color .2s, transform .3s var(--ease); }
.pill-ca .ca-label { color: var(--muted); }
.pill-ca i { color: var(--muted); }
.pill-ca:not(:disabled):hover { border-color: color-mix(in srgb, var(--fg) 35%, transparent); }
.pill-ca:not(:disabled):active { transform: scale(.97); }
.pill-ca:disabled { cursor: default; }
.pill-ca:disabled i { display: none; }
.pill-ca.copied { border-color: var(--accent); }
.pill-ca.copied i { color: var(--accent); }
.hero-title { font-size: clamp(2.7rem, 5.6vw, 4.6rem); max-width: 11ch; }
.hero-title .w { display: inline-block; }
.hero-title .accent { color: var(--accent); }
.hero-sub { margin-top: 24px; font-size: 1.15rem; color: var(--muted); max-width: 38ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-visual { position: relative; height: min(68vh, 620px); min-height: 380px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 10% 5% 0; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%); filter: blur(10px);
}
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.tag {
  position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap;
  display: flex; flex-direction: column; font: 400 12px/1.35 var(--mono); color: var(--muted);
  padding-left: 12px; border-left: 1px solid var(--line); margin-top: -14px;
  transition: opacity .4s;
}
.tag b { font: 600 13px var(--sans); color: var(--fg); letter-spacing: -0.01em; }
.tag[data-label="out"] { border-left: 0; padding-left: 0; margin-top: -28px; margin-left: -34px; }
.tag[data-label="out"] b { color: var(--accent); font: 500 12px var(--mono); }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  padding-top: 40px; padding-bottom: 72px; border-top: 1px solid var(--line);
}
.stat b { display: block; font-size: clamp(1.9rem, 3.2vw, 2.6rem); font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- section heads ---------- */
.section-title { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 18ch; }
.section-sub { color: var(--muted); font-size: 1.08rem; max-width: 56ch; margin-top: 16px; }

/* ---------- how (sticky 3D story) ---------- */
.how { background: var(--bg-2); border-block: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; }
.how-sticky { position: relative; }
.how-visual { position: sticky; top: 64px; height: calc(100dvh - 64px); }
.how-steps { padding: 18vh 0 22vh; }
.how-steps .section-title { margin-bottom: 18vh; }
.step {
  min-height: 58vh; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  opacity: .28; transform: translateY(14px); transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.step.is-active { opacity: 1; transform: none; }
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.step p { color: var(--muted); font-size: 1.08rem; max-width: 42ch; }
.step-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 22px;
}

/* ---------- built (bento) ---------- */
.built { padding-top: 140px; padding-bottom: 60px; }
.bento {
  margin-top: 48px; display: grid; gap: 18px;
  grid-template-columns: 1.55fr 1fr; grid-template-rows: auto auto;
  grid-template-areas: "watch check" "watch data";
}
.tile {
  position: relative; overflow: hidden; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 22px;
  transform-style: preserve-3d; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), border-color .3s, box-shadow .4s;
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.tile:hover::after { opacity: 1; }
.tile h3 { font-size: 1.55rem; }
.tile p { color: var(--muted); margin-top: 8px; max-width: 46ch; }
.tile-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 500; color: var(--accent); font-size: 15px; }
.tile-link i { transition: transform .4s var(--ease); }
.tile:hover .tile-link i { transform: translateX(4px); }
.tile-watch { grid-area: watch; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface) 55%); }
.tile-check { grid-area: check; }
.tile-data { grid-area: data; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transform: translateZ(30px); }
.tile-watch .shot { margin-top: auto; }
.tile-check .shot img { aspect-ratio: 16 / 7; object-fit: cover; object-position: top; }

.mini-bars { display: grid; gap: 9px; }
.mini-bar { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; font: 12px var(--mono); }
.mini-bar span:first-child { text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar i { display: block; height: 8px; border-radius: 999px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease); }
.mini-bars.in .mini-bar i { transform: scaleX(var(--w)); }
.mini-bar b { text-align: right; font-weight: 500; }
.tile-data .tile-link { margin-top: auto; }

/* ---------- use (steps + code) ---------- */
.use { padding-top: 120px; padding-bottom: 60px; }
.use-grid { margin-top: 48px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
.use-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.use-step {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--r); border: 1px solid transparent; background: transparent;
  transition: background .3s, border-color .3s;
}
.use-step b { display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.use-step span:last-child { color: var(--muted); font-size: 15px; }
.use-step .n {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--line); font: 500 14px var(--mono); color: var(--muted); transition: all .3s;
}
.use-step:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.use-step.is-active { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.use-step.is-active .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.code { border-radius: var(--r); background: #111112; color: #e6e5e2; border: 1px solid #232325; overflow: hidden; box-shadow: var(--shadow); }
.code-tabs { position: relative; display: flex; gap: 2px; padding: 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid #232325; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tabs button {
  position: relative; z-index: 1; flex: none; font: 500 13px var(--sans); color: #8d8c88; background: none; border: 0;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: color .25s;
}
.code-tabs button[aria-selected="true"] { color: #f2f2f0; }
.tab-ink { position: absolute; z-index: 0; top: 8px; height: 34px; left: 0; width: 0; border-radius: 999px; background: #232325; transition: transform .5s var(--ease), width .5s var(--ease); }
.code-body { position: relative; min-height: 250px; }
.code pre { margin: 0; padding: 26px 28px 30px; overflow-x: auto; font: 14px/1.75 var(--mono); }
.code pre:not([hidden]) { animation: codeIn .5s var(--ease); }
.code .c { color: #6d6c68; }
.copy {
  position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px var(--sans); color: #c4c3bf; background: #1c1c1e; border: 1px solid #2c2c2f; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: background .2s;
}
.copy:hover { background: #262628; }
@keyframes codeIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- why (uneven grid) ---------- */
.why { padding-top: 120px; padding-bottom: 60px; }
.why-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-cell {
  position: relative; overflow: hidden; border-radius: var(--r); padding: 28px; min-height: 230px;
  background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
}
.why-cell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
}
.why-cell:hover::before { opacity: 1; }
.why-cell i { font-size: 28px; color: var(--accent); margin-bottom: auto; }
.why-cell h3 { font-size: 1.35rem; margin-top: 32px; }
.why-cell p { color: var(--muted); font-size: 15px; }
.why-wide { grid-column: span 2; }
.why-wide h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); max-width: 16ch; }
.why-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.why-accent i, .why-accent p { color: inherit; }
.why-accent p { opacity: .8; }
.why-accent::before { background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / .22), transparent 65%); }

/* ---------- source (credit) ---------- */
.source { padding-top: 140px; padding-bottom: 60px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.source-shot { margin: 0; perspective: 1400px; }
.source-shot img { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); transform-origin: center bottom; }
.source-shot figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }
.source-copy p { color: var(--muted); margin-top: 18px; font-size: 1.05rem; }
.repo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin: 30px 0 32px; }
.repo div { border-top: 1px solid var(--line); padding-top: 12px; }
.repo dt { font-size: 13px; color: var(--muted); }
.repo dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- final + footer ---------- */
.final { padding-top: 160px; padding-bottom: 140px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 34px; }
.final h2 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); max-width: 16ch; }
.foot { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 22px; justify-content: flex-end; flex-wrap: wrap; }
.foot nav a:hover { color: var(--fg); }
.foot p { grid-column: 1 / -1; font-size: 13px; }
.foot .logo { color: var(--fg); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .w { opacity: 0; transform: translateY(0.45em) rotateX(-40deg); filter: blur(6px);
    animation: wordIn 1s var(--ease) forwards; animation-delay: calc(120ms + var(--i) * 70ms); }
  .hero-sub, .hero-cta, .eyebrow, .token { opacity: 0; animation: fadeUp .9s var(--ease) forwards; }
  .token { animation-delay: 0ms; }
  .eyebrow { animation-delay: 60ms; }
  .hero-sub { animation-delay: 600ms; }
  .hero-cta { animation-delay: 720ms; }
  .hero-visual { opacity: 0; animation: visualIn 1.6s var(--ease) 200ms forwards; }
  .reveal { opacity: 0; transform: translateY(28px); filter: blur(4px); transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease); transition-delay: var(--d, 0ms); }
  .reveal.in { opacity: 1; transform: none; filter: none; }

  /* the Strata app screenshot tilts back into place as it scrolls into view */
  @supports (animation-timeline: view()) {
    .source-shot img { animation: tiltIn linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .hero-visual canvas { animation: heroOut linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
  }
}
@keyframes wordIn { to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes visualIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes tiltIn { from { transform: rotateX(28deg) scale(.92); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes heroOut { to { transform: translateY(12%) scale(.92); opacity: .25; } }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .why-wide { grid-column: span 2; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .hero-visual { height: 420px; min-height: 0; order: 2; }
  .how-grid { grid-template-columns: 1fr; gap: 0; }
  /* one column: the scene pins under the nav and the steps scroll up beneath it */
  .how-sticky { position: sticky; top: 64px; z-index: 2; height: 44vh; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .how-visual { position: relative; top: 0; height: 100%; }
  .how-steps { padding: 6vh 0 30vh; position: relative; z-index: 1; }
  .how-steps .section-title { margin-bottom: 4vh; }
  .step { min-height: 46vh; }
  .bento { grid-template-columns: 1fr; grid-template-areas: "watch" "check" "data"; }
  .use-grid, .source { grid-template-columns: 1fr; }
  .source-copy { order: -1; }
}
@media (max-width: 600px) {
  .shell { padding: 0 16px; }
  .nav-end .gh:not(.gh-x) { display: none; }
  .nav-end .gh-x i { font-size: 20px; }
  .hero { padding-top: 56px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .why-wide { grid-column: auto; }
  .tile { padding: 22px; }
  .built, .use, .why, .source { padding-top: 88px; }
  .final { padding-top: 100px; padding-bottom: 100px; }
  .foot { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
  .tag { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .btn, .step { transition: none; transform: none !important; }
  .step { opacity: 1; }
}
