/* Helpwell — brand layer.
 *
 * One file, loaded by every page on helpwell.ca before that page's own styles.
 * It carries three things and nothing else:
 *   1. the colour and type tokens,
 *   2. the page chrome (crisis bar, header, nav, footer),
 *   3. the components that must look identical wherever they appear
 *      (buttons, the hero, form fields, the glass panel).
 *
 * Why a red palette. The old site carried three palettes at once — grass
 * green on the home page, sea blue on the app and the legal pages, and a warm
 * paper tan in the library. A person moving from helpwell.ca to the login
 * form crossed a brand boundary without leaving the product. Red is the one
 * colour this product already owns: the maple leaf in the mark, the flag on
 * the privacy page. It is now the only accent, and everything else is a warm
 * neutral so the red stays an accent rather than a shout.
 *
 * Contrast, measured on white (#FFFFFF) with the WCAG 2.x formula:
 *   --brand        #C8102E   5.88:1  body text, links, small labels
 *   --brand-deep   #9E0C24   8.30:1  button ground (white on it)
 *   --brand-ink    #6E0A1A  11.70:1  text on the pale wash
 *   --ink          #1A1113  17.06:1
 *   --ink-soft     #4A3A3E  10.03:1
 *   --ink-muted    #6B575C   6.68:1
 * On the hero's near-black ground (#140A0C):
 *   white                     18.4:1
 *   --brand-bright #FF5A66    5.53:1  the display accent word
 *   hero muted white 72%      ~12:1
 * Anything that changes these numbers needs to be measured again. The old
 * file did this and it is the reason two colours in it are darker than they
 * look like they should be.
 */

:root {
  /* ── colour ─────────────────────────────────────────────────────────────
     The site is dark. Not a dark mode bolted on beside a light one — the
     product shows a red light on near-black water in its hero, and the pages
     behind it are the same room.

     Two reds, same hue, different jobs: --brand is the surface red (buttons,
     fills, the leaf) and --brand-text is what gets read. On this ground
     #E01B3C is 4.1:1, which fails AA at body size, so text takes the lighter
     #FF7180 at 6.7:1.

     Measured on the ground (#1A0E12):
       --ink           #FFF7F6               18.9:1
       --ink-soft      white 80%             ~11:1
       --ink-muted     white 60%              ~6.6:1
       --brand-text    #FF7180                6.7:1
     Anything that changes these numbers needs measuring again. */
  --brand: #E01B3C;
  --brand-text: #FF7180;

  /* The app's three data colours, in this file because the marketing site
     shows sample readings with them. They were referenced on the home page and
     defined nowhere, so `stroke: var(--energy-tone)` failed at computed-value
     time and fell back to no paint: the sample trendline and its bar fills
     were invisible, and the day-4 dot rendered as an unstyled black circle.
     That is why the card looked weak — half of it was never painted. */
  --energy-tone: #3FBE81;
  --sleep-tone:  #6AA6EE;
  --stress-tone: #E8794A;
  --brand-deep: #B8122C;
  --brand-ink: #FFD9DE;
  --brand-pale: rgba(224, 27, 60, 0.18);
  --brand-glow: rgba(224, 27, 60, 0.22);
  --brand-line: rgba(224, 27, 60, 0.34);
  --brand-bright: #FF7180;

  --bg: #2F1A22;
  --surface: rgba(255, 247, 246, 0.06);
  /* The header at full strength. The bar itself is glass and lets the page
     through on purpose; the phone drawer is the one piece of chrome that must
     hide what is under it, because what is under it is the hero. Same value as
     the no-backdrop-filter fallback below, so the drawer and the bar it hangs
     from are the same colour whichever support path the browser takes. */
  --nav-solid: #26141B;
  /* The translucent fill every card uses. On a dark ground a solid card is a
     grey slab; at 6% with a blur it is a pane of glass with the page behind
     it. */
  --surface-glass: rgba(255, 247, 246, 0.055);
  --surface-elevated: rgba(255, 247, 246, 0.10);
  --ink: #FFF7F6;
  --ink-soft: rgba(255, 244, 242, 0.80);
  --ink-muted: rgba(255, 244, 242, 0.60);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);

  /* The hero ground. Warm near-black, never blue-black: beside red a cold
     black reads as a mistake, and this is the colour the video sits on. */
  --night: #1D1014;
  --night-2: #33191E;
  --night-line: rgba(255, 255, 255, 0.14);
  --night-ink: #FFF7F6;
  --night-soft: rgba(255, 244, 242, 0.76);

  /* Amber is the crisis bar and nothing else. On dark it is a warm tint with
     a light ink, not a pastel block. */
  --amber: #E0A468;
  --amber-pale: rgba(143, 82, 16, 0.20);
  --amber-ink: #F2C79B;

  /* ── type ─────────────────────────────────────────────────────────────── */
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── shape ────────────────────────────────────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 14px 34px -14px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.55), 0 8px 24px -8px rgba(0, 0, 0, 0.35);

  /* ── motion ───────────────────────────────────────────────────────────── */
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 520ms;
  --ease-out: cubic-bezier(0.22, 0.68, 0.32, 1);
  --ease-in-out: cubic-bezier(0.55, 0.06, 0.35, 1);

  --wrap: 1140px;
  --nav-h: 72px;
}


/* ── the ground ────────────────────────────────────────────────────────────
   One fixed gradient behind every page. It does not scroll with the content,
   so a section that happens to sit mid-page passes over the same field the hero
   did — the page keeps one colour scheme from the first pixel to the footer
   instead of going flat putty after the first screen.

   Five blooms, all the same two pigments: the brand red at 4–12% and a warm
   amber at 6–8%. At those alphas the brightest point is about four percent
   lighter than the base, which is why the contrast table in BRAND.md still
   holds; this is colour, not light.

   Cards are glass and blur what is behind them, so the ground shows through
   the surfaces that sit on it. privacy.html and learn.html opt out: the legal
   page is a document and the library is parchment. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52% 44% at 12% 4%,  rgba(224, 27, 60, 0.30) 0%, rgba(224, 27, 60, 0) 64%),
    radial-gradient(42% 38% at 96% 18%, rgba(224, 27, 60, 0.22) 0%, rgba(224, 27, 60, 0) 62%),
    radial-gradient(46% 42% at 54% 48%, rgba(224, 27, 60, 0.14) 0%, rgba(224, 27, 60, 0) 68%),
    radial-gradient(48% 44% at 88% 88%, rgba(194, 65, 12, 0.18) 0%, rgba(194, 65, 12, 0) 64%),
    radial-gradient(52% 46% at 2% 96%,  rgba(184, 18, 44, 0.20) 0%, rgba(184, 18, 44, 0) 66%),
    linear-gradient(168deg, #40232F 0%, #2F1A22 48%, #3A1F2A 100%);
}
@media (prefers-reduced-motion: no-preference) {
  /* Nothing moves; the declaration exists only to keep the layer on the
     compositor while it is repainted under backdrop-filter. */
  body::before { will-change: transform; }
}

/* ── chrome ─────────────────────────────────────────────────────────────── */

.crisis-bar {
  background: var(--amber-pale);
  border-bottom: 1px solid rgba(196, 130, 50, 0.28);
  color: var(--amber-ink);
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 9px 0;
  text-align: center;
}
.crisis-bar a { color: var(--amber-ink); font-weight: 700; }
.crisis-bar .wrap { padding: 0 24px; }

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(34, 19, 25, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  header.site { background: var(--nav-solid); }
}

/* While the drawer is open the bar stops being glass. A translucent strip above
   an opaque panel reads as a seam, and with a menu over the hero there is
   nothing behind the bar worth keeping. The blur goes with it: there is nothing
   left for it to do, and it is the most expensive thing on the header. */
header.site.nav-open {
  background: var(--nav-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 28px;
  min-height: var(--nav-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.logo .mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
  /* The same silhouette the pages already draw in their SVG sprite, as a
     standalone file so it works on every page without copying the sprite. */
  background: url('/leaf.svg') center / contain no-repeat;
}
.logo:hover .mark { filter: brightness(0.82); }
.logo span { color: var(--brand); }

nav.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  font-size: 0.94rem;
  font-weight: 400;
  color: var(--ink-soft);
}
nav.site-nav a {
  display: inline-block;
  padding: 6px 2px;
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out);
}
nav.site-nav a:hover { color: var(--brand-text); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Desktop-invisible: the menu is the nav. Named here rather than on the page
   because every page that has a drawer uses the same button. */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0; flex: none;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: transparent; cursor: pointer; color: var(--ink);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
/* Items that exist only in the mobile drawer. */
nav.site-nav li.drawer-auth { display: none; }

/* ── buttons ────────────────────────────────────────────────────────────────
   One shape for every action: a pill. The two weights are "this is the thing"
   (solid red) and "this is the other thing" (hairline). Nothing gets a third
   weight, and nothing is a 4px rectangle pretending to be a link.            */

.btn-primary,
.btn-secondary,
.btn-nav,
.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(110, 10, 26, 0.18), 0 10px 24px -12px rgba(200, 16, 46, 0.55);
}
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-text); background: var(--surface); }

.btn-nav {
  min-height: 44px;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: none;
}
.btn-nav:hover { background: var(--brand-deep); }

.btn-ghost {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
  background: transparent;
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-text); }

/* ── labels ───────────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-text);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--pill);
  background: var(--brand);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ══════════════════════════════════════════════════════════════════════════
   The hero.
   ══════════════════════════════════════════════════════════════════════════
   A full-bleed loop behind the opening statement, the copy on the left, and
   the product itself — a live, working preview, not a screenshot — floating
   on the right.

   The layer that decides whether this is readable is not the video, it is
   the scrim: two stacked gradients, a vertical one that guarantees 18:1
   white-on-ground at the left where the text sits, and a red wash that keeps
   the loop from reading as a stock stock-footage backdrop. Remove either and
   the text contrast depends on a video that has not been shot yet.           */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night);
  color: var(--night-ink);
  padding: 28px 0 0;
  display: flex;
  flex-direction: column;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-media video,
.hero-media img,
.hero-media .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  border: 0;
  display: block;
}
/* The still is always underneath. Until /media/hero.mp4 exists this is the
   whole background; once it does, the video paints over it and the still
   becomes the poster for the first paint and every pause. */
.hero-poster {
  background: var(--night) url('/media/hero-poster.jpg') center / cover no-repeat;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(29, 16, 20, 0.82) 0%, rgba(29, 16, 20, 0.62) 38%, rgba(29, 16, 20, 0.26) 68%, rgba(29, 16, 20, 0.16) 100%),
    linear-gradient(180deg, rgba(29, 16, 20, 0.34) 0%, rgba(29, 16, 20, 0.04) 26%, rgba(29, 16, 20, 0.34) 78%, var(--night) 100%),
    radial-gradient(120% 80% at 78% 18%, rgba(200, 16, 46, 0.30) 0%, rgba(200, 16, 46, 0) 62%);
}

.hero-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
  flex: 1;
  min-height: min(64vh, 600px);
}

.hero-copy { max-width: 34rem; }

.hero-badge {
  display: inline-block;
  padding: 14px 18px 14px 14px;
  border-radius: 16px;
  max-width: 27rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.88rem;
  color: var(--night-soft);
  text-decoration: none;
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.hero-badge:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.28); }
.hero-badge-line {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--night-soft);
  text-wrap: balance;
}
.hero-badge strong { color: #fff; font-weight: 500; }
.hero-badge .arrow { color: var(--brand-bright); white-space: nowrap; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  color: #fff;
  font-size: clamp(2.9rem, 5.4vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 26px 0 0;
  text-wrap: balance;
}
.hero h1 .line-2 { display: block; color: var(--brand-bright); margin-top: 4px; }

.hero-lede {
  margin: 22px 0 0;
  max-width: 44ch;
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--night-soft);
}
.hero-lede strong { color: #fff; font-weight: 500; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}
.hero .btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(200, 16, 46, 0.9);
}
.hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}
.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.62);
  color: #fff;
}

.hero-foot {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 244, 242, 0.62);
}
.hero-foot .dot { color: var(--brand-bright); padding: 0 6px; }
.hero-foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.34);
}
.hero-foot a:hover { color: #fff; text-decoration-color: #fff; }

/* Until a loop is dropped in /media/hero.mp4, the still is the background, and
   a completely motionless still under a "video hero" is a promise the page does
   not keep. This is the smallest honest substitute: a 42-second drift, on the
   still only, paused by the same control as the video. */
@media (prefers-reduced-motion: no-preference) {
  .hero-poster {
    animation: hero-drift 42s var(--ease-in-out) infinite alternate;
    will-change: transform;
  }
  @keyframes hero-drift {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to   { transform: scale(1.10) translate3d(-1.4%, -1.1%, 0); }
  }
  .hero[data-motion="paused"] .hero-poster { animation-play-state: paused; }
}

.hero-pause {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--pill);
  background: rgba(20, 10, 12, 0.3);
  color: rgba(255, 244, 242, 0.86);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.hero-pause:hover { border-color: rgba(255, 255, 255, 0.42); color: #fff; }
/* The button sets display: inline-flex, which beats the browser's
   [hidden] { display: none }. Without this the hidden attribute is a comment. */
.hero-pause[hidden] { display: none; }
.hero-pause svg { width: 13px; height: 13px; flex: none; }

/* The glass panel. Used by the hero preview and by anything that has to sit
   on the loop without becoming a white box.
   Colour is white at 6% over whatever is behind it, so the panel reads the
   same on a bright frame and a dark one; the 1px white at 16% edge is what
   separates it from the video without a shadow. */
.glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(36, 17, 20, 0.82); }
}

/* Links are the brand red unless a component says otherwise. The home page
   overrides this with `a { color: inherit }` because almost every link there
   is inside a coloured card. */
a { color: var(--brand-text); text-underline-offset: 2px; }
a:hover { color: var(--brand-text); }

/* ── layout ───────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; width: 100%; }

/* ── the auth card ────────────────────────────────────────────────────────────
   Used by login.html and signup.html on this origin, and mirrored in the app's
   app.css so the two sign-in screens are the same screen. The page ground is
   warm white; the card is the only surface with a shadow, which is what makes
   the form read as the thing to do rather than as part of the page.            */
/* The card is glass, not paper. A white rectangle on a warm ground is the
   brightest object in the viewport and it reads as a form pasted onto a page;
   at 58% white with a real blur behind it the ground comes through, the edges
   soften, and the form sits *in* the page instead of on it. The border is
   white at 75% because that is what a blur finishes with — a lens edge, not a
   drawn line. Text contrast is measured on the composite (~#FCFAF9): ink is
   still 16:1, muted 6.3:1. */
.card {
  background: rgba(52, 31, 39, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 70px -30px rgba(0, 0, 0, 0.75),
    0 2px 10px rgba(0, 0, 0, 0.30);
  padding: 36px 34px;
  width: 100%;
  max-width: 440px;
}
@supports not (backdrop-filter: blur(1px)) {
  .card { background: rgba(52, 31, 39, 0.88); }
}

/* The ground the glass needs. Without something behind it, a translucent card
   on a flat fill is just an off-white card. */

.card h1 { font-family: var(--serif); font-size: 2rem; font-weight: 500; margin: 14px 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.field input:hover { border-color: rgba(255, 255, 255, 0.32); }
.field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.field .hint { font-size: 0.78rem; color: var(--ink-muted); margin-top: 5px; }

.btn-block { width: 100%; margin-top: 6px; }
.hidden { display: none !important; }

.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.msg.show { display: block; }
.msg.error { background: rgba(140, 47, 47, 0.26); border: 1px solid rgba(255, 138, 138, 0.36); color: #FFC9C9; }
.msg.ok { background: var(--brand-glow); border: 1px solid var(--brand-line); color: #FFD9DE; }

.foot { margin-top: 22px; font-size: 0.88rem; color: var(--ink-muted); text-align: center; }
.privacy-line { margin-top: 14px; font-size: 0.8rem; color: var(--ink-muted); text-align: center; }
.meta { font-size: 0.88rem; color: var(--ink-soft); }
.meta strong { color: var(--ink); font-weight: 600; }

.linklike {
  background: none; border: none; padding: 12px 4px; margin: 0;
  font: inherit; color: var(--brand-text); text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer; min-height: 44px;
}
.linklike:hover { color: var(--brand-text); }

.anon-code-box {
  background: var(--brand-glow);
  border: 1px dashed var(--brand);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin: 16px 0;
}
.anon-code {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--brand-ink);
  word-break: break-all;
  user-select: all;
}

/* The app-style header these two pages use: wordmark only, no nav. */
header.site .wrap { display: flex; align-items: center; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 24px;
  height: 24px;
  margin-right: 9px;
  flex: none;
  background: url('/leaf.svg') center / contain no-repeat;
}
.brand span { color: var(--brand); }

/* ── footer ───────────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 0;
}
footer.site .inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 28px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
footer.site .brand { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); text-decoration: none; }
footer.site .brand span { color: var(--brand); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.site nav a { color: var(--ink-soft); text-decoration: none; }
footer.site nav a:hover { color: var(--brand-text); }

/* ── focus ────────────────────────────────────────────────────────────────── */
:where(a, button, summary, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.hero :where(a, button):focus-visible,
.on-dark :where(a, button):focus-visible {
  outline-color: #fff;
}

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { gap: 16px; padding: 12px 20px; }
  nav.site-nav ul { gap: 18px; font-size: 0.9rem; }
  .btn-nav { padding: 0 16px; }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 8px;
    min-height: 0;
  }
  .hero-copy { max-width: 38rem; }
  .hero h1 { font-size: clamp(2.5rem, 8.4vw, 3.5rem); }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(29, 16, 20, 0.5) 0%, rgba(29, 16, 20, 0.44) 30%, rgba(29, 16, 20, 0.76) 100%),
      radial-gradient(120% 70% at 80% 6%, rgba(200, 16, 46, 0.28) 0%, rgba(200, 16, 46, 0) 60%);
  }
}

@media (max-width: 860px) {
  /* The nav collapses behind the menu button; the bar keeps one action — Start
     a check-in — because two pills plus a wordmark plus a menu button do not
     fit on a 390px screen without the text wrapping to two lines, which is what
     it did.

     The drawer is opaque, not glass. It was `var(--surface)`, which is 6% white:
     on a phone the panel disappeared entirely and every link sat on top of the
     hero headline, so the menu was there and unreadable. A dropdown covers
     content and therefore has to hide it; translucency is for surfaces the page
     is allowed to show through. */
  .nav-toggle { display: flex; }
  .nav-right .btn-ghost { display: none; }
  nav.site-nav li.drawer-auth { display: block; }
  .btn-nav { padding: 0 15px; font-size: 0.85rem; }

  .nav { position: relative; }
  nav.site-nav ul {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px 20px 16px;
    background: var(--nav-solid);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    /* Eight rows are taller than a 568px phone. The panel is absolutely
       positioned under a sticky bar, so without a bound the last row — the one
       that says Create account — sits below the viewport and cannot be
       scrolled to. Bound it to the screen and let the panel scroll instead.
       140px is the crisis line (about 51px) plus the bar (65px) plus a margin;
       the line is part of the page, not the panel, and it is taller on narrower
       phones. */
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  header.site.nav-open nav.site-nav ul { display: flex; }
  nav.site-nav li { border-bottom: 1px solid var(--line); }
  nav.site-nav li:last-child { border-bottom: none; }
  nav.site-nav a { display: block; padding: 15px 2px; font-size: 1rem; }
  /* Sign in and Create account live at the end of the drawer and matter most:
     a returning person on a phone has nowhere else to go. */
  nav.site-nav li:nth-last-child(-n+2) a { font-weight: 600; color: var(--brand-text); }
}

@media (max-width: 640px) {
  .crisis-bar { font-size: 0.76rem; padding: 8px 14px; }
  .nav { padding: 10px 16px; min-height: 64px; }
  .logo { font-size: 1.28rem; }
  .hero { padding-top: 24px; }
  .hero-inner { padding: 8px 18px 0; gap: 32px; }
  .hero-foot { padding: 18px 18px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero h1 { margin-top: 20px; }
  .hero-lede { font-size: 1.02rem; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; }
  .btn-primary, .btn-secondary { min-height: 52px; }
}

/* ── motion ──────────────────────────────────────────────────────────────────
   The hero loop is the one decorative moving thing on the site. It is a state
   change only in the sense that it is alive; it carries no information, which
   is exactly why it stops for anyone who asks for that. The page script also
   leaves the video paused in that case, so this is the belt to its braces. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* The video is not hidden here — it is never started (the page script reads
     this preference first), so it sits on its poster. Hiding it would also hide
     the one control that lets somebody who changed their mind play it, and a
     control that cannot do its job is worse than no control. */
}

/* ── the paper cards below the hero ────────────────────────────────────────
   These were pure white. On a warm ground a white card is a light box and,
   repeated eight times down a long page, that is what "blasty" means. They now
   use the warm translucent fill and the same blur as everything else, so the
   ground comes through a little and the edges sit into the page. Where
   backdrop-filter is missing the fill rises to 94% — still warm, still paper. */
.trust-strip,
.flow-card,
.stage-card,
.feature-box,
.plan-card,
.feature-card,
.schema-box {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
  border-color: rgba(255, 255, 255, 0.10);
}
@supports not (backdrop-filter: blur(1px)) {
  .trust-strip,
  .flow-card,
  .stage-card,
  .feature-box,
  .plan-card,
  .feature-card,
  .schema-box { background: rgba(52, 31, 39, 0.9); }
}

/* ── the crisis line, at phone width ───────────────────────────────────────
   On a 390px screen the full sentence wrapped to four lines and pushed the
   headline most of a screen down; the first thing a visitor met was an
   emergency notice, which is not what this site is. The number still leads —
   it is the first two words now — and the sentence is still there on any
   screen wide enough to hold it. */
.crisis-bar .crisis-short { display: none; }
@media (max-width: 640px) {
  .crisis-bar {
    font-size: 0.76rem;
    line-height: 1.4;
    padding: 7px 16px;
  }
  .crisis-bar .crisis-long { display: none; }
  .crisis-bar .crisis-short { display: block; }
  /* A real target for the number, without growing the bar around it. */
  .crisis-bar a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: -6px 0;
    padding: 0 2px;
  }
}
