/* ==========================================================================
   T&H Pharmacy — public site design system (2026 redesign)
   site.css      : tokens, base, layout, header, footer, buttons, forms, home
   site-pages.css: inner pages, auth, portal
   Brand colours are sampled from the logo (navy #134085, teal #3E8289).
   The admin panel still uses style.css until the backend phase.
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0e2747;
  --navy: #134085;
  --navy-hover: #1b4f9e;
  --teal: #3e8289;
  --teal-ink: #2b6168;
  --teal-light: #8cc3c6;
  --teal-tint: #e4efee;
  --paper: #f7f5f0;
  --paper-2: #efebe3;
  --surface: #ffffff;
  --line: #ddd6c9;
  --line-soft: #e9e4da;
  --text: #1a2433;
  --muted: #566070;
  --on-ink: #e9eef5;
  --on-ink-muted: #a9b6c8;
  --error: #b42318;
  --error-tint: #fdecea;
  --success: #1e6b4f;
  --success-tint: #e6f3ed;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.35rem, 1.15rem + 0.7vw, 1.65rem);
  --step-3: clamp(1.75rem, 1.35rem + 1.4vw, 2.45rem);
  --step-4: clamp(2.15rem, 1.5rem + 2.4vw, 3.15rem);
  --step-5: clamp(2.45rem, 1.5rem + 3.4vw, 4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: clamp(3.5rem, 2.5rem + 3.3vw, 6rem);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(14, 39, 71, 0.06);
  --shadow-2: 0 10px 30px -12px rgba(14, 39, 71, 0.22);
  --shadow-3: 0 30px 60px -24px rgba(14, 39, 71, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1200px;
  --header-h: 72px;
  --utility-h: 34px;
  --notice-h: 0px; /* height of admin notices above the header; see .site-notice */
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Fraunces has an optical-size axis (opsz 9-144). Left on auto, the browser
     draws headings with different letter shapes on a phone and a desktop. One
     optical size everywhere (the 64px desktop hero's); inherited, and ignored by
     Instrument Sans, which has no opsz axis. */
  font-optical-sizing: none;
  font-variation-settings: "opsz" 64;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-hover); }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--teal-tint); color: var(--ink); }
main:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.icon { flex: none; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ---------- 4. Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-ink); margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow-light { color: var(--teal-light); }
.display { font-size: var(--step-5); font-weight: 400; letter-spacing: -0.025em; line-height: 1.02; }
.display-sm { font-size: var(--step-4); }
.display .hero-gradient-text, .hero-gradient-text { font-style: italic; color: var(--teal-ink); font-weight: 350; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 36rem; line-height: 1.55; }
.section-title { font-size: var(--step-3); max-width: 22ch; }
.section-lede { color: var(--muted); max-width: 38rem; font-size: 1.0625rem; }
.prose p { color: var(--muted); }
.prose p.text-lg, .prose .text-lg { font-size: 1.0625rem; }
.prose strong { color: var(--text); }
.prose h2, .prose h3 { margin-top: var(--space-6); }
.prose ul { padding-left: 1.2rem; margin-bottom: var(--space-4); color: var(--muted); }
.text-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 600; text-decoration: none; color: var(--navy);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.text-link .icon { transition: transform 0.25s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.text-link-light { color: #fff; }
.text-link-light:hover { color: var(--teal-light); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0.65rem 1.3rem;
  font: 600 0.96875rem/1.2 var(--font-body);
  color: #fff; background: var(--navy); border: 1px solid var(--navy);
  border-radius: var(--radius-pill); text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 52px; padding: 0.8rem 1.6rem; font-size: 1.03125rem; }
.btn-sm { min-height: 36px; padding: 0.4rem 0.95rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--navy); border-color: var(--navy); box-shadow: none; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--teal-tint); border-color: var(--teal-tint); color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; color: #fff; box-shadow: none; }
.btn[disabled], .btn.is-loading { opacity: 0.65; pointer-events: none; }

/* ---------- 6. Header ---------- */
/* Admin-scheduled notices sit above the utility bar. */
.site-notice { font-size: 0.925rem; }
.site-notice-info { background: var(--teal-tint); color: var(--teal-ink); }
.site-notice-important { background: #fff4e0; color: #6b4100; }
.site-notice-inner { display: flex; align-items: center; gap: var(--space-3); padding-block: 0.6rem; }
.site-notice-inner p { margin: 0; }
.site-notice-inner .icon { flex: none; }
.site-notice a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Keep the home first screen exactly one window tall with notices showing:
   an estimate per notice here, the measured height set by site.js. */
.site-shell:has(.site-notice) { --notice-h: 2.6rem; }
.site-shell:has(.site-notice + .site-notice) { --notice-h: 5.2rem; }
.utility-bar { background: var(--ink); color: var(--on-ink-muted); font-size: 0.8125rem; }
.utility-inner { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-6); height: var(--utility-h); }
.utility-item { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--on-ink-muted); text-decoration: none; }
a.utility-item:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow 0.3s;
}
@supports (backdrop-filter: blur(10px)) {
  .site-header { background: rgba(247, 245, 240, 0.8); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(14, 39, 71, 0.45); }
.header-inner { position: relative; display: flex; align-items: center; gap: var(--space-6); height: var(--header-h); }
.brand img { width: 140px; height: auto; }
.primary-nav { display: flex; align-items: center; gap: var(--space-6); margin-left: auto; }
.nav-list { display: flex; gap: var(--space-1); list-style: none; }
.nav-link {
  position: relative; display: block; padding: 0.5rem 0.7rem;
  font-size: 0.9375rem; font-weight: 500; color: var(--text); text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-link::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.25rem; height: 1.5px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-logout { margin: 0; }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

@media (max-width: 1020px) {
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
    width: 46px; height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--line);
    color: var(--ink); cursor: pointer; background: var(--surface);
  }
  .nav-check:focus-visible + .nav-burger { outline: 3px solid var(--teal); outline-offset: 2px; }
  .nav-burger-close { display: none; }
  .nav-check:checked + .nav-burger .nav-burger-open { display: none; }
  .nav-check:checked + .nav-burger .nav-burger-close { display: block; }
  .primary-nav {
    display: none; position: absolute; top: 100%; left: -1.25rem; right: -1.25rem;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    padding: var(--space-4) 1.25rem var(--space-6);
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-3);
    max-height: calc(100dvh - var(--nav-top, var(--header-h))); overflow-y: auto;
    overscroll-behavior: contain; /* reaching the end must not scroll the page behind */
  }
  html:has(#nav-open:checked) { overflow: hidden; }
  .nav-check:checked ~ .primary-nav { display: flex; }
  .nav-list { flex-direction: column; }
  .nav-link { padding: 0.85rem 0.25rem; font-size: 1.125rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav-link::after { display: none; }
  .nav-actions { flex-wrap: wrap; }
  .nav-actions .btn { flex: 1; }
  /* Open menu must not be clipped by the blurred header's containing block. */
  .site-header:has(.nav-check:checked) { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
}
@media (max-width: 640px) {
  .utility-inner { justify-content: space-between; gap: var(--space-3); }
  .utility-hide-sm { display: none; }
  .utility-item:first-child { display: none; }
  .brand img { width: 128px; }
}

/* ---------- 7. Sections ---------- */
.section { padding-block: var(--space-9); }
.section-paper { background: var(--paper-2); }
.section-ink { background: var(--ink); color: var(--on-ink); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-head { margin-bottom: var(--space-6); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }
.section-head-row .section-title { margin-bottom: 0; }
.section-actions { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; margin-top: var(--space-7); }

/* ---------- 8. Home: hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(2rem, 1.25rem + 2.5vw, 3.75rem) clamp(2.5rem, 1.75rem + 2.75vw, 4.5rem);
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(62, 130, 137, 0.14), transparent 70%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(19, 64, 133, 0.08), transparent 70%),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-copy .lede { margin-bottom: var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: var(--muted); font-size: 0.925rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-facts .icon { color: var(--teal); }
.hero-media { position: relative; width: 100%; max-width: 470px; justify-self: end; padding: var(--space-4) var(--space-4) var(--space-5) var(--space-6); }
/* Offset outline arch: frames the photo so its pale edges never dissolve into the page. */
.hero-media::before {
  content: ""; position: absolute; inset: 0 0 var(--space-7) var(--space-7);
  border: 1.5px solid rgba(62, 130, 137, 0.45);
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg); pointer-events: none;
}
.arch {
  margin: 0; width: 100%; aspect-ratio: 1 / 1.12; overflow: hidden;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-3); background: var(--paper-2);
}
.arch { position: relative; z-index: 1; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 39, 71, 0) 55%, rgba(14, 39, 71, 0.28)); pointer-events: none; }

/* ---------- 8b. Home: first screen ----------
   Hero + proof strip together fill the window below the header, so the
   four stats sit on the base of the first screen.
   Only on desktop-shaped windows; phones scroll naturally. */
@media (min-width: 1021px) and (min-height: 600px) {
  .first-screen {
    display: flex; flex-direction: column;
    /* - 1px: the header's bottom border sits outside --header-h. */
    height: calc(100svh - var(--header-h) - var(--utility-h) - var(--notice-h) - 1px);
    min-height: 560px;
  }
  .first-screen .hero { flex: 1; display: flex; align-items: center; padding-block: var(--space-6); }
  .first-screen .hero > .wrap { width: min(100% - 2.5rem, var(--wrap)); }
  .first-screen .display { font-size: min(var(--step-5), 7.4svh); }
  .first-screen .display-sm { font-size: min(var(--step-4), 6svh); }
  .first-screen .hero-media { width: auto; max-width: none; }
  /* Photo height follows the window so the first screen never overflows. */
  .first-screen .arch { width: auto; height: clamp(300px, calc(100svh - 330px), 540px); aspect-ratio: 1 / 1.12; }
}

/* ---------- 9. Home: proof strip ---------- */
.proof { border-block: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item { display: flex; flex-direction: column; gap: 0.15rem; padding: var(--space-5) var(--space-5); border-left: 1px solid var(--line-soft); }
.proof-item:first-child { border-left: 0; padding-left: 0; }
.proof-value { font-family: var(--font-display); font-size: var(--step-3); color: var(--navy); line-height: 1.05; }
.proof-label { color: var(--muted); font-size: 0.925rem; }

/* ---------- 10. Home: specialties ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.spec-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.spec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line); }
.spec-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.spec-index { font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: 1.1rem; }
.spec-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-ink); }
.spec-name { font-size: var(--step-2); margin-bottom: var(--space-2); }
.spec-summary { color: var(--muted); margin-bottom: var(--space-5); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.chip {
  display: inline-block; padding: 0.32rem 0.75rem; font-size: 0.85rem; font-weight: 500;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill); text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--ink); }
.spec-more { margin-top: auto; display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; text-decoration: none; }
.spec-more .icon { transition: transform 0.25s var(--ease); }
.spec-more:hover .icon { transform: translateX(3px); }

/* ---------- 11. Home: steps, split, team ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); list-style: none; counter-reset: none; }
.step { border-top: 1px solid rgba(255, 255, 255, 0.18); padding-top: var(--space-5); }
.step-num { display: block; font-family: var(--font-display); font-style: italic; font-size: 1.9rem; color: var(--teal-light); line-height: 1; margin-bottom: var(--space-4); }
.step h3 { font-size: 1.25rem; }
.step p { color: var(--on-ink-muted); margin: 0; font-size: 0.95rem; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.split-media { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5 / 4.6; box-shadow: var(--shadow-2); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.callout {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--teal-tint); color: var(--ink); border-radius: var(--radius);
  padding: var(--space-4) var(--space-5); margin: var(--space-5) 0 var(--space-6);
}
.callout .icon { color: var(--teal-ink); margin-top: 2px; }

.team-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.team-mini-photo {
  aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface);
  margin-bottom: var(--space-4); border: 1px solid var(--line-soft);
}
.team-mini-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.6s var(--ease); }
.team-mini:hover .team-mini-photo img { transform: scale(1.04); }
.team-mini-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-bottom: 0.15rem; }
.team-mini-name span { font-family: var(--font-body); font-size: 0.875rem; color: var(--muted); }
.team-mini-role { color: var(--muted); font-size: 0.925rem; margin: 0; }
.avatar-fallback { display: grid; place-items: center; height: 100%; font-family: var(--font-display); font-size: 3rem; color: var(--teal-ink); background: var(--teal-tint); }

/* ---------- 12. Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding-top: var(--space-7); font-size: 0.9375rem; }
.footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap;
  padding-bottom: var(--space-6); margin-bottom: var(--space-6); border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-cta-title { font-family: var(--font-display); font-size: var(--step-2); color: #fff; max-width: 20ch; line-height: 1.12; margin: 0; }
.footer-cta-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-brand img:first-child { width: 140px; margin-bottom: var(--space-4); }
.footer-badge { width: 96px; margin-top: var(--space-4); border-radius: 6px; }
.footer-heading { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: var(--space-4); }
.footer-text { font-size: 0.95rem; margin-bottom: var(--space-3); }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--teal-light); }
.site-footer a.btn-light, .site-footer a.btn-light:hover { color: var(--ink); }
.site-footer a.btn-outline-light:hover { color: #fff; }
.footer-links { list-style: none; display: grid; gap: var(--space-2); font-size: 0.95rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  margin-top: var(--space-7); padding-block: var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.875rem;
}
.footer-base p { margin: 0; }
.site-footer .footer-credit a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 13. Forms ---------- */
.field { margin-bottom: var(--space-4); }
.field label, .label { display: block; font-weight: 600; font-size: 0.925rem; color: var(--ink); margin-bottom: var(--space-2); }
.field-req { color: var(--error); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.9rem;
  font: 400 16px/1.4 var(--font-body); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566070' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.5rem; }
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(62, 130, 137, 0.18); }
input[aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: 0.85rem; color: var(--muted); margin: var(--space-2) 0 0; }
.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 32px; padding: 0 0.7rem; font: 600 0.8125rem var(--font-body); color: var(--navy);
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; cursor: pointer;
}
.password-toggle:hover { border-color: var(--navy); }
.form-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 1.25vw, 2rem); box-shadow: var(--shadow-1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.form-note { font-size: 0.875rem; color: var(--muted); }

/* ---------- 14. Alerts & consent ---------- */
.alert {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-top: var(--space-5); padding: var(--space-4) var(--space-5);
  border-radius: var(--radius); border: 1px solid; font-size: 0.975rem;
}
.alert-body { display: grid; gap: 0.2rem; }
.alert-success { background: var(--success-tint); border-color: #b9dccb; color: var(--success); }
.alert-error { background: var(--error-tint); border-color: #f3c3bd; color: var(--error); }
.alert-info { background: var(--teal-tint); border-color: #c4dcda; color: var(--teal-ink); }

.consent {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 60; max-width: 360px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-4); box-shadow: var(--shadow-3); font-size: 0.85rem;
}
.consent p { color: var(--muted); }
.consent-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }

/* ---------- 15. Motion (scroll-driven; no JS, no library) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 16. Responsive (home + chrome) ---------- */
@media (max-width: 1020px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-media { max-width: 440px; width: 100%; margin-inline: auto; justify-self: center; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-5); }
  .team-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split-media { aspect-ratio: 16 / 11; }
}
@media (max-width: 720px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-item { padding: var(--space-5) var(--space-4); border-left: 0; border-top: 1px solid var(--line-soft); }
  .proof-item:nth-child(-n + 2) { border-top: 0; }
  .proof-item:first-child { padding-left: var(--space-4); }
  .spec-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-media { padding: 0 0 var(--space-7) var(--space-4); }
  .arch { aspect-ratio: 1 / 1.05; }
}
@media (max-width: 520px) {
  .steps, .team-strip { grid-template-columns: 1fr; }
  .team-strip { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .consent { left: var(--space-3); right: var(--space-3); }
}

@media print {
  .utility-bar, .site-header, .site-footer, .consent { display: none; }
  body { background: #fff; }
}
