/* Whistype — Design System v2 */

/* ========== TOKENS ========== */
:root {
  --font: 'Inter', 'Segoe UI Variable', system-ui, -apple-system, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: .25s;
  --t-fast: .1s;
  --t-slow: .7s;

  --w: 1080px;
  --w-narrow: 720px;
  --w-wide: 1200px;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --success: #22c55e;
  --error: #ef4444;
  --info: #3b82f6;

  color-scheme: light dark;
}

/* Dark (default) */
:root {
  --bg: #060606;
  --bg2: #0a0a0a;
  --bg-elevated: #0f0f0f;
  --bg-surface: rgba(255, 255, 255, .03);
  --bg-glass: rgba(255, 255, 255, .04);
  --text: #f0f0f0;
  --text-secondary: #999;
  --text-muted: #888;
  --text-dim: #666;
  --border: rgba(255, 255, 255, .08);
  --border-hover: rgba(255, 255, 255, .16);
  --border-btn: rgba(255, 255, 255, .12);
  --accent: #f0f0f0;
  --surface-hover: rgba(255, 255, 255, .04);
  --glow: rgba(255, 255, 255, .06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  --noise-opacity: .015;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f8f8;
    --bg2: #f2f2f2;
    --bg-elevated: #ffffff;
    --bg-surface: rgba(0, 0, 0, .02);
    --bg-glass: rgba(255, 255, 255, .7);
    --text: #0a0a0a;
    --text-secondary: #555;
    --text-muted: #777;
    --text-dim: #999;
    --border: rgba(0, 0, 0, .07);
    --border-hover: rgba(0, 0, 0, .14);
    --border-btn: rgba(0, 0, 0, .12);
    --accent: #0a0a0a;
    --surface-hover: rgba(0, 0, 0, .03);
    --glow: rgba(0, 0, 0, .04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, .08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .1);
    --noise-opacity: .01;
  }
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

a { color: var(--text); text-decoration: none; transition: letter-spacing .3s var(--ease), color var(--t) var(--ease); }
a:hover { letter-spacing: .03em; }
img { max-width: 100%; height: auto; display: block; }

/* ========== LAYOUT ========== */
.w { max-width: var(--w); margin: 0 auto; padding: 0 32px; }
.w-narrow { max-width: var(--w-narrow); margin: 0 auto; padding: 0 32px; }
.w-wide { max-width: var(--w-wide); margin: 0 auto; padding: 0 32px; }

/* ========== TYPOGRAPHY ========== */
h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.03em;
}
h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}
h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
p { margin-bottom: 1rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.section-label {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--text-muted);
  flex-shrink: 0;
}

.section-desc {
  max-width: 600px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.serif { font-family: var(--font-serif); }
.mono { font-family: var(--font-mono); font-size: .875em; }

.statement {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 680px;
}

/* ========== SECTIONS ========== */
section {
  padding: 140px 0;
  position: relative;
}

.hero {
  padding: 180px 0 140px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, var(--glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > .w { position: relative; z-index: 1; }

/* Animated waveform */
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 64px;
  margin: 0 auto 40px;
}

.waveform-bar {
  width: 6px;
  border-radius: 3px;
  background: var(--text);
  animation: waveBreath 3s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { height: 28px; animation-delay: 0s; }
.waveform-bar:nth-child(2) { height: 44px; animation-delay: .2s; }
.waveform-bar:nth-child(3) { height: 56px; animation-delay: .4s; }
.waveform-bar:nth-child(4) { height: 38px; animation-delay: .6s; }
.waveform-bar:nth-child(5) { height: 22px; animation-delay: .8s; }

@keyframes waveBreath {
  0%, 100% { transform: scaleY(1); opacity: .7; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

.hero h1 { margin-bottom: 20px; }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* Scroll indicator */
.scroll-hint {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: scrollDrop 2.4s var(--ease) infinite;
}

.scroll-hint-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
}

@keyframes scrollDrop {
  0%, 100% { opacity: .4; transform: translateY(0); }
  50% { opacity: .8; transform: translateY(6px); }
}

/* Section separator */
.sep {
  display: flex;
  justify-content: center;
  padding: 0;
}

.sep-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: dotBreathe 3s ease-in-out infinite;
}

@keyframes dotBreathe {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.3); }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  font-family: var(--font);
  font-size: .9375rem;
  font-weight: 500;
  border: 1px solid var(--border-btn);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.btn:hover {
  letter-spacing: 0;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: scale(.97); transition-duration: .08s; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--glow), var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Breathing CTA */
.btn-breathe {
  animation: btnBreathe 4s ease-in-out infinite;
}

@keyframes btnBreathe {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 32px var(--glow); }
}

/* ========== GLASS CARDS ========== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.glass:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.glass-static {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ========== FEATURE SHOWCASES ========== */
.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0;
}

.feature-showcase:nth-child(even) { direction: rtl; }
.feature-showcase:nth-child(even) > * { direction: ltr; }

.feature-showcase + .feature-showcase {
  border-top: 1px solid var(--border);
}

.feature-text h3 { margin-bottom: 12px; }
.feature-text p { font-size: 1rem; line-height: 1.7; }

.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  min-height: 240px;
  position: relative;
  overflow: hidden;
}

/* Cursor pinning visual — animated scene */
.pin-scene {
  width: 100%;
  max-width: 320px;
  position: relative;
  height: 220px;
}

.pin-window {
  position: absolute;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: opacity .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
}

.pin-window-bar {
  height: 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
}

.pin-window-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: .4;
}

.pin-window-title {
  font-size: .5625rem;
  color: var(--text-dim);
  margin-left: 6px;
  letter-spacing: .03em;
}

.pin-window-body {
  padding: 12px;
}

.pin-window-field {
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.pin-window-field .pin-text {
  font-size: .6875rem;
  font-family: var(--font-mono);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.pin-window-field .pin-cursor {
  width: 1.5px;
  height: 14px;
  background: var(--text);
  flex-shrink: 0;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Window A — target (where text lands) */
.pin-win-a {
  left: 0;
  top: 0;
  width: 200px;
  z-index: 2;
}

/* Window B — distraction (user switches here) */
.pin-win-b {
  right: 0;
  top: 40px;
  width: 180px;
  z-index: 1;
  opacity: .4;
}

/* Animation states via JS */
.pin-scene.phase-switch .pin-win-a {
  opacity: .35;
  transform: scale(.95);
  z-index: 1;
}
.pin-scene.phase-switch .pin-win-b {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.pin-scene.phase-land .pin-win-a {
  opacity: 1;
  z-index: 2;
}
.pin-scene.phase-land .pin-win-b {
  opacity: .4;
  z-index: 1;
}

.pin-result {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .6875rem;
  color: var(--text-muted);
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .4s var(--ease);
}

.pin-scene.phase-land .pin-result {
  opacity: 1;
}

/* Fallback cascade visual — with audio wave */
.cascade-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}

.cascade-audio {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cascade-audio-bar {
  width: 3px;
  border-radius: 1.5px;
  background: var(--success);
  animation: audioWave 1.2s ease-in-out infinite;
}

.cascade-audio-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.cascade-audio-bar:nth-child(2) { height: 16px; animation-delay: .1s; }
.cascade-audio-bar:nth-child(3) { height: 12px; animation-delay: .2s; }
.cascade-audio-bar:nth-child(4) { height: 20px; animation-delay: .3s; }
.cascade-audio-bar:nth-child(5) { height: 10px; animation-delay: .4s; }
.cascade-audio-bar:nth-child(6) { height: 14px; animation-delay: .15s; }
.cascade-audio-bar:nth-child(7) { height: 8px; animation-delay: .35s; }

@keyframes audioWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(.4); }
}

.cascade-audio-label {
  font-size: .625rem;
  color: var(--success);
  margin-left: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 600;
}

.cascade-providers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.cascade-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  font-size: .8125rem;
  transition: all .4s var(--ease);
}

.cascade-step .cascade-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .4s var(--ease);
}

.cascade-step .cascade-bar {
  flex: 1;
  height: 3px;
  border-radius: 1.5px;
  background: var(--border);
  overflow: hidden;
}

.cascade-step .cascade-bar-fill {
  height: 100%;
  border-radius: 1.5px;
  width: 0;
  transition: width .6s var(--ease), background .3s var(--ease);
}

.cascade-step.cascade-active { border-color: var(--border-hover); }
.cascade-step.cascade-active .cascade-dot { background: var(--success); }
.cascade-step.cascade-active .cascade-bar-fill { width: 100%; background: var(--success); }

.cascade-step.cascade-trying .cascade-dot { background: var(--info); }
.cascade-step.cascade-trying .cascade-bar-fill { background: var(--info); animation: tryingBar .8s var(--ease) forwards; }

.cascade-step.cascade-skip { opacity: .35; }
.cascade-step.cascade-skip .cascade-dot { background: var(--error); }
.cascade-step.cascade-skip .cascade-bar-fill { width: 100%; background: var(--error); }

.cascade-step.cascade-ready .cascade-dot { background: var(--text-dim); }

@keyframes tryingBar {
  0% { width: 0; }
  80% { width: 70%; }
  100% { width: 70%; }
}

/* Performance — dramatic comparison bars */
.perf-compare-dramatic {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.perf-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.perf-bar-name {
  font-size: .6875rem;
  color: var(--text-muted);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.perf-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-surface);
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s var(--ease);
}

.perf-bar-fill.bar-ours {
  background: var(--text);
}

.perf-bar-fill.bar-theirs {
  background: var(--text-dim);
  opacity: .25;
}

.perf-bar-val {
  font-size: .6875rem;
  color: var(--text-dim);
  width: 70px;
  flex-shrink: 0;
}

/* Secondary features grid */
.features-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 80px;
}

.feature-cell {
  background: var(--bg2);
  padding: 32px;
  transition: background var(--t) var(--ease);
}

.feature-cell:hover {
  background: var(--bg-elevated);
}

.feature-cell h4 { margin-bottom: 8px; }
.feature-cell p { font-size: .875rem; margin: 0; color: var(--text-secondary); }

/* ========== STATS / PERFORMANCE ========== */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}

.perf-stat {
  text-align: center;
  padding: 48px 24px;
}

.perf-value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.perf-label {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Visual comparison bars */
.perf-compare {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.perf-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--text);
  transition: width 1.2s var(--ease);
}

.perf-bar.ours { width: 12px; }
.perf-bar.theirs { width: 100px; background: var(--text-dim); opacity: .3; }

.perf-bar-label {
  font-size: .6875rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.perf-footnote {
  text-align: center;
  margin-top: 40px;
  font-size: .8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ========== STORY / ORIGIN ========== */
.story-section {
  text-align: center;
  padding: 120px 0;
}

.story-section .statement {
  margin: 0 auto 32px;
  max-width: 640px;
}

.story-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  color: var(--text-secondary);
  transition: color var(--t) var(--ease), letter-spacing .3s var(--ease);
}

.story-link:hover {
  color: var(--text);
  letter-spacing: .02em;
}

.story-link .arrow {
  transition: transform var(--t) var(--ease);
}

.story-link:hover .arrow {
  transform: translateX(4px);
}

/* Build in Public */
.bip-banner {
  margin-top: 48px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.bip-banner .bip-text {
  flex: 1;
}

.bip-banner h4 { margin-bottom: 4px; }

.bip-banner p {
  font-size: .875rem;
  color: var(--text-secondary);
  margin: 0;
}

.bip-banner .btn {
  flex-shrink: 0;
}

/* Hero sub-note */
.hero-note {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: .02em;
}

/* ========== HONESTY / TRANSPARENCY ========== */
.triad-section {
  counter-reset: triad;
}

.triad-item {
  padding: 56px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: start;
}

.triad-item + .triad-item {
  border-top: 1px solid var(--border);
}

.triad-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-dim);
}

.triad-content h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.triad-content p {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
}

/* Comparison */
.comparison {
  margin-top: 80px;
}

.comparison h3 { margin-bottom: 32px; }

.compare-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t) var(--ease);
}

.compare-row:hover {
  background: var(--surface-hover);
}

.compare-row.compare-header {
  border-bottom: 1px solid var(--border-hover);
}

.compare-cell {
  padding: 20px 24px;
  font-size: .9375rem;
}

.compare-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .8125rem;
}

.compare-ours {
  color: var(--text);
  font-weight: 500;
}

.compare-theirs {
  color: var(--text-dim);
}

.compare-header .compare-cell {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 24px;
}

/* ========== PRICING ========== */
.pricing-free {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.pricing-free-card {
  padding: 28px;
}

.pricing-free-card h4 { margin-bottom: 4px; }

.pricing-free-card .price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-free-card .period {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-free-card ul {
  list-style: none;
  padding: 0;
}

.pricing-free-card li {
  font-size: .8125rem;
  color: var(--text-secondary);
  padding: 5px 0;
  padding-left: 16px;
  position: relative;
}

.pricing-free-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* Paid tiers */
.pricing-paid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.pricing-paid-card {
  padding: 40px;
}

.pricing-paid-card.featured {
  border-color: var(--border-hover);
  position: relative;
}

.pricing-badge {
  display: inline-block;
  font-size: .625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pricing-paid-card h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.pricing-paid-card .price {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 4px;
}

.pricing-paid-card .price span {
  font-size: .875rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-paid-card .period {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-paid-card ul {
  list-style: none;
  padding: 0;
}

.pricing-paid-card li {
  font-size: .9375rem;
  color: var(--text-secondary);
  padding: 7px 0;
  padding-left: 20px;
  position: relative;
}

.pricing-paid-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

/* ========== ACCORDION / FAQ ========== */
.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: color var(--t) var(--ease);
}

.accordion-trigger:hover {
  color: var(--text-secondary);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
  margin-left: 16px;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.accordion-icon::before {
  width: 12px;
  height: 1.5px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-icon::after {
  width: 1.5px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-item.open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), padding .4s var(--ease);
}

.accordion-item.open .accordion-content {
  max-height: 600px;
  padding-bottom: 24px;
}

.accordion-content p,
.accordion-content div {
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.7;
}

/* Cost breakdown visual (inside accordion) */
.cost-visual {
  display: flex;
  height: 40px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin: 16px 0;
}

.cost-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: flex var(--t-slow) var(--ease);
}

.cost-segment.seg-payment { flex: .75; background: rgba(239, 68, 68, .15); color: var(--error); }
.cost-segment.seg-api { flex: 1; background: rgba(59, 130, 246, .12); color: var(--info); }
.cost-segment.seg-vat { flex: .85; background: rgba(255, 255, 255, .06); color: var(--text-muted); }
.cost-segment.seg-profit { flex: 2.4; background: rgba(34, 197, 94, .1); color: var(--success); }

.cost-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.cost-legend-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cost-legend-item .amount {
  font-size: 1rem;
  font-weight: 600;
}

.cost-legend-item .label {
  font-size: .6875rem;
  color: var(--text-muted);
}

/* ========== DOWNLOAD CTA ========== */
.download-section {
  text-align: center;
  padding: 160px 0;
}

.platform-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}

.platform-badge {
  font-size: .75rem;
  color: var(--text-muted);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  letter-spacing: .02em;
}

.platform-badge.coming-soon {
  opacity: .4;
  font-style: italic;
}

/* ========== LEGAL PAGES ========== */
.legal-nav {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.legal-nav a {
  font-size: .875rem;
  color: var(--text-muted);
  transition: color var(--t) var(--ease);
}
.legal-nav a:hover { color: var(--text); }

main.w-narrow {
  padding-top: 64px;
  padding-bottom: 96px;
}

.block {
  margin-bottom: 40px;
}
.block:last-child { margin-bottom: 0; }

.block h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 8px;
}
.block h2 {
  font-size: 1.125rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  color: var(--text);
}
.block h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 24px;
  color: var(--text);
}

.block ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.block ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.block ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.block table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .875rem;
}
.block table th,
.block table td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.block table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.block table a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.block table a:hover { color: var(--text); }

.text-secondary { color: var(--text-muted); }

/* ========== FOOTER ========== */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: .8125rem;
  color: var(--text-muted);
  transition: color var(--t) var(--ease);
}

.footer-links a:hover { color: var(--text); letter-spacing: 0; }

.footer-meta {
  font-size: .8125rem;
  color: var(--text-muted);
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal-scale {
  opacity: 0;
  transform: scale(.96);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.vis .reveal,
.vis .reveal-left,
.vis .reveal-right,
.vis .reveal-scale {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .18s; }
.reveal-d3 { transition-delay: .26s; }
.reveal-d4 { transition-delay: .34s; }
.reveal-d5 { transition-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  section { padding: 96px 0; }
  .hero { padding: 140px 0 96px; }

  .feature-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-showcase:nth-child(even) { direction: ltr; }

  .perf-grid { grid-template-columns: 1fr; gap: 16px; }
  .perf-stat { padding: 32px 24px; }

  .triad-item {
    grid-template-columns: 48px 1fr;
    gap: 20px;
    padding: 40px 0;
  }
  .triad-num { font-size: 2rem; }

  .compare-row { grid-template-columns: 100px 1fr 1fr; }
  .compare-cell { padding: 16px 12px; font-size: .8125rem; }

  .pricing-free { grid-template-columns: 1fr; }
  .pricing-paid { grid-template-columns: 1fr; }

  .features-secondary { grid-template-columns: 1fr; }

  .cost-legend { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .w, .w-narrow, .w-wide { padding: 0 20px; }
  section { padding: 72px 0; }
  .hero { padding: 120px 0 72px; }
  .feature-visual { padding: 32px; min-height: 180px; }
  .triad-item { grid-template-columns: 1fr; }
  .triad-num { font-size: 1.5rem; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-cell { padding: 8px 0; }
  .compare-header { display: none; }
  .compare-label { display: block; margin-bottom: 4px; }
}
