/* Sorrel landing page — plain CSS, system fonts, light + dark.
   No external fonts, no JS, no tracking. Accent echoes the app's warm palette. */

:root {
  --bg: #fcfbf7;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --text: #1f1b16;
  --text-muted: #5d564c;
  --border: #e4ddcf;
  --accent: #a85f1f;          /* AA-contrast warm accent on light */
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(31, 27, 22, .06), 0 8px 24px rgba(31, 27, 22, .08);
  --radius: 14px;
  --maxw: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110d;
    --surface: #1d1916;
    --surface-2: #24201b;
    --text: #f1ece3;
    --text-muted: #b7ad9e;
    --border: #322c25;
    --accent: #e0974a;        /* AA-contrast warm accent on dark */
    --accent-ink: #1a1206;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

a { color: var(--accent); }

/* Focus + skip link (accessibility) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 10; text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  border-bottom: 1px solid var(--border);
  padding-bottom: 48px;
}
.topbar {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.topbar-link { font-size: 15px; color: var(--text-muted); text-decoration: none; }
.topbar-link:hover { color: var(--text); }

.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 0;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
.hero-copy h1 { font-size: clamp(40px, 6vw, 60px); margin: 0 0 8px; }
.subtitle { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; margin: 0 0 16px; }
.oneliner { font-size: 18px; color: var(--text-muted); margin: 0 0 28px; max-width: 38ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-block; font-weight: 600; font-size: 16px; text-decoration: none;
  padding: 13px 22px; border-radius: 11px; border: 1px solid transparent; transition: transform .04s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); }
.hero-note { font-size: 14px; color: var(--text-muted); margin: 16px 0 0; }

/* Hero mockup (CSS-only; swap for a real screenshot later) */
.hero-mock { display: grid; gap: 14px; }
.mock-window {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px 18px; position: relative;
}
.mock-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.mock-source-text { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--text-muted); margin: 0; white-space: pre-wrap; }
.mock-sorrel { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.mock-clean-text { font-size: 15px; margin: 0 0 14px; }
.mock-key { display: flex; gap: 6px; justify-content: center; }
.mock-key kbd {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 7px; padding: 4px 10px; color: var(--text); box-shadow: var(--shadow);
}
.mock-playing { display: flex; align-items: center; gap: 4px; }
.mock-playing .bar { width: 3px; height: 14px; background: var(--accent); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.mock-playing .bar:nth-child(2) { animation-delay: .15s; height: 20px; }
.mock-playing .bar:nth-child(3) { animation-delay: .3s; height: 11px; }
.mock-playing .bar:nth-child(4) { animation-delay: .45s; height: 18px; }
.mock-playing .bar:nth-child(5) { animation-delay: .6s; height: 13px; }
.mock-playing-label { font-size: 13px; color: var(--text-muted); margin-left: 8px; }
@keyframes eq { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .mock-playing .bar { animation: none; } }

/* ---------- Workflow band ---------- */
.band { background: var(--surface); border-bottom: 1px solid var(--border); }
.workflow-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 24px; list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.workflow-card h3 { font-size: 18px; margin: 0 0 8px; }
.workflow-card p { font-size: 15px; color: var(--text-muted); margin: 0; }

/* ---------- Prose sections ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 56px 24px; }
.prose h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 18px; }
.prose p { margin: 0 0 16px; }
.privacy-flow { padding-left: 22px; }
.privacy-flow li { margin-bottom: 10px; }
.plain-list { padding-left: 22px; }
.plain-list li { margin-bottom: 8px; }

details {
  border: 1px solid var(--border); border-radius: 11px; padding: 4px 18px; margin-bottom: 12px; background: var(--surface);
}
summary { font-weight: 600; cursor: pointer; padding: 12px 0; list-style-position: inside; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
details p { color: var(--text-muted); margin: 0 0 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; }
.footer-links { margin: 0 0 8px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.copyright { font-size: 14px; color: var(--text-muted); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .workflow-grid { grid-template-columns: 1fr; padding: 40px 24px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
}
