/* Dose website. Rules and reasons: ../DESIGN.md.
   White paper, black ink, one grey step between sections; the real app is the only picture.
   Light only, by choice. System fonts only: nothing is downloaded from another site. */
:root {
  --paper: #ffffff;       /* page */
  --mist: #f5f5f7;        /* alternate sections, form panel, footer */
  --ink: #1d1d1f;         /* text, buttons, focus, the story field */
  --ink-soft: #55555b;    /* secondary notes only (6.5:1 or better on paper and mist) */
  --field: #8e8e93;       /* form field borders (3:1 or better against paper) */
  --on-ink: #ffffff;
  --display: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, "Times New Roman", serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Five sizes */
  --size-display: clamp(2rem, 1.15rem + 3.9vw, 4.25rem);
  --size-heading: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  --size-title: 1.375rem;
  --size-body: 1.125rem;
  --size-small: 0.9375rem;
  --measure: 36rem;
  --section: clamp(64px, 8vw, 112px);
  --radius-screen: 36px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-padding-top: 84px; } /* the sticky bar never covers a focused field */
[id] { scroll-margin-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--size-body)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 72rem; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
a { color: inherit; text-underline-offset: 3px; touch-action: manipulation; }
a[href^="mailto:"], footer p { overflow-wrap: anywhere; } /* long addresses wrap at large text sizes */
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; } /* the skip link's target, not a control */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: break-word; margin: 0; }
h1 { font-size: var(--size-display); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: var(--size-heading); line-height: 1.1; }
h3 { font-size: var(--size-title); line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
strong { font-weight: 600; }

.skip { position: absolute; left: 12px; top: -100px; z-index: 10; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* Top bar: solid, floats over the page, so it alone gets a hairline shadow. */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); /* taste-skill-ignore: sticky bar */ }
.bar .wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.25rem; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
.wordmark img { border-radius: 7px; }
.nav { display: flex; gap: 24px; }
.nav a { font-size: var(--size-small); text-decoration: none; padding-block: 8px; }
.nav a:hover { text-decoration: underline; }
.bar a.small-cta { font-size: var(--size-small); font-weight: 600; color: var(--on-ink); background: var(--ink); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; }

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font: 600 1.0625rem/1 var(--text); text-decoration: none; cursor: pointer; touch-action: manipulation;
}
.button:hover { background: #3a3a3c; }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; }
.link::after { content: " →"; }

/* Sections */
section { padding-block: var(--section); }
.band { background: var(--mist); }
.ink { background: var(--ink); color: var(--on-ink); }
.ink :focus-visible { outline-color: var(--on-ink); }
.section-head { max-width: 44rem; }
.section-head p { margin-top: 16px; }
.lede { font-size: var(--size-title); line-height: 1.4; }

/* Heading on the left, content on the right (desktop). */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.split-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 821px) { .split-head { position: sticky; top: 100px; } }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 104px) var(--section); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head head" "text screen"; gap: clamp(32px, 4vw, 56px) clamp(40px, 6vw, 96px); align-items: start; }
.hero h1 { grid-area: head; max-width: 15em; }
.hero-text { grid-area: text; display: grid; gap: 20px; max-width: 36rem; }
.hero-screen { grid-area: screen; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 12px; }
.aside { font-size: var(--size-small); color: var(--ink-soft); max-width: 30rem; }

/* App screens: plain screenshots, rounded like the phone's display, on a grey step. */
.screen { margin: 0; }
.screen img { display: block; width: 100%; height: auto; border-radius: var(--radius-screen); background: var(--mist); }
.hero-screen { justify-self: center; width: 100%; max-width: 340px; padding: 14px; background: var(--mist); border-radius: calc(var(--radius-screen) + 14px); }
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 56px; }
.screens img { max-width: 300px; }
.screens figcaption { margin-top: 20px; max-width: 300px; }

/* Why Dose? */
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px clamp(28px, 4vw, 56px); }
.reason { display: grid; gap: 10px; align-content: start; }
.sample { justify-self: start; margin-top: 6px; font: 600 1.0625rem/1 var(--text); font-variant-numeric: tabular-nums; padding: 12px 16px; border-radius: 14px; background: var(--mist); }
.sample small { font-size: var(--size-small); font-weight: 400; color: var(--ink-soft); }

/* Who it's for */
.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); margin-top: 48px; }
.who > div { background: var(--mist); border-radius: 24px; padding: clamp(24px, 3.5vw, 40px); }
.who ul { margin: 16px 0 0; padding-left: 1.1em; display: grid; gap: 10px; }
.who li::marker { color: var(--ink-soft); }

/* Story, on the ink field */
.story { margin: 0; }
.story blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.45; letter-spacing: -0.01em; }
.story cite { display: block; margin-top: 24px; font-style: normal; font-size: var(--size-small); }
.byline { font-size: var(--size-title); line-height: 1.4; }

/* Beta steps: a real ordered list; the numbers are large, not boxed. */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(step); font-family: var(--display); font-size: var(--size-heading); line-height: 1; font-variant-numeric: lining-nums; }

/* FAQ: native details on white rows, one grey step from the band. */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; position: relative; border-radius: 16px; touch-action: manipulation; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.faq details p { padding: 0 24px 22px; max-width: 40rem; }

/* Join */
.join .note { font-size: var(--size-small); color: var(--ink-soft); max-width: 30rem; }
.signup-panel { background: var(--mist); border-radius: 28px; padding: clamp(24px, 4vw, 44px); display: grid; gap: 18px; }
.signup { display: grid; gap: 20px; }
.signup .field { display: grid; gap: 8px; min-width: 0; }
.signup label { font-size: var(--size-small); font-weight: 600; }
.signup .optional { font-weight: 400; color: var(--ink-soft); }
.signup input, .signup select {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--field); background-color: var(--paper); color: var(--ink);
  font: 400 var(--size-body)/1.2 var(--text);
}
.signup select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("chevron.svg"); background-repeat: no-repeat; background-position: right 18px center; background-size: 12px 8px; }
.signup input:hover, .signup select:hover { border-color: var(--ink); }
.signup input:focus-visible, .signup select:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.signup input[aria-invalid="true"] { border: 2px solid var(--ink); }
.signup .button { width: 100%; }
.signup .button[aria-busy="true"] { cursor: progress; background: #3a3a3c; }
.signup .check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--size-small); font-weight: 400; line-height: 1.45; cursor: pointer; margin-top: 4px; }
.signup .check input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--ink); }
.signup .check a { color: var(--ink); }
.signup .trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* taste-skill-ignore: hidden honeypot, not a rule */
.field-error { font-size: var(--size-small); font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.field-error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 0.8em; transform: translateY(-0.05em); }
.field-error:empty { display: none; }
.form-status { font-size: var(--size-small); }
.form-status:empty { display: none; }
.signup-done { display: grid; gap: 12px; }
.signup-done:focus { outline: none; }
.signup-done .done-title { font-family: var(--display); font-size: var(--size-title); line-height: 1.35; }
.signup-done p:not(.done-title) { font-size: var(--size-small); color: var(--ink-soft); }
.fallback { font-size: var(--size-small); color: var(--ink-soft); }
.fallback a { color: var(--ink); }

/* Footer: the name returns, then the fine print, all in full ink. */
footer { background: var(--mist); }
footer .wrap { padding-block: 56px 64px; display: grid; gap: 12px; font-size: var(--size-small); }
footer p { max-width: 52rem; }
.footer-mark { font-family: var(--display); font-size: var(--size-heading); line-height: 1; letter-spacing: -0.02em; margin-bottom: 12px; }
footer .legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
footer .legal a { font-weight: 600; text-decoration: none; }
footer .legal a:hover { text-decoration: underline; }

/* Tablet and phone */
@media (max-width: 820px) {
  .nav { display: none; }
  .hero .wrap, .split, .who, .reasons { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { grid-template-areas: "head" "text" "screen"; }
  .hero-screen { max-width: 300px; }
  .split { gap: 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .screens { gap: 20px; }
  .screens figcaption { font-size: var(--size-small); }
}
/* Phones: the screens become a row you swipe through, with the next one peeking in. */
@media (max-width: 600px) {
  .screens { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 12px; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); padding-inline: max(20px, env(safe-area-inset-left, 0px)); scroll-padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
  .screens .screen { flex: 0 0 min(250px, 74%); scroll-snap-align: start; }
}
@media (max-width: 420px) {
  .bar .wrap { gap: 12px; }
  .bar a.small-cta { padding: 0 14px; }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .bar a.small-cta { transition: background-color 0.15s ease, transform 0.1s ease; }
  .button:active { transform: scale(0.98); }
}

/* Reading pages (privacy, terms, support, 404): same type and colour, a narrower column. */
.doc .wrap { padding-block: clamp(40px, 7vw, 80px) clamp(56px, 8vw, 96px); }
.doc article { max-width: 42rem; }
.doc .back { display: inline-block; font-size: var(--size-small); font-weight: 600; color: var(--ink-soft); text-decoration: none; margin-bottom: 28px; }
.doc .back:hover { color: var(--ink); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; }
.doc h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); line-height: 1.2; margin-top: 44px; }
.doc h3 { font-size: 1.2rem; margin-top: 28px; }
.doc p { margin-top: 14px; }
.doc ul, .doc ol { margin: 14px 0 0; padding-left: 1.2em; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--ink-soft); }
.doc .meta { margin-top: 14px; color: var(--ink-soft); font-size: var(--size-small); }
.doc .draft { display: inline-block; font-size: 0.8rem; font-weight: 600; background: var(--ink); color: var(--on-ink); border-radius: 999px; padding: 2px 10px; vertical-align: 1px; }
.doc .card { margin-top: 24px; padding: 18px 20px; border-radius: 16px; background: var(--mist); }
.doc .card p:first-child, .doc .card:first-child { margin-top: 0; }
.doc nav ul { list-style: none; padding: 0; }
