/* MediFlow website styles: index.html, privacy.html and terms.html.
   The app's own look carried onto the web. Light, sage, calm, card-based.
   - Values are design tokens (--mf-*, from tokens.css; never set them here). Shared components, the ones the app
     has too, read roles (--mf-button-*, --mf-field-*, --mf-card-*, --mf-pill-*, --mf-tone-*, --mf-text-*, --mf-page-*);
     see design-system/rules.md. The interaction-states and components sections use roles only (checked by
     design-system/scripts/lint_web.py); page sections may also use base tokens for page-only decoration.
   - Website-only values are --web-*: type (Poppins; the app stays Roboto), headline sizes and motion.
     Big headlines medium 500, small headings and buttons semibold 600, text regular 400.
   Sections: base · interaction states · components · page sections · policy pages. */

/* ---------------------------------------------------------------- base */
:root { color-scheme: light; --web-font: 'Poppins', system-ui, sans-serif; --web-head-weight: 500; --web-strong-weight: 600;
  --web-display: clamp(42px, 6.4vw, 82px); --web-h2: clamp(30px, 4vw, 48px); --web-lead: 19px;
  --web-motion: 150ms ease-out;
  /* Clay tone text is 3.5:1 on its tint, under AA for small text. Until the design system has a darker clay, darken it
     with ink (4.9:1). A known website-only difference, listed in design-system/rules.md. */
  --clay-text: color-mix(in srgb, var(--mf-tone-clay-text) 75%, var(--mf-text-body)); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } :root { --web-motion: 0s; } }
body { margin: 0; background: var(--mf-page-bg); color: var(--mf-text-body); font: 400 16px/1.6 var(--web-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: var(--web-head-weight); letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
h3 { font-weight: var(--web-strong-weight); }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.i { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; line-height: 1; display: inline-block; font-feature-settings: 'liga'; }
/* [to confirm: …] in content.json; keep these out of anything handed over */
mark.tbc { background: var(--mf-tone-amber-bg); color: var(--mf-text-body); border: 1px dashed var(--mf-tone-amber-text); border-radius: var(--mf-radius-sm); padding: 1px 6px; font-size: .92em; }

/* ---------------------------------------------------------------- interaction states
   One model for every control, the app's own (Flutter Material 3 buttons): on hover, keyboard focus or press,
   a layer of the control's text colour is laid over it at --mf-state-hover / -focus / -pressed. Disabled
   controls are ink at --mf-state-disabled-container (fill) and -content (text). The web adds a focus ring
   for keyboard users (2px, the field focus colour; white on the dark contact band, see page sections).
   Cards are not interactive and do not react. */
:focus-visible { outline: 2px solid var(--mf-field-border-focus); outline-offset: 3px; }

.btn { --state: 0%; box-shadow: inset 0 0 0 100vmax color-mix(in srgb, currentColor var(--state), transparent);
  transition: box-shadow var(--web-motion), color var(--web-motion); }
.btn:hover { --state: var(--mf-state-hover); }
.btn:focus-visible { --state: var(--mf-state-focus); }
.btn:active { --state: var(--mf-state-pressed); }
.btn:disabled, .btn[aria-disabled="true"] { --state: 0%; cursor: not-allowed; border-color: transparent;
  background: color-mix(in srgb, var(--mf-text-body) var(--mf-state-disabled-container), transparent);
  color: color-mix(in srgb, var(--mf-text-body) var(--mf-state-disabled-content), transparent); }

/* Text links: underlined inside running text; nav and footer links stay quiet and underline on hover. */
a { color: inherit; text-underline-offset: .18em; transition: color var(--web-motion); }
a:hover { text-decoration-thickness: 2px; }
.navlinks a, footer a, .logo { text-decoration: none; }
.navlinks a:hover, footer .meta a:hover, footer .links a:hover { color: var(--mf-text-body); text-decoration: underline; text-decoration-thickness: 1px; }

/* FAQ questions: link colour on hover, like the app's text buttons. */
summary { transition: color var(--web-motion); }
summary:hover { color: var(--mf-text-link); }

/* Form fields: as the app's fields, the field border turns into a 2px focus border. No hover change (the app has none). */
input, select { transition: border-color var(--web-motion); }
input:focus, select:focus { outline: none; border-color: var(--mf-field-border-focus); box-shadow: 0 0 0 1px var(--mf-field-border-focus); }

/* ---------------------------------------------------------------- components */
.eyebrow { display: inline-flex; border-radius: var(--mf-pill-radius); padding: 6px 13px; background: var(--mf-tone-sage-bg); color: var(--mf-tone-sage-text);
  font-weight: var(--web-strong-weight); font-size: var(--mf-font-size-pill); letter-spacing: var(--mf-letter-spacing-pill); }
.eyebrow.clay { background: var(--mf-tone-clay-bg); color: var(--clay-text); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--mf-button-height); padding: 0 24px; border-radius: var(--mf-button-radius);
  font: var(--web-strong-weight) var(--mf-font-size-button)/1 var(--web-font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary { background: var(--mf-button-primary-bg); color: var(--mf-button-primary-text); }
.btn-ghost { background: transparent; color: var(--mf-button-outline-text); border-color: var(--mf-button-outline-border); }   /* the app's outlined button */
.card { background: var(--mf-card-bg); border: 1px solid var(--mf-card-border); border-radius: var(--mf-card-radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.card p { font-size: var(--mf-font-size-body-strong); color: var(--mf-text-muted); }
label { display: grid; gap: 6px; font-size: var(--mf-font-size-label); font-weight: var(--web-strong-weight); letter-spacing: var(--mf-letter-spacing-label); text-transform: uppercase; color: var(--mf-field-label); }
input, select { font: var(--mf-font-size-input) var(--web-font); color: var(--mf-text-body); padding: 13px 14px; border-radius: var(--mf-field-radius); border: 1px solid var(--mf-field-border); background: var(--mf-field-bg); }

/* ---------------------------------------------------------------- page sections */
nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--mf-color-surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--mf-page-divider); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { display: block; width: auto; }
.logo .lockup { height: 36px; } footer .logo .lockup { height: 32px; }
.logo .mark { height: var(--mh, 24px); } footer .logo .mark { height: calc(var(--mh, 24px) * .875); }
.wordmark { font-weight: 600; font-size: 25px; letter-spacing: -0.02em; color: var(--mf-color-sage); } footer .wordmark { font-size: 22px; }
.navlinks { display: flex; gap: 28px; font-weight: var(--mf-font-weight-medium); color: var(--mf-text-muted); }
@media (max-width: 880px) { .navlinks { display: none; } }

.hero { padding-block: 72px 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 56px; align-items: center; }
.hero h1 { font-size: var(--web-display); margin-top: 20px; }
.hero h1 span { color: var(--mf-color-sage); display: block; }
.lead { font-size: var(--web-lead); color: var(--mf-text-muted); margin-top: 22px; max-width: 33em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--mf-text-muted); font-size: var(--mf-font-size-body-strong); }
.ticks li::before { content: "✓ "; color: var(--mf-color-sage); font-weight: var(--web-strong-weight); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero .phone { justify-self: center; } }

.phone { --s: .76; width: max-content; max-width: 100%; padding: 10px; border-radius: 40px; background: var(--mf-color-ink); box-shadow: 0 40px 70px -40px color-mix(in srgb, var(--mf-color-sage-deep) 60%, transparent); }
.phone .screen { line-height: 1.55; width: 390px; height: var(--h); overflow: hidden; border-radius: 30px; transform: scale(var(--s)); transform-origin: 0 0; margin-right: calc(390px * (var(--s) - 1)); margin-bottom: calc(var(--h) * (var(--s) - 1)); background: var(--mf-color-bg); }
@media (max-width: 420px) { .phone { --s: .68; } }

section { padding-block: 84px; }
.band { background: var(--mf-color-surface); border-block: 1px solid var(--mf-page-divider); }
.head { max-width: 42rem; display: grid; gap: 16px; justify-items: start; }
.head h2 { font-size: var(--web-h2); }
.head p { font-size: 18px; color: var(--mf-text-muted); }
.cards { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.band .card { background: var(--mf-page-bg); }
.card h3 { font-size: var(--mf-font-size-sheet-title); letter-spacing: -0.01em; }
.ic { width: var(--mf-size-icon-box); height: var(--mf-size-icon-box); border-radius: var(--mf-radius-md); display: grid; place-items: center; background: var(--mf-tone-sage-bg); color: var(--mf-tone-sage-text); }
.problem .ic { background: var(--mf-tone-clay-bg); color: var(--mf-tone-clay-text); }
.problem li:nth-child(1) .ic .i::before { content: "edit_note"; } .problem li:nth-child(2) .ic .i::before { content: "rule"; } .problem li:nth-child(3) .ic .i::before { content: "pending_actions"; }
.steps .no { font-weight: var(--web-strong-weight); font-size: var(--mf-font-size-label); letter-spacing: var(--mf-letter-spacing-label); text-transform: uppercase; color: var(--mf-color-sage-deep); }
.trust li:nth-child(1) .ic .i::before { content: "task_alt"; } .trust li:nth-child(2) .ic .i::before { content: "autorenew"; }
.trust li:nth-child(3) .ic .i::before { content: "lock"; } .trust li:nth-child(4) .ic .i::before { content: "receipt_long"; }
.security li:nth-child(1) .ic .i::before { content: "dns"; } .security li:nth-child(2) .ic .i::before { content: "https"; }
.security li:nth-child(3) .ic .i::before { content: "monitor_heart"; } .security li:nth-child(4) .ic .i::before { content: "cloud_done"; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.list .tick { width: 28px; height: 28px; border-radius: var(--mf-radius-sm); background: var(--mf-tone-sage-bg); color: var(--mf-tone-sage-text); display: grid; place-items: center; font-weight: var(--web-strong-weight); }
.list p { color: var(--mf-text-muted); }
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

#about .split { margin-top: 16px; }   /* the label sits above both columns, so the heading and the story start level */
.mission { font-weight: var(--web-head-weight); letter-spacing: -0.01em; border-left: 4px solid var(--mf-color-sage); padding-left: 18px; }

details { border-bottom: 1px solid var(--mf-page-divider); padding-block: 18px; }
summary { cursor: pointer; font-weight: var(--web-strong-weight); font-size: var(--mf-font-size-sheet-title); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary h3 { margin: 0; font: inherit; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--mf-color-sage); font-weight: var(--web-strong-weight); }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--mf-text-muted); max-width: 46em; }

.cta { background: var(--mf-color-sage-deep); color: var(--mf-color-on-dark90); border-radius: 28px; padding: clamp(28px, 6vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.cta h2 { font-size: var(--web-h2); color: var(--mf-color-surface); }
.cta > div > p { margin-top: 16px; font-size: 18px; }
form { background: var(--mf-card-bg); color: var(--mf-text-body); border-radius: var(--mf-card-radius); padding: 24px; display: grid; gap: 14px; }
.sent { font-size: var(--mf-font-size-body-compact); color: var(--mf-color-sage-deep); min-height: 1.2em; }
.cta > div :focus-visible { outline-color: var(--mf-color-surface); }   /* the focus ring on the dark band */
@media (max-width: 880px) { .cta { grid-template-columns: minmax(0, 1fr); } }

footer { padding-block: 40px; color: var(--mf-text-muted); font-size: var(--mf-font-size-body); border-top: 1px solid var(--mf-page-divider); margin-top: 84px; }
footer .wrap { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "logo stores links" "meta stores links"; gap: 16px 56px; align-items: start; }
footer .logo { grid-area: logo; } footer .meta { grid-area: meta; } footer .stores { grid-area: stores; align-self: end; } footer .links { grid-area: links; justify-self: end; }
footer .meta { display: grid; gap: 6px; }
footer .links { display: flex; gap: 18px; }
footer .stores { display: flex; flex-direction: column; gap: 10px; }   /* App Store and Google Play badges, stacked beside the logo and text, bottoms level: the stores' own artwork, unaltered */
footer .stores img { display: block; height: 40px; width: auto; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "meta" "stores" "links"; }
  footer .stores { flex-direction: row; flex-wrap: wrap; gap: 12px; } footer .links { justify-self: start; } }

/* ---------------------------------------------------------------- policy pages (privacy.html, terms.html) */
.legal { max-width: 46rem; padding-block: 56px 0; }
.legal h1 { font-size: var(--web-h2); margin-bottom: 18px; }
.legal h2 { font-size: 21px; letter-spacing: -0.01em; margin: 36px 0 10px; }
.legal p { margin-top: 10px; }
.legal ul { padding-left: 20px; margin: 10px 0 0; display: grid; gap: 6px; }
.legal h3 { font-size: 17px; margin: 24px 0 6px; }
.legal ol { list-style: none; counter-reset: item; padding-left: 2.4em; margin: 10px 0 0; display: grid; gap: 6px; }
.legal ol > li { counter-increment: item; position: relative; }
.legal ol > li::before { content: "(" counter(item, lower-alpha) ")"; position: absolute; left: -2.4em; }
.legal ol ol > li::before { content: "(" counter(item, lower-roman) ")"; }
.legal a { color: var(--mf-text-link); }
