/* PrismaCount marketing page: design tokens (design.md sections 2-4).
   Ledger and Midnight values are copied from the product so the page and the demo are one brand. */

@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/Newsreader-var.woff2") format("woff2-variations"),
       url("../assets/fonts/Newsreader-var.woff2") format("woff2");
  font-weight: 350 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/HankenGrotesk-var.woff2") format("woff2-variations"),
       url("../assets/fonts/HankenGrotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallbacks, so the swap to the real face does not move the layout. */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 94%;
  ascent-override: 98%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Hanken Fallback";
  src: local("Segoe UI"), local("Arial");
  size-adjust: 99%;
  ascent-override: 100%;
  descent-override: 26%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  /* Ledger (light, default) */
  --paper: #f6f4ef;
  --sheet: #fffefb;
  --surface: #fffefb;
  --leaf: #efece5;
  --ink: #171e2c;
  --ink-2: #4a5161;
  --rule: #dcd6ca;
  --rule-strong: #8b8576;
  --bronze: #8a6631;
  --bronze-ink: #6f5226;
  --primary: #1d2942;
  --primary-hi: #2a3a5c;
  --on-primary: #fbf8f1;
  --link: #24468f;
  --focus: #2c56b8;
  --pos: #24644a;
  --warn: #855711;
  --warn-wash: #f5ecda;

  /* Midnight (always on night bands) */
  --night: #0b1517;
  --night-2: #101d20;
  --night-3: #152629;
  --night-ink: #e9f0ed;
  --night-ink-2: #b2c3be;
  --night-rule: #22363a;
  --night-rule-strong: #5b7579;
  --champagne: #dcc28c;
  --champagne-hi: #e8d3a6;
  --on-champagne: #1c1608;
  --night-focus: #f0dcae;
  --night-warn: #f1bf7f;

  /* The bill book: sheet tints and chop ink, the same in both modes */
  --carbon-white: #fffefb;
  --carbon-pink: #f3d9dc;
  --carbon-yellow: #f4e7b0;
  --carbon-line: #c9c2b4;
  --carbon-ink: #2a3550;
  --chop: #4a3aa0;
  --chop-night: #b9aef5;

  /* Ink that always reads on a light sheet, whatever the visitor's mode */
  --sheet-ink: #171e2c;
  --sheet-ink-2: #4a5161;
  --sheet-rule: #dcd6ca;
  --sheet-bronze: #8a6631;
  --sheet-warn: #855711;
  --sheet-warn-wash: #f5ecda;
  --sheet-link: #24468f;
  --sheet-focus: #2c56b8;

  /* Type */
  --font-serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", "Hanken Fallback", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-display: clamp(2.5rem, 1.55rem + 4.1vw, 5.25rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  --fs-h3: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --fs-lede: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-price: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  --fs-figure: 1.125rem;

  /* Layout */
  --gutter: 16px;
  --container: 76rem;
  --grid-gap: 16px;
  --band-pad: clamp(4.5rem, 3rem + 6vw, 9rem);
  --bar-h: 72px;
  --bar-h-small: 56px;
  --action-bar-h: 56px;

  --r-sheet: 3px;
  --r-button: 6px;
  --r-dialog: 10px;
  --r-pill: 999px;

  --shadow-sheet: 0 1px 2px rgba(23, 30, 44, .08), 0 18px 40px -18px rgba(23, 30, 44, .35);
  --shadow-sheet-night: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .7);

  /* Motion tokens (motion.css may refine; main.js never animates) */
  --ease-arrive: cubic-bezier(.16, 1, .3, 1);
  --ease-leave: cubic-bezier(.4, 0, 1, 1);
  --ease-std: cubic-bezier(.2, 0, 0, 1);
  --dur-press: 90ms;
  --dur-menu: 140ms;
  --dur-dialog: 220ms;
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
}
@media (min-width: 960px) {
  :root { --gutter: 32px; --grid-gap: 24px; }
}

/* Dark preference remaps the ledger bands; sheets stay paper. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1517;
    --surface: #101d20;
    --leaf: #152629;
    --ink: #e9f0ed;
    --ink-2: #b2c3be;
    --rule: #22363a;
    --rule-strong: #5b7579;
    --bronze: #dcc28c;
    --bronze-ink: #e3cc9b;
    --primary: #dcc28c;
    --primary-hi: #e8d3a6;
    --on-primary: #1c1608;
    --link: #e3cc9b;
    --focus: #f0dcae;
    --pos: #8ed6b5;
    --warn: #f1bf7f;
    --warn-wash: #2b302b;
    --shadow-sheet: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --paper: #0b1517;
  --surface: #101d20;
  --leaf: #152629;
  --ink: #e9f0ed;
  --ink-2: #b2c3be;
  --rule: #22363a;
  --rule-strong: #5b7579;
  --bronze: #dcc28c;
  --bronze-ink: #e3cc9b;
  --primary: #dcc28c;
  --primary-hi: #e8d3a6;
  --on-primary: #1c1608;
  --link: #e3cc9b;
  --focus: #f0dcae;
  --pos: #8ed6b5;
  --warn: #f1bf7f;
  --warn-wash: #2b302b;
  --shadow-sheet: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .7);
}
