/* ── Sales Whisperer ─────────────────────────────────────────────────────────
   Tokens lifted from the product itself (apps/web/src/app/globals.css):
   "focused cockpit chrome: neutral, dense, and low-glow", with orange
   reserved for primary action and active location. Inter + JetBrains Mono,
   matching the desktop app.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg-base:      #080A0F;
  --bg-elevated:  #0D1017;
  --surface:      rgba(255, 255, 255, 0.026);
  --surface-hover:rgba(255, 255, 255, 0.045);
  --border:       rgba(255, 255, 255, 0.075);
  --border-strong:rgba(255, 255, 255, 0.13);

  --text-primary:   rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary:  rgba(255, 255, 255, 0.35);

  --accent:        #F75B22;
  --accent-hover:  #FB7E4D;
  --accent-soft:   rgba(247, 91, 34, 0.10);
  --accent-border: rgba(247, 91, 34, 0.22);
  --ring:          rgba(247, 91, 34, 0.5);

  --status-danger: #ef4444;

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  --measure: 64rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.46);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip:focus {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 50;
  background: var(--accent); color: #fff;
  padding: 0.6rem 1rem; border-radius: 8px;
  font-size: 0.9rem;
}

:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

/* ── top bar ─────────────────────────────────────────────────────────────── */

.bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem var(--pad) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bar img { display: block; height: 34px; width: auto; }

.bar-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* ── hero ────────────────────────────────────────────────────────────────── */

main { max-width: var(--measure); margin: 0 auto; padding: 0 var(--pad); }

.hero { padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(2.5rem, 5vw, 3.5rem); }

h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.35rem, 1.3rem + 4.6vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.lede {
  max-width: 46ch;
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── the demo: transcript + coaching in the margin ───────────────────────── */

.demo {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  box-shadow: var(--shadow-lg);
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--accent); }

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
  box-shadow: 0 0 10px rgba(247, 91, 34, 0.55);
  animation: pulse 2.4s ease-in-out infinite;
}

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

.demo-meta { color: var(--text-tertiary); }

.transcript { list-style: none; margin: 0; padding: 0; }

.turn {
  display: grid;
  grid-template-columns: 4.25rem 1fr 15rem;
  gap: 0 1.5rem;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
}

.turn:last-child { border-bottom: 0; padding-bottom: 0.25rem; }

.t { font-family: var(--mono); font-size: 0.75rem; color: var(--text-tertiary); padding-top: 0.3rem; }

.who {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-tertiary);
}

/* Transcript is mono, like the app. */
.said {
  grid-column: 2;
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 0.86rem + 0.2vw, 0.9875rem);
  line-height: 1.55;
  color: var(--text-primary);
}

/* Coaching is sans, in the margin — the app's voice, not the caller's.
   Kept off the accent on purpose: orange is for action, not commentary. */
.cue {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
  padding-left: 1.125rem;
  border-left: 2px solid var(--accent-border);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.cue-good { color: var(--text-primary); }

.demo-foot {
  margin: 1.5rem 0 0;
  padding-top: 1.125rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── what changed ────────────────────────────────────────────────────────── */

.change { padding: clamp(4rem, 9vw, 6rem) 0 0; }

.change-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin: 0 0 2rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.change-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.change-item h3 {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.012em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.change-item p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }

/* ── signup ──────────────────────────────────────────────────────────────── */

.signup { padding: clamp(4rem, 9vw, 6rem) 0 clamp(3rem, 6vw, 4rem); }

.signup h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.375rem);
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin: 0 0 0.625rem;
}

.signup-note { margin: 0 0 1.75rem; color: var(--text-secondary); max-width: 44ch; }

#notify-form { display: flex; flex-wrap: wrap; gap: 0.625rem; max-width: 34rem; }

#email {
  flex: 1 1 15rem;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.8125rem 1rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

#email::placeholder { color: var(--text-tertiary); }
#email:hover { background: var(--surface-hover); }
#email:focus-visible { border-color: var(--accent-border); outline-offset: 1px; }

/* The one place orange does work: the primary action. */
#notify-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.375rem;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 9px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

#notify-btn:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
#notify-btn:active:not(:disabled) { transform: translateY(1px); }
#notify-btn:disabled { opacity: 0.5; cursor: default; }

.form-msg { margin: 0.875rem 0 0; min-height: 1.4rem; font-size: 0.9rem; color: var(--text-secondary); }
.form-msg[data-state="error"] { color: var(--status-danger); }

/* ── footer ──────────────────────────────────────────────────────────────── */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem var(--pad) 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.625rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── motion ──────────────────────────────────────────────────────────────── */

.js-anim .turn { opacity: 0; transform: translateY(6px); transition: opacity 520ms ease, transform 520ms ease; }
.js-anim .cue  { opacity: 0; transform: translateX(-5px); transition: opacity 520ms ease, transform 520ms ease; }
.js-anim .turn.in, .js-anim .cue.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .turn, .js-anim .cue { opacity: 1 !important; transform: none !important; transition: none !important; }
  .live-dot { animation: none; }
  #notify-btn { transition: none; }
}

/* ── narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 46rem) {
  .turn { grid-template-columns: 3.75rem 1fr; gap: 0 1rem; }
  .cue { grid-column: 2; grid-row: auto; margin-top: 0.75rem; }
  .demo-head { font-size: 0.6875rem; }
  .bar img { height: 28px; }
}
