/* v1d about — dark, one gradient, serif display vs geometric sans (DESIGN.md §4) */
:root {
  --bg: #0a0a0f;
  --panel: #14141c;
  --panel-2: #1b1b26;
  --line: #26262f;
  --text: #ececf1;
  --muted: #9a9aa8;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --grad: linear-gradient(100deg, var(--violet), var(--cyan));
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 4rem);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-dot { color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; font-size: .92rem; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 10px; font-weight: 600;
  padding: .8rem 1.5rem; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--grad); color: #0a0a0f;
  box-shadow: 0 0 24px color-mix(in srgb, var(--violet) 35%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px color-mix(in srgb, var(--violet) 55%, transparent); }
.btn-ghost { border: 1px solid var(--line); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.15rem; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 9vh, 7rem) clamp(1.2rem, 5vw, 4rem) clamp(3rem, 8vh, 6rem);
  max-width: 1240px; margin: 0 auto;
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse at 70% 20%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-eyebrow { font-size: .85rem; color: var(--muted); font-family: var(--mono); margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cyan) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.2vw, 4.8rem);
  line-height: 1.04; letter-spacing: -0.03em; font-weight: 600;
  margin-bottom: 1.4rem;
}
.rotator { display: inline-block; min-width: 5.2ch; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin-bottom: 2rem; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- panels (browser-chrome frames) ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.panel-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.chrome-dot { width: 10px; height: 10px; border-radius: 50%; background: #33333e; }
.chrome-url { margin-left: .6rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }

/* ---------- hero demo panel ---------- */
.hero-demo { position: relative; z-index: 1; }
.demo-search {
  display: flex; align-items: center; gap: .6rem;
  margin: 1rem; padding: .7rem 1rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: .95rem;
}
.demo-search-icon { color: var(--muted); }
.caret { width: 2px; height: 1.1em; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.demo-results { padding: 0 1rem; display: grid; gap: .6rem; min-height: 216px; }
.demo-hit {
  display: flex; gap: .8rem; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease, border-color .3s ease, box-shadow .3s ease;
}
.demo-hit.in { opacity: 1; transform: none; }
.demo-hit.hot { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 0 20px color-mix(in srgb, var(--violet) 30%, transparent); }
.hit-thumb { width: 86px; height: 52px; border-radius: 6px; flex: none; background-size: cover; background-position: center; }
.thumb-ring { background: radial-gradient(circle at 50% 55%, #d4a531 0 14%, #6b5423 22%, #221a10 60%, #0d0a06); }
.thumb-hand { background: radial-gradient(circle at 40% 40%, #caa06a 0 20%, #4a3a28 45%, #17110a); }
.thumb-fire { background: radial-gradient(circle at 55% 65%, #e57b26 0 10%, #93321b 35%, #1c0d06 75%); }
.hit-meta { display: flex; align-items: baseline; gap: .7rem; font-size: .85rem; min-width: 0; }
.hit-time { font-family: var(--mono); color: var(--cyan); }
.hit-label { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit-score { font-family: var(--mono); color: var(--muted); margin-left: auto; }

.demo-foot {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1rem 1rem; border-top: 1px solid var(--line); margin-top: 1rem;
}
.latency-badge {
  font-family: var(--mono); font-size: .8rem; color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
  padding: .2rem .6rem; border-radius: 999px;
}
.demo-foot-note { font-size: .8rem; color: var(--muted); }

/* ---------- tabs section ---------- */
.tabs-section { max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 8vh, 6rem) clamp(1.2rem, 5vw, 4rem); }
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.1; letter-spacing: -0.02em; text-align: center; margin-bottom: 2.6rem; font-weight: 600;
}
.tabs { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }
.tab {
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: .65rem 1.3rem; cursor: pointer; transition: all .2s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, var(--panel)); }

.tab-panel { display: none; grid-template-columns: 1fr 1.35fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.tab-panel.active { display: grid; animation: fadeUp .45s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }

.tp-copy h3 { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.15; margin-bottom: 1rem; font-weight: 600; }
.tp-copy p { color: var(--muted); margin-bottom: 1.2rem; }
.tp-copy em { color: var(--cyan); font-style: normal; }
.tp-list { list-style: none; display: grid; gap: .55rem; }
.tp-list li { padding-left: 1.4rem; position: relative; font-size: .95rem; }
.tp-list li::before { content: "→"; position: absolute; left: 0; color: var(--violet); }

.tp-shot { position: relative; }
.tp-shot img { width: 100%; aspect-ratio: 16/9.6; object-fit: cover; object-position: top; }

/* click-tab mask pulse */
.mask-pulse {
  position: absolute; left: 45%; top: 16%; width: 34%; height: 42%;
  border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
  background: color-mix(in srgb, var(--violet) 32%, transparent);
  border: 2px solid var(--violet);
  opacity: 0; animation: maskFade 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes maskFade { 0%, 15% { opacity: 0; transform: scale(.96); } 35%, 75% { opacity: 1; transform: scale(1); } 95%, 100% { opacity: 0; } }

/* ---------- truths ---------- */
.truths {
  max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 4rem) clamp(3rem, 7vh, 5rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.truth { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; }
.truth-num { color: var(--violet); font-size: .8rem; letter-spacing: .1em; }
.truth h4 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; margin: .7rem 0 .6rem; font-weight: 600; }
.truth p { color: var(--muted); font-size: .92rem; }

/* ---------- hood ---------- */
.hood { text-align: center; padding: 0 clamp(1.2rem, 5vw, 4rem) clamp(3rem, 8vh, 6rem); }
.hood-title { font-size: .78rem; letter-spacing: .22em; color: var(--muted); margin-bottom: 1.2rem; }
.hood-badges { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; max-width: 760px; margin: 0 auto; }
.badge {
  font-size: .85rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem;
  transition: all .25s ease;
}
.badge:hover { color: var(--text); border-color: var(--violet); }

/* ---------- foot cta ---------- */
.foot-cta { text-align: center; padding: clamp(3rem, 10vh, 7rem) 1.2rem; position: relative; }
.foot-cta::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.foot-title { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.02em; margin-bottom: 2rem; font-weight: 600; }

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: center; gap: .8rem;
  padding: 2rem; color: var(--muted); font-size: .85rem;
  border-top: 1px solid var(--line);
}
.footer a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .tab-panel, .tab-panel.active { grid-template-columns: 1fr; }
  .truths { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .demo-hit { opacity: 1; transform: none; }
}

/* ---------- story panel (READ tab — real product output, typeset) ---------- */
.story-scroll { padding: 1.1rem 1.2rem .4rem; display: grid; gap: 1rem; }
.story-scene {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: .2rem .8rem;
  opacity: 0; transform: translateY(10px);
  animation: sceneIn .6s ease forwards;
}
.tab-panel.active .story-scene:nth-child(1) { animation-delay: .15s; }
.tab-panel.active .story-scene:nth-child(2) { animation-delay: .45s; }
.tab-panel.active .story-scene:nth-child(3) { animation-delay: .75s; }
.tab-panel.active .story-scene:nth-child(4) { animation-delay: 1.05s; }
@keyframes sceneIn { to { opacity: 1; transform: none; } }
.story-time { color: var(--cyan); font-size: .8rem; padding-top: .2rem; }
.story-scene p { grid-column: 2; font-size: .92rem; color: var(--text); line-height: 1.5; }
.story-quote { color: var(--muted) !important; font-style: italic; }
.story-attrib { font-style: normal; font-size: .8rem; color: var(--muted); }
.story-foot {
  border-top: 1px solid var(--line); margin-top: .6rem;
  padding: .8rem 1.2rem; font-size: .78rem; color: var(--muted);
}
.story-srt { color: var(--cyan); }
