/* Format, the website. Same paper, ink and blue as the app (app.css), plus
   the two quiet surfaces a long page needs. Contrast ratios are on --bg. */

:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --bg-tint: #f0ede6;         /* alternating bands */
  --bg-raised: #ffffff;
  --bg-hover: #efebe3;
  --line: #e4dfd5;
  --line-strong: #cdc6b8;
  --text: #1f1d1a;            /* 15.6:1 */
  --text-dim: #5c574f;        /* 6.6:1, 6.0 on the tint */
  --text-faint: #6b665d;      /* 5.3:1, 4.9 on the tint */
  --accent: #1559d0;          /* 5.8:1, white on it 6.1:1 */
  --accent-ink: #ffffff;
  --accent-soft: rgba(21, 89, 208, .10);
  --shadow-card: 0 1px 2px rgba(60, 45, 20, .06), 0 6px 20px rgba(60, 45, 20, .08);
  --shadow-sheet: 0 2px 6px rgba(60, 45, 20, .08), 0 24px 64px rgba(60, 45, 20, .18);
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --serif: ui-serif, 'New York', 'Iowan Old Style', Charter, 'Bitstream Charter', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --dur: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --site-max: 1160px;
  --gutter: 32px;
  /* One spacing scale for the whole page (Mokxi's rhythm): a section's space,
     the gap under a section head, and the padding inside every card. */
  --sec-pad: 96px;
  --head-gap: 48px;
  --card-pad: 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #161513;
    --bg-tint: #1f1d1a;
    --bg-raised: #23211e;
    --bg-hover: #2b2925;
    --line: #34312b;
    --line-strong: #45413a;
    --text: #ede9e2;          /* 15.1:1 */
    --text-dim: #aba59b;      /* 7.5:1 */
    --text-faint: #958f85;    /* 5.7:1, 5.2 on the tint */
    --accent: #57a8ff;        /* 7.3:1, dark ink on it 7.9:1 */
    --accent-ink: #0b1a2e;
    --accent-soft: rgba(87, 168, 255, .16);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
    --shadow-sheet: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 64px rgba(0, 0, 0, .55);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #161513;
  --bg-tint: #1f1d1a;
  --bg-raised: #23211e;
  --bg-hover: #2b2925;
  --line: #34312b;
  --line-strong: #45413a;
  --text: #ede9e2;
  --text-dim: #aba59b;
  --text-faint: #958f85;
  --accent: #57a8ff;
  --accent-ink: #0b1a2e;
  --accent-soft: rgba(87, 168, 255, .16);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-sheet: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 64px rgba(0, 0, 0, .55);
}

/* Pictures of the app come in both themes; show the one that matches. */
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot-light { display: none; }
  :root:not([data-theme='light']) .shot-dark { display: block; }
}
:root[data-theme='dark'] .shot-light { display: none; }
:root[data-theme='dark'] .shot-dark { display: block; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  html { scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 50; background: var(--bg-raised); padding: 10px 14px; border-radius: var(--r-md); }

.wrap { width: 100%; max-width: var(--site-max); margin: 0 auto; padding: 0 var(--gutter); }

/* Type: bold sans, the same face as the wordmark. One size per role. */
.eyebrow {
  font: 600 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
h1, h2 { font-family: var(--sans); font-weight: 700; color: var(--text); text-wrap: balance; }
h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.03em; }
.hero-line { display: block; }
h2 { font-size: 36px; line-height: 1.15; letter-spacing: -.025em; }
h3, .lead, .sub { text-wrap: pretty; }
h3 { font: 650 18px/1.35 var(--sans); letter-spacing: -.01em; }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-dim); max-width: 34em; }
.sub { font-size: 17px; line-height: 1.6; color: var(--text-dim); max-width: 36em; margin-top: 14px; }
.small { font-size: 14px; color: var(--text-faint); margin-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid transparent;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background var(--dur), filter var(--dur), border-color var(--dur);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-raised); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-size: 22px; color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark-svg { display: block; height: .9em; width: auto; }
.wm-ink { fill: currentColor; }
.wm-accent { fill: var(--accent); }
.nav-link, .btn-head { white-space: nowrap; }
/* Keeps a short phrase together so a narrow screen never leaves one word alone on a line. */
.nb { white-space: nowrap; }
.head-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--r-md);
  color: var(--text-dim); font-size: 15px; text-decoration: none; transition: background var(--dur), color var(--dur);
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); }
.btn-head { margin-left: 8px; }

/* Sections: one rhythm. Every band has the same space above and below,
   and every head the same gap before what follows. */
.band { padding: var(--sec-pad) 0; }
.band-tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto var(--head-gap); display: flex; flex-direction: column; align-items: center; }

/* Hero */
.hero { padding: calc(var(--sec-pad) - 16px) 0 var(--sec-pad); text-align: center; }
.hero-text { display: flex; flex-direction: column; align-items: center; }
.hero .lead { margin-top: 20px; }
.hero .cta-row { justify-content: center; }
.hero-pic { max-width: calc(1080px + 2 * var(--gutter)); margin-top: var(--head-gap); }

/* App window: a quiet frame so a screenshot reads as the app, not a poster. */
.window {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sheet); overflow: hidden;
}
.window-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg-raised);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.window-url, .window-tag {
  font: 11px/1 var(--mono); letter-spacing: .04em; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.window-tag { justify-self: end; text-transform: uppercase; letter-spacing: .1em; }
.window .shot, .window .shot img { width: 100%; }

/* Cards: one surface, one padding */
.card, .step, .plan {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: var(--card-pad); }
.step-label { font: 600 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.step-label span { color: var(--accent); margin-right: 6px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p:last-child { color: var(--text-dim); }

/* Styles: words beside the Sources panel */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.style-list { list-style: none; padding: 0; margin-top: 28px; border-top: 1px solid var(--line); }
.style-list li { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.style-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.style-name { font: 650 17px/1.3 var(--sans); letter-spacing: -.01em; }
.style-ed { font: 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.pro {
  flex: none;
  font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 5px 8px; border-radius: 999px;
}
.split-pic { max-width: 440px; justify-self: end; width: 100%; }

/* Exported paper: real pages on a desk */
.sheets { display: flex; justify-content: center; gap: 32px; }
.sheet { width: min(400px, 100%); }
.sheet img { width: 100%; border-radius: 3px; background: #fff; box-shadow: var(--shadow-sheet); outline: 1px solid rgba(0, 0, 0, .06); }
.sheet figcaption {
  margin-top: 14px; text-align: center;
  font: 600 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
}
.formats { text-align: center; margin-top: 32px; font: 600 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.formats span { margin: 0 8px; color: var(--text-faint); }

/* Tools */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { overflow: hidden; display: flex; flex-direction: column; }
.card-pic { border-bottom: 1px solid var(--line); aspect-ratio: 9 / 5; overflow: hidden; background: var(--bg); }
.card-pic img, .card-pic .shot { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card h3 { padding: 22px var(--card-pad) 6px; }
.card p { padding: 0 var(--card-pad) var(--card-pad); color: var(--text-dim); }
.promise { text-align: center; max-width: 620px; margin: var(--sec-pad) auto 0; }
.promise h3 { font: 700 28px/1.2 var(--sans); letter-spacing: -.02em; }
.promise p { margin-top: 12px; color: var(--text-dim); font-size: 17px; }
.facts {
  list-style: none; padding: 0; margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.facts li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 14px; color: var(--text-dim); background: var(--bg-raised);
}
.facts li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; padding: var(--card-pad); border-radius: var(--r-xl); }
.plan h3 { font: 700 22px/1.2 var(--sans); letter-spacing: -.015em; }
.price { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; }
.amount { font: 700 44px/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.per { color: var(--text-dim); font-size: 16px; }
.price-alt { margin-top: 8px; color: var(--text-dim); font-size: 15px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 10px; flex: 1; align-content: start; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ''; position: absolute; left: 2px; top: .42em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.plan-btn { width: 100%; }
.plan-note { margin-top: 12px; text-align: center; font-size: 14px; color: var(--text-faint); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none;
  font: 650 17px/1.35 var(--sans); letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 9px; height: 9px; margin-right: 6px;
  border-right: 1.6px solid var(--text-faint); border-bottom: 1.6px solid var(--text-faint);
  transform: translateY(-3px) rotate(45deg); transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--text-dim); max-width: 64ch; }

/* Closing */
.closing { text-align: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.foot-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px 48px; }
.foot-brand p { margin-top: 8px; color: var(--text-faint); font-size: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px;
  color: var(--text-dim); font-size: 15px; text-decoration: none;
}
.foot-nav a:hover { color: var(--text); text-decoration: underline; }
.theme-btn {
  height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: transparent; color: var(--text-dim); font: 14px var(--sans); cursor: pointer;
}
.theme-btn:hover { background: var(--bg-hover); color: var(--text); }

/* Desk, then tablet, then phone: the scale steps down together. */
@media (max-width: 1100px) {
  :root { --sec-pad: 80px; --head-gap: 40px; --gutter: 24px; }
  h1 { font-size: 46px; }
  h2 { font-size: 32px; }
}
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: var(--head-gap); }
  .split-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .style-list { width: 100%; max-width: 560px; text-align: left; }
  .split-pic { justify-self: center; }
  .steps, .cards { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 720px) {
  :root { --sec-pad: 56px; --head-gap: 32px; --gutter: 16px; --card-pad: 22px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .lead { font-size: 17px; }
  .sub { font-size: 16px; }
  .wordmark { font-size: 20px; }
  .sheets { gap: 12px; }
  .sheet figcaption { margin-top: 10px; font-size: 11px; }
  .plans { grid-template-columns: 1fr; max-width: 480px; }
  .btn, .nav-link, .theme-btn, .foot-nav a { min-height: 44px; }
  .btn-head { height: 44px; padding: 0 14px; margin-left: 4px; }
  .nav-link { padding: 0 10px; }
  .promise h3 { font-size: 24px; }
  .window-url { visibility: hidden; }
  .style-text { flex-direction: column; gap: 2px; }
}
@media (max-width: 520px) {
  .cta-row { width: 100%; }
  .cta-row .btn { width: 100%; }
}
@media (max-width: 420px) {
  h1 { font-size: 32px; }
  .nav-link { padding: 0 6px; font-size: 14px; }
  .btn-head { padding: 0 12px; font-size: 14px; }
}
@media (max-width: 360px) {
  /* The wordmark and the main button need the room; Pricing is one scroll away. */
  .nav-link[href="#pricing"] { display: none; }
  :root { --card-pad: 20px; }
}
@media (max-width: 340px) {
  .wordmark { font-size: 18px; }
  .nav-link { padding: 0 4px; }
  .btn-head { padding: 0 10px; }
}

/* ---- Mokxi structure, Format's paper ---- */

/* A faint dot grid behind the hero, the closing band and the sign-in page:
   Mokxi's breadboard dots, here as the grid of a notebook page. */
:root { --dot: color-mix(in srgb, var(--text) 9%, transparent); }
.dotted { background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; background-position: 11px 11px; }

/* Hero: words on the left, the app on the right, at desk width. */
.hero { padding: 72px 0 80px; text-align: left; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.hero-text { align-items: flex-start; }
.hero h1 { font-size: clamp(36px, 3.4vw, 46px); }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin-top: 18px; }
.hero .cta-row { justify-content: flex-start; margin-top: 26px; }
.hero .small { margin-top: 14px; }
.hero-window { width: 100%; }

/* Pricing: Pro carries the accent edge and one plain badge. */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-badge {
  font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 6px 9px; border-radius: 999px;
}
.plan-pro { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-card); }

/* The closing band sits on the dots too, ruled off from the sections around it. */
.closing { border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .hero-grid { gap: 40px; }
}
@media (max-width: 960px) {
  /* Stacked: centered words, the app under them. */
  .hero { text-align: center; padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { align-items: center; }
  .hero .cta-row { justify-content: center; }
  .hero-window { max-width: 640px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .hero { padding: 44px 0 56px; }
  .hero h1 { font-size: 34px; }
  .hero-window { max-width: 420px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 31px; }
}
