/* Dawi design tokens — generated from brand-src/design_handoff_dawi_brand/tokens/.

   Do not edit here; edit nothing there either. See tools/lib/brand.js. */



/* ---- tokens/colors.css ---- */
:root {
  /* ---- Brand ---------------------------------------------------------- */
  /* The mark is #D90000 painted at 80% opacity; over paper it reads #E03333. */
  --dawi-red-ink: #d90000;
  --dawi-red: #e03333;
  --dawi-red-deep: #b5211d;
  --dawi-red-tint: #fdece9;

  /* ---- Warm neutrals (the "paper" family) ----------------------------- */
  --paper: #fdfbf7;
  --paper-raised: #ffffff;
  --paper-sunk: #faf3ea;
  --paper-deep: #f3e7da;

  --ink-900: #4a3a33;
  --ink-700: #57453c;
  --ink-500: #786359;
  --ink-300: #a08974;
  --ink-100: #cbb9a6;

  --line-strong: #e6d6c4;
  --line: #eee0d2;
  --line-soft: #f4e9dd;

  /* ---- Silk palette (sampled from the brand imagery) ------------------- */
  --silk-blush: #f9c9ce;
  --silk-rose: #f2a9a4;
  --silk-coral: #f0906e;
  --silk-peach: #fcd9b8;
  --silk-amber: #f2b24c;
  --silk-cream: #fcf0e4;
  --silk-sand: #f0d8cc;

  /* ---- Analytical accents (from the simulator) ------------------------- */
  --sage: #8fae98;
  --sage-tint: #eaf1eb;
  --violet: #9a8fc4;
  --violet-tint: #efedf7;

  /* ---- Semantic aliases ------------------------------------------------ */
  --surface-page: var(--paper);
  --surface-card: var(--paper-raised);
  --surface-sunk: var(--paper-sunk);
  --surface-inverse: #3a2d27;

  --text-display: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-faint: var(--ink-300);
  --text-on-accent: #fffaf5;
  --text-link: var(--dawi-red-deep);
  --text-link-hover: var(--dawi-red);

  --border-default: var(--line);
  --border-strong: var(--line-strong);
  --border-focus: var(--dawi-red);

  --accent: var(--dawi-red);
  --accent-hover: var(--dawi-red-deep);
  --accent-quiet: var(--dawi-red-tint);

  --status-good: var(--sage);
  --status-good-tint: var(--sage-tint);
  --status-watch: var(--silk-amber);
  --status-watch-tint: #fdf1dc;
  --status-strain: var(--silk-coral);
  --status-strain-tint: #fdeae2;
  --status-note: var(--violet);
  --status-note-tint: var(--violet-tint);
}

/* ---- tokens/typography.css ---- */
:root {
  --font-display: "Questrial", ui-sans-serif, system-ui, sans-serif;
  --font-text: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  /* Same face as display today, but kept separate: the wordmark is a fixed
     asset and must not move if the display face is ever swapped. */
  --font-wordmark: "Questrial", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  /* Wordmark lockup: Questrial 400, split "i", no leading pad — tracking sits
     between glyphs only, so the box equals the ink and centres correctly. */
  --wordmark-tracking: 0.66em;

  /* Questrial ships ONE weight (400), so display type has no weight axis:
     hierarchy comes from size and tracking alone. The weight tokens below
     apply to DM Sans text only. */
  --weight-display: 400;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-eyebrow: 700;

  /* Display scale — Questrial (single weight); tracking tightens as size grows */
  --type-hero: 76px;
  --type-hero-tracking: -2.6px;
  --type-display: 52px;
  --type-display-tracking: -1.6px;
  --type-title: 34px;
  --type-title-tracking: -0.9px;
  --type-heading: 24px;
  --type-heading-tracking: -0.5px;

  /* Text scale — DM Sans */
  --type-lead: 19px;
  --type-body: 16px;
  --type-body-sm: 14.5px;
  --type-caption: 12.5px;

  /* Eyebrow / label — DM Sans 700, wide tracking, uppercase */
  --type-eyebrow: 11px;
  --type-eyebrow-tracking: 1.8px;
  --type-label: 10.5px;
  --type-label-tracking: 1.4px;

  --leading-tight: 1.08;
  --leading-snug: 1.25;
  --leading-body: 1.62;
  --leading-loose: 1.75;

  --measure: 68ch;
  --measure-narrow: 52ch;
}

/* ---- tokens/spacing.css ---- */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 26px;
  --space-7: 34px;
  --space-8: 44px;
  --space-9: 58px;
  --space-10: 76px;
  --space-11: 104px;
  --space-12: 140px;

  --gutter-page: 40px;
  --gutter-page-sm: 22px;
  --width-content: 1180px;
  --width-prose: 720px;

  /* Sticky site header — the splash subtracts this so the two cannot drift apart */
  --nav-height: 51px;
}

/* ---- tokens/surfaces.css ---- */
:root {
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  --border-hairline: 1px solid var(--border-default);
  --border-dashed: 1px dashed var(--line-strong);

  /* Shadows are warm, wide and very low-opacity — light through fabric,
     never a grey drop shadow. */
  --shadow-none: none;
  --shadow-card: 0 12px 30px -30px rgba(120, 60, 40, 0.80);
  --shadow-raised: 0 18px 44px -34px rgba(120, 60, 40, 0.70);
  --shadow-float: 0 30px 70px -46px rgba(120, 60, 40, 0.85);
  --ring-focus: 0 0 0 3px rgba(224, 51, 51, 0.22);

  --veil-warm: linear-gradient(180deg, rgba(253, 251, 247, 0) 0%, rgba(253, 251, 247, 0.92) 78%, var(--paper) 100%);
  --wash-silk: linear-gradient(115deg, var(--silk-blush) 0%, var(--silk-peach) 46%, var(--silk-cream) 100%);
}

/* ---- tokens/motion.css ---- */
:root {
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-entrance: cubic-bezier(0.16, 0.84, 0.44, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 420ms;
  --duration-drift: 900ms;
  --transition-ui: all var(--duration-base) var(--ease-standard);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-fast: 0ms; --duration-base: 0ms; --duration-slow: 0ms; --duration-drift: 0ms; }
}

/* Page-level CSS shared by dawi.me and rounds.dawi.me.
   Everything here is built on the tokens generated from brand-src/; this file
   adds only what a token file cannot: the reset, the type classes, and the
   responsive behaviour the handoff never specified.

   The handoff's components style themselves with inline React styles, which
   outrank every selector here. That is fine — they are self-contained widgets.
   The page furniture around them is what these classes are for. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-text);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }

/* One visible focus treatment everywhere. The tokens supply a warm ring rather
   than the browser's blue, which would be the only cool colour on the page. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

button { font-family: inherit; }

/* --------------------------------------------------------------- type scale */
/* Questrial ships ONE weight, so display hierarchy comes from size and tracking
   alone — and tracking only ever tightens as size grows, never the reverse. */

.display-hero, .display, .title, .heading {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
  color: var(--text-display);
  margin: 0;
  text-wrap: pretty;
}
.display-hero { font-size: var(--type-hero); letter-spacing: var(--type-hero-tracking); }
.display { font-size: var(--type-display); letter-spacing: var(--type-display-tracking); }
.title { font-size: var(--type-title); letter-spacing: var(--type-title-tracking); line-height: var(--leading-snug); }
.heading { font-size: var(--type-heading); letter-spacing: var(--type-heading-tracking); line-height: var(--leading-snug); }

.eyebrow {
  font-family: var(--font-text);
  font-size: var(--type-eyebrow);
  font-weight: var(--weight-eyebrow);
  letter-spacing: var(--type-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--dawi-red);
  margin: 0;
}
.eyebrow--muted { color: var(--text-muted); }

.label {
  font-family: var(--font-text);
  font-size: var(--type-label);
  font-weight: var(--weight-eyebrow);
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Any number a reader might compare belongs in mono. */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* A lead fills the column it is in. It used to cap at --measure-narrow, which
   is 52ch against a 1100px content width — so every intro paragraph broke at
   about 60% and then ran ragged under a full-width grid of cards, which reads
   as a layout fault rather than as a considered measure. Where a genuinely
   narrow column is wanted, ask for it: `.measure` and `.measure-narrow` are
   still there to add. */
.lead {
  font-size: var(--type-lead);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
}

/* Prose fills its column. A measure is opt-in — add .measure or .measure-narrow
   where a genuinely narrow column is wanted. tools/lib/css-audit.js fails the
   build if a measure cap reappears on anything else. */
.prose {}
.prose p { margin: 0 0 var(--space-5); line-height: var(--leading-loose); color: var(--text-body); }
.prose p:last-child { margin-bottom: 0; }

.measure { max-width: var(--measure); }
.measure-narrow { max-width: var(--measure-narrow); }

/* ------------------------------------------------------------------ layout */

.page { max-width: var(--width-content); margin: 0 auto; padding: 0 var(--gutter-page); }
.page--prose { max-width: calc(var(--width-prose) + var(--gutter-page) * 2); }

.stack > * + * { margin-top: var(--space-5); }

/* --------------------------------------------------------------- responsive */
/* The handoff specifies one canvas width and no breakpoints. Rather than
   overriding hundreds of declarations, the type tokens themselves step down —
   every consumer that reads them, including the page classes above, comes with.
   Tracking is re-stated at each step because a display size that shrinks while
   keeping -2.6px of tracking reads as a mistake, not as a smaller headline. */

@media (max-width: 900px) {
  :root {
    --type-hero: 54px;      --type-hero-tracking: -1.7px;
    --type-display: 40px;   --type-display-tracking: -1.2px;
    --type-title: 29px;     --type-title-tracking: -0.7px;
    --gutter-page: 28px;
  }
}

@media (max-width: 560px) {
  :root {
    --type-hero: 40px;      --type-hero-tracking: -1.1px;
    --type-display: 31px;   --type-display-tracking: -0.8px;
    --type-title: 25px;     --type-title-tracking: -0.5px;
    --type-heading: 21px;   --type-heading-tracking: -0.3px;
    --type-lead: 17px;
    --gutter-page: var(--gutter-page-sm);
  }
}

/* An `fr` track is floored at min-content, so collapsing a grid to one column is
   not enough on its own — the track has to be minmax(0, 1fr) and the children
   need min-width: 0, or a long unbroken figure keeps the old width and the page
   scrolls sideways. Learned the hard way retrofitting the first prototype. */
.grid { display: grid; gap: var(--space-5); }
.grid > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* Wide content must scroll inside its own box; the page body never does. */
.scroll-x { overflow-x: auto; }

/* ----------------------------------------------------------- link buttons */
/* The handoff's Button component always renders a <button>, which cannot be a
   link — and most of the buttons on a marketing site are navigation. These
   classes mirror it declaration for declaration on an <a>, so the two are
   indistinguishable on screen. Keep them in step with the Button in
   brand-src/design_handoff_dawi_brand/ui_kits/_shared/ds.jsx. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-ui);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--text-on-accent); }

.btn--secondary { background: var(--paper-raised); border-color: var(--border-strong); color: var(--ink-700); }
.btn--secondary:hover { background: var(--paper-sunk); color: var(--ink-900); }

.btn--sm { font-size: 10.5px; padding: 9px 16px; }
.btn--lg { font-size: 12.5px; padding: 17px 32px; }

/* ---- DAWI lockup ---- (generated: tools/lib/brand.js) */
.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lockup-gap, 34px);
}
.lockup__mark { height: var(--mark-h); width: auto; display: block; }
.lockup__word {
  /* Solved against the mark: advA + advW = 1.620em, mark width = 0.897 x its height. */
  --wm-gap: max(0px, calc(0.897 * var(--mark-h) - 1.620 * var(--wm-size)));
  font-family: var(--font-wordmark);
  font-weight: 400;
  font-size: var(--wm-size);
  line-height: 1;
  color: var(--ink-900);
  white-space: nowrap;
  /* Both required for the solved gap to be the real gap. The handoff measures
     each letter in its own <span>, which suppresses kerning as a side effect;
     one text run does not, and Questrial kerns DAWI by 2.7px at hero size —
     enough to visibly break the alignment. At 0.55em of tracking, pair kerning
     is meaningless anyway, and the brand asks for no ligature in the wordmark. */
  font-kerning: none;
  font-variant-ligatures: none;
  letter-spacing: var(--wm-gap);
  /* Cancel the trailing gap CSS adds after the last letter. */
  margin-right: calc(-1 * var(--wm-gap));
  /* (advI - advD) / 2 — re-centres A...W under the mark. */
  transform: translateX(calc(-0.2330 * var(--wm-size)));
}

/* Side by side, for a header bar too short to stack. The centring offset is
   vertical-only in that arrangement, so it is cancelled. */
.lockup--row { flex-direction: row; align-items: center; gap: var(--lockup-gap, 10px); }
.lockup--row .lockup__word { transform: none; }

/* ---- patient avatar rig ---- (generated: tools/lib/rig.js) */
@keyframes rigBlink { 0%,6.2%,100% { transform: scaleY(1); } 2.5% { transform: scaleY(0.06); } }
@keyframes rigLook { 0%,100% { transform: rotate(-0.7deg) translateY(0); } 50% { transform: rotate(0.8deg) translateY(-1.6px); } }
@keyframes rigScan { 0%,100% { transform: rotate(0.35deg) translateY(-0.6px); } 28% { transform: rotate(-1deg) translateY(0.4px); } 62% { transform: rotate(-0.15deg) translateY(-1.4px); } }
@keyframes rigWince { 0%,68%,100% { transform: rotate(0deg) translateY(0); } 76% { transform: rotate(-0.9deg) translateY(2px) scale(0.997); } 88% { transform: rotate(0.35deg) translateY(0.5px); } }

.rig { display: block; }   /* size always comes from the component */
.rig__sway { animation: var(--rig-sway) var(--rig-sway-dur) ease-in-out infinite; animation-delay: var(--rig-delay, 0s); }
.rig__blink { animation: rigBlink var(--rig-blink, 5.8s) ease-in-out infinite; }

/* dawi.me page furniture. The design-system components carry their own styling;
   this is the layout around them. */

/* ------------------------------------------------------------------- nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-height);
  padding: 0 var(--gutter-page);
  background: rgba(253, 251, 247, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav__inner { display: flex; align-items: center; gap: 34px; max-width: 100%; }

.nav__link {
  font-size: var(--type-eyebrow);
  font-weight: var(--weight-eyebrow);
  letter-spacing: var(--type-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 0;
}
.nav__link:hover { color: var(--ink-700); }
.nav__link.is-here { color: var(--dawi-red); }

/* The nav is one link while the rest of the site is placeholder, so it fits
   anywhere. These rules are for when the other four come back: tracked-out
   uppercase labels do not fit a phone, and rather than hiding them behind a
   menu button — which would be the only JavaScript the site needs — the row
   scrolls, with the gaps tightened first. */
@media (max-width: 560px) {
  .nav { justify-content: flex-start; padding: 0 var(--gutter-page-sm); }
  .nav__inner { gap: 20px; }
}

/* ------------------------------------------------------------------ hero --- */

.hero {
  position: relative;
  overflow: hidden;
  /* Subtracting the nav height is what keeps the two from drifting apart: the
     photograph fills exactly what is left of the first screen. --nav-height is
     a token for this reason. */
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px var(--gutter-page);
}

.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.9; }
.hero__veil { position: absolute; inset: 0; background: var(--veil-warm); }

.hero__lockup { position: relative; margin: 0; }

/* Hero-only, and only over photography: two warm layers rather than a grey
   drop shadow. On flat paper this reads as pasted-on. */
.hero__lockup .lockup__mark {
  filter: drop-shadow(0 14px 18px rgba(120, 60, 40, .42)) drop-shadow(0 3px 4px rgba(120, 60, 40, .30));
}

@media (prefers-reduced-motion: no-preference) {
  .hero__lockup { animation: heroRise 900ms var(--ease-entrance) both; }
  @keyframes heroRise {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: none; }
  }
}

/* The lockup is sized in px so the solved letter gaps stay exact; below the
   breakpoints it steps down to sizes that still fit a phone. */
@media (max-width: 700px) {
  .hero__lockup .lockup { --mark-h: 104px; --wm-size: 43px; --lockup-gap: 26px; }
}
@media (max-width: 420px) {
  .hero__lockup .lockup { --mark-h: 84px; --wm-size: 35px; --lockup-gap: 22px; }
}

/* --------------------------------------------------------------- sections --- */

.section { margin-top: var(--space-11); }
.section-top { padding-top: var(--space-10); }

/* ------------------------------------------------------ featured simulator --- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}
.feature__body { padding: 44px 44px 40px; }
.feature__art { position: relative; min-height: 340px; background: var(--paper-sunk); }
.feature__silk { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature__cast {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 18px;
}
/* Overlapped, and every second one lifted, so the row reads as a group of
   people rather than as a filmstrip. */
.feature__cast > * { margin-left: -22px; }
.feature__cast > *:first-child { margin-left: 0; }
.feature__cast > *:nth-child(even) { margin-bottom: 18px; }

@media (max-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature__body { padding: 30px 26px 26px; }
  .feature__art { min-height: 250px; order: -1; }
}

/* ------------------------------------------------------------- writing --- */

.postlist { display: grid; }
.postlist__item {
  display: grid;
  gap: 8px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}
.postlist__item:hover .title { color: var(--dawi-red-deep); }
.postlist__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.postlist__date { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.postlist__sub { font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.backlink {
  font-size: var(--type-eyebrow);
  font-weight: var(--weight-eyebrow);
  letter-spacing: var(--type-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
}
.backlink:hover { color: var(--dawi-red); }

/* ------------------------------------------------------------- teaching --- */

.teaching { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.teaching > * { min-width: 0; }

.teaching__art { height: 210px; position: relative; background: var(--paper-sunk); overflow: hidden; }
.teaching__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.teaching__cast { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.teaching__cast > * { margin-left: -18px; }
.teaching__cast > *:first-child { margin-left: 0; }

.modecard {
  display: grid;
  gap: 7px;
  align-content: start;
  padding: 18px 20px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-page);
  color: inherit;
  transition: var(--transition-ui);
}
.modecard:hover { border-color: var(--accent); background: var(--accent-quiet); color: inherit; }
.modecard__eyebrow {
  font-size: var(--type-label);
  font-weight: var(--weight-eyebrow);
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
  color: var(--dawi-red);
}
.modecard__facts { font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 900px) {
  .teaching { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------- footer --- */

.foot { border-top: 1px solid var(--line-soft); margin-top: var(--space-11); }
.foot__inner {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 40px var(--gutter-page) 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.foot__brand { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-faint); }
.foot__links { display: flex; gap: 24px; font-size: 12.5px; flex-wrap: wrap; }
.foot__copy { color: var(--text-faint); }
