/* Clipsie — brand stylesheet
   Shared across landing, legal pages, and the OAuth callback.
   Design: deep studio-plum base, one bold coral-magenta accent (the "clip/hype"),
   electric lime used only for the live "peak" signal. Space Grotesk (display) +
   Manrope (body) + JetBrains Mono (timecodes / chat readouts). */

:root {
  --ink:      #141019;   /* page background — deep near-black plum */
  --ink-2:    #0E0B13;   /* deepest wells / footer */
  --surface:  #1E1726;   /* cards & panels */
  --surface-2:#241B30;   /* raised panel */
  --line:     #322641;   /* hairline borders */
  --text:     #F4F0F7;   /* primary text */
  --muted:    #A398B5;   /* secondary text */
  --faint:    #6E6480;   /* tertiary / captions */
  --hype:     #FF3D6E;   /* primary accent — coral-magenta */
  --hype-dim: #C72E55;
  --peak:     #C9FF4D;   /* signal accent — electric lime (live peak only) */

  --maxw: 1120px;
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint ambient glow behind the top of the page */
body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto 0;
  height: 70vh;
  background: radial-gradient(60% 60% at 70% 0%, rgba(255,61,110,0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--hype); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hype);
  margin: 0 0 18px;
}
/* lime (--peak) is reserved for the hero's live/peak signal — section eyebrows stay coral */

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(20,16,25,0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark { width: 28px; height: 28px; display: block; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav .nav-links { display: contents; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--hype); color: #fff; box-shadow: 0 8px 30px rgba(255,61,110,0.35); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 36px rgba(255,61,110,0.45); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; padding: 96px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.hero h1 .accent { color: var(--hype); }
.hero p.lede { color: var(--muted); font-size: 19px; max-width: 30ch; margin: 22px 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); margin-top: 18px; letter-spacing: 0.02em; }

/* ---------- signature: hype timeline ---------- */
.scope {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.scope-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.06em; margin-bottom: 16px; }
.scope-head .live { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--peak); box-shadow: 0 0 0 0 rgba(201,255,77,0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,255,77,0.55);} 70%{ box-shadow: 0 0 0 9px rgba(201,255,77,0);} 100%{ box-shadow:0 0 0 0 rgba(201,255,77,0);} }

.bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 0 2px; }
.bars i { flex: 1; background: linear-gradient(180deg, #4A3A5E, #2C2238); border-radius: 3px 3px 0 0; display: block; transform-origin: bottom; transition: height .3s ease; }
/* the peak window — the slice Clipsie cuts */
.clip-window {
  position: absolute; top: -8px; bottom: 0;
  border: 1.5px solid var(--peak);
  border-radius: 10px;
  background: rgba(201,255,77,0.07);
  box-shadow: inset 0 0 24px rgba(201,255,77,0.12);
}
.clip-window::before {
  content: "9:16 CLIP";
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--peak); white-space: nowrap;
}
.bars i.hot { background: linear-gradient(180deg, var(--hype), var(--hype-dim)); }
.scope-readout { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-family: var(--font-mono); font-size: 12.5px; }
.scope-readout .metric { color: var(--muted); }
.scope-readout .metric b { color: var(--peak); font-weight: 500; }
.scope-readout .verdict { color: var(--hype); letter-spacing: 0.06em; }

/* chat ticker under the scope */
.chat { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.9; color: var(--muted); max-height: 76px; overflow: hidden; }
.chat .u { color: var(--hype); }

/* the clip window breathes softly so the "clip" moment always has a little life.
   Signature motion — kept on even under reduced-motion (it's contained and meaningful). */
.clip-window { animation: clipIdle 3.6s ease-in-out infinite; }
@keyframes clipIdle {
  0%, 100% { box-shadow: inset 0 0 24px rgba(201,255,77,0.10); }
  50%      { box-shadow: inset 0 0 28px rgba(201,255,77,0.22), 0 0 16px rgba(201,255,77,0.18); }
}
/* one-shot flash when the demo cursor "clicks" CLIP IT (separate layer so it doesn't fight the idle pulse) */
.clip-window::after {
  content: ""; position: absolute; inset: -2px; border-radius: 10px; opacity: 0; pointer-events: none;
}
.scope.clipping .clip-window::after { animation: clipFlash .7s ease-out; }
@keyframes clipFlash {
  0%   { opacity: 1; box-shadow: inset 0 0 0 1.5px #E4FF8A, inset 0 0 34px rgba(201,255,77,0.55), 0 0 26px rgba(201,255,77,0.5); }
  100% { opacity: 0; box-shadow: inset 0 0 0 1.5px rgba(201,255,77,0), inset 0 0 0 rgba(201,255,77,0), 0 0 0 rgba(201,255,77,0); }
}
.scope.clipping .scope-readout .verdict { color: var(--peak); text-shadow: 0 0 14px rgba(201,255,77,0.55); transition: color .15s ease, text-shadow .15s ease; }

/* demo pointer that slings in, circles the peak, and clicks the verdict.
   Rides a curved offset-path; offset-rotate:0 keeps it upright, offset-anchor pins the
   arrow tip (~5px,4px) to the path so it lands precisely on the verdict. */
.scope-cursor {
  position: absolute; left: 0; top: 0; z-index: 6; width: 26px; height: 26px;
  pointer-events: none; opacity: 0;
  offset-rotate: 0deg; offset-anchor: 5px 4px; will-change: offset-distance, opacity;
}
.scope-cursor .sc-tip { display: block; width: 100%; height: 100%; transform-origin: 5px 4px;
  filter: drop-shadow(0 4px 7px rgba(0,0,0,0.55)); }
.scope-cursor svg { display: block; width: 100%; height: 100%; }
.scope-ripple {
  position: absolute; z-index: 5; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; border: 2px solid var(--peak); opacity: 0; pointer-events: none;
}
.scope-ripple.go { animation: scopeRipple .6s ease-out forwards; }
@keyframes scopeRipple {
  from { opacity: .9; transform: scale(.4); }
  to   { opacity: 0;  transform: scale(3.4); }
}

/* boot sequence: hide the pieces the JS streams in, so they're hidden on first paint and
   then handed off to WAAPI (which holds the hidden state via fill:backwards). */
.scope.preboot .bars i { transform: scaleY(0); }
.scope.preboot .clip-window,
.scope.preboot .chat > div,
.scope.preboot .scope-readout { opacity: 0; }

/* ---------- sections ---------- */
section { position: relative; z-index: 1; }
.section { padding: 80px 0; }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--muted); margin: 16px 0 0; }

/* how it works — a real ordered pipeline, so numbering is meaningful */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before { content: ""; position: absolute; top: 68px; left: 9%; right: 9%; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--hype) 20%, var(--hype) 80%, transparent); opacity: .22; }
.step { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.step:hover { border-color: var(--muted); background: var(--surface-2); box-shadow: 0 14px 34px rgba(0,0,0,0.42); }
.step .no { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.step h3 { font-size: 19px; margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* How-it-works: animated step demos (a tiny live screen per step) */
.step-viz { position: relative; height: 84px; margin-bottom: 18px; border-radius: 10px; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line); }
.step-viz .viz { display: block; width: 100%; height: 100%; }
.viz .v-dot   { fill: var(--hype); }
.viz .v-line  { fill: var(--muted); opacity: .42; }
.viz .v-line.lit { fill: var(--hype); opacity: .9; }
.viz .v-bar   { fill: var(--muted); opacity: .32; }
.viz .v-hot   { fill: var(--hype); }
.viz .v-ping  { fill: none; stroke: var(--hype); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.viz .v-frame { fill: rgba(255,61,110,0.06); stroke: var(--hype); stroke-width: 1.5; }
.viz .v-play  { fill: var(--hype); }
.viz .v-cap   { fill: var(--muted); opacity: .6; transform-box: fill-box; transform-origin: left center; }
.viz .v-clip  { fill: var(--hype); }

/* the demos loop only when motion is allowed; otherwise the static state still reads */
.anim .viz-chat .cl { animation: vChat 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * .4s); }
@keyframes vChat { 0% { opacity: 0; transform: translateY(7px); } 14% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; } }
.anim .viz-spike .v-hot { transform-box: fill-box; transform-origin: bottom; animation: vSpike 2.2s ease-in-out infinite; }
@keyframes vSpike { 0%, 100% { transform: scaleY(.8); } 45% { transform: scaleY(1); } }
.anim .viz-spike .v-ping { animation: vPing 2.2s ease-out infinite; }
@keyframes vPing { 0% { opacity: 0; transform: scale(.5); } 38% { opacity: .9; } 100% { opacity: 0; transform: scale(2.4); } }
.anim .viz-cut .v-cap { animation: vType 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .45s); }
@keyframes vType { 0% { transform: scaleX(.15); opacity: .3; } 26% { transform: scaleX(1); opacity: .7; } 80% { transform: scaleX(1); opacity: .7; } 100% { transform: scaleX(.15); opacity: .3; } }
.anim .viz-post .v-rise { transform-box: fill-box; animation: vRise 2.6s ease-in infinite; }
@keyframes vRise { 0% { opacity: 0; transform: translateY(16px); } 22% { opacity: 1; } 68% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }

/* a clip pulse flows 01 → 04 along the connector */
.steps-pulse { position: absolute; top: 68px; left: 9%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%; background: var(--hype); box-shadow: 0 0 9px rgba(255,61,110,.85); z-index: 0; opacity: 0; }
.anim .steps-pulse { animation: vFlow 4.4s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes vFlow { 0% { left: 9%; opacity: 0; } 8% { opacity: 1; } 90% { opacity: 1; } 100% { left: 91%; opacity: 0; } }

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: border-color .2s ease, box-shadow .2s ease; }
.feature:hover { border-color: var(--hype); box-shadow: 0 14px 34px rgba(0,0,0,0.42); }
.feature h3 { font-size: 20px; margin: 0 0 10px; }
.feature p { color: var(--muted); font-size: 15.5px; margin: 0; }
.feature .ic { width: 30px; height: 30px; color: var(--hype); margin-bottom: 16px; }

/* platforms pipeline diagram */
.flow-head { text-align: center; margin-bottom: 30px; }
.flow-head .eyebrow { margin-bottom: 12px; }
.flow-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.flow { display: flex; justify-content: center; }
.platform-diagram { width: 100%; max-width: 800px; height: auto; overflow: visible; }
.platform-diagram .rail { fill: none; stroke: var(--line); stroke-width: 2; }
.platform-diagram .node-ring { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.platform-diagram .hub-ring { fill: var(--surface-2); stroke: var(--hype); stroke-width: 2;
  filter: drop-shadow(0 0 14px rgba(255,61,110,0.35)); }
.platform-diagram .plabel { font-family: var(--font-mono); font-size: 15px; fill: var(--muted); letter-spacing: 0.04em; }
.platform-diagram .plabel.hub { fill: var(--text); }
.platform-diagram .clip-dot { fill: var(--hype); filter: drop-shadow(0 0 5px rgba(255,61,110,0.85)); }
@media (prefers-reduced-motion: reduce) { .platform-diagram .clip-dot { display: none; } }

/* ---------- showcase: clip carousel + stats (social proof) ---------- */
.showcase { position: relative; z-index: 1; padding: 72px 0 32px; overflow: hidden; }
.showcase::before { content: ""; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 70%; height: 360px; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(201,255,77,0.07), transparent 72%); }
.showcase .wrap, .showcase .carousel { position: relative; z-index: 1; }
.showcase .section-head { margin-bottom: 28px; }

.stat-band { display: flex; gap: 0; flex-wrap: wrap; margin: 0 0 40px; }
.stat { padding: 0 clamp(20px, 3vw, 44px); border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -0.02em; line-height: 1; }
.stat .n.accent { color: var(--hype); }
.stat .l { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-top: 10px; }

.carousel { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 8px; }
.carousel-viewport { overflow: hidden; padding: 48px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.carousel-track { display: flex; gap: 22px; will-change: transform;
  transition: transform .55s cubic-bezier(.22,.61,.36,1); }

.clip-card { position: relative; flex: 0 0 auto; width: 190px; aspect-ratio: 9 / 16;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line); cursor: pointer;
  background: var(--surface-2); opacity: .55; transform: scale(.82);
  transition: transform .5s cubic-bezier(.22,.61,.36,1), opacity .5s ease, border-color .16s ease, box-shadow .3s ease; }
.clip-card:hover { border-color: var(--hype); }
.clip-card.is-active { opacity: 1; transform: scale(1.04); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.clip-card.is-active:hover { transform: scale(1.06); }
.clip-card .cover-fallback { position: absolute; inset: 0; z-index: 0; background: radial-gradient(120% 75% at 50% 0%, #3A2A4D, #181020); }
.clip-card img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-card .grad { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(10,7,15,0) 38%, rgba(10,7,15,0.92)); }
.clip-card .badge { position: absolute; z-index: 3; top: 10px; left: 10px; width: 28px; height: 28px;
  border-radius: 8px; display: grid; place-items: center; background: rgba(10,7,15,0.6); backdrop-filter: blur(4px); }
.clip-card .badge svg { width: 16px; height: 16px; display: block; }
.clip-card .play { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,61,110,0.92);
  display: grid; place-items: center; opacity: 0; transition: opacity .2s ease; box-shadow: 0 8px 24px rgba(255,61,110,0.45); }
.clip-card.is-active .play { opacity: 1; }
.clip-card .play svg { width: 18px; height: 18px; margin-left: 2px; }
.clip-card .meta { position: absolute; z-index: 3; left: 13px; right: 13px; bottom: 12px; }
.clip-card .views { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff; line-height: 1; }
.clip-card .views .x { color: var(--peak); }
.clip-card .handle { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.78); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* click-to-play: the active card shows an inline player */
.clip-card.playing { opacity: 1; transform: scale(1.12); z-index: 30; border-color: var(--hype); box-shadow: 0 28px 70px rgba(0,0,0,0.65); }
.clip-card.playing .grad,
.clip-card.playing .play,
.clip-card.playing .meta,
.clip-card.playing .badge { opacity: 0; pointer-events: none; }
.clip-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; z-index: 4; }

/* carousel arrows */
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 25;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(20,16,25,0.82); backdrop-filter: blur(8px); color: var(--text);
  font-family: var(--font-display); font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: border-color .15s, color .15s, transform .12s, background .15s; }
.car-arrow:hover { border-color: var(--hype); color: var(--hype); background: rgba(30,23,38,0.95); }
.car-arrow:active { transform: translateY(-50%) scale(.92); }
.car-arrow.prev { left: 0; }
.car-arrow.next { right: 0; }

/* CTA band */
.band { text-align: center; background: linear-gradient(180deg, var(--surface), var(--ink-2)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 56px 28px; }
.band h2 { font-size: clamp(28px, 4vw, 40px); }
.band p { color: var(--muted); margin: 14px auto 28px; max-width: 46ch; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); margin-top: 40px; background: var(--ink-2); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; padding-bottom: 32px; flex-wrap: wrap; }
.site-footer .links { display: flex; gap: 26px; font-size: 14px; }
.site-footer .links a { color: var(--muted); }
.site-footer .links a:hover { color: var(--text); }
.site-footer .legal { color: var(--faint); font-size: 13px; font-family: var(--font-mono); }

/* ---------- legal / document pages ---------- */
.doc { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 64px 24px 40px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); }
.doc .meta { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin: 14px 0 40px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; }
.doc p, .doc li { color: #D8D0E0; }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc a { color: var(--hype); text-decoration: underline; text-underline-offset: 2px; }
.doc strong { color: var(--text); }
.doc .tldr { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--hype); border-radius: 10px; padding: 18px 20px; margin: 8px 0 8px; }
.doc .tldr p { margin: 0; color: var(--muted); }

/* ---------- callback page ---------- */
.callback { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; padding: 80px 24px; }
.callback h1 { font-size: 30px; margin-bottom: 8px; }
.callback .sub { color: var(--muted); margin: 0 0 28px; }
.cb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cb-status { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: 15px; }
.cb-status.ok { background: rgba(201,255,77,0.08); border: 1px solid rgba(201,255,77,0.4); color: #E4FFB0; }
.cb-status.err { background: rgba(255,61,110,0.08); border: 1px solid rgba(255,61,110,0.4); color: #FFC2D2; }
.field { margin: 16px 0; }
.field label { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.value-row { display: flex; gap: 8px; align-items: stretch; }
.value-row code { display: block; flex: 1; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; font-family: var(--font-mono); font-size: 13.5px; color: var(--text); word-break: break-all; overflow-x: auto; }
.value-row button { background: var(--hype); color: #fff; border: none; border-radius: 8px; padding: 0 16px; font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer; }
.value-row button.copied { background: var(--peak); color: var(--ink); }
.cb-hint { color: var(--faint); font-size: 13px; margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 64px 0 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before, .steps-pulse { display: none; }   /* connector + pulse only make sense in one row */
  .features { grid-template-columns: 1fr; }
  .nav .nav-links { display: none; }
  .stat-band { gap: 26px 30px; }                     /* drop dividers when the row wraps */
  .stat { border-left: 0; padding: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- a11y ---------- */
:focus-visible { outline: 2px solid var(--peak); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  /* Keep the carousel infinite + centered for everyone; JS just skips the auto-spin.
     Only kill incidental animations, not the carousel's layout. */
  .hero h1, .bars i, .dot { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- motion: hero load-in + scroll reveal (gated by .anim on <html>) ---------- */
@keyframes riseIn   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes scopeIn  { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }

/* Hero performs once on first paint. */
.anim .hero .eyebrow  { animation: riseIn .6s both .05s; }
.anim .hero h1        { animation: riseIn .7s both .15s; }
.anim .hero .lede     { animation: riseIn .6s both .34s; }
.anim .hero .hero-cta { animation: riseIn .6s both .46s; }
.anim .hero-note      { animation: riseIn .6s both .56s; }
.anim .hero .scope    { animation: scopeIn .8s both .3s; }
/* (the bars no longer grow all-at-once here — the always-on boot sequence streams them in) */

/* Scroll reveal: hidden until observed, then eased in. Hover effects use border/shadow only,
   so they don't fight the reveal transform. */
.anim .section-head,
.anim .stat-band,
.anim .carousel,
.anim .step,
.anim .feature,
.anim .flow,
.anim .band {
  opacity: 0; transform: translateY(26px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.22,.61,.36,1),
              border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.anim .section-head.in,
.anim .stat-band.in,
.anim .carousel.in,
.anim .step.in,
.anim .feature.in,
.anim .flow.in,
.anim .band.in { opacity: 1; transform: none; }
.anim .steps .step:nth-child(2),
.anim .features .feature:nth-child(2) { transition-delay: .08s; }
.anim .steps .step:nth-child(3),
.anim .features .feature:nth-child(3) { transition-delay: .16s; }
.anim .steps .step:nth-child(4) { transition-delay: .24s; }

/* ---------- clip "flies out" to the feed when CLIP IT is clicked ---------- */
.clip-fly { position: fixed; left: 0; top: 0; z-index: 60; width: 48px; height: 85px; border-radius: 10px;
  background: linear-gradient(158deg, var(--hype), #2A1E38); border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 44px rgba(255,61,110,0.4); pointer-events: none; will-change: transform, opacity; }
.clip-fly .cf-play { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  transform: translate(-50%,-50%); background: #fff; opacity: .92;
  clip-path: polygon(22% 12%, 22% 88%, 86% 50%); }

/* ---------- primary CTA sheen sweep ---------- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-18deg); opacity: 0; pointer-events: none; }
.btn-primary:hover::after { animation: sheen .85s ease; }
@keyframes sheen { 0% { left: -60%; opacity: 0; } 18% { opacity: 1; } 100% { left: 130%; opacity: 0; } }
.anim .hero-cta .btn-primary::after { animation: sheen 5.5s ease 2.4s infinite; }

/* ---------- feature-card icon micro-interactions (on hover, the icon acts out the feature) ---------- */
.feature .ic * { transform-box: fill-box; transform-origin: center; }
/* 1 · detection: the crosshair locks on */
.features .feature:nth-child(1):hover .ic circle { animation: lockOn 1s ease-in-out infinite; }
@keyframes lockOn { 0%,100% { transform: scale(1); } 50% { transform: scale(.6); } }
.features .feature:nth-child(1):hover .ic path { animation: ticksBlink 1s ease-in-out infinite; }
@keyframes ticksBlink { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
/* 2 · reframe: the frame snaps toward 9:16 */
.features .feature:nth-child(2):hover .ic rect { animation: reframe 1.1s ease-in-out infinite; }
@keyframes reframe { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.72); } }
/* 3 · multi-post: the node travels the list */
.features .feature:nth-child(3):hover .ic circle { animation: travel 1.3s ease-in-out infinite; }
@keyframes travel { 0% { transform: translateX(0); } 50% { transform: translateX(-9px); } 100% { transform: translateX(0); } }
/* 4 · scheduling: the clock hand sweeps */
.features .feature:nth-child(4) .ic path { transform-box: view-box; transform-origin: 12px 12px; }
.features .feature:nth-child(4):hover .ic path { animation: sweep 1.7s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---------- "live" stat tick (the engine is running right now) ---------- */
.stat .n.bump { animation: statBump .55s cubic-bezier(.34,1.4,.6,1); }
@keyframes statBump { 0% { transform: none; } 35% { transform: translateY(-4px); } 100% { transform: none; } }

/* live chat ticker feed (transform target inside the clipped .chat) */
.chat-feed { will-change: transform; }

/* ---------- theme toggle ---------- */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: block; }

/* ============================ LIGHT THEME ============================
   Flip the page chrome to light; keep "device/media" surfaces (the hero scope, the
   platform-diagram chips) dark so the bars, the lime live-signal, and the white TikTok
   mark all keep their contrast. */
html[data-theme="light"] {
  --ink:      #F1EFF7;   /* a hair more tint so pure-white cards separate cleanly */
  --ink-2:    #E8E4F0;
  --surface:  #FFFFFF;
  --surface-2:#F4F1FA;
  --line:     #E5E0EC;
  --text:     #1B1522;
  --muted:    #5C5468;
  --faint:    #8A8298;
  --hype:     #E62E5E;   /* a touch deeper so it stays legible on white */
  --hype-dim: #C21F4C;
  /* --peak (lime) stays bright — it only lives on the dark scope, re-pinned below */
}
body { transition: background-color .3s ease, color .3s ease; }

/* the hero scope stays a dark stream-monitor device — re-declare the dark tokens inside it */
html[data-theme="light"] .scope {
  --surface: #1E1726; --surface-2: #241B30; --line: #322641;
  --text: #F4F0F7; --muted: #A398B5; --faint: #6E6480;
  --hype: #FF3D6E; --hype-dim: #C72E55;
  background: linear-gradient(180deg, #241B30, #1E1726);
}

/* header glass + softer ambient glow on a light page */
html[data-theme="light"] .site-header { background: rgba(255,255,255,0.72); }
html[data-theme="light"] body::before { background: radial-gradient(60% 60% at 70% 0%, rgba(255,61,110,0.10), transparent 70%); }

/* platform-diagram chips stay dark so the logos (incl. the white TikTok mark) read */
html[data-theme="light"] .platform-diagram .node-ring,
html[data-theme="light"] .platform-diagram .hub-ring { fill: #241B30; }
html[data-theme="light"] .platform-diagram .node-ring { stroke: #3A2E4A; }

/* carousel arrows on a light page */
html[data-theme="light"] .car-arrow { background: rgba(255,255,255,0.86); }
html[data-theme="light"] .car-arrow:hover { background: #fff; }

/* focus ring needs contrast against white */
html[data-theme="light"] :focus-visible { outline-color: var(--hype); }

/* legal/callback pages hardcode light text — flip those to dark in light mode */
html[data-theme="light"] .doc p, html[data-theme="light"] .doc li { color: #2A2235; }
html[data-theme="light"] .cb-status.ok { color: #3C6B00; }
html[data-theme="light"] .cb-status.err { color: #A62247; }

/* ---- light-mode elevation: soft, cool-tinted shadows instead of dark glows.
   This is what makes light mode read as "clean" — cards get a quiet resting lift, and
   hover/active states deepen gently rather than stamping a hard black shadow. ---- */
html[data-theme="light"] .step,
html[data-theme="light"] .feature,
html[data-theme="light"] .cb-card,
html[data-theme="light"] .doc .tldr {
  box-shadow: 0 1px 2px rgba(26,17,48,0.04), 0 10px 24px -8px rgba(26,17,48,0.08);
}
html[data-theme="light"] .step:hover,
html[data-theme="light"] .feature:hover {
  box-shadow: 0 2px 6px rgba(26,17,48,0.06), 0 20px 42px -14px rgba(26,17,48,0.16);
}
html[data-theme="light"] .band {
  box-shadow: 0 1px 2px rgba(26,17,48,0.04), 0 18px 44px -16px rgba(26,17,48,0.10);
}
/* the dark device + media surfaces: soft cool shadow, not heavy black */
html[data-theme="light"] .scope { box-shadow: 0 30px 70px -28px rgba(26,17,48,0.42); }
html[data-theme="light"] .clip-card.is-active { box-shadow: 0 20px 46px -16px rgba(26,17,48,0.32); }
html[data-theme="light"] .clip-card.playing { box-shadow: 0 26px 60px -18px rgba(26,17,48,0.42); }
/* the coral CTA glow, cleaned up for a light page */
html[data-theme="light"] .btn-primary { box-shadow: 0 8px 22px -6px rgba(230,46,94,0.38); }
html[data-theme="light"] .btn-primary:hover { box-shadow: 0 12px 30px -8px rgba(230,46,94,0.48); }
/* dial the dark-tuned ambient glows right down so they don't read as smudges on white */
html[data-theme="light"] body::before { background: radial-gradient(60% 60% at 72% 0%, rgba(255,61,110,0.05), transparent 70%); }
html[data-theme="light"] .showcase::before { background: radial-gradient(50% 60% at 50% 0%, rgba(255,61,110,0.045), transparent 72%); }
html[data-theme="light"] .steps::before { opacity: .16; }
