/* Copyright (c) 2026 StoriaBrevi LLC. All rights reserved.
   Licensed under proprietary terms. See LICENSE in the project root.
   Colours follow ui_core/tokens.py; fonts are the app's bundled faces. */

@font-face { font-family: 'Barlow Condensed'; font-weight: 400; font-display: swap; src: url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('../fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-500.woff2') format('woff2'); }

@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #00e5cc;
}

:root {
  --bg: #0b0b0e;
  --panel: #121218;
  --raised: #1a1a22;
  --ink: #f4f6fa;
  --muted: #b4bac8;
  --lo: #8a90a0;
  --line: rgba(255, 255, 255, .09);
  --glass: rgba(14, 14, 19, .66);
  --accent: #00e5cc;
  --accent-ink: #04211d;
  --deck-a: #ff7a3d;
  --deck-b: #36b8ff;
  --fit: #2ee59d;
  --workable: #ffd23d;
  --risky: #ff8a1f;
  --clash: #ff4d5e;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
  transition: --accent .9s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 19px/1.5 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: .94; }
h1 { font-size: clamp(3.6rem, 9vw, 7.4rem); }
h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent); }
h2 { font-size: clamp(2.3rem, 5vw, 4rem); max-width: 14ch; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: .04em; line-height: 1.1; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: .6em 1em; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 500 .8rem/1 var(--mono); }
.skip:focus { left: 8px; }

/* The WebGL stage sits behind everything; sections scroll over it. */
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 80% 45%, transparent 30%, rgba(11, 11, 14, .6) 80%);
}
.no-webgl #world { display: none; }
.no-webgl body {
  background:
    radial-gradient(50% 45% at 78% 35%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(255, 122, 61, .12), transparent 70%),
    var(--bg);
}
main, .foot { position: relative; z-index: 2; }

.eyebrow {
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.eyebrow-dot::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: .7em;
  background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: rotate(45deg);
  vertical-align: .1em;
}
.lede { color: var(--muted); font-size: clamp(1.1rem, 1.5vw, 1.3rem); max-width: 34rem; margin-top: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5em; cursor: pointer; border: 0;
  padding: .9em 1.5em; border-radius: 6px;
  font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, white 10%), 0 8px 40px -8px var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--accent), 0 10px 50px -6px var(--accent); }
.btn:active { transform: translateY(0); }
.btn-ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.btn-small { padding: .7em 1.1em; font-size: .68rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 14px var(--gutter);
  transition: background .3s ease, backdrop-filter .3s ease;
}
.top.scrolled { background: rgba(11, 11, 14, .66); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; font: 700 1.5rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.links { display: flex; gap: 1.8rem; }
.links a { font: 500 .68rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--ink); }
.sound {
  display: inline-flex; align-items: center; gap: .55em; cursor: pointer;
  padding: .62em 1em; border-radius: 6px; border: 0;
  background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 .68rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.sound[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; }
.sound[aria-pressed="true"] .bars i { background: var(--accent); animation: eq .9s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 11px; } }

/* Side progress dots: diamonds, like the app's mark. */
.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 10; display: grid; gap: 15px; }
.dots a { width: 7px; height: 7px; transform: rotate(45deg); background: rgba(255, 255, 255, .22); transition: background .3s, box-shadow .3s, transform .3s; }
.dots a.active { background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: rotate(45deg) scale(1.35); }

/* Sections */
section { min-height: 100vh; min-height: 100svh; padding: 120px var(--gutter); display: flex; align-items: center; position: relative; }
.panel { max-width: 40rem; }

/* Hero */
.hero { gap: 4vw; justify-content: space-between; padding-bottom: 100px; }
.hero-copy { max-width: 36rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* The stem-mixer toy: a cue rail, four stem meters and an auto-mix toggle. */
.deck {
  align-self: flex-end; width: min(25rem, 100%); padding: 18px;
  border-radius: 12px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -40px #000;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.deck .eyebrow { margin-bottom: 1rem; }
.cue { display: flex; align-items: center; gap: 10px; }
.tag { font: 500 .7rem/1 var(--mono); padding: .35em .5em; border-radius: 4px; }
.tag-a { color: var(--deck-a); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck-a) 50%, transparent); }
.tag-b { color: var(--deck-b); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck-b) 50%, transparent); }
.rail {
  --x: 0; position: relative; flex: 1; height: 34px; cursor: grab; touch-action: none; border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px calc(12.5% - .1px)) 0 50% / 100% 10px no-repeat,
    rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rail:active { cursor: grabbing; }
.rail .fill {
  position: absolute; inset: 15px auto 15px 0; width: calc(var(--x) * 100%);
  background: linear-gradient(90deg, var(--deck-a), var(--deck-b)); opacity: .7; border-radius: 2px;
}
.rail .knob {
  position: absolute; top: 4px; bottom: 4px; left: calc(var(--x) * (100% - 12px)); width: 12px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 16px var(--accent);
}
.rail.snapped .knob { animation: snap .25s ease-out; }
@keyframes snap { 40% { transform: scaleX(1.6); } }
.stems { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stems button {
  width: 100%; cursor: pointer; display: grid; gap: 8px; justify-items: center; padding: 10px 4px 9px;
  border: 0; border-radius: 6px; background: rgba(255, 255, 255, .03); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 .6rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.stems button:hover { color: var(--ink); }
.stems button[aria-pressed="true"] { color: var(--clash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clash) 60%, transparent); }
.stems button[aria-pressed="true"] .meter { opacity: .25; }
.meter { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.meter i { width: 7px; height: 100%; border-radius: 2px; transform-origin: bottom; transform: scaleY(var(--g, 0)); transition: transform .12s linear; }
.meter .ma { background: var(--deck-a); box-shadow: 0 0 8px color-mix(in srgb, var(--deck-a) 60%, transparent); }
.meter .mb { background: var(--deck-b); box-shadow: 0 0 8px color-mix(in srgb, var(--deck-b) 60%, transparent); }
.deck-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.auto {
  flex: none; cursor: pointer; padding: .6em .9em; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); font: 500 .62rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.auto[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
.plan { font: 400 .72rem/1.35 var(--mono); color: var(--muted); }

/* How it works */
.how { justify-content: flex-end; }
.how .panel, .features .panel { padding: 36px; border-radius: 14px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.steps { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.steps .num { font: 500 .7rem/1 var(--mono); letter-spacing: .14em; color: var(--accent); }
.steps h3 { margin: .7rem 0 .45rem; }
.steps p { color: var(--muted); font-size: 1.05rem; }

/* Editor screenshot: a tilted window that settles flat as it scrolls in, with a spotlight per tab. */
.studio, .clash { background: linear-gradient(transparent, rgba(11, 11, 14, .84) 16%, rgba(11, 11, 14, .84) 84%, transparent); }
.studio { flex-direction: column; align-items: stretch; justify-content: center; }
.studio-head { max-width: 44rem; margin: 0 auto; text-align: center; }
.studio-head h2 { margin: 0 auto; max-width: none; }
.studio-head .lede { margin-left: auto; margin-right: auto; }
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 2.2rem; }
.shots button {
  cursor: pointer; display: inline-flex; align-items: baseline; gap: .6em;
  padding: .65em 1.05em; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); font: 600 1rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
}
.shots button span { font: 500 .62rem/1 var(--mono); letter-spacing: .12em; color: var(--accent); }
.shots button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.window {
  width: 100%; max-width: 1120px; margin: 1.6rem auto 0; border-radius: 10px; overflow: hidden; background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px -40px var(--accent);
  transform: perspective(1800px) rotateX(10deg) scale(.94); transform-origin: 50% 0;
  opacity: .4; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1), opacity 1.1s ease, box-shadow .6s ease;
}
.window.in { transform: none; opacity: 1; }
.chrome { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #0f0f14; border-bottom: 1px solid var(--line); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.chrome span { margin-left: 10px; font: 500 .62rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.frame { position: relative; }
.frame img { width: 100%; height: auto; }
.spot {
  position: absolute; border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(5, 5, 8, .62), 0 0 0 2px var(--accent), 0 0 30px 2px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: left .5s cubic-bezier(.3, .7, .2, 1), top .5s cubic-bezier(.3, .7, .2, 1), width .5s cubic-bezier(.3, .7, .2, 1), height .5s cubic-bezier(.3, .7, .2, 1);
}
.spot-text { max-width: 40rem; margin: 1.4rem auto 0; min-height: 3em; text-align: center; color: var(--muted); font-size: 1.15rem; }

/* Stem compatibility */
.clash { justify-content: center; gap: clamp(32px, 6vw, 96px); }
.clash-copy { max-width: 30rem; }
.window-tall { width: min(440px, 100%); margin: 0; flex: none; }
.window-tall img { width: 100%; height: auto; }
.legend { list-style: none; margin: 1.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font: 500 .68rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .6em; }
.legend i { width: 12px; height: 12px; border-radius: 2px; }
.legend .fit { background: var(--fit); }
.legend .workable { background: var(--workable); }
.legend .risky { background: var(--risky); }
.legend .clashes { background: var(--clash); }

/* Features */
.features { justify-content: flex-start; }
.features .panel { max-width: 46rem; }
.grid { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; }
.grid h3 { margin-bottom: .45rem; }
.grid h3::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: .6em; vertical-align: .2em; background: var(--accent); box-shadow: 0 0 8px var(--accent); transform: rotate(45deg); }
.grid p { color: var(--muted); font-size: 1.05rem; }

/* Coming soon */
.soon { justify-content: center; text-align: center; }
.soon .panel { max-width: 46rem; padding: 48px 36px; border-radius: 16px; background: rgba(11, 11, 14, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line); }
.panel-center { margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.panel-center h2 { max-width: none; }
.btn-large { padding: 1.1em 2.1em; font-size: .8rem; margin-top: 2rem; }
.btn-soon { cursor: default; color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--accent), 0 0 40px -10px var(--accent); }
.btn-soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 40px -10px var(--accent); }
.setup { margin-top: 2.4rem; text-align: left; width: 100%; max-width: 30rem; }
.setup .eyebrow { margin-bottom: .6rem; }
.setup dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 1.02rem; }
.setup dt { font: 500 .64rem/2.1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.setup dd { margin: 0; color: var(--muted); }

.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; padding: 28px var(--gutter) 40px; font: 500 .64rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--lo); }
.foot a { text-transform: none; letter-spacing: .06em; text-decoration: none; transition: color .2s; }
.foot a:hover, .foot a:focus-visible { color: var(--accent); }

@media (max-width: 1100px) {
  .hero { flex-direction: column; align-items: flex-start; justify-content: flex-end; padding-top: 50vh; }
  .deck { align-self: flex-start; }
  .clash { flex-direction: column; }
  .scrim { background: linear-gradient(rgba(11, 11, 14, .1) 0%, rgba(11, 11, 14, .5) 45%, rgba(11, 11, 14, .82) 100%); }
}

@media (max-width: 960px) {
  .links { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .top { gap: .6rem; padding: 12px 16px; }
  .top .btn-small { display: none; }
  .sound .label { display: none; }
  .dots { display: none; }
  section { padding: 96px 16px; }
  .hero { padding-top: 40vh; }
  .how .panel, .features .panel, .soon .panel { padding: 24px 20px; }
  .steps, .grid { grid-template-columns: 1fr; }
  .shots button { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .window { transform: none; opacity: 1; transition: none; }
  .spot { transition: none; }
  :root { transition: none; }
  .rail.snapped .knob { animation: none; }
}
