/* ============================================================
   Marlo — Markdown editor for Mac
   styles.css
   ============================================================ */

:root {
  --bg: #FBFBF9;
  --surface: #FFFFFF;
  --surface-2: #F2F1ED;
  --ink: #16161A;
  --ink-muted: #5A5A60;
  --ink-faint: #8E8E94;
  --line: #E7E6E1;
  --accent: #B45309;     /* warm amber — paper-ink feel */
  --accent-ink: #FFFFFF;
  --code-bg: #F2F1ED;
  --shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 32px rgba(20,20,20,.06);

  --serif: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0E;
    --surface: #161614;
    --surface-2: #1C1C1A;
    --ink: #ECEBE6;
    --ink-muted: #A8A7A2;
    --ink-faint: #76756F;
    --line: #2A2A27;
    --accent: #F59E0B;
    --accent-ink: #161614;
    --code-bg: #1C1C1A;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky 60pt header eats the top of any scrolled-to section; pad so
     anchor jumps land below the header instead of behind it. */
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv01";
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

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

code, pre { font-family: var(--mono); }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.92em; }
pre code { background: none; padding: 0; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 0.5rem 1rem; z-index: 1000;
}
.skip:focus { left: 1rem; top: 1rem; }

.container {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
}
.container.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 7px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1;
}
.brand-mark::before {
  content: "M";
  display: block;
  /* Optical centering: uppercase serif glyphs sit on the baseline with
     no descender, so geometric center looks ~1px too high. Nudge down. */
  transform: translateY(0.5px);
}
.brand-word { font-size: 18px; }
.nav nav { display: flex; align-items: center; gap: 20px; }
.nav nav a { color: var(--ink-muted); font-size: 15px; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.btn-sm { color: var(--bg); }
.nav nav a.btn-sm:hover { color: var(--accent-ink); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; background: var(--ink); color: var(--bg); }
.btn-sm:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- HERO ---------- */
.hero { padding: 80px 0 48px; }
.eyebrow {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 18px;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6.8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
  max-width: 18ch;
  text-wrap: balance;
}
.lede {
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--ink);
  margin: 0 0 8px;
  max-width: 38ch;
}
.sublede {
  font-size: 17px; color: var(--ink-muted);
  margin: 0 0 32px; max-width: 52ch;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.micro { font-size: 13px; color: var(--ink-faint); margin-top: 14px; }

/* ---------- HERO SCREENSHOT ---------- */
.hero-screenshot { margin: 56px 0 0; padding: 0; }
.screenshot-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.screenshot-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-muted);
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ED6A5E; }
.dot-y { background: #F4BF4F; }
.dot-g { background: #61C554; }
.screenshot-title { margin-left: 10px; font-family: var(--sans); }
.screenshot-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.screenshot-editor, .screenshot-preview {
  padding: 24px 28px;
  font-size: 14px;
  line-height: 1.55;
  min-height: 360px;
}
.screenshot-editor {
  background: var(--surface);
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  white-space: pre-wrap;
  color: var(--ink);
  margin: 0;
}
.screenshot-editor code { background: none; padding: 0; font-size: 14px; }
.md-h { color: var(--accent); }
.md-em { color: var(--ink); font-style: italic; }
.md-b { color: var(--ink); font-weight: 700; }
.md-code { color: var(--ink-muted); }

.screenshot-preview { background: var(--bg); font-family: var(--sans); }
.screenshot-preview .preview-h1 { font-family: var(--serif); font-size: 28px; line-height: 1.1; margin: 0 0 12px; font-weight: 600; }
.screenshot-preview .preview-h2 { font-family: var(--serif); font-size: 20px; margin: 20px 0 8px; font-weight: 600; }
.screenshot-preview p, .screenshot-preview ul { margin: 0 0 12px; }
.screenshot-preview ul { padding-left: 20px; }
.screenshot-preview .code {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  overflow: auto;
}

@media (max-width: 760px) {
  .screenshot-body { grid-template-columns: 1fr; }
  .screenshot-editor { border-right: none; border-bottom: 1px solid var(--line); }
}

/* ---------- SECTIONS ---------- */
section { padding: 80px 0; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 40px;
  text-wrap: balance;
}

/* ---------- WHY ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 16px 0 8px;
}
.pillar p { color: var(--ink-muted); margin: 0; }
.pillar-icon { color: var(--accent); display: inline-flex; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- FEATURES ---------- */
.features { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.feature-icon { color: var(--accent); display: inline-flex; margin-bottom: 12px; }
.feature h3 { font-size: 16px; margin: 0 0 6px; font-weight: 600; }
.feature p { font-size: 14px; color: var(--ink-muted); margin: 0; line-height: 1.5; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- PITCH ---------- */
.pitch p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 20px;
}
.pitch p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink-muted);
  transition: transform .15s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 16px;
}

/* ---------- BOTTOM CTA ---------- */
.cta { padding: 96px 0 120px; border-top: 1px solid var(--line); }
.cta h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
  text-wrap: balance;
}
.cta .sublede { margin: 0 auto 28px; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 48px 0 24px;
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.footer-brand-row .brand-mark { width: 26px; height: 26px; font-size: 16px; }
.footer-brand { margin: 0; font-weight: 700; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { color: var(--ink-muted); font-size: 15px; }
.site-footer nav a:hover { color: var(--ink); }
.footer-bottom { padding-top: 18px; }

/* ---------- MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
