/* Verso — design system foundation
   Direction: editorial-calm. Black ink on paper-white, an editorial serif
   display (Fraunces) over a utilitarian sans (Inter), one functional blue
   (the block-editor's own selection/drop-guide blue) as the single accent.
   Hand-drawn ink illustration, generous measure, quiet motion. */

/* Self-hosted variable fonts — no render-blocking third-party round-trip.
   font-display:swap so first paint never waits on the font. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jbmono.woff2") format("woff2");
}

:root {
  /* ink + paper */
  --ink: #2e2b26;
  --ink-soft: #4b463e;
  --ink-mute: #8a8378;
  --ink-faint: #b7b0a4;
  --paper: #ffffff;
  --paper-warm: #fbfaf7;
  --paper-warm-2: #f6f4ef;
  --paper-band: #f3f1ea;
  --hair: #e9e5dc;
  --hair-strong: #ddd8cd;

  /* the one accent — the editor's blue */
  --blue: #2a7de1;
  --blue-ink: #1c5fb0;
  --blue-soft: #eaf2fc;
  --guide: #38a0d8; /* drop-guide cyan-blue */

  /* block accent tints (Notion-style pastels, used sparingly) */
  --tint-yellow: #fbf3db;
  --tint-green: #e7f2ea;
  --tint-pink: #f8e9ef;
  --tint-blue: #e6eff9;

  --ok: #2f9e6f;
  --warn: #d08a3a;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 720px;
  --wide: 1180px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(30, 26, 20, .06), 0 1px 3px rgba(30, 26, 20, .05);
  --shadow-md: 0 8px 28px -12px rgba(40, 34, 26, .22);
  --shadow-lg: 0 24px 64px -24px rgba(40, 34, 26, .30);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(42, 125, 225, .18); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 28px; }
.measure { max-width: var(--measure); margin: 0 auto; padding: 0 28px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 560; line-height: 1.08; letter-spacing: -.012em; margin: 0; color: var(--ink); }
.display {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.022em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.lead { font-size: clamp(1.12rem, 1.9vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); }
.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px;
  font-size: .95rem; font-weight: 500; border: 1px solid transparent;
  transition: transform .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #17140f; box-shadow: var(--shadow-md); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-ink); box-shadow: 0 8px 24px -10px rgba(42,125,225,.55); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair-strong); }
.btn-ghost:hover { background: var(--paper-warm-2); border-color: var(--ink-faint); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-sm { padding: 7px 14px; font-size: .86rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- top nav (marketing) ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav-inner { max-width: var(--wide); margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.24rem; letter-spacing: -.02em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: 8px; }
.nav-links a { font-size: .93rem; color: var(--ink-soft); transition: color .15s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-right a.text { font-size: .93rem; color: var(--ink-soft); }
.nav-right a.text:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }

.mobile-menu { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-right .text, .nav-right .btn.hide-mobile { display: none; }
  .nav-toggle { display: block; }
  .nav-right { margin-left: 0; }
  .mobile-menu {
    display: block; position: fixed; inset: 62px 0 auto 0; z-index: 55;
    background: var(--paper); border-bottom: 1px solid var(--hair);
    padding: 12px 22px 22px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: .22s var(--ease);
  }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; box-shadow: var(--shadow-md); }
  .mobile-menu a { display: block; padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--hair); color: var(--ink); }
  .mobile-menu .btn { width: 100%; justify-content: center; margin-top: 14px; }
}

/* ---------- footer ---------- */
.footer { background: var(--paper-warm); border-top: 1px solid var(--hair); margin-top: 0; }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 64px 28px 40px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer h5 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 14px; font-weight: 500; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { font-size: .92rem; color: var(--ink-soft); }
.footer a:hover { color: var(--ink); }
.footer-brand p { color: var(--ink-mute); font-size: .92rem; max-width: 34ch; margin: 14px 0 0; }
.footer-bottom { max-width: var(--wide); margin: 0 auto; padding: 24px 28px 40px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--hair); font-size: .84rem; color: var(--ink-mute); }
.footer-bottom .demo-note { margin-left: auto; font-family: var(--font-mono); font-size: .74rem; }
@media (max-width: 860px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 26px 20px; } .footer-brand { grid-column: 1 / -1; } }

/* demo-mode label */
.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--warn); background: #fbf1e2; border: 1px solid #f0dcc0; padding: 3px 9px; border-radius: 999px;
}

/* section rhythm */
.section { padding: 108px 0; }
.section-sm { padding: 72px 0; }
.band { background: var(--paper-warm); }
.band-2 { background: var(--paper-band); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--hair-strong); background: var(--paper); font-size: .82rem; color: var(--ink-soft); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* entrance is a pure-CSS animation with fill:both — content is ALWAYS visible
   at the end state even if JS never runs (bulletproof for screenshots). */
.reveal { animation: revealUp .7s var(--ease) both; }
@keyframes revealUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* generic prose (blog, help, legal) */
.prose { font-size: 1.08rem; line-height: 1.72; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.7rem; margin-top: 2em; color: var(--ink); }
.prose h3 { font-size: 1.28rem; margin-top: 1.6em; color: var(--ink); }
.prose p { margin: 0; }
.prose a { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(42,125,225,.35); }
.prose a:hover { text-decoration-color: var(--blue); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .45em 0; }
.prose blockquote { border-left: 3px solid var(--ink); margin: 1.4em 0; padding: 2px 0 2px 22px; font-family: var(--font-display); font-size: 1.24rem; font-style: italic; color: var(--ink); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--paper-warm-2); border: 1px solid var(--hair); padding: 1px 6px; border-radius: 5px; }
.prose pre { background: #2b2822; color: #f3efe6; border-radius: var(--r-md); padding: 20px 22px; overflow-x: auto; font-family: var(--font-mono); font-size: .9rem; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose img, .prose figure img { border-radius: var(--r-md); border: 1px solid var(--hair); }
.prose figcaption { font-size: .86rem; color: var(--ink-mute); text-align: center; margin-top: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2.4em 0; }
