/*
Theme Name: Scale Blueprint
Theme URI: https://scaleblueprint.com.au
Author: Scale Blueprint
Description: Minimal, fast, mobile-first theme for Scale Blueprint. Lead form above the fold with server-side Go High Level (LeadConnector) sync, fold-aware layout for foldables (iPhone Duo, Galaxy Fold), and auto-created About Us / Privacy Policy / Terms of Use pages.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: scale-blueprint
*/

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
	font-family: "SB Display";
	src: url("assets/fonts/poppins-500.woff") format("woff");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "SB Sans";
	src: url("assets/fonts/dm-sans-var.woff") format("woff");
	font-weight: 300 800;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	/* Brand: Mint #CDEAC0 · Light green #7EB76D · Dark green #2C5D28 · Ink #111111 */
	--paper: #f8faf5;
	--paper-2: #edf6e8;
	--ink: #111111;
	--ink-2: #4b5449;
	--ink-3: #7c8679;
	--line: rgba(17, 17, 17, 0.11);
	--line-strong: rgba(17, 17, 17, 0.2);
	--forest: #2c5d28;
	--forest-2: #234b20;
	--forest-line: rgba(255, 255, 255, 0.2);
	--lime: #cdeac0;
	--lime-deep: #7eb76d;
	--danger: #ff9d8a;

	--font-display: "SB Display", "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-sans: "SB Sans", "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--wrap: 1240px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--radius: 14px;
	--header-h: 72px;

	--safe-l: env(safe-area-inset-left, 0px);
	--safe-r: env(safe-area-inset-right, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin: 0; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + var(--gutter) * 2);
	margin: 0 auto;
	padding-left: calc(var(--gutter) + var(--safe-l));
	padding-right: calc(var(--gutter) + var(--safe-r));
}
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link:focus {
	position: fixed; top: 10px; left: 10px; z-index: 100; clip: auto; width: auto; height: auto;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.eyebrow {
	display: inline-flex; align-items: center; gap: .6em;
	font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
	color: var(--ink-2);
}
.eyebrow::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%;
	background: var(--lime-deep); box-shadow: 0 0 0 4px rgba(126, 183, 109, .22);
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .65em;
	min-height: 48px; padding: 0 1.35em;
	border-radius: 999px; border: 1px solid transparent;
	font: 600 .97rem/1 var(--font-sans); letter-spacing: -.005em;
	text-decoration: none; cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #dcf1d2; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--forest-2); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 0 1.05em; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(248, 250, 245, .86);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .25s ease;
	padding-top: env(safe-area-inset-top, 0px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); line-height: 0; }
.brand svg { height: 44px; width: auto; overflow: visible; }
@media (max-width: 719px) { .brand svg { height: 40px; } }
.site-footer .brand svg { height: 34px; }
.brand img.custom-logo { max-height: 38px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(.75rem, 2.4vw, 2rem); }
.site-nav__link {
	font-size: .93rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
	transition: color .2s ease;
}
.site-nav__link:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	padding: clamp(1.25rem, 4.5vh, 4.5rem) 0 clamp(2.5rem, 7vh, 6rem);
	isolation: isolate;
}
.hero::before {
	/* faint blueprint grid */
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 40px 40px;
	background-position: center top;
	opacity: .45;
	-webkit-mask-image: radial-gradient(ellipse 70% 75% at 30% 35%, #000 10%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 75% at 30% 35%, #000 10%, transparent 75%);
}
.hero__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(1.25rem, 3vh, 2rem);
	align-items: center;
}
.hero__title {
	font-size: clamp(2.45rem, 10.4vw, 3.6rem);
	line-height: 1.04;
	letter-spacing: -.035em;
}
.hero__title .line { display: block; }
.hero__title .mark {
	background: linear-gradient(transparent 60%, var(--lime) 60%, var(--lime) 92%, transparent 92%);
	padding: 0 .03em;
	margin: 0 -.03em;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__lead {
	margin: clamp(.9rem, 2.2vh, 1.6rem) 0 0;
	max-width: 34rem;
	font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
	line-height: 1.55;
	color: var(--ink-2);
}
.hero__meta {
	display: none;
	margin-top: clamp(1.25rem, 3.5vh, 2.5rem);
	gap: 1.5rem; flex-wrap: wrap; align-items: center;
	font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.hero__meta ol { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.hero__meta li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__meta li + li::before { content: ""; width: 16px; height: 1px; background: var(--line-strong); margin-right: .6rem; }

/* ---------- Diagnosis form card ---------- */
.diag {
	position: relative;
	background: var(--forest);
	color: var(--paper);
	border-radius: calc(var(--radius) + 4px);
	padding: clamp(1.15rem, 3.2vw, 2rem);
	box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -30px rgba(44, 93, 40, .55);
}
.diag__head { margin-bottom: clamp(.8rem, 2vh, 1.25rem); }
.diag__title { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); letter-spacing: -.03em; line-height: 1.1; }
.diag__sub { margin: .4rem 0 0; font-size: .92rem; line-height: 1.45; color: rgba(255, 255, 255, .74); }
.diag__badge {
	flex: none; display: inline-flex; align-items: center; gap: .45em;
	font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--lime); border: 1px solid rgba(205, 234, 192, .4); border-radius: 999px; padding: .45em .8em;
	white-space: nowrap; margin-bottom: .85rem;
}
.diag__badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.diag form { display: grid; gap: .6rem; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.field { position: relative; }
.field input, .field select, .field textarea {
	width: 100%;
	height: 52px;
	padding: 1.25rem .95rem .35rem;
	border-radius: 10px;
	border: 1px solid var(--forest-line);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: 500 16px/1.2 var(--font-sans); /* 16px prevents iOS zoom */
	-webkit-appearance: none; appearance: none;
	transition: border-color .2s ease, background .2s ease;
}
.field select {
	padding-right: 2.4rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23cdeac0' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 1rem center;
}
.field select option { color: var(--ink); background: #fff; }
.field select { color: rgba(255, 255, 255, 0); }
.field select:focus, .field:has(option:checked:not([value=""])) select, .field select.has-value { color: #fff; }
.field label {
	position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
	font-size: .97rem; color: rgba(255, 255, 255, .68); pointer-events: none;
	transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 2rem);
}
.field label .opt { opacity: .6; font-size: .85em; }
.field input:focus, .field select:focus {
	outline: none; border-color: var(--lime); background: rgba(255, 255, 255, .12);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.has-value + label,
.field:has(option:checked:not([value=""])) label {
	top: .9rem; font-size: .7rem; letter-spacing: .04em; color: var(--lime);
}
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }
.field__error { display: block; font-size: .78rem; color: var(--danger); margin-top: .3rem; }

.diag .btn--lime { width: 100%; min-height: 54px; border-radius: 10px; font-size: 1rem; margin-top: .15rem; }
.diag .btn[disabled] { opacity: .7; cursor: progress; }
.diag__fine { margin: .35rem 0 0; font-size: .78rem; line-height: 1.45; color: rgba(255, 255, 255, .62); }
.diag__fine a { color: #fff; }
.diag__notice { border-radius: 10px; padding: .75rem .9rem; font-size: .9rem; margin: 0 0 .25rem; background: rgba(255, 157, 138, .12); color: #ffd2c9; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.diag__success { display: none; text-align: left; padding: .5rem 0; }
.diag.is-done form, .diag.is-done .diag__head { display: none; }
.diag.is-done .diag__success { display: block; }
.diag__success .tick { width: 44px; height: auto; margin-bottom: 1.1rem; }
.diag__success .tick svg { width: 44px; height: auto; }
.diag__success h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.diag__success p { color: rgba(255, 255, 255, .8); margin-bottom: 1.25rem; }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(17,17,17,.25); border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 10vw, 8rem) 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--paper-2); }
.section__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__title { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.75rem); max-width: 18ch; }
.section__title em { font-style: normal; color: var(--ink-3); }
.section__intro { max-width: 34rem; color: var(--ink-2); margin: 0; }

/* vitals */
.vitals { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line-strong); }
.vital { align-content: start; padding: 1.6rem 0 1.8rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.25rem 1fr; gap: .25rem 1rem; }
.vital__num { font-family: var(--font-display); font-size: .9rem; color: var(--ink-3); padding-top: .35rem; font-variant-numeric: tabular-nums; }
.vital h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); letter-spacing: -.03em; }
.vital p { grid-column: 2; margin: .5rem 0 0; color: var(--ink-2); max-width: 30rem; font-size: 1rem; }

/* 90-day ruler */
.ruler { margin-top: .5rem; }
.ruler__bar { display: grid; grid-template-columns: 14fr 16fr 60fr; gap: 4px; }
.ruler__seg { height: 10px; border-radius: 3px; background: var(--line-strong); }
.ruler__seg:nth-child(1) { background: var(--lime-deep); }
.ruler__seg:nth-child(2) { background: var(--forest); }
.ruler__seg:nth-child(3) { background: var(--ink); }
.ruler__ticks { display: flex; justify-content: space-between; margin-top: .6rem; font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.phases { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: clamp(2rem, 5vw, 3.5rem); }
.phase { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.phase__days { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.phase h3 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); margin: .55rem 0 .6rem; }
.phase p { color: var(--ink-2); margin: 0; font-size: 1rem; max-width: 26rem; }
.phase__dot { display: inline-block; width: 10px; height: 12px; border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%; margin-right: .5rem; vertical-align: -1px; }

/* deliverables */
.outcomes { display: grid; grid-template-columns: 1fr; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: o; }
.outcomes li {
	display: flex; gap: 1rem; align-items: baseline;
	padding: 1.15rem 0; border-top: 1px solid var(--line);
	font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); letter-spacing: -.01em;
}
.outcomes li::before {
	content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
	background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1' fill='none' stroke='%230e1712' stroke-width='1.6'/%3E%3C/svg%3E") center/10px no-repeat;
	transform: translateY(3px);
}

/* closing CTA */
.closer { background: var(--forest); color: var(--paper); padding: clamp(4rem, 10vw, 7.5rem) 0; border-top: 0; }
.closer__inner { display: grid; gap: 2rem; align-items: end; justify-items: start; }
.closer__title { font-size: clamp(2.3rem, 1.2rem + 5vw, 5rem); letter-spacing: -.035em; max-width: 13ch; }
.closer__title span { color: var(--lime); }
.closer p { color: rgba(255,255,255,.78); max-width: 30rem; margin: 1.25rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 2.5rem 0 calc(2.5rem + var(--safe-b)); font-size: .9rem; color: var(--ink-2); }
.site-footer__inner { display: grid; gap: 1.5rem; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; color: var(--ink); font-weight: 500; padding: .35rem 0; display: inline-block; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__legal { color: var(--ink-3); font-size: .82rem; margin: 0; }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4.75rem); letter-spacing: -.035em; }
.page-hero .updated { margin-top: 1rem; color: var(--ink-3); font-size: .9rem; }
.prose { max-width: 44rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(4rem, 9vw, 7rem); }
.prose h2 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.9rem); margin: 2.5rem 0 .9rem; letter-spacing: -.03em; line-height: 1.15; }
.prose h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; letter-spacing: -.02em; line-height: 1.2; }
.prose p, .prose li { color: #262b25; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose > :first-child { margin-top: 0; }
.prose .lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink); letter-spacing: -.01em; }

/* ---------- Brand mark animation (recreates the animated logo) ---------- */
.sc { transform-box: fill-box; transform-origin: 50% 100%; }
.logo-anim .sc { animation: sb-stack .7s cubic-bezier(.2, .9, .25, 1.15) both; }
.logo-anim .sc3 { animation-delay: .05s; }
.logo-anim .sc2 { animation-delay: .28s; }
.logo-anim .sc1 { animation-delay: .5s; }
.logo-anim .wm { animation: sb-fade .6s ease .75s both; }
@keyframes sb-stack { from { opacity: 0; transform: translateY(35%) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes sb-fade { from { opacity: 0; } to { opacity: 1; } }
[data-reveal] .sc, [data-reveal] .wm { animation-play-state: paused; }
[data-reveal].is-in .sc, [data-reveal].is-in .wm { animation-play-state: running; }

.closer { position: relative; overflow: hidden; }
@media (max-width: 719px) { .closer__icon { top: auto !important; bottom: 1.75rem; transform: none !important; width: 64px !important; opacity: .22 !important; } }
.closer__icon { position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); top: 50%; transform: translateY(-50%); width: clamp(110px, 15vw, 220px); opacity: .16; pointer-events: none; }
.closer__icon svg { width: 100%; height: auto; }
.closer__inner { position: relative; }

.page-hero__icon { width: 26px; margin-bottom: 1.25rem; }
.page-hero__icon svg { width: 100%; height: auto; }

/* =========================================================
   Responsive
   ========================================================= */

/* Very narrow (Galaxy Fold cover, small Android) */
@media (max-width: 359px) {
	.field-row { grid-template-columns: 1fr; }
	.diag__badge { display: none; }
	.hero__title { font-size: 2.2rem; }
}

/* Phones: keep form above the fold */
@media (max-width: 719px) {
	.site-nav__link { display: none; }
	:root { --header-h: 60px; }
	/* Phones: headline, then the form, then the intro — keeps the form above the fold */
	.hero__copy { display: contents; }
	.hero__title { order: 1; }
	.diag { order: 2; }
	.hero__lead { order: 3; font-size: 1rem; margin-top: .25rem; }
}
/* Short phones (iPhone SE / mini, landscape-ish browsers): trim to show the form */
@media (max-width: 719px) and (max-height: 700px) {
	.hero { padding-top: .85rem; }
	.hero__title { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
	.diag__sub, .diag__badge { display: none; }
	.diag { padding: 1rem 1.1rem 1.1rem; }
	.diag__head { margin-bottom: .7rem; }
	.diag form { gap: .5rem; }
	.field-row { gap: .5rem; }
	.field input, .field select { height: 48px; padding-top: 1.15rem; }
	.field input:focus + label, .field input:not(:placeholder-shown) + label,
	.field select:focus + label, .field select.has-value + label, .field:has(option:checked:not([value=""])) label { top: .8rem; }
	.diag .btn--lime { min-height: 50px; }
	.diag__fine { font-size: .74rem; }
}

/* Foldable inner screens (iPhone Duo ≈ 800–950px wide, short), tablets, desktop:
   two equal columns so the hinge/crease falls in the gutter, not through text. */
@media (min-width: 720px) {
	.hero__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(2.5rem, 6vw, 5.5rem);
	}
	.hero__title { font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
	.hero__meta { display: flex; }
	.field input, .field select { height: 50px; }

	.section__head { grid-template-columns: 1.2fr 1fr; align-items: end; }
	.vitals { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 4rem); }
	.phases { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
	.phase { border-top: 0; padding-top: 0; }
	.outcomes { grid-template-columns: 1fr 1fr; column-gap: clamp(2rem, 5vw, 4rem); }
	.closer__inner { justify-items: start; }
	.site-footer__inner { grid-template-columns: auto 1fr auto; align-items: center; }
	.footer-nav ul { justify-content: center; }
}

/* Short + wide: iPhone Duo unfolded (~890×600), landscape phones, small laptops */
@media (min-width: 720px) and (max-height: 760px) {
	.hero { padding: 1rem 0 2rem; }
	.hero__title { font-size: clamp(2.3rem, 8.6vh, 4rem); }
	.hero__lead { font-size: 1rem; margin-top: .75rem; }
	.hero__meta { margin-top: 1rem; }
	.diag { padding: 1.1rem 1.25rem; }
	.diag__head { margin-bottom: .7rem; }
	.diag__sub { display: none; }
	.diag form { gap: .45rem; }
	.field input, .field select { height: 46px; padding-top: 1.1rem; }
	.field input:focus + label, .field input:not(:placeholder-shown) + label,
	.field select:focus + label, .field select.has-value + label, .field:has(option:checked:not([value=""])) label { top: .75rem; }
	.diag .btn--lime { min-height: 48px; }
}
@media (min-width: 720px) and (max-height: 560px) {
	.hero__meta { display: none; }
	.diag__fine { display: none; }
	.diag__badge { display: none; }
}

/* Large screens */
@media (min-width: 1100px) {
	.hero { min-height: calc(100svh - var(--header-h) - 1px); display: grid; align-items: center; }
	.hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
	.hero__title { font-size: clamp(4rem, 6.2vw, 6.1rem); }
	.vitals { grid-template-columns: repeat(4, 1fr); }
	.vital { grid-template-columns: 1fr; border-bottom: 0; border-right: 1px solid var(--line); padding: 1.75rem 1.75rem 0 0; }
	.vital:last-child { border-right: 0; }
	.vital p { grid-column: 1; }
	.vital__num { padding: 0 0 2.5rem; }
}
@media (min-width: 1100px) and (max-height: 760px) {
	.hero__title { font-size: clamp(3rem, 9vh, 5rem); }
}

/* Foldables exposing viewport segments (Chromium foldables; progressive enhancement).
   Put each hero column on its own screen segment, gutter = hinge. */
@media (horizontal-viewport-segments: 2) {
	.hero__grid {
		grid-template-columns: calc(env(viewport-segment-width 0 0) - var(--gutter)) calc(env(viewport-segment-width 1 0) - var(--gutter));
		column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + var(--gutter));
	}
	.hero .wrap { padding-left: var(--gutter); padding-right: 0; }
}
/* Folded "book" posture, top/bottom halves (vertical segments) — hero on top, form below the crease */
@media (vertical-viewport-segments: 2) {
	.hero__grid { grid-template-columns: 1fr; row-gap: calc(env(viewport-segment-top 0 1) - env(viewport-segment-bottom 0 0) + 1.5rem); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .diag, .closer { display: none; }
	body { background: #fff; }
}
