/* Fonts (files in assets/fonts, SIL OFL 1.1) */
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(assets/fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(assets/fonts/instrument-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600 700; font-display: swap; src: url(assets/fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400; font-display: swap; src: url(assets/fonts/fraunces-latin-400-italic.woff2) format('woff2'); }

/* Colors and sizes */
:root {
  --ink: #1d1918;
  --muted: #5c534d;
  --line: #e7e0d6;
  --paper: #faf7f2;
  --sand: #f1ebe2;
  --card: #fffdfa;
  --plum: #7a3290;
  --plum-dark: #4e1f5c;
  --plum-tint: #f3e6f6;
  --rust: #a8481f;
  --rust-tint: #fbe6da;
  --sans: 'Instrument Sans', Arial, Helvetica, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --gap: clamp(72px, 9vw, 128px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(44px, 5.6vw, 78px); }
h2 { font-size: clamp(33px, 3.7vw, 52px); }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
h1 em, h2 em { font-family: var(--serif); font-weight: 400; color: var(--plum); letter-spacing: -0.03em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
.shell { width: min(1180px, 100% - 96px); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -200px; z-index: 10; padding: 12px 18px; background: var(--card); border: 2px solid var(--plum); border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 26px; border: 0; border-radius: 999px; background: var(--plum); color: #fff; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background 0.15s; }
.button:hover { background: var(--plum-dark); }
.button:disabled { opacity: 0.6; cursor: default; }
.button-small { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.text-link { font-size: 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgb(250 247 242 / 94%); border-bottom: 1px solid transparent; backdrop-filter: blur(10px); }
.nav-shell { position: relative; display: flex; align-items: center; gap: 32px; min-height: 80px; }
.brand { display: inline-flex; align-items: flex-start; font-size: 34px; font-weight: 600; letter-spacing: -0.07em; line-height: 1; text-decoration: none; }
.brand span { margin-left: 3px; font-size: 0.72em; line-height: 0.8; color: var(--plum); letter-spacing: 0; }
.site-header nav { display: flex; gap: 32px; margin-left: auto; }
.site-header nav a { padding: 10px 0; font-size: 16px; text-decoration: none; }
.site-header nav a:hover { color: var(--plum); }
.nav-shell > .text-link { margin-left: auto; }
.menu-toggle { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 40px; align-items: center; padding-block: 36px 72px; }
.lede { margin-top: 24px; max-width: 30em; font-size: 19px; color: var(--muted); }
.hero .waitlist, .hero .cta-app { margin-top: 34px; }
.hero-art { position: relative; height: 620px; border-radius: 36px; background: var(--plum-tint); overflow: hidden; }
.phone { overflow: hidden; padding: 8px; border-radius: 42px; background: var(--ink); box-shadow: 0 26px 60px rgb(58 31 42 / 20%); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; background: var(--paper); }
.hero-art .phone { position: absolute; width: 252px; height: 516px; }
.phone-front { left: 5%; top: 52px; z-index: 1; }
.phone-back { right: 5%; top: 140px; }

/* Waitlist form */
.waitlist { max-width: 500px; }
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; min-width: 0; min-height: 52px; padding: 12px 22px; border: 1px solid #8d8279; border-radius: 999px; background: var(--card); }
.field-row input::placeholder { color: #6e645d; opacity: 1; }
.field-row input[aria-invalid] { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.field-row .button { flex: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--plum); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { margin-top: 10px; font-size: 15px; font-weight: 500; }
.form-status[data-kind='error'] { color: var(--rust); }
.form-status[data-kind='done'] { color: var(--plum); }
.waitlist.is-done .field-row, .waitlist.is-done .consent { display: none; }
.waitlist.is-done .form-status { font-size: 19px; }

/* Library facts */
.facts { border-block: 1px solid var(--line); }
.facts-inner { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 32px; padding-block: 34px; }
.facts-inner > div { display: flex; flex-direction: column-reverse; }
.facts dd { font-size: 40px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts dt { margin-top: 6px; font-size: 16px; color: var(--muted); }

/* Label */
.label-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr); gap: 72px; align-items: center; padding-block: var(--gap); }
.label-copy > p { margin-top: 22px; max-width: 32em; color: var(--muted); }
.legend { display: grid; gap: 16px; margin-top: 32px; }
.legend li { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.legend strong { font-weight: 600; }
.legend span { color: var(--muted); }
.legend .is-help strong { color: var(--plum); }
.legend .is-watch strong { color: var(--rust); }
.label-card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 24px 60px rgb(58 31 42 / 10%); }
.label-top { display: flex; justify-content: space-between; gap: 16px; padding: 20px 32px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.label-list { padding: 30px 32px 34px; font-size: 20px; line-height: 1.95; }
.label-list b { font-weight: 600; }
.label-list mark { padding: 3px 4px; border-radius: 5px; color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.label-list .help { background: var(--plum-tint); color: var(--plum-dark); }
.label-list .watch { background: var(--rust-tint); color: #8a3814; font-weight: 600; }
.label-card figcaption { display: flex; gap: 14px; padding: 22px 32px 26px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--muted); }
.label-card figcaption strong { font-weight: 600; color: var(--rust); }
.dot { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--rust); }

/* Features */
.features { padding-bottom: var(--gap); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head p { font-size: 16px; color: var(--muted); }
.feature-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; }
.tabs { display: flex; flex-direction: column; }
.tab { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 18px 22px; border: 0; border-left: 3px solid var(--line); background: none; text-align: left; cursor: pointer; }
.tab strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.tab small { font-size: 16px; color: var(--muted); }
.tab[aria-selected='true'] { border-left-color: var(--plum); }
.tab[aria-selected='true'] strong { color: var(--plum); }
@media (hover: hover) { .tab[aria-selected='false']:hover { background: var(--sand); } }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; height: 520px; padding: 0 56px; border-radius: 28px; background: var(--sand); overflow: hidden; }
.panel-copy { align-self: center; }
.panel h3 { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.18; text-wrap: balance; }
.panel-copy p { margin-top: 16px; color: var(--muted); }
.panel-copy .fine { padding-top: 16px; border-top: 1px solid #dcd2c6; font-size: 15px; }
.panel-phone { width: 300px; height: 560px; margin-top: 52px; }

/* Steps */
.steps { padding-block: var(--gap); background: var(--plum-dark); color: #fff; }
.steps ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 52px; counter-reset: step; }
.steps li { padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 30%); counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: 18px; font: italic 400 40px/1 var(--serif); color: #e3bdec; }
.steps li p { margin-top: 8px; color: #eadcee; }

/* Privacy and sources */
.trust { padding-block: var(--gap); }
.trust h2 { max-width: 18em; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.trust article { padding-top: 22px; border-top: 2px solid var(--ink); }
.trust article p { margin-top: 10px; color: var(--muted); }

/* Questions */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; padding-bottom: var(--gap); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font-size: 26px; line-height: 1.1; font-weight: 400; color: var(--plum); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); }

/* Closing */
.closing { margin-bottom: 64px; padding: clamp(48px, 7vw, 88px) clamp(24px, 6vw, 88px); border-radius: 36px; background: var(--plum-tint); text-align: center; }
.closing > p { margin-top: 16px; color: var(--muted); }
.closing .waitlist { margin: 32px auto 0; text-align: left; }
.closing .cta-app { margin-top: 32px; }

/* Footer and legal page */
.site-footer { display: flex; align-items: center; gap: 28px; padding-block: 32px 48px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-footer .brand { font-size: 26px; color: var(--ink); }
.footer-links { display: flex; gap: 22px; margin-left: auto; }
.footer-links a { padding: 10px 0; }
.legal { max-width: 720px; padding-block: 48px 96px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal h2 { margin: 40px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.noscript-note { position: fixed; inset: auto 16px 16px; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; }

/* Tablet */
@media (max-width: 1080px) {
  .shell { width: calc(100% - 64px); }
  .site-header nav { gap: 22px; }
  .hero { gap: 28px; }
  .hero-art { height: 560px; }
  .hero-art .phone { width: 220px; height: 434px; }
  .phone-front { left: 5%; }
  .phone-back { right: -12%; top: 150px; }
  .field-row { flex-direction: column; }
  .label-section { gap: 40px; }
  .label-list { font-size: 18px; }
  .feature-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
  .panel { grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; padding: 0 28px; }
  .panel h3 { font-size: 25px; }
  .panel-phone { width: 230px; }
  .faq { gap: 40px; }
}

/* Phone */
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .nav-shell { min-height: 66px; gap: 8px; }
  .brand { font-size: 30px; margin-right: auto; }
  .menu-toggle { display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; }
  .menu-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.2s; }
  .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .site-header nav { position: absolute; top: 64px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 8px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 16px 36px rgb(58 31 42 / 14%); }
  .site-header nav.is-open { display: flex; }
  .site-header nav a { padding: 14px 0; }
  .site-header nav a + a { border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 20px 48px; }
  .lede { margin-top: 18px; font-size: 18px; }
  .hero .waitlist, .hero .cta-app { margin-top: 26px; }
  .hero-art { height: 430px; border-radius: 26px; }
  .hero-art .phone { width: 206px; height: 406px; padding: 6px; border-radius: 32px; }
  .hero-art .phone img { border-radius: 26px; }
  .phone-front { left: 16px; top: 36px; }
  .phone-back { right: -64px; top: 112px; }
  .facts-inner { grid-template-columns: 1fr; gap: 0; padding-block: 8px; }
  .facts-inner > div { flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; padding-block: 14px; }
  .facts-inner > div + div { border-top: 1px solid var(--line); }
  .facts dt { margin: 0; line-height: 1.35; }
  .facts dd { font-size: 28px; }
  .label-section { grid-template-columns: 1fr; gap: 36px; }
  .label-card { order: -1; }
  .label-copy { display: contents; }
  .label-copy h2, .label-copy > p { order: -2; }
  .label-copy > p { margin-top: -18px; }
  .legend { margin-top: 0; }
  .legend li { grid-template-columns: 92px 1fr; }
  .label-top, .label-list, .label-card figcaption { padding-inline: 22px; }
  .tabs { display: none; }
  .feature-layout { grid-template-columns: 1fr; }
  .panels { display: grid; gap: 16px; }
  .panel, .panel[hidden] { display: grid !important; grid-template-columns: 1fr; gap: 0; height: auto; padding: 30px 24px 0; border-radius: 24px; }
  .panel-phone { width: min(270px, 100%); height: 400px; margin: 28px auto 0; border-radius: 38px 38px 0 0; padding-bottom: 0; }
  .panel-phone img { border-radius: 30px 30px 0 0; }
  .steps ol, .trust-grid, .faq { grid-template-columns: 1fr; gap: 32px; }
  .steps ol, .trust-grid { margin-top: 36px; }
  .faq details p { padding-right: 12px; }
  .closing { width: calc(100% - 24px); border-radius: 26px; }
  .site-footer { flex-wrap: wrap; gap: 10px 24px; }
  .site-footer p { order: 3; width: 100%; }
}

@media (max-width: 400px) {
  .nav-shell .button-small { padding-inline: 15px; font-size: 14px; }
  .brand { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
