/* entzun.ink — built from the Entzun design system (docs/design/tokens.json in the app repo).
   Two themes, the same roles: Paper (light) and Night (dark). Only the roles are used below. */

@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader16pt-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader16pt-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader16pt-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/AtkinsonHyperlegibleNext-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/AtkinsonHyperlegibleNext-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/AtkinsonHyperlegibleNext-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lexend"; src: url("fonts/Lexend-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Luciole"; src: url("fonts/Luciole-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "OpenDyslexic"; src: url("fonts/OpenDyslexic-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }

:root {
  --paper: #FAF8F4;
  --well: #F1EDE4;
  --raised: #FFFFFF;
  --ink: #1C1B19;
  --ink-secondary: #5A564E;
  --hairline: rgba(28, 27, 25, 0.12);
  --warn: #A8480A;
  --mark-wash: rgba(255, 213, 74, 0.5);
  --mark-rule: #C2570B;
  --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.18);
  --font-book: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Atkinson Hyperlegible Next", system-ui, -apple-system, sans-serif;
  --gutter: 64px;
  --measure: 680px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121316;
    --well: #1C1D21;
    --raised: #1E2024;
    --ink: #E6E3DD;
    --ink-secondary: #A49E94;
    --hairline: rgba(230, 227, 221, 0.16);
    --warn: #FFB340;
    --mark-wash: rgba(255, 200, 61, 0.3);
    --mark-rule: #FFB340;
    --shadow-modal: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

/* Basics */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--ink-secondary); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Type roles */
.display { font-family: var(--font-book); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; font-size: 40px; }
.display-hero { font-family: var(--font-book); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; font-size: 64px; }
.title-detail { font-family: var(--font-book); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; font-size: 32px; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-secondary); }
.lede { font-size: 21px; line-height: 1.55; color: var(--ink-secondary); }
.muted { color: var(--ink-secondary); }
.small { font-size: 13px; color: var(--ink-secondary); }
.h3 { font-size: 19px; font-weight: 700; }
.mark-underline { text-decoration: underline; text-decoration-color: var(--mark-rule); text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* Controls */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 28px; border-radius: 25px;
  background: var(--ink); color: var(--paper);
  font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none;
}
.pill:hover { color: var(--paper); }
.pill.small { height: 36px; padding: 0 16px; border-radius: 18px; font-size: 14px; color: var(--paper); }
.pill.medium { height: 44px; padding: 0 20px; border-radius: 22px; font-size: 15px; }
.pill.outline { background: transparent; color: var(--paper); border: 1px solid rgba(230, 227, 221, 0.4); }
.pill[aria-disabled="true"] { opacity: 0.4; cursor: default; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--font-book); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 600; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); padding-bottom: 2px; }

/* Sections */
.section { padding: 72px 0; }
.section.rule { border-top: 1px solid var(--hairline); }
.section.well { background: var(--well); }
.section.ink { background: var(--ink); color: var(--paper); }
.section.ink .eyebrow { color: #A49E94; }
.section.ink p { color: #E6E3DD; }
@media (prefers-color-scheme: dark) {
  .section.ink { background: var(--well); color: var(--ink); }
  .section.ink p { color: var(--ink-secondary); }
  .pill.outline { color: var(--ink); border-color: rgba(230, 227, 221, 0.4); }
}
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 700px; }
.section-head.split { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 48px; max-width: none; }
.section-head.split > div { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.section-head.split > p { max-width: 440px; }
.stack { display: flex; flex-direction: column; gap: 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-3.loose { gap: 40px 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.two-col { display: flex; gap: 64px; align-items: flex-start; }
.two-col > .lead { flex-shrink: 0; width: 520px; display: flex; flex-direction: column; gap: 16px; }
.two-col > .lead.narrow { width: 420px; }
.two-col > .rest { flex-grow: 1; display: flex; flex-direction: column; gap: 16px; }

.card { padding: 28px; background: var(--well); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.section.well .card { background: var(--paper); gap: 16px; }
.card .numeral { font-family: var(--font-book); font-size: 40px; line-height: 1; font-weight: 500; color: var(--ink-secondary); }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature svg { width: 24px; height: 24px; }
.feature .aa { font-family: var(--font-book); font-size: 24px; line-height: 1; font-weight: 500; }
.feature h3 { font-size: 17px; font-weight: 700; }
.feature p { color: var(--ink-secondary); }
.feature a { color: var(--ink); }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero .wrap { display: flex; align-items: center; gap: 72px; }
.hero-copy { flex-grow: 1; display: flex; flex-direction: column; gap: 28px; max-width: 700px; }
.hero-copy .lede { max-width: 600px; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta .small { font-size: 14px; }
.hero-shot { flex-shrink: 0; width: 400px; display: flex; justify-content: center; }
.shot-phone { width: 360px; border-radius: 18px; box-shadow: var(--shadow-modal); border: 1px solid var(--hairline); }
.shot-mac { border-radius: 12px; box-shadow: var(--shadow-modal); border: 1px solid var(--hairline); }

/* Reader section */
.reader-pair { display: flex; align-items: flex-end; gap: 24px; }
.reader-pair .shot-mac { width: 828px; }
.reader-pair .shot-phone { width: 300px; }
.hide-controls { display: flex; align-items: center; gap: 64px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.hide-controls .shot-phone { width: 300px; flex-shrink: 0; }
.hide-controls > div { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.hide-controls p { color: var(--ink-secondary); }

/* Accessibility */
.face-list { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.face-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.face-list .eyebrow { flex-shrink: 0; }
.face-newsreader { font-family: var(--font-book); font-size: 20px; }
.face-atkinson { font-family: var(--font-ui); font-size: 18px; }
.face-lexend { font-family: "Lexend", var(--font-ui); font-size: 18px; }
.face-luciole { font-family: "Luciole", var(--font-ui); font-size: 18px; }
.face-opendyslexic { font-family: "OpenDyslexic", var(--font-ui); font-size: 14px; white-space: nowrap; }
.sentence-demo { display: flex; flex-direction: column; gap: 6px; padding: 20px 16px; border-top: 1px solid var(--hairline); font-family: var(--font-book); font-size: 18px; line-height: 1.6; }
.sentence-demo .receded { opacity: 0.18; }
.sentence-demo .word { text-decoration: underline; text-decoration-color: var(--mark-rule); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.spacing-demo { display: flex; flex-direction: column; gap: 12px; color: var(--ink-secondary); }
.spacing-demo p { margin: 0; }
.sliders { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-secondary); }
.sliders label { display: flex; align-items: center; gap: 12px; min-height: 24px; }
.sliders span { width: 96px; flex-shrink: 0; }
.sliders input[type="range"] { flex-grow: 1; margin: 0; accent-color: var(--ink); }

/* Sync */
.device-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--well); border-radius: 12px; }
.device-row svg { width: 24px; height: 24px; flex-shrink: 0; }
.device-row > div { display: flex; flex-direction: column; gap: 2px; }
.device-row .name { font-size: 15px; font-weight: 600; }
.device-row .pos { font-size: 13px; color: var(--ink-secondary); }
.sync-arrow { display: flex; justify-content: center; }
.sync-arrow svg { width: 20px; height: 20px; }
.two-col > .rest.sync { padding-top: 34px; gap: 12px; }

/* Library */
.library .wrap { display: flex; gap: 64px; align-items: center; padding-bottom: 0; }
.library .shot-mac { width: 668px; border-radius: 12px 12px 0 0; border-bottom: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0 48px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.footer-top > div { display: flex; flex-direction: column; gap: 4px; }
.footer-top .brand { font-size: 26px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-secondary); gap: 16px; flex-wrap: wrap; }
.footer-bottom nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-bottom a { color: var(--ink-secondary); }

/* Documents (privacy, support) */
.doc .wrap { display: flex; gap: 96px; align-items: flex-start; padding-top: 64px; padding-bottom: 72px; }
.doc aside { flex-shrink: 0; width: 220px; display: flex; flex-direction: column; gap: 12px; padding-top: 12px; position: sticky; top: 24px; }
.doc aside a { text-decoration: none; font-size: 15px; color: var(--ink-secondary); }
.doc aside a[aria-current="page"] { font-weight: 700; color: var(--ink); }
.doc aside .note { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--ink-secondary); display: flex; flex-direction: column; gap: 6px; }
.doc aside .note a { font-weight: 600; color: var(--ink); }
.doc article { width: var(--measure); max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.doc article header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.doc article h1 { font-family: var(--font-book); font-size: 48px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.doc article h2 { font-size: 20px; font-weight: 700; line-height: 1.3; margin-top: 20px; }
.doc article h2.serif { font-family: var(--font-book); font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin-top: 24px; }
.doc.policy article { font-family: var(--font-book); font-size: 19px; line-height: 1.6; gap: 22px; }
.doc.policy article h2 { font-family: var(--font-ui); }
.doc.policy article .small { font-family: var(--font-ui); font-size: 14px; }
.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--hairline); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary { font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 22px; color: var(--ink-secondary); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 8px; color: var(--ink-secondary); }
.faq details p + p { margin-top: 10px; }
.callout { padding: 24px 28px; background: var(--well); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.callout h2 { font-size: 17px; font-weight: 700; margin: 0; }
.callout p { color: var(--ink-secondary); }

/* Phone and small screens */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .display-hero { font-size: 40px; line-height: 1.1; }
  .display { font-size: 30px; }
  .title-detail { font-size: 26px; }
  .lede { font-size: 17px; }
  .mark-underline { text-decoration-thickness: 2px; text-underline-offset: 6px; }
  .site-header .wrap { height: 60px; }
  .brand { font-size: 24px; }
  .site-nav { gap: 18px; font-size: 14px; }
  .site-nav .hide-phone { display: none; }
  .section { padding: 40px 0; }
  .section-head.split { flex-direction: column; align-items: flex-start; gap: 16px; }
  .stack { gap: 20px; }
  .grid-3, .grid-3.loose, .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .two-col { flex-direction: column; gap: 20px; }
  .two-col > .lead, .two-col > .lead.narrow { width: auto; }
  .two-col > .rest.sync { padding-top: 0; }
  .card { padding: 20px; gap: 8px; }
  .hero { padding: 40px 0 32px; }
  .hero .wrap { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-shot { width: 100%; justify-content: flex-start; }
  .shot-phone, .hero-shot .shot-phone, .reader-pair .shot-phone, .hide-controls .shot-phone { width: min(350px, 100%); }
  .reader-pair { flex-direction: column; align-items: flex-start; }
  .reader-pair .shot-mac { width: 100%; }
  .hide-controls { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
  .library .wrap { flex-direction: column; align-items: flex-start; gap: 24px; }
  .library .shot-mac { width: 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom nav { flex-direction: column; gap: 10px; }
  .doc .wrap { flex-direction: column; gap: 32px; padding-top: 32px; padding-bottom: 48px; }
  .doc aside { width: auto; position: static; }
  .doc article h1 { font-size: 36px; }
  .doc.policy article { font-size: 18px; }
}
