/* AutoSOP — "document studio". Light, paper-tinted neutrals (not the banned
   cream+serif+terracotta combo: body copy is sans, accent is amber not
   terracotta). Concept: the product turns a screen+voice recording into an
   annotated document, so the hero shows that transformation directly — a
   waveform (the narration) resolving into a numbered, annotated doc.
   Signature effect: "annotation-sweep" — an amber highlight box draws itself
   onto a mock screenshot, like the AI marking up what you clicked. */
:root {
  --bg: #f8f8f5;
  --bg-2: #f2f1ec;
  --panel: #ffffff;
  --panel-2: #fbfaf7;
  --line: #e3e0d6;
  --line-2: #d3cfc0;
  --ink: #201e1a;
  --muted: #6f6a5f;
  --muted-dim: #a49d8c;
  --accent: #f2a900;
  --accent-rgb: 242, 169, 0;
  --accent-ink: #201e1a;
  --safe: #1f9d63;
  --warn: #c2410c;
  --danger: #c23b4f;
  --font: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.pulse { display:inline-block; width:6px; height:6px; border-radius:50%; background: var(--accent); margin-right:8px; box-shadow:0 0 0 0 rgba(var(--accent-rgb),.55); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),.5);} 70%{box-shadow:0 0 0 7px rgba(var(--accent-rgb),0);} 100%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),0);} }

header.site { position: sticky; top: 0; z-index: 30; background: rgba(248,248,245,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 550; }
.nav-links a:hover { color: var(--ink); }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font:inherit; font-weight:650; font-size:0.95rem; cursor:pointer;
  background: var(--accent); color: var(--accent-ink); border:1px solid var(--accent); padding:12px 20px; border-radius:11px; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -14px rgba(var(--accent-rgb),.85); }
.btn:focus-visible { outline: 3px solid rgba(var(--accent-rgb),.5); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--accent); box-shadow: none; }
.btn.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn.btn-block { width: 100%; }
.btn:disabled { opacity:.55; cursor:default; transform:none; box-shadow:none; }

.hero { padding: 60px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.kicker { display:inline-flex; align-items:center; font-family: var(--mono); font-size:0.74rem; text-transform:uppercase; letter-spacing:0.12em; color: var(--muted); border:1px solid var(--line); background: var(--panel); border-radius:999px; padding:6px 13px; }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.15rem); margin-top: 20px; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .sub { color: var(--muted); font-size: 1.06rem; margin: 20px 0 0; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.micro { font-size: 0.82rem; color: var(--muted-dim); margin: 16px 0 0; }

/* Hero mockup: recording -> waveform -> annotated document */
.board { background: var(--panel); border:1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 30px 60px -34px rgba(32,30,26,.28); overflow:hidden; }
.board-bar { display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); background: var(--panel-2); }
.board-bar .dot { width:10px; height:10px; border-radius:50%; background: var(--line-2); }
.board-title { font-family: var(--mono); font-size:0.78rem; color: var(--muted-dim); margin-left:6px; }
.board-live { margin-left:auto; font-size:0.72rem; color: var(--muted); font-family: var(--mono); display:inline-flex; align-items:center; }
.board-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.wave-row { display: flex; align-items: center; gap: 12px; }
.wave-label { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin-left: auto; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--accent); opacity: .55; height: 40%; animation: wave 1.6s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: -0.9s; height: 70%; }
.wave i:nth-child(3n) { animation-delay: -0.4s; height: 90%; }
.wave i:nth-child(5n) { animation-delay: -1.2s; height: 55%; }
@keyframes wave { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.assemble-arrow { text-align: center; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-dim); }

.doc-steps { display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 14px 0; }
.doc-step { display: flex; gap: 12px; align-items: flex-start; }
.doc-step .num { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--accent); width: 18px; flex-shrink: 0; padding-top: 2px; }
.doc-step-title { margin: 0; font-size: 0.86rem; color: var(--ink); }
.doc-step.done-preview .doc-step-title { color: var(--muted); }
.doc-step.done-preview .num { color: var(--safe); }

.shot { position: relative; width: 100%; max-width: 220px; height: 70px; margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.shot-chrome { position: absolute; inset: 0; background: linear-gradient(160deg, var(--bg-2), var(--panel-2) 60%); }
.shot-chrome::before { content:''; position:absolute; top:6px; left:8px; width:34px; height:6px; border-radius:3px; background: var(--line-2); }
.shot-chrome::after { content:''; position:absolute; top:20px; left:8px; right:34px; height:26px; border-radius:5px; background: var(--panel); border: 1px solid var(--line); }
.highlight-box { position: absolute; top: 18px; right: 26px; width: 34px; height: 22px; border: 2px solid var(--accent); border-radius: 5px; box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18); animation: sweep 2.8s ease-in-out infinite; }
.callout { position: absolute; top: 8px; right: 18px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; animation: sweep 2.8s ease-in-out infinite; }
@keyframes sweep { 0%, 18% { opacity: 0; transform: scale(0.7); } 30%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.7); } }

.board-foot { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); font-family: var(--mono); }
.safe-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); flex-shrink: 0; }

section.showcase, section.how, section.market, section.signup { padding: 64px 0; }
section.showcase { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-label { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.showcase h2, .how h2, .market h2, .signup h2 { font-size: 1.85rem; margin-top: 14px; text-wrap: balance; }
.showcase .sub, .how .sub, .market .sub { color: var(--muted); margin: 12px 0 0; max-width: 46em; }

/* Output showcase: the actual generated SOP document mockup */
.doc-card { margin-top: 32px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 30px 60px -36px rgba(32,30,26,.3); overflow: hidden; }
.doc-card-head { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.doc-card-head h3 { font-size: 1.3rem; }
.doc-card-meta { font-family: var(--mono); font-size: 0.76rem; color: var(--muted-dim); margin-top: 6px; }
.doc-card-body { padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.doc-full-step { display: grid; grid-template-columns: 32px 1fr; gap: 14px; }
.doc-full-step .num { font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.doc-full-step h4 { margin: 0 0 6px; font-size: 1rem; font-family: var(--font); font-weight: 650; }
.doc-full-step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.doc-full-step .shot { max-width: 320px; height: 96px; margin-top: 12px; }
.doc-full-step .shot .highlight-box { animation: none; opacity: 1; transform: none; top: 26px; right: 40px; width: 56px; height: 32px; }
.doc-full-step .shot .callout { animation: none; opacity: 1; transform: none; top: 14px; right: 30px; }
.shot-caption { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-dim); margin-top: 8px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.step-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; position: relative; overflow: hidden; }
.step-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background: var(--accent); }
.step-card .num { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); font-weight: 700; }
.step-card h3 { font-size: 1.02rem; font-family: var(--font); font-weight: 650; margin: 12px 0 8px; }
.step-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.market-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; margin-top: 28px; }
.stat-box { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 28px; text-align: center; }
.stat-number { display: block; font-family: var(--mono); font-size: 2.6rem; font-weight: 700; color: var(--accent); }
.stat-caption { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }
.gap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gap-list li { display: flex; gap: 10px; font-size: 0.94rem; color: var(--ink); }
.gap-list b { color: var(--accent); font-family: var(--mono); font-size: 0.8rem; flex-shrink: 0; padding-top: 3px; }

.signup .btn { margin-top: 24px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 46px; margin-top: 24px; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 0.88rem; }
.footer-row a { color: var(--muted); } .footer-row a:hover { color: var(--accent); }
.footer-row nav { display: flex; gap: 18px; }

/* Modal (contract preserved for main.js, incl. business-type picker) */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(32,30,26,.45); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { position: relative; width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 30px; box-shadow: 0 40px 90px -30px rgba(32,30,26,.4); max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 1.3rem; }
.modal .sub { color: var(--muted); font-size: 0.95rem; margin: 10px 0 20px; }
.modal .close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal .close:hover { color: var(--ink); }
.modal label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.modal input[type=email] { width: 100%; font: inherit; padding: 12px 14px; border-radius: 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); }
.modal input[type=email]:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.25); }
.business-picker { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.business-picker legend { font-size: 0.78rem; color: var(--muted); padding: 0 6px; }
.business-check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--ink); font-weight: 400; margin: 0; cursor: pointer; }
.business-check input { accent-color: var(--accent); }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.consent-row input { margin-top: 4px; flex-shrink: 0; accent-color: var(--accent); }
.consent-row label { font-size: 0.82rem; font-weight: 400; color: var(--muted); margin: 0; }
.consent-row a { color: var(--accent); }
.status { font-size: 0.9rem; margin: 12px 0 0; color: var(--muted); }
.status.success { color: var(--safe); }
.status.error { color: var(--danger); }

.legal { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.legal .back { font-size: 0.88rem; color: var(--muted); display: inline-block; margin-bottom: 24px; }
.legal .back:hover { color: var(--accent); }
.legal h1 { font-size: 2rem; margin-bottom: 8px; }
.legal h2 { font-size: 1.15rem; margin-top: 32px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--muted); font-size: 0.96rem; }
.legal ul { padding-left: 20px; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .market-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 480px) { body { font-size: 16px; } .steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } * { animation: none !important; transition: none !important; } }
