/* ============================================
   CRISPER — PRODUCTION STYLESHEET
   Palette matches app: near-black bg, white
   text hierarchy, red accent used sparingly.
   ============================================ */

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

:root {
  /* exact app palette */
  --bg:         #1c1c1c;   /* Color(white: 0.11) */
  --surface:    #1e1e1e;   /* Color(white: 0.12) */
  --surface2:   #262626;   /* Color(white: 0.15) */
  --surface3:   #2e2e2e;
  --border:     rgba(255,255,255,0.13); /* Color(white: 0.28) */
  --border-sub: rgba(255,255,255,0.07);

  --t1: #ffffff;                     /* primary */
  --t2: rgba(255,255,255,0.62);      /* secondary */
  --t3: rgba(255,255,255,0.45);      /* tertiary */
  --t4: rgba(255,255,255,0.32);      /* quaternary */

  /* single accent */
  --red:   rgb(242, 25, 25);  /* Color(red:0.95, green:0.1, blue:0.1) */
  --red-d: rgba(242,25,25,0.12);

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  --font:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  --max-w:     1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #111111;
  color: var(--t1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==============================
   UTILITIES
   ============================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 14px;
}

.eyebrow--red { color: var(--red); }

hr.divider {
  border: none;
  border-top: 1px solid var(--border-sub);
  margin: 0;
}

/* ==============================
   NAV
   ============================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border-sub);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--t1);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-icon-box {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--t3);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--t1); }

.nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; }

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--t1);
  color: #111;
  padding: 14px 28px;
  font-size: 15px;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--t2);
  padding: 13px 24px;
  font-size: 15px;
  border: 1px solid var(--border);
}
.btn-outline:hover { color: var(--t1); border-color: var(--border); }

/* ==============================
   HERO
   ============================== */
.hero {
  min-height: 100vh;
  padding: 130px 0 80px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* subtle noise-like texture line */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(255,255,255,0.012) 80px,
      rgba(255,255,255,0.012) 81px
    );
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 80px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--t3);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--t1);
  margin-bottom: 20px;
}

.hero-title em {
  font-style: normal;
  color: var(--t3);
  font-weight: 300;
}

.hero-sub {
  font-size: 17px;
  color: var(--t3);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-footnote {
  font-size: 12px;
  color: var(--t4);
  margin-top: -36px;
  margin-bottom: 0;
}

/* Trust row */
.trust-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--t4);
  font-weight: 500;
}

.trust-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  color: var(--t3);
}

/* ---- Hero right: App preview ---- */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* ---- Real pill (canvas recreation) ---- */
.real-pill-wrapper {
  position: relative;
  width: 136px;
  height: 38px;
}

.real-pill-clip {
  position: absolute;
  inset: 0;
  border-radius: 19px;
  overflow: hidden;
  background: #000;
  transition: background 0.35s ease;
}

#pillWave {
  display: block;
}

.real-pill-border {
  position: absolute;
  top: -8px;
  left: -8px;
  pointer-events: none;
}

/* Icon placeholder */
.app-icon-slot {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--t4);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}

.app-icon-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(255,255,255,0.025) 6px,
    rgba(255,255,255,0.025) 7px
  );
}

.icon-placeholder-svg {
  position: relative;
  z-index: 1;
  opacity: 0.3;
}

.icon-slot-label {
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Floating pill mockup */
.pill-mockup-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pill-mockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Recording state */
.pill-mockup.s-recording {
  background: rgba(242,25,25,0.08);
  border-color: rgba(242,25,25,0.35);
}

/* Transcribing state */
.pill-mockup.s-transcribing {
  border-color: rgba(255,255,255,0.35);
  animation: subtlePulse 2s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.05); }
  50%       { box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
}

/* Done state */
.pill-mockup.s-done {
  border-color: rgba(255,255,255,0.25);
}

.pill-mic-icon {
  color: var(--t4);
  display: flex;
  flex-shrink: 0;
  transition: color 0.3s;
}

.pill-mockup.s-recording .pill-mic-icon { color: var(--red); }

/* Waveform */
.pill-wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 22px;
}

.pill-wave span {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: var(--t1);
  animation: waveBar 0.9s ease-in-out infinite;
  opacity: 0.25;
}

.pill-mockup.s-recording .pill-wave span {
  background: var(--red);
  opacity: 1;
}

.pill-wave span:nth-child(1)  { animation-delay: 0.00s; }
.pill-wave span:nth-child(2)  { animation-delay: 0.11s; }
.pill-wave span:nth-child(3)  { animation-delay: 0.22s; }
.pill-wave span:nth-child(4)  { animation-delay: 0.08s; }
.pill-wave span:nth-child(5)  { animation-delay: 0.18s; }
.pill-wave span:nth-child(6)  { animation-delay: 0.30s; }
.pill-wave span:nth-child(7)  { animation-delay: 0.05s; }
.pill-wave span:nth-child(8)  { animation-delay: 0.16s; }

@keyframes waveBar {
  0%, 100% { height: 3px;  opacity: 0.25; }
  50%       { height: 18px; opacity: 1; }
}

/* Spinner for transcribing */
.pill-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-top-color: var(--t2);
  animation: spin 0.75s linear infinite;
}

.pill-mockup.s-transcribing .pill-wave { display: none; }
.pill-mockup.s-transcribing .pill-spinner { display: block; }

/* Check for done */
.pill-check {
  display: none;
  color: var(--t2);
}
.pill-mockup.s-done .pill-wave { display: none; }
.pill-mockup.s-done .pill-check { display: flex; }

@keyframes spin { to { transform: rotate(360deg); } }

.pill-state-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--t4);
  letter-spacing: 0.02em;
}

/* Mini transcript preview */
.transcript-preview {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.tp-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 8px;
}

.tp-text {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
}

.tp-text strong {
  color: var(--t1);
  font-weight: 500;
}

/* ==============================
   SECTIONS
   ============================== */
.section {
  padding: 96px 0;
}

.section-head {
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--t1);
  margin-bottom: 14px;
}

.section-title em {
  font-style: normal;
  color: var(--t3);
  font-weight: 300;
}

.section-sub {
  font-size: 16px;
  color: var(--t3);
  line-height: 1.75;
  max-width: 480px;
}

/* ==============================
   FEATURES
   ============================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-sub);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feat {
  background: #111111;
  padding: 32px 28px;
  transition: background 0.2s;
}
.feat:hover { background: var(--surface); }

.feat--wide { grid-column: span 2; }

.feat-number {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--t4);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.feat h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feat p {
  font-size: 13.5px;
  color: var(--t3);
  line-height: 1.7;
}

/* Hotkeys inside feature */
.feat-hotkeys {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feat-hotkey {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feat-hotkey-desc {
  font-size: 12px;
  color: var(--t4);
  margin-left: 2px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--t2);
  min-width: 26px;
}

/* Library mockup */
.lib-mockup {
  margin-top: 20px;
  display: flex;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-sub);
  overflow: hidden;
  background: #0e0e0e;
  font-size: 11.5px;
  height: 140px;
}

.lm-sidebar {
  width: 120px;
  border-right: 1px solid var(--border-sub);
  padding: 10px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.lm-row {
  padding: 4px 12px;
  color: var(--t4);
  cursor: default;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.15s;
}
.lm-row:hover { color: var(--t2); }
.lm-row--active { color: var(--t2); font-weight: 600; }
.lm-row--app { font-size: 11px; padding-left: 16px; color: var(--t4); }

.lm-sep {
  height: 1px;
  background: var(--border-sub);
  margin: 5px 0;
}

.lm-badge {
  font-size: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 0 5px;
  color: var(--t4);
}

.lm-list {
  flex: 1;
  padding: 6px 0;
  overflow: hidden;
}

.lm-item {
  padding: 6px 12px;
  cursor: default;
  border-radius: 5px;
  margin: 0 4px;
  transition: background 0.15s;
}
.lm-item:hover { background: var(--surface); }
.lm-item--sel { background: var(--surface2); }

.lm-title { font-size: 11px; font-weight: 600; color: var(--t1); margin-bottom: 2px; }
.lm-meta  { font-size: 10px; color: var(--t4); }

/* ==============================
   HOW IT WORKS
   ============================== */
.steps-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-sub);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  background: #111111;
  padding: 32px 24px;
  position: relative;
}

.step-n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--t4);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  display: block;
}

.step h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.7;
}

.step-indicator {
  margin-top: 20px;
}

/* Small pill states in steps */
.s-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-sub);
  background: var(--surface);
}

.s-pill--recording {
  background: rgba(242,25,25,0.07);
  border-color: rgba(242,25,25,0.3);
}

.s-pill--done {
  border-color: rgba(255,255,255,0.2);
}

.s-mini-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 16px;
}

.s-mini-wave span {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: var(--red);
  animation: waveBar 1s ease-in-out infinite;
}
.s-mini-wave span:nth-child(1) { animation-delay: 0.00s; }
.s-mini-wave span:nth-child(2) { animation-delay: 0.13s; }
.s-mini-wave span:nth-child(3) { animation-delay: 0.26s; }
.s-mini-wave span:nth-child(4) { animation-delay: 0.08s; }
.s-mini-wave span:nth-child(5) { animation-delay: 0.20s; }

.s-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-top-color: var(--t2);
  animation: spin 0.75s linear infinite;
}

.s-polish {
  margin-top: 16px;
}

.s-raw {
  font-size: 11.5px;
  color: var(--t4);
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.5;
}

.s-clean {
  font-size: 11.5px;
  color: var(--t2);
  font-weight: 500;
  line-height: 1.5;
}

.s-arrow {
  font-size: 11px;
  color: var(--t4);
  margin-bottom: 4px;
}

/* ==============================
   PRIVACY
   ============================== */
.privacy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.privacy-points {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pp {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pp-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.pp-check svg { color: var(--t2); }

.pp-text {
  font-size: 14px;
  color: var(--t3);
  line-height: 1.6;
}

.pp-text code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--t3);
}

/* Pipeline diagram */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #111111;
  border-bottom: 1px solid var(--border-sub);
  transition: background 0.2s;
}
.pl-row:last-child { border-bottom: none; }
.pl-row:hover { background: var(--surface); }

.pl-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.pl-info { flex: 1; }

.pl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
}

.pl-detail {
  font-size: 11.5px;
  color: var(--t4);
  font-family: var(--font-mono);
}

.pl-arrow {
  padding: 0 20px;
  text-align: center;
  font-size: 11px;
  color: var(--t4);
  background: #111111;
  border-bottom: 1px solid var(--border-sub);
}

.pl-row--output .pl-name { color: var(--t2); }

.no-cloud-badge {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(242,25,25,0.25);
  background: rgba(242,25,25,0.06);
  font-size: 12px;
  font-weight: 600;
  color: rgba(242,25,25,0.8);
}

/* ==============================
   APPS
   ============================== */
.apps-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-tag {
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-sub);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--t3);
  transition: color 0.15s, border-color 0.15s;
}
.app-tag:hover {
  color: var(--t1);
  border-color: var(--border);
}

.app-tag--any {
  border-style: dashed;
  color: var(--t4);
}

/* ==============================
   CTA
   ============================== */
.cta-section {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 1px;
  height: 120px;
  background: linear-gradient(to bottom, var(--border-sub), transparent);
}

.cta-title {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
  color: var(--t1);
}

.cta-sub {
  font-size: 17px;
  color: var(--t3);
  margin-bottom: 40px;
  line-height: 1.7;
}

.cta-footnote {
  margin-top: 18px;
  font-size: 12px;
  color: var(--t4);
}

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

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--t2);
}

.footer-copy {
  font-size: 12px;
  color: var(--t4);
}

/* ==============================
   SCROLL FADE-IN
   ============================== */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { display: none; }
  .steps-track { grid-template-columns: repeat(2, 1fr); }
  .privacy-layout { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feat--wide { grid-column: span 2; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feat--wide { grid-column: span 1; }
  .steps-track { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
