/* ReplySmith public site. Vanilla CSS, served by the FastAPI backend.
 * One accent (brand violet, as used on the extension's Insert button),
 * zinc neutrals, one radius scale (8px controls / 16px surfaces),
 * light + dark via prefers-color-scheme. */

@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fafafa;
  --surface: #f2f2f4;
  --surface-strong: #e9e9ee;
  --elevated: #ffffff;
  --fg: #18181b;
  --fg-soft: #3f3f46;
  --muted: #62626b;
  --line: #e2e2e7;
  --accent: hsl(255 72% 56%);
  --accent-hover: hsl(255 72% 50%);
  --accent-soft: hsl(255 72% 56% / 0.09);
  --accent-fg: #ffffff;
  --shadow: 0 1px 2px hsl(250 20% 20% / 0.06), 0 12px 32px -8px hsl(255 40% 30% / 0.16);
  --radius-sm: 8px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --surface: #16161a;
    --surface-strong: #1d1d22;
    --elevated: #1b1b20;
    --fg: #f4f4f5;
    --fg-soft: #d4d4d8;
    --muted: #a1a1aa;
    --line: #2a2a31;
    --accent: hsl(255 80% 72%);
    --accent-hover: hsl(255 80% 78%);
    --accent-soft: hsl(255 80% 72% / 0.12);
    --accent-fg: #120d24;
    --shadow: 0 1px 2px hsl(0 0% 0% / 0.4), 0 16px 40px -12px hsl(255 60% 10% / 0.7);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 500; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--bg); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 28px; height: 28px; flex: none; }

.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; transition: color 0.2s var(--ease); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav .btn { color: var(--accent-fg); }
@media (max-width: 720px) {
  .nav .nav-secondary { display: none; }
  .nav { gap: 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm); border: 0;
  background: var(--accent); color: var(--accent-fg); font: inherit; font-size: 15px; font-weight: 550;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 1px 0 hsl(255 60% 30% / 0.25), inset 0 1px 0 hsl(0 0% 100% / 0.18);
}
.btn:hover { background: var(--accent-hover); color: var(--accent-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn[aria-disabled="true"] { background: var(--surface-strong); color: var(--muted); box-shadow: none; cursor: default; transform: none; }
.link-arrow { color: var(--fg-soft); text-decoration: none; font-weight: 500; font-size: 15px; transition: color 0.2s var(--ease); }
.link-arrow:hover { color: var(--fg); }
.link-arrow span { display: inline-block; transition: transform 0.2s var(--ease); }
.link-arrow:hover span { transform: translateX(3px); }

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; color: var(--fg); letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.04; font-weight: 650; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; font-weight: 620; }
h3 { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--fg-soft); max-width: 34ch; }
.muted { color: var(--muted); }
.mono { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: 0.02em; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 112px 0 120px; }
@media (max-width: 768px) { .section { padding: 72px 0 80px; } }

/* Hero: asymmetric split, copy left, real product panel right */
.hero { padding: 72px 0 104px; position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 28px; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-note { font-size: 14px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -12% -18% -10% -8%; z-index: -1;
  background: radial-gradient(60% 55% at 60% 45%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
@media (max-width: 960px) {
  .hero { padding: 40px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .lede { max-width: none; }
}

/* Real product panel preview (static render of the extension's panel UI) */
.panel {
  width: 100%; max-width: 480px; margin-left: auto;
  background: #ffffff; color: #1b1d27; border-radius: var(--radius-lg);
  border: 1px solid hsl(240 10% 50% / 0.12); box-shadow: var(--shadow);
  font-size: 14px; line-height: 20px; overflow: hidden;
  transform: rotate(0.6deg);
}
@media (max-width: 960px) { .panel { margin: 0 auto; transform: none; } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; font-size: 16px; }
.panel-head .dot { width: 18px; height: 18px; border-radius: 6px; background: var(--accent); flex: none; }
@media (prefers-color-scheme: dark) { .panel-head .dot { background: hsl(255 72% 56%); } }
.panel-body { padding: 0 18px 18px; }
.panel-label { font-weight: 800; font-size: 15px; margin: 6px 0 6px; color: rgba(0, 0, 0, 0.94); }
.panel-text { color: rgba(6, 8, 31, 0.86); }
.panel-points { margin: 6px 0 14px; padding-left: 18px; color: rgba(6, 8, 31, 0.86); }
.panel-points li { margin: 4px 0; }
.panel-rule { height: 1px; background: #ededf4; margin: 4px -18px 14px; }
.panel-ideas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-chip { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: rgba(114, 118, 139, 0.08); color: #1b1d27; }
.panel-idea { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px; margin-bottom: 8px; border-radius: 8px; background: rgba(114, 118, 139, 0.07); color: #1b1d27; }
.panel-idea span:last-child { color: rgba(10, 13, 51, 0.5); }
.panel-idea.is-active { background: hsl(255 72% 56% / 0.1); box-shadow: inset 0 0 0 1px hsl(255 72% 56% / 0.35); }
.panel-input { margin-top: 12px; border: 1px solid rgba(114, 118, 139, 0.22); border-radius: 12px; padding: 10px 12px 26px; color: rgba(10, 13, 51, 0.5); }
.panel-caption { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 480px; margin-left: auto; text-align: right; }
@media (max-width: 960px) { .panel-caption { margin: 14px auto 0; text-align: center; } }

/* How it works: sticky heading left, steps right */
.flow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 72px; }
.flow-head { position: sticky; top: 108px; align-self: start; display: grid; gap: 18px; }
.flow-head p { color: var(--fg-soft); max-width: 36ch; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.flow-step { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding: 28px 28px 30px; border-radius: var(--radius-lg); background: var(--surface); }
.flow-step:nth-child(2) { background: var(--surface-strong); }
.flow-step:nth-child(4) { background: var(--accent-soft); }
.flow-verb { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; color: var(--fg); }
.flow-step p { color: var(--fg-soft); }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; gap: 36px; }
  .flow-head { position: static; }
  .flow-step { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
}

/* Privacy statement band */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { max-width: 16ch; }
.band-grid { margin-top: 56px; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 40px; }
.band-item { padding-top: 22px; border-top: 2px solid var(--fg); display: grid; gap: 8px; }
.band-item:first-child { border-top-color: var(--accent); }
.band-item p { color: var(--fg-soft); max-width: 32ch; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; } }

/* Pricing: two plans, Pro emphasised by colour not height */
.pricing-head { display: grid; gap: 14px; max-width: 60ch; }
.plans { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 22px; padding: 32px; border-radius: var(--radius-lg); background: var(--elevated); border: 1px solid var(--line); }
.plan-pro { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), var(--shadow); background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--elevated); }
.plan-name { font-weight: 600; font-size: 16px; color: var(--fg-soft); }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; min-height: 64px; }
.plan-price strong { font-size: 44px; line-height: 1; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { padding-left: 26px; position: relative; color: var(--fg-soft); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-50%) rotate(-45deg); }
.plan-foot { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan { padding: 26px; } }

/* FAQ: side-by-side list */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
.faq dl { margin: 0; }
.faq-row { padding: 22px 0 24px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.faq-row:first-child { padding-top: 0; }
.faq dt { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.faq dd { margin: 0; color: var(--fg-soft); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; gap: 28px; } }

/* Closing CTA */
.closing { padding: 0 0 112px; margin-top: -40px; }
@media (max-width: 768px) { .closing { margin-top: -16px; padding-bottom: 80px; } }
.closing-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-top: 48px; border-top: 1px solid var(--line); }
.closing h2 { max-width: 18ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--muted); }
.site-footer .container { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: start; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--fg-soft); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
.footer-legal { grid-column: 1 / -1; max-width: 80ch; }
@media (max-width: 640px) { .site-footer .container { grid-template-columns: 1fr; } }

/* ---------- Document pages (privacy / terms / refunds) ---------- */
.doc { padding: 64px 0 104px; }
.doc-inner { max-width: 720px; }
.doc-head { display: grid; gap: 12px; padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 50px); }
.doc h2 { font-size: 24px; line-height: 1.25; font-weight: 620; letter-spacing: -0.02em; margin: 48px 0 12px; scroll-margin-top: 96px; }
.doc p, .doc li { color: var(--fg-soft); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 10px 0 0; display: grid; gap: 8px; }
.doc strong { color: var(--fg); font-weight: 600; }
.doc code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.88em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.summary { margin: 28px 0 8px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--fg); }
.summary p { color: var(--fg); }
.data-list { display: grid; gap: 12px; margin-top: 16px; }
.data-item { padding: 20px 22px; border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 10px; }
.data-item h3 { font-size: 17px; }
.data-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 15px; }
.data-meta div { display: grid; gap: 2px; }
.data-meta dt { font-size: 13px; color: var(--muted); font-weight: 500; }
.data-meta dd { margin: 0; color: var(--fg-soft); }
@media (max-width: 600px) { .data-meta { grid-template-columns: 1fr; } }

/* 404 */
.notfound { padding: 120px 0 160px; display: grid; gap: 20px; justify-items: start; }

/* ---------- Motion (entry + reveal), respects reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .panel.rise { animation-duration: 1s; }
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.is-visible { opacity: 1; transform: none; }
  .panel-idea.is-active { animation: pick 3.6s var(--ease) 1.4s 1 both; }
  @keyframes pick { 0% { background: rgba(114, 118, 139, 0.07); box-shadow: none; } 100% { background: hsl(255 72% 56% / 0.1); box-shadow: inset 0 0 0 1px hsl(255 72% 56% / 0.35); } }
}

/* ---------- Beta guide ---------- */
.steps { padding-left: 22px; margin: 12px 0 0; display: grid; gap: 10px; }
.steps li { color: var(--fg-soft); padding-left: 4px; }
.steps li::marker { color: var(--accent); font-weight: 600; }
.checklist { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { padding: 20px 22px; border-radius: var(--radius-lg); background: var(--surface); display: grid; gap: 6px; align-content: start; }
.check:first-child { grid-column: 1 / -1; background: var(--accent-soft); }
.check h3 { font-size: 17px; }
.check p { font-size: 16px; }
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
[hidden] { display: none !important; }
.form { margin-top: 28px; display: grid; gap: 22px; max-width: 560px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 550; font-size: 15px; color: var(--fg); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--elevated); border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: var(--radius-sm); padding: 11px 13px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.help { font-size: 14px; color: var(--muted); }
.form-error { padding: 12px 14px; border-radius: var(--radius-sm); background: hsl(0 75% 50% / 0.1); color: hsl(0 65% 38%); font-size: 15px; }
@media (prefers-color-scheme: dark) { .form-error { color: hsl(0 85% 75%); } }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Website upgrade (Pro card) */
.upgrade-web { display: grid; gap: 12px; }
.gsi-slot { min-height: 44px; }
.upgrade-status { font-size: 14px; color: var(--fg-soft); min-height: 0; }
.upgrade-status:empty { display: none; }
.upgrade-status[data-error="true"] { color: hsl(0 65% 42%); }
@media (prefers-color-scheme: dark) { .upgrade-status[data-error="true"] { color: hsl(0 85% 72%); } }
