/* Humphrey Roofing Inc. — site stylesheet
   Palette: storm navy, logo blue, membrane white, concrete, slate.
   Type: Archivo (display, expanded), Public Sans (body), IBM Plex Mono (specs). */

/* Self-hosted fonts (SIL Open Font License) */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ink: #0f1b27;          /* storm navy: text + dark surfaces */
  --ink-2: #1a2a3a;
  --blue: #1461b4;         /* logo blue: the one accent */
  --blue-ink: #0d4b8f;     /* accent on light for text/hover */
  --blue-soft: #e4eef9;
  --paper: #f4f7f8;        /* membrane white */
  --surface: #ffffff;
  --concrete: #dce2e6;
  --line: #cfd7dd;
  --slate: #56656f;        /* secondary text */
  --on-dark: #eef3f6;
  --on-dark-2: #a9b7c3;
  --ok: #1d7a4f;
  --err: #b3261e;
  --shadow: 0 1px 2px rgb(15 27 39 / .06), 0 12px 32px -12px rgb(15 42 72 / .22);
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --z-header: 50;
  --z-overlay: 80;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9eff3; --ink-2: #c9d4dc;
    --blue: #5b9bea; --blue-ink: #8bbaf2; --blue-soft: #16273a;
    --paper: #0c141c; --surface: #121d28; --concrete: #1b2936; --line: #253646;
    --slate: #9aabb8;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 14px 36px -14px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e9eff3; --ink-2: #c9d4dc;
  --blue: #5b9bea; --blue-ink: #8bbaf2; --blue-soft: #16273a;
  --paper: #0c141c; --surface: #121d28; --concrete: #1b2936; --line: #253646;
  --slate: #9aabb8;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 14px 36px -14px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* Fixed dark tokens for sections that are always dark (hero, footer, bands) */
.dark {
  --d-bg: #0f1b27; --d-bg-2: #16263a; --d-text: #eef3f6; --d-text-2: #a9b7c3; --d-line: rgb(255 255 255 / .14);
  background: var(--d-bg); color: var(--d-text);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: #8bbaf2; }
::selection { background: var(--blue); color: #fff; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--radius-s); font-weight: 600; }
.skip:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Type scale */
h1, h2, h3, h4 { font-family: var(--f-display); font-stretch: 112%; line-height: 1.04; letter-spacing: -.02em; margin: 0; text-wrap: balance; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--slate); max-width: 60ch; }
.dark .lede { color: var(--d-text-2); }
.eyebrow { font: 500 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-ink); display: inline-flex; gap: .6em; align-items: center; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.dark .eyebrow { color: #8bbaf2; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.prose { max-width: 66ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .35em; }
.prose strong { color: var(--ink); }

/* Buttons */
.btn { --b: var(--blue); display: inline-flex; align-items: center; gap: .6em; padding: .9em 1.35em; border-radius: 999px; border: 1.5px solid var(--b); background: var(--b); color: #fff; font: 600 1rem/1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.2,1), background-color .2s, box-shadow .2s, color .2s; white-space: nowrap; }
.btn:hover { color: #fff; background: #0f539d; border-color: #0f539d; transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgb(20 97 180 / .7); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); box-shadow: none; }
.dark .btn--ghost { color: var(--d-text); border-color: rgb(255 255 255 / .35); }
.dark .btn--ghost:hover { background: rgb(255 255 255 / .08); color: #fff; border-color: #fff; }
.textlink { font-weight: 600; text-decoration: none; display: inline-flex; gap: .45em; align-items: center; color: var(--blue-ink); }
.textlink::after { content: "→"; transition: transform .2s; }
.textlink:hover::after { transform: translateX(4px); }
.dark .textlink { color: #8bbaf2; }

/* Announcement bar */
.notice { background: var(--blue); color: #fff; font: 500 .82rem/1.4 var(--f-mono); letter-spacing: .02em; }
.notice .wrap { display: flex; gap: 1.2em; justify-content: center; align-items: center; padding-block: .55em; flex-wrap: wrap; text-align: center; }
.notice a { color: #fff; }
.notice span + span::before { content: "·"; margin-right: 1.2em; opacity: .6; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-header); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgb(15 27 39 / .5); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 58px; height: auto; }
.brand-name { font: 800 1.06rem/1 var(--f-display); font-stretch: 115%; letter-spacing: -.01em; text-transform: uppercase; }
.brand-name small { display: block; font: 500 .75rem/1.2 var(--f-mono); letter-spacing: .1em; color: var(--slate); margin-top: 5px; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .55em .8em; border-radius: 8px; transition: background-color .2s, color .2s; }
.nav a:hover { background: var(--concrete); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--blue-ink); background: var(--blue-soft); }
.header-cta { display: flex; align-items: center; gap: 14px; margin-left: 12px; }
.header-phone { font: 600 .95rem/1.1 var(--f-mono); color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-phone small { display: block; font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; color: var(--slate); text-transform: uppercase; margin-bottom: 4px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); color: var(--ink); border-radius: 10px; width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 1120px) {
  .header-phone { display: none; }
}
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .nav, .header-cta { display: none; }
  .site-header.menu-open .nav { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; box-shadow: var(--shadow); gap: 2px; }
  .site-header.menu-open .nav a { font-size: 1.1rem; padding: .8em .6em; }
  .site-header.menu-open .nav .btn { margin-top: 10px; justify-content: center; }
}
.nav .btn { display: none; }
@media (max-width: 980px) { .nav .btn { display: inline-flex; color: #fff; } }

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; transform: scale(1.04); animation: heroSettle 1.8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroSettle { from { transform: scale(1.12); } to { transform: scale(1.04); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgb(11 21 31 / .92) 0%, rgb(11 21 31 / .72) 42%, rgb(11 21 31 / .15) 100%),
  linear-gradient(0deg, rgb(11 21 31 / .85) 0%, transparent 38%); }
.hero .wrap { padding-block: clamp(80px, 12vw, 150px) clamp(56px, 8vw, 96px); display: grid; gap: 28px; }
.hero h1 { max-width: 13ch; color: #fff; }
.hero h1 em { font-style: normal; color: #8bbaf2; }
.hero .lede { color: #d5dee6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .16); font: 500 .82rem/1.3 var(--f-mono); color: #c3d0da; letter-spacing: .02em; }
.hero-meta b { color: #fff; font-weight: 600; }
.hero-meta span { display: inline-flex; gap: .5em; align-items: center; }
.hero-meta svg { width: 16px; height: 16px; color: #8bbaf2; }

/* Page hero (interior) */
.page-hero { position: relative; isolation: isolate; overflow: hidden; }
.page-hero .wrap { padding-block: clamp(64px, 9vw, 116px) clamp(48px, 6vw, 80px); display: grid; gap: 18px; }
.page-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); max-width: 16ch; color: #fff; }
.page-hero .lede { color: #cdd8e1; }
.page-hero .hero-media img { object-position: center 55%; animation: none; transform: none; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(11 21 31 / .93) 0%, rgb(11 21 31 / .74) 50%, rgb(11 21 31 / .35) 100%); }
.crumbs { font: 500 .78rem/1 var(--f-mono); letter-spacing: .06em; color: #a9b7c3; display: flex; gap: .6em; flex-wrap: wrap; }
.crumbs a { color: #cfdbe5; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* Credential strip */
.creds { background: var(--surface); border-bottom: 1px solid var(--line); }
.creds .wrap { display: grid; grid-template-columns: repeat(5, 1fr); }
.cred { padding: 22px 18px; display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--line); }
.cred:first-child { border-left: 0; padding-left: 0; }
.cred b { font: 800 1.5rem/1 var(--f-display); font-stretch: 112%; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.cred span { font-size: .86rem; color: var(--slate); line-height: 1.35; }
@media (max-width: 900px) { .creds .wrap { grid-template-columns: repeat(2, 1fr); } .cred { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } .cred:nth-child(-n+2) { border-top: 0; } .cred:last-child { grid-column: 1 / -1; } }

/* Sections */
.section { padding-block: clamp(72px, 9vw, 128px) clamp(80px, 10vw, 140px); }
.section--tight { padding-block: clamp(56px, 7vw, 88px); }
.section--alt { background: var(--surface); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 32px; }
@media (max-width: 860px) { .section-head--split { grid-template-columns: 1fr; } }

/* Services — asymmetric bento */
.services { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.svc { position: relative; overflow: hidden; border-radius: var(--radius-l); min-height: 340px; display: flex; align-items: flex-end; color: #fff; text-decoration: none; isolation: isolate; background: #0f1b27; }
.svc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(11 21 31 / 0) 25%, rgb(11 21 31 / .88) 100%); }
.svc:hover img { transform: scale(1.05); }
.svc:hover { color: #fff; }
.svc-body { padding: 26px; display: grid; gap: 10px; width: 100%; }
.svc-body p { color: #d3dde5; font-size: .98rem; max-width: 46ch; }
.svc-tag { font: 500 .75rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #9fc4ef; }
.svc-go { display: inline-flex; width: 42px; height: 42px; border-radius: 50%; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3); align-items: center; justify-content: center; position: absolute; top: 22px; right: 22px; transition: background-color .25s, transform .25s; }
.svc:hover .svc-go { background: var(--blue); transform: rotate(-45deg); }
.svc-go svg { width: 18px; height: 18px; }
.svc--a { grid-column: span 7; min-height: 460px; }
.svc--b { grid-column: span 5; min-height: 460px; }
.svc--c { grid-column: span 5; }
.svc--d { grid-column: span 7; }
@media (max-width: 860px) { .svc--a, .svc--b, .svc--c, .svc--d { grid-column: 1 / -1; min-height: 320px; } }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--rev .split-media { order: 2; }
.split-body { display: grid; gap: 20px; align-content: start; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-l); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.split-media .inset { position: absolute; width: 46%; right: -6%; bottom: -8%; aspect-ratio: 1; border: 6px solid var(--paper); border-radius: var(--radius-m); box-shadow: var(--shadow); }
.section--alt .split-media .inset { border-color: var(--surface); }
.media-note { position: absolute; left: 16px; top: 16px; background: rgb(11 21 31 / .78); color: #fff; font: 500 .75rem/1.3 var(--f-mono); padding: 8px 11px; border-radius: 8px; backdrop-filter: blur(6px); letter-spacing: .02em; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev .split-media { order: 0; } .split-media .inset { right: 12px; bottom: -24px; width: 40%; } .split-media { margin-bottom: 24px; } }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231461b4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 13px no-repeat; }
.dark .checks li::before { background-color: rgb(139 186 242 / .16); }

/* Cross-section (signature element) */
.xsec { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .xsec { grid-template-columns: 1fr; } }
.xsec-fig { background: var(--d-bg-2); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 34px); border: 1px solid var(--d-line); position: relative; }
.xsec-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.xsec-fig .layer { cursor: pointer; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s, filter .3s; }
.xsec-fig .layer:hover, .xsec-fig .layer.is-on { filter: brightness(1.15); }
.xsec-fig.is-stacked .layer { transform: translateY(var(--dy)); }
.xsec-fig.is-stacked .lbl, .xsec-fig.is-stacked .leader, .xsec-fig.is-stacked .layer circle[r="2.5"] { opacity: 0; transition: opacity .2s; }
.xsec-fig.is-stacked .layer.is-on .lbl, .xsec-fig.is-stacked .layer.is-on .leader { opacity: 1; }
.xsec-fig .lbl { font: 500 13px var(--f-mono); fill: #a9b7c3; letter-spacing: .02em; transition: fill .2s; }
.xsec-fig .layer.is-on .lbl { fill: #fff; }
.xsec-fig .lbl.is-on { fill: #fff; }
.xsec-fig .leader { stroke: rgb(255 255 255 / .28); stroke-width: 1; }
.xsec-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: s; }
.xsec-steps button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 14px; border-radius: 12px; transition: background-color .2s; }
.xsec-steps button:hover { background: rgb(255 255 255 / .05); }
.xsec-steps button:focus-visible { outline: 2px solid #8bbaf2; }
.xsec-steps button[aria-pressed="true"] { background: rgb(139 186 242 / .12); }
.xsec-steps .n { font: 600 .8rem/1 var(--f-mono); color: #8bbaf2; padding-top: 4px; }
.xsec-steps b { display: block; font: 700 1.05rem/1.3 var(--f-display); font-stretch: 108%; color: #fff; }
.xsec-steps span.d { display: block; color: var(--d-text-2); font-size: .94rem; margin-top: 4px; line-height: 1.5; }
.xsec-toggle { margin-top: 18px; }
.xsec-fig .caption { display: block; margin-top: 10px; font: 500 .75rem/1 var(--f-mono); color: #8195a6; letter-spacing: .06em; }

/* Compare table */
.compare { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 560px; }
.compare-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface); }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 600 .76rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); background: var(--paper); }
.compare thead th.hi { color: var(--blue-ink); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 30%; }
.compare td.hi { background: color-mix(in srgb, var(--blue-soft) 60%, transparent); color: var(--ink); font-weight: 500; }
.compare tr:last-child > * { border-bottom: 0; }

/* Process (a real sequence) */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 26px 8px 0; display: grid; gap: 12px; align-content: start; position: relative; }
.step + .step { padding-left: 26px; border-left: 1px solid var(--line); }
.step .n { font: 600 .82rem/1 var(--f-mono); color: var(--blue-ink); letter-spacing: .08em; }
.step p { color: var(--slate); font-size: .98rem; }
@media (max-width: 900px) { .process { grid-template-columns: 1fr 1fr; } .step:nth-child(3) { padding-left: 0; border-left: 0; } .step:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } .step, .step + .step { padding-left: 0; border-left: 0; } .step + .step { border-top: 1px solid var(--line); } }

/* Project strip / gallery */
.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.strip figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-m); background: var(--concrete); }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.strip figure:hover img { transform: scale(1.04); }
.strip figcaption { position: absolute; left: 10px; bottom: 10px; background: rgb(11 21 31 / .76); color: #fff; font: 500 .75rem/1.3 var(--f-mono); padding: 6px 9px; border-radius: 6px; backdrop-filter: blur(4px); }
.strip .s1 { grid-column: span 5; grid-row: span 2; aspect-ratio: 4/5; }
.strip .s2 { grid-column: span 4; aspect-ratio: 4/3; }
.strip .s3 { grid-column: span 3; aspect-ratio: 3/4; grid-row: span 2; }
.strip .s4 { grid-column: span 4; aspect-ratio: 4/3; }
@media (max-width: 860px) { .strip { grid-template-columns: 1fr 1fr; } .strip figure { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 1 !important; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font: 500 .9rem/1 var(--f-body); padding: .7em 1.1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .ct { font-family: var(--f-mono); font-size: .78em; opacity: .65; margin-left: .35em; }
.gallery { columns: 3 300px; column-gap: 14px; }
.gallery button { all: unset; box-sizing: border-box; display: block; width: 100%; margin-bottom: 14px; break-inside: avoid; cursor: zoom-in; border-radius: var(--radius-m); overflow: hidden; position: relative; background: var(--concrete); }
.gallery button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gallery img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery button:hover img { transform: scale(1.03); }
.gallery .cap { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; align-items: end; pointer-events: none; }
.gallery .cap span { background: rgb(11 21 31 / .78); color: #fff; font: 500 .75rem/1.3 var(--f-mono); padding: 6px 9px; border-radius: 6px; }
.gallery [hidden] { display: none !important; }

.lightbox { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgb(8 14 20 / .94); display: grid; grid-template-rows: 1fr auto; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.lightbox figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.lightbox img { max-height: calc(100dvh - 140px); max-width: min(100%, 1400px); width: auto; border-radius: 8px; }
.lightbox .lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #dfe7ee; font: 500 .85rem/1.4 var(--f-mono); max-width: 1400px; width: 100%; margin: 12px auto 0; }
.lightbox button { background: rgb(255 255 255 / .1); color: #fff; border: 1px solid rgb(255 255 255 / .2); width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgb(255 255 255 / .2); }
.lightbox .lb-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox svg { width: 20px; height: 20px; }

/* Brands */
.brands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: stretch; }
.brand-tile { background: #fff; border-radius: var(--radius-m); display: grid; place-items: center; padding: 18px; min-height: 104px; border: 1px solid var(--line); }
.brand-tile img { max-height: 58px; width: auto; filter: grayscale(1) contrast(1.05); opacity: .78; transition: filter .3s, opacity .3s; }
.brand-tile:hover img { filter: none; opacity: 1; }
@media (max-width: 860px) { .brands { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .brands { grid-template-columns: repeat(2, 1fr); } }

/* Letter / quote from John */
.letter { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.letter blockquote { margin: 0; font: 500 clamp(1.45rem, 2.6vw, 2.15rem)/1.3 var(--f-display); font-stretch: 100%; letter-spacing: -.012em; text-wrap: balance; }
.letter blockquote::before { content: "“"; display: block; font-size: 3.4em; line-height: .6; color: var(--blue); margin-bottom: .1em; font-weight: 800; }
.letter .sig { margin-top: 26px; display: grid; gap: 2px; }
.letter .sig b { font-weight: 700; }
.letter .sig span { color: var(--slate); font-size: .92rem; }
@media (max-width: 860px) { .letter { grid-template-columns: 1fr; } }

/* Facts list (side-by-side FAQ) */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.faq-item { padding: 26px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.faq-item h3 { font-size: 1.18rem; font-stretch: 105%; }
.faq-item p { color: var(--slate); }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* Area band */
.area { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.area-list { display: flex; flex-wrap: wrap; gap: 8px; }
.area-list span { font: 500 .86rem/1 var(--f-mono); padding: .7em .95em; border-radius: 8px; border: 1px solid var(--d-line); color: var(--d-text); background: rgb(255 255 255 / .03); }
.area-list span.hi { border-color: #5b9bea; background: rgb(91 155 234 / .14); }
@media (max-width: 860px) { .area { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-l); }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgb(13 75 143 / .96) 0%, rgb(13 75 143 / .85) 45%, rgb(15 27 39 / .5) 100%); }
.cta-band .inner { padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: end; color: #fff; }
.cta-band h2 { color: #fff; max-width: 16ch; }
.cta-band p { color: #dbe7f3; margin-top: 14px; max-width: 48ch; }
.cta-band .lines { display: grid; gap: 14px; }
.cta-line { display: grid; gap: 2px; padding: 14px 18px; border-radius: 12px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); color: #fff; text-decoration: none; transition: background-color .2s; }
.cta-line:hover { background: rgb(255 255 255 / .18); color: #fff; }
.cta-line small { font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #bcd4ee; }
.cta-line b { font: 600 1.25rem/1.2 var(--f-mono); }
@media (max-width: 860px) { .cta-band .inner { grid-template-columns: 1fr; } }

/* Cards (used sparingly: material types) */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.type { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; display: grid; gap: 10px; align-content: start; }
.type .spec { font: 500 .75rem/1.3 var(--f-mono); color: var(--blue-ink); letter-spacing: .06em; text-transform: uppercase; }
.type p { color: var(--slate); font-size: .96rem; }
.section--alt .type { background: var(--paper); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-lines { display: grid; gap: 14px; }
.contact-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; background: var(--surface); display: grid; gap: 6px; }
.contact-card .k { font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-ink); }
.contact-card .v { font: 600 1.35rem/1.2 var(--f-mono); color: var(--ink); text-decoration: none; }
.contact-card a.v:hover { color: var(--blue); }
.contact-card .e { color: var(--slate); font-size: .95rem; word-break: break-word; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(22px, 4vw, 40px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label, .field legend { font-weight: 600; font-size: .92rem; }
.field .opt { font-weight: 400; color: var(--slate); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: .8em .9em; transition: border-color .2s, box-shadow .2s; width: 100%; }
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 20%, transparent); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.field .err { color: var(--err); font-size: .86rem; min-height: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg legend { margin-bottom: 8px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: .65em 1em; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .94rem; transition: all .2s; background: var(--paper); }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-status { border-radius: 10px; padding: 14px 16px; font-size: .95rem; }
.form-status.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.form-status.bad { background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid color-mix(in srgb, var(--err) 40%, transparent); }
.fineprint { font-size: .84rem; color: var(--slate); }

/* Articles */
.articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.article-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-l); overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .3s, box-shadow .3s; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.article-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.article-card .b { padding: 24px; display: grid; gap: 10px; align-content: start; }
.article-card .meta { font: 500 .75rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.article-card p { color: var(--slate); font-size: .96rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.article-aside { position: sticky; top: 110px; display: grid; gap: 16px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static; } }

/* Placeholder marker for content awaiting confirmation */
.ph { background: repeating-linear-gradient(-45deg, color-mix(in srgb, #d9a400 14%, transparent) 0 8px, transparent 8px 16px); border: 1.5px dashed #c79600; border-radius: 10px; padding: 14px 16px; font-size: .95rem; color: var(--ink); }
.ph::before { content: "Needs confirmation · "; font: 600 .75rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #9a7400; }

/* Footer */
.site-footer { padding-block: 72px 36px; }
.site-footer .top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--d-line); }
.site-footer img.logo { width: 170px; }
.site-footer p { color: var(--d-text-2); font-size: .95rem; max-width: 36ch; }
.site-footer h4 { font: 600 .75rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #8bbaf2; margin-bottom: 16px; font-stretch: 100%; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--d-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .phone { font-family: var(--f-mono); font-weight: 600; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; font: 500 .8rem/1.4 var(--f-mono); color: #8195a6; }
.lic { display: inline-flex; gap: .6em; align-items: center; border: 1px solid var(--d-line); border-radius: 8px; padding: 8px 12px; font: 500 .8rem/1 var(--f-mono); color: var(--d-text); margin-top: 18px; }
.lic b { color: #8bbaf2; font-weight: 600; }
@media (max-width: 900px) { .site-footer .top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .top { grid-template-columns: 1fr; } }

/* Mobile call bar */
.callbar { display: none; }
@media (max-width: 760px) {
  .callbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-header); padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .callbar .btn { justify-content: center; padding: .85em 1em; }
  body { padding-bottom: 76px; }
}

/* Reveal on scroll: content is visible at rest; motion only enhances */
.reveal { transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.pre { transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal.pre { opacity: 1; transform: none; }
}

/* Utility */
.stack-s > * + * { margin-top: 12px; }
.stack-m > * + * { margin-top: 22px; }
.center { text-align: center; }
.mt-l { margin-top: clamp(40px, 6vw, 72px); }
.muted { color: var(--slate); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 700px) {
  .notice span:nth-child(-n+2) { display: none; }
  .notice span:nth-child(3)::before { content: none; }
}
.brand-tile img { max-height: 46px; max-width: 100%; }
@media (max-width: 700px) {
  .hero::before, .page-hero::before { background: linear-gradient(180deg, rgb(11 21 31 / .78) 0%, rgb(11 21 31 / .86) 55%, rgb(11 21 31 / .94) 100%); }
  .xsec-fig .lbl { font-size: 17px; }
}
[hidden] { display: none !important; }
.form-row .field { align-content: start; }
@media (max-width: 700px) {
  .notice span:nth-child(-n+3) { display: none; }
  .notice span:nth-child(4)::before { content: none; }
}

/* ===== v2 additions ===== */

/* Grain on dark surfaces */
.dark { position: relative; }
.dark > .wrap { position: relative; z-index: 1; }
.dark::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero::after, .page-hero::after { z-index: 0; }
.site-footer::after { opacity: .05; }

/* Before / after comparison */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .ba-grid { grid-template-columns: 1fr; } }
.ba { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-l); overflow: hidden; background: var(--concrete); isolation: isolate; --pos: 50%; touch-action: pan-y; }
.ba--wide { aspect-ratio: 16 / 9; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 0 1px rgb(11 21 31 / .25); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 6px 18px -6px rgb(11 21 31 / .6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6 5 12l4 6M15 6l4 6-4 6'/%3E%3C/svg%3E"); background-size: 22px; background-repeat: no-repeat; background-position: center; }
.ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; z-index: 2; }
.ba input[type="range"]:focus-visible ~ .ba-handle::after { outline: 3px solid var(--blue); outline-offset: 2px; }
.ba-tag { position: absolute; top: 12px; font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; background: rgb(11 21 31 / .78); color: #fff; backdrop-filter: blur(4px); pointer-events: none; z-index: 1; }
.ba-tag--l { left: 12px; } .ba-tag--r { right: 12px; }
.ba-cap { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; color: var(--slate); }
.ba-cap b { color: var(--ink); font-weight: 600; }
.ba-wrap { display: grid; gap: 0; }

/* Restore-or-replace checker */
.checker { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .checker { grid-template-columns: 1fr; } }
.checker fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.checker legend { font: 700 1.05rem/1.3 var(--f-display); font-stretch: 108%; margin-bottom: 10px; padding: 0; }
.checker legend .q { font: 600 .75rem/1 var(--f-mono); color: var(--blue-ink); letter-spacing: .1em; margin-right: .6em; }
.checker .opts { display: grid; gap: 8px; }
.checker .opts label { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s; }
.checker .opts label:hover { border-color: var(--ink); }
.checker .opts input { position: absolute; opacity: 0; pointer-events: none; }
.checker .opts .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; transition: all .2s; }
.checker .opts input:checked + .dot { border-color: var(--blue); border-width: 6px; }
.checker .opts input:checked ~ span.t { color: var(--ink); }
.checker .opts input:focus-visible + .dot { outline: 3px solid var(--blue); outline-offset: 2px; }
.checker .opts label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.checker .opts .t { font-size: .97rem; line-height: 1.4; }
.checker-result { position: sticky; top: 100px; border-radius: var(--radius-l); padding: clamp(22px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 14px; align-content: start; }
.checker-result .verdict { font: 500 .75rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-ink); }
.checker-result h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.checker-result p { color: var(--slate); }
.checker-result .meter { height: 8px; border-radius: 999px; background: var(--concrete); overflow: hidden; }
.checker-result .meter i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--blue), #8bbaf2); transition: width .5s cubic-bezier(.2,.8,.2,1); border-radius: inherit; }
.checker-result .scale { display: flex; justify-content: space-between; font: 500 .75rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.checker-result ul { margin: 0; padding-left: 1.1em; color: var(--slate); font-size: .95rem; display: grid; gap: 6px; }
.checker-result[data-state="empty"] .when-filled { display: none; }
.checker-result[data-state="filled"] .when-empty { display: none; }

/* Storm strip */
.storm { border: 1.5px solid var(--line); border-radius: var(--radius-l); background: var(--surface); display: grid; grid-template-columns: 1fr 2.2fr; overflow: hidden; }
.storm-head { padding: clamp(22px, 3vw, 34px); background: var(--blue-soft); display: grid; gap: 10px; align-content: start; }
.storm-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.storm-steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.storm-step { padding: clamp(22px, 3vw, 30px); border-left: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.storm-step .n { font: 600 .75rem/1 var(--f-mono); color: var(--blue-ink); letter-spacing: .1em; }
.storm-step p { font-size: .95rem; color: var(--slate); }
@media (max-width: 900px) { .storm { grid-template-columns: 1fr; } .storm-steps { grid-template-columns: 1fr; } .storm-step { border-left: 0; border-top: 1px solid var(--line); } }

/* Photo upload */
.upload { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; background: var(--paper); transition: border-color .2s, background-color .2s; }
.upload.is-over { border-color: var(--blue); background: var(--blue-soft); }
.upload input[type="file"] { font-size: .92rem; }
.upload .hint { font-size: .86rem; color: var(--slate); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumbs:empty { display: none; }

/* Gallery status */
.gallery-status { font: 500 .8rem/1 var(--f-mono); color: var(--slate); letter-spacing: .04em; margin: -14px 0 18px; }

/* Cross-section build-up (JS adds .is-stacked then removes it) */
.xsec-fig .layer { transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .3s, filter .3s; }
.xsec-fig.is-stacked .layer { transition-delay: 0s; }
.checker-result { top: calc(env(safe-area-inset-top, 0px) + 96px); scroll-margin-top: 110px; }
.article-aside { top: calc(env(safe-area-inset-top, 0px) + 96px); }
.ba-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgb(11 21 31 / .7); padding: 7px 10px; border-radius: 6px; pointer-events: none; z-index: 1; transition: opacity .4s; }
.ba.is-touched .ba-hint { opacity: 0; }


/* ===== v3: responsive fixes (audit 2026-09-23) ===== */

/* 1. Header: switch to the menu button below 1200px; tighten the full nav just above it */
@media (max-width: 1199px) {
  .menu-btn { display: inline-flex; }
  .nav, .header-cta { display: none; }
  .site-header.menu-open .nav { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; box-shadow: var(--shadow); gap: 2px; max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; }
  .site-header.menu-open .nav a { font-size: 1.1rem; padding: .8em .6em; min-height: 48px; display: flex; align-items: center; }
  .site-header.menu-open .nav .btn { display: inline-flex; margin-top: 10px; justify-content: center; color: #fff; }
}
@media (min-width: 1200px) and (max-width: 1320px) {
  .site-header .wrap { gap: 14px; }
  .nav a { padding: .55em .6em; font-size: .92rem; }
  .header-cta { margin-left: 4px; }
}
.menu-btn { flex-shrink: 0; width: 46px; height: 46px; }
.brand { min-width: 0; }
@media (max-width: 400px) {
  .brand img { width: 44px; }
  .brand-name { font-size: .95rem; }
  .brand-name small { font-size: .7rem; letter-spacing: .06em; }
  .site-header .wrap { gap: 12px; min-height: 68px; }
}

/* 4. Buttons may wrap on narrow screens instead of running off the edge */
@media (max-width: 480px) {
  .btn { white-space: normal; text-align: center; justify-content: center; line-height: 1.25; }
  .hero-actions .btn, .cta-band .hero-actions .btn { width: 100%; }
  .hero .eyebrow, .page-hero .eyebrow { line-height: 1.5; align-items: flex-start; }
  .hero .eyebrow::before, .page-hero .eyebrow::before { margin-top: .7em; flex-shrink: 0; }
  h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  .page-hero h1 { font-size: clamp(1.95rem, 9vw, 2.4rem); }
  h2 { font-size: clamp(1.7rem, 8vw, 2.1rem); }
  .section { padding-block: 64px 72px; }
  .cta-band .inner { padding: 28px 20px; }
  .cta-line b { font-size: 1.1rem; }
}

/* 2. Cross-section on small screens: bigger drawing, number badges instead of side labels */
.xsec-fig .badge { display: none; }
@media (max-width: 899px) {
  .xsec-fig { padding: 16px 12px 14px; }
  .xsec-fig .lbl, .xsec-fig .leader, .xsec-fig .layer circle[r="2.5"] { display: none; }
  .xsec-fig .badge { display: inline; }
  .xsec-fig .badge circle { fill: #1461b4; stroke: #0f1b27; stroke-width: 2; }
  .xsec-fig .badge text { font: 700 18px var(--f-mono); fill: #fff; }
  .xsec-fig .layer.is-on .badge circle { fill: #fff; }
  .xsec-fig .layer.is-on .badge text { fill: #0f1b27; }
  .xsec-steps button { padding: 12px 10px; grid-template-columns: 32px 1fr; }
}

/* 3. Comparison table becomes stacked cards on phones */
@media (max-width: 640px) {
  .compare-wrap { border: 0; background: transparent; overflow: visible; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; min-width: 0; }
  .compare thead { display: none; }
  .compare tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 12px; overflow: hidden; }
  .compare tbody th { width: 100%; padding: 14px 16px 6px; border: 0; font-size: 1rem; }
  .compare td { border: 0; padding: 8px 16px 12px; display: grid; gap: 2px; }
  .compare td::before { content: attr(data-label); font: 600 .75rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
  .compare td.hi::before { color: var(--blue-ink); }
  .compare td.hi { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}

/* 5. Touch targets: 44px minimum on touch-sized screens */
@media (max-width: 1024px) {
  .textlink { min-height: 44px; }
  .chip { min-height: 44px; }
  .contact-card a.v { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-card .e a { display: inline-block; padding-block: 10px; }
  .site-footer ul { gap: 2px; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer .bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .article-card { min-height: 44px; }
  .brand { min-height: 44px; }
  .lb-bar button, .lightbox .lb-close { width: 48px; height: 48px; }
}

/* Misc small-screen polish */
@media (max-width: 480px) {
  .creds .wrap { grid-template-columns: 1fr 1fr; }
  .cred b { font-size: 1.3rem; }
  .svc { min-height: 280px; }
  .svc-body { padding: 20px; }
  .ba-cap { flex-direction: column; gap: 2px; }
  .storm-step, .storm-head { padding: 20px; }
  .checker-result { position: static; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .gallery button { margin-bottom: 10px; }
  .gallery .cap span { font-size: .75rem; }
  .split-media .inset { width: 44%; }
}
@media (min-width: 481px) and (max-width: 860px) {
  .svc--a, .svc--b, .svc--c, .svc--d { grid-column: span 6; min-height: 300px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .creds .wrap { grid-template-columns: repeat(5, 1fr); }
  .cred { padding: 18px 12px; }
  .cred b { font-size: 1.25rem; }
  .letter blockquote { font-size: 1.6rem; }
}
.xsec-fig.is-stacked .badge { opacity: 0; } .xsec-fig.is-stacked .layer.is-on .badge { opacity: 1; }

/* v3 follow-ups */
@media (max-width: 400px) { .brand-name small { font-size: .75rem; letter-spacing: .04em; } }
@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand img { width: 38px; }
  .brand-name { font-size: .86rem; }
  .brand-name small { letter-spacing: 0; }
  .site-header .wrap { gap: 8px; }
}
.ba-hint { font-size: .75rem; }
.chip .ct, .gallery-status { font-size: .75rem; }
.brand-name small { font-size: .75rem; }
@media (max-width: 1024px) {
  .notice a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
  .notice .wrap { padding-block: 0; }
  .article-aside .contact-card > a:not(.btn):not(.v) { display: inline-flex; align-items: center; min-height: 44px; }
}
