/* ==========================================================================
   BioLinks Pakistan — design system
   MIUIX-inspired: soft layering, generous radius, restrained glass, calm
   surfaces, strong whitespace. Light theme only (documented decision —
   upgrade path: add a prefers-color-scheme dark block using the same tokens).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color — neutral ramp (cool) */
  --bg: #f3f7f5;
  --bg-sunken: #e9f1ed;
  --surface: #ffffff;
  --surface-muted: #f7faf9;

  /* Color — ink */
  --ink: #0d1512;          /* 17.15:1 on --bg */
  --ink-muted: #4c5a55;    /* 6.70:1 on --bg  */

  /* Color — accent ramp (teal) */
  --accent: #0e7a63;       /* 4.88:1 on --bg, 5.27:1 with white text */
  --accent-strong: #0b5e4c;/* 7.15:1 on --bg, 7.72:1 with white text */
  --accent-soft: #dff3ec;
  --accent-ink: #08453a;

  /* Color — lines and structure */
  --line: rgb(13 21 18 / 0.10);
  --line-strong: rgb(13 21 18 / 0.16);

  /* Glass (used selectively: header, hero panel, mobile bar, final CTA) */
  --glass-bg: rgb(255 255 255 / 0.66);
  --glass-border: rgb(255 255 255 / 0.75);
  --glass-blur: blur(16px) saturate(1.4);

  /* Shadows — layered transparent, elevation not decoration */
  --shadow-1: 0 1px 2px rgb(13 21 18 / 0.05), 0 2px 8px rgb(13 21 18 / 0.05);
  --shadow-2: 0 2px 4px rgb(13 21 18 / 0.05), 0 12px 32px rgb(13 21 18 / 0.09);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Spacing scale (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Type — system stack, no webfonts, no render-blocking */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;   /* 13px — captions, never body */
  --fs-sm: 0.875rem;    /* 14px — UI text */
  --fs-md: 1rem;        /* 16px — body floor */
  --fs-lg: 1.125rem;    /* 18px — lead paragraphs */
  --fs-xl: 1.375rem;    /* 22px */
  --fs-2xl: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);  /* section titles */
  --fs-3xl: clamp(1.875rem, 1.5rem + 1.8vw, 2.625rem);/* hero headline */
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.6;

  /* Motion — short, interruptible, explain-state only */
  --t-fast: 150ms;
  --t-med: 220ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --measure: 65ch;
  --wrap: min(90vw, 1120px);
  --wrap-wide: min(94vw, 1280px);
  --header-h: 64px;
  --bar-h: 60px; /* mobile action bar */
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Safe-area: viewport-fit=cover content must clear the sensor housing */
:root { padding-top: env(safe-area-inset-top, 0px); }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ambient layer — very restrained, behind everything, never interactive */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 34rem at 82% -8%, rgb(14 122 99 / 0.07), transparent 60%),
    radial-gradient(46rem 30rem at -10% 30%, rgb(14 122 99 / 0.05), transparent 55%);
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  font-weight: 650;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.005em; }

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--accent); }

strong { font-weight: 650; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* Focus — visible ring, preserved in forced-colors */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — first focusable element */
.skip-link {
  position: absolute;
  inset-inline-start: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--accent-strong);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--s-3); color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap { width: var(--wrap); margin-inline: auto; }
.wrap-wide { width: var(--wrap-wide); margin-inline: auto; }

main { display: block; }

section[id], div[id] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }

/* Sections: space is the primary separator */
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-7); }

.section-head {
  max-width: var(--measure);
  margin-block-end: var(--s-6);
}
.section-head h2 { margin-block-end: var(--s-3); }
.section-head p { color: var(--ink-muted); font-size: var(--fs-lg); }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-block-end: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgb(13 21 18 / 0.03);
}
.header-inner {
  width: var(--wrap);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--ink); }
.brand small {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.site-nav { margin-inline-start: auto; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 550;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.site-nav a:hover { background: rgb(13 21 18 / 0.05); color: var(--ink); }

.header-cta { flex-shrink: 0; }

/* Burger — native <details>/<summary>: works with script-src 'none' */
.mobile-nav { display: none; }
.mobile-nav summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: var(--s-2);
  border-radius: var(--r-sm);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background var(--t-fast) var(--ease);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary:hover { background: rgb(13 21 18 / 0.05); }
.mobile-nav .nav-icon-close { display: none; }
.mobile-nav[open] .nav-icon-open { display: none; }
.mobile-nav[open] .nav-icon-close { display: inline; }
/* Closed state: no layout at all for the panel (keeps hidden menu content
   from producing off-viewport boxes; UA closed-details rendering varies) */
.mobile-nav:not([open]) .mobile-nav-panel { display: none; }
.mobile-nav-panel {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  width: auto;
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-2);
}
.mobile-nav-panel nav {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  width: var(--wrap);
  margin-inline: auto;
  padding-block: var(--s-3);
}
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; }
.mobile-nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s-3);
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 550;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mobile-nav-links a:hover { background: rgb(13 21 18 / 0.05); color: var(--accent-strong); }
/* Category items read as a subordinate group: indented, regular weight */
.mobile-nav-label + .mobile-nav-links a {
  padding-inline-start: calc(var(--s-3) * 2);
  font-weight: 400;
  color: var(--ink-muted);
}
.mobile-nav-label + .mobile-nav-links a:hover { color: var(--accent-strong); }
.mobile-nav-label {
  margin: var(--s-3) 0 var(--s-1);
  padding-inline: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.mobile-nav-call { justify-content: center; margin-block-start: var(--s-2); }

/* --------------------------------------------------------------------------
   5. Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding-inline: var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: var(--shadow-2);
}

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

.btn-ghost {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-ink); }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Inline text link with arrow — describes its destination */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.link-more::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.link-more:hover::after { transform: translateX(3px); }

/* RTL: mirror the link arrow so it points into the flow direction */
html[dir="rtl"] .link-more::after { content: "←"; }
html[dir="rtl"] .link-more:hover::after { transform: translateX(-3px); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
/* Subtle technical grid behind the hero — vanilla-3D reference technique,
   adapted to the light theme; decorative, masked to fade, no JS */
.hero { position: relative; padding-block: var(--s-8) var(--s-7); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 8%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 8%, #000 25%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: var(--s-7);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-block-end: var(--s-4);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 { margin-block-end: var(--s-4); }
.hero-lead {
  max-width: 54ch;
  font-size: var(--fs-lg);
  color: var(--ink-muted);
  margin-block-end: var(--s-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* Hero side panel — one of the few glass surfaces */
.hero-panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: var(--s-6);
}
.hero-panel h2 { font-size: var(--fs-lg); margin-block-end: var(--s-4); }

.fact-list { list-style: none; display: grid; gap: var(--s-4); }
.fact-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-3);
  align-items: start;
}
.fact-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.fact-icon svg { width: 20px; height: 20px; }
.fact-list b { display: block; font-size: var(--fs-md); font-weight: 650; }
.fact-list span { font-size: var(--fs-sm); color: var(--ink-muted); }
.fact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.fact-list a:hover { color: var(--accent-strong); text-decoration: underline; }

/* --------------------------------------------------------------------------
   7. Trust strip
   -------------------------------------------------------------------------- */
.trust-strip { padding-block: var(--s-6); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  list-style: none;
}
.trust-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}
.trust-item b {
  display: block;
  font-size: var(--fs-md);
  font-weight: 650;
  margin-block-end: var(--s-1);
}
.trust-item span { font-size: var(--fs-sm); color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   8. Category cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-2);
    border-color: var(--line-strong);
    transform: translateY(-2px);
  }
}
.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-block-end: var(--s-1);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: var(--fs-lg); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent-strong); text-decoration: underline; }
.card p { font-size: var(--fs-sm); color: var(--ink-muted); flex-grow: 1; }
.card .link-more { color: var(--accent-strong); }

/* --------------------------------------------------------------------------
   9. Process steps
   -------------------------------------------------------------------------- */
/* Cards — number badge sits beside the heading, copy spans below */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  list-style: none;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  grid-column: 1;
  grid-row: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-md);
}
.step h3 { grid-column: 2; grid-row: 1; font-size: var(--fs-lg); }
.step p { grid-column: 1 / -1; grid-row: 2; font-size: var(--fs-sm); color: var(--ink-muted); }

/* --------------------------------------------------------------------------
   10. Location / business info
   -------------------------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: start;
}

.info-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-1);
}
.info-panel h3 { margin-block-end: var(--s-4); }
.panel-title { font-size: var(--fs-xl); margin-block-end: var(--s-4); }

.address-block {
  font-style: normal;
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--ink);
}
.address-block .label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-block-end: var(--s-1);
}

.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-block-start: var(--s-5);
}

.note-line {
  margin-block-start: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* Utility: sunken section band (alternating section surface) */
.section-sunken { background: var(--bg-sunken); }

/* Utility: labelled value block (e.g. phone under a label) */
.value-block { margin-block-start: var(--s-4); }
.value-block .label,
.address-block .label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-block-end: var(--s-1);
}
.value-block a {
  font-size: var(--fs-lg);
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}
.value-block a:hover { color: var(--accent-strong); text-decoration: underline; }

/* Utility: centered action row */
.actions-center { justify-content: center; }

/* Utility: footer base without top rule */
.footer-base-plain { border-block-start: none; padding-block-start: 0; }

/* Map placeholder — no iframe; direct links only (privacy + performance) */
.map-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, var(--accent-soft), var(--surface-muted));
  padding: var(--s-7) var(--s-6);
  text-align: center;
  box-shadow: var(--shadow-1);
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}
.map-card svg { width: 44px; height: 44px; color: var(--accent-strong); }
.map-card p { font-size: var(--fs-sm); color: var(--ink-muted); max-width: 40ch; }

/* Embedded Google Map — homepage location only, lazy-loaded via loading=lazy.
   Sized for the info-grid column: full column width, 420px desktop / 320px
   phone; the frame card clips the iframe to the system radius. */
.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: var(--surface-muted);
}
.map-frame iframe { display: block; width: 100%; height: 420px; border: 0; }

/* --------------------------------------------------------------------------
   11. FAQ — native details/summary, works without JavaScript
   -------------------------------------------------------------------------- */
.faq-list { display: grid; gap: var(--s-3); max-width: 800px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 56px;
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-md);
  list-style: none;
  transition: background var(--t-fast) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--surface-muted); }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-inline-end: 2px solid var(--accent-strong);
  border-block-end: 2px solid var(--accent-strong);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-med) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq-item .faq-answer {
  padding: 0 var(--s-5) var(--s-5);
  color: var(--ink-muted);
  font-size: var(--fs-md);
  max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   12. Final CTA — glass band
   -------------------------------------------------------------------------- */
.final-cta { padding-block: var(--s-8); }
.final-cta-inner {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: var(--s-8) var(--s-7);
  text-align: center;
  display: grid;
  gap: var(--s-4);
  justify-items: center;
}
.final-cta-inner > * { position: relative; z-index: 1; }
.final-cta-inner p { color: var(--ink-muted); font-size: var(--fs-lg); max-width: 52ch; }
.final-cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; margin-block-start: var(--s-2); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-block-start: 1px solid var(--line);
  background: var(--surface-muted);
  padding-block: var(--s-7) var(--s-6);
  margin-block-end: calc(var(--bar-h) + var(--s-5) + env(safe-area-inset-bottom, 0px)); /* clearance for mobile action bar */
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s-7);
  margin-block-end: var(--s-6);
}
.footer-grid h2 { font-size: var(--fs-md); margin-block-end: var(--s-3); }
.footer-grid p, .footer-grid li { font-size: var(--fs-sm); color: var(--ink-muted); }
.footer-grid ul { list-style: none; display: grid; gap: var(--s-2); }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--accent-strong); text-decoration: underline; }
.footer-address { font-style: normal; line-height: var(--lh-snug); }

.footer-base {
  border-block-start: 1px solid var(--line);
  padding-block-start: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}
.footer-base a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; }
.footer-base a:hover { color: var(--accent-strong); }

/* --------------------------------------------------------------------------
   14. Mobile action bar — Call | Directions, safe-area aware
   -------------------------------------------------------------------------- */
.mobile-bar {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-block-start: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgb(13 21 18 / 0.08);
  padding: var(--s-2) var(--s-4);
  padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px));
  gap: var(--s-3);
}
.mobile-bar .btn { flex: 1; min-height: var(--bar-h); }

/* --------------------------------------------------------------------------
   15. Legal pages
   -------------------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-xl); margin-block: var(--s-6) var(--s-3); }
.prose h3 { font-size: var(--fs-lg); margin-block: var(--s-5) var(--s-2); }
.prose p { margin-block-end: var(--s-4); color: var(--ink); }
.prose ul, .prose ol { margin-block-end: var(--s-4); padding-inline-start: var(--s-5); }
.prose li { margin-block-end: var(--s-2); }
.prose li::marker { color: var(--accent); }
.prose a { overflow-wrap: anywhere; }

/* Supply-area category visual: text column + one contextual illustration.
   DOM order (prose, figure) matches visual reading order on desktop and mobile. */
.prose-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.cat-visual { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-muted); }
.cat-visual img { display: block; width: 100%; height: auto; }
@media (min-width: 48rem) {
  .prose-row { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}

.page-head { padding-block: var(--s-8) var(--s-6); }
.page-head h1 { margin-block-end: var(--s-3); }
.page-head p { color: var(--ink-muted); font-size: var(--fs-lg); max-width: 60ch; }

/* Breadcrumbs */
.crumbs { padding-block-start: var(--s-5); font-size: var(--fs-sm); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.crumbs li { color: var(--ink-muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--s-2); color: var(--line-strong); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-strong); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* 404 */
.center-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: var(--s-4);
  justify-items: center;
  padding-block: var(--s-8);
}
.center-page h1 { font-size: var(--fs-2xl); }

/* --------------------------------------------------------------------------
   16. Responsive — breakpoints follow content, not device presets
   -------------------------------------------------------------------------- */

/* Hero panel + copy stop fitting side-by-side around 60rem */
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

/* Trust strip: 4-across only when each item keeps its text readable */
@media (min-width: 56rem) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Card grid: 3-across when cards stay ≥ 18rem wide */
@media (min-width: 56rem) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Tablet range (48–56rem): 4/3-across crowds text (phone numbers wrapped
   mid-digit, ~15-char measures) and steps squeeze — hold at 2-across/stacked
   until the 56rem rules; must come after the min-48rem block above */
@media (min-width: 48rem) and (max-width: 55.99rem) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}

/* Burger zone: the single-row header (brand + nav + CTA) was measured to
   need >= 976px of the 90vw container — below that it genuinely stops
   fitting, so links move into a native <details> menu (no JS required).
   Desktop keeps the normal horizontal nav above 60.99rem. */
@media (max-width: 60.99rem) {
  .site-nav { display: none; }
  .header-cta { display: none; } /* phone zone: fixed mobile bar + menu panel carry Call */
  .mobile-nav { display: block; margin-inline-start: auto; }
}
/* Tablet burger zone: header Call CTA fits comfortably beside the burger */
@media (max-width: 60.99rem) and (min-width: 48rem) {
  .header-cta { display: inline-flex; margin-inline-start: auto; }
  .mobile-nav { margin-inline-start: var(--s-2); }
}

/* Below 48rem everything stacks */
@media (max-width: 47.99rem) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .map-frame iframe { height: 320px; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .section { padding-block: var(--s-7); }
  .hero { padding-block: var(--s-7) var(--s-6); }
  .final-cta-inner { padding: var(--s-7) var(--s-5); }
  .mobile-bar { display: flex; }
}

/* Phone-width: trust facts become a single readable column */
@media (max-width: 30rem) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* Very narrow — 320px must not overflow */
@media (max-width: 22.5rem) {
  .trust-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .info-actions .btn { width: 100%; }
  .brand small { display: none; }
}

/* --------------------------------------------------------------------------
   17. Motion and forced colors
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:active { transform: none; }
}

@media (forced-colors: active) {
  .btn, .card, .faq-item, .trust-item, .info-panel, .hero-panel { border: 1px solid CanvasText; }
  .site-header, .mobile-bar { border-block-end: 1px solid CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}

/* --------------------------------------------------------------------------
   18. Requirement lists in info panels (catalog pages)
   -------------------------------------------------------------------------- */
.steps-list { padding-inline-start: var(--s-5); }
.steps-list li { margin-block-end: var(--s-2); }
.steps-list li::marker { color: var(--accent); }
