/* REX VALVES – main stylesheet
   Tokens follow the brand brief. Radius stays at 2px everywhere: machined, not soft. */
:root {
	--navy: #10243A;
	--blue: #183B5B;
	--white: #FFFFFF;
	--grey: #F3F5F7;
	--steel: #687786;
	--gold: #C49A52;
	--gold-dark: #A9813F;
	--line: #DCE1E6;
	--ink: #10243A;
	--body: #33475B;

	--f-head: "Montserrat", "Segoe UI", Arial, sans-serif;
	--f-body: "Inter", "Segoe UI", Arial, sans-serif;

	/* Type scale (1.25 minor third-ish, clamped) */
	--t-xs: .8125rem;
	--t-s: .9375rem;
	--t-m: 1.0625rem;
	--t-l: clamp(1.2rem, 1.1rem + .4vw, 1.375rem);
	--t-xl: clamp(1.5rem, 1.3rem + .9vw, 2rem);
	--t-2xl: clamp(1.9rem, 1.5rem + 1.8vw, 2.75rem);
	--t-3xl: clamp(2.2rem, 1.6rem + 2.8vw, 3.6rem);

	--r: 2px;
	--wrap: 1200px;
	--gap: clamp(1rem, .6rem + 1.5vw, 2rem);
	--sec: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
	--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 56px); }
body { margin: 0; font: 400 var(--t-m)/1.65 var(--f-body); color: var(--body); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: var(--t-3xl); font-weight: 800; }
h2 { font-size: var(--t-2xl); font-weight: 700; }
h3 { font-size: var(--t-l); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px; background: var(--white); padding: .6rem 1rem; }

.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.narrow { max-width: 820px; }
.lead { font-size: var(--t-l); line-height: 1.55; max-width: 62ch; }
.muted, .note { color: var(--steel); font-size: var(--t-s); }
.note { max-width: 70ch; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.5rem; border: 2px solid transparent; border-radius: var(--r); font: 600 var(--t-s)/1.2 var(--f-head); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--grey); color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: var(--white); background: transparent; }
.btn-outline-light:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.08); }
.btn-ghost { color: var(--blue); background: transparent; padding-inline: .5rem; text-decoration: underline; }
.text-link { font: 600 var(--t-s)/1.4 var(--f-head); color: var(--blue); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.text-link:hover { color: var(--navy); border-color: var(--navy); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--navy); text-decoration: none; }
.brand-logo { max-height: 48px; width: auto; }
.brand-name { font: 800 1.15rem/1 var(--f-head); letter-spacing: .06em; color: inherit; margin: 0; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav .menu { display: flex; list-style: none; gap: .25rem; align-items: center; }
.site-nav .menu > li { position: relative; display: flex; align-items: center; }
.site-nav .menu > li > a { display: block; padding: .6rem .7rem; font: 600 var(--t-s)/1.2 var(--f-head); color: var(--navy); text-decoration: none; }
.site-nav .menu > li > a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a { color: var(--blue); box-shadow: inset 0 -2px 0 var(--gold); }
.mega-toggle { background: none; border: 0; color: var(--navy); padding: .4rem .2rem; margin-left: -.4rem; cursor: pointer; }
.has-mega.is-open .mega-toggle svg { transform: rotate(180deg); }
.nav-toggle { display: none; }

/* Mega menu */
.mega { position: fixed; left: 0; right: 0; top: var(--header-h); background: var(--white); border-top: 1px solid var(--line); border-bottom: 3px solid var(--navy); visibility: hidden; opacity: 0; transition: opacity .15s, visibility .15s; }
.has-mega:hover > .mega, .has-mega:focus-within > .mega, .has-mega.is-open > .mega { visibility: visible; opacity: 1; }
.mega-inner { width: min(100% - 2 * var(--gap), var(--wrap)); margin: 0 auto; padding: 1.75rem 0; display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem; }
.mega-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem 1.5rem; }
.mega-list a { display: block; padding: .6rem .75rem; text-decoration: none; border-left: 2px solid transparent; }
.mega-list a:hover { border-left-color: var(--gold); background: var(--grey); }
.mega-list strong { display: block; font: 600 var(--t-s)/1.3 var(--f-head); color: var(--navy); }
.mega-list span { display: block; font-size: var(--t-xs); color: var(--steel); }
.mega-aside { background: var(--grey); padding: 1.25rem; font-size: var(--t-s); }
.mega-empty { color: var(--steel); }

/* ---------- Sections ---------- */
.sec { padding-block: var(--sec); }
.sec-tight { padding-block: calc(var(--sec) * .5); }
.sec-grey { background: var(--grey); }
.sec-navy { background: var(--navy); color: #D3DCE5; }
.sec-navy h2, .sec-navy h3 { color: var(--white); }
.sec-head { max-width: 760px; margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem); }
.sec-head h2 { margin-bottom: .35em; }
.sec-head .lead { margin: 0; color: inherit; }
.empty { padding: 2rem; background: var(--white); border-left: 3px solid var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); color: #D3DCE5; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: var(--gap); padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lead { color: #C3CFDA; }
.hero-tag { font: 600 var(--t-s)/1.4 var(--f-head); color: var(--gold); margin-bottom: 1.25rem; padding-left: 1rem; border-left: 2px solid var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-visual img { width: 100%; max-width: 560px; margin-left: auto; }
.hero-visual img[src$=".jpg"], .hero-visual img[src$=".webp"], .hero-visual img[src$=".avif"], .hero-visual img[src$=".png"] { aspect-ratio: 4/3.4; object-fit: cover; border-radius: var(--r); }
.hero-line { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--gold) 0 18%, var(--blue) 18% 100%); }

.page-hero, .cat-hero { background: var(--navy); color: #C3CFDA; position: relative; padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); border-bottom: 6px solid var(--blue); }
.page-hero h1, .cat-hero h1 { color: var(--white); font-size: var(--t-2xl); max-width: 22ch; }
.page-hero .lead, .cat-hero .lead { color: #C3CFDA; }
.page-hero.has-img .page-hero-img { position: absolute; inset: 0; opacity: .18; }
.page-hero.has-img .page-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .wrap { position: relative; }
.cat-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--gap); align-items: center; }
.cat-hero-img img, .cat-hero-img .rex-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); }
.meta-line { font-size: var(--t-s); color: #9FB0C2; }
.meta-line a { color: inherit; }
.preview-flag { background: var(--gold); color: var(--navy); padding: .6rem var(--gap); font-weight: 600; text-align: center; }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; font-size: var(--t-xs); margin-bottom: 1.25rem; }
.crumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--steel); }
.crumbs a { color: #C3CFDA; text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
.crumbs [aria-current] { color: var(--gold); }

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.split-rev .split-media { order: 2; }
.split-media img, .split-media .rex-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); }
.split-copy p { max-width: 60ch; }

/* Placeholder (missing real photo) */
.rex-placeholder { display: grid; place-items: center; align-content: center; gap: .5rem; background: repeating-linear-gradient(45deg, #EEF1F4 0 10px, #E7EBEF 10px 20px); color: var(--steel); font-size: var(--t-xs); aspect-ratio: 4/3; border: 1px dashed #C1CAD3; }
.rex-placeholder img { width: 45%; max-width: 200px; aspect-ratio: auto !important; }

/* ---------- Valve cards ---------- */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.vgrid-3 { grid-template-columns: repeat(3, 1fr); }
.vcard a { display: flex; flex-direction: column; height: 100%; background: var(--white); text-decoration: none; color: var(--body); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s; }
.vcard a:hover { border-color: var(--navy); }
.vcard-img img, .vcard-img .rex-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.vcard h3 { padding: 1.1rem 1.25rem 0; margin-bottom: .4rem; font-size: var(--t-m); }
.vcard p { padding: 0 1.25rem; font-size: var(--t-s); color: var(--steel); margin-bottom: 1rem; }
.vcard-link { margin: auto 1.25rem 1.25rem; font: 600 var(--t-xs)/1 var(--f-head); color: var(--blue); padding-top: .75rem; border-top: 1px solid var(--line); }
.vcard a:hover .vcard-link { color: var(--gold-dark); }

/* ---------- Reasons (definition grid) ---------- */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.reasons > div { padding: 1.75rem 1.75rem 1.75rem 0; border-bottom: 1px solid var(--line); }
.reasons > div:not(:nth-child(3n+1)) { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.reasons dt { font: 700 var(--t-m)/1.3 var(--f-head); color: var(--navy); margin-bottom: .5rem; }
.reasons dd { margin: 0; font-size: var(--t-s); }

/* ---------- Industries ---------- */
.ind-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); }
.ind-grid a { display: block; height: 100%; padding: 1.5rem; background: var(--navy); text-decoration: none; color: #AFC0D0; transition: background-color .15s; }
.ind-grid a:hover { background: var(--blue); }
.ind-grid strong { display: block; font: 700 var(--t-m)/1.3 var(--f-head); color: var(--white); margin-bottom: .4rem; }
.ind-grid span { font-size: var(--t-s); }
.ind-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.ind-row { padding: 2rem 0; border-top: 1px solid var(--line); }
.ind-row h2 { font-size: var(--t-xl); }

/* ---------- Flow process: the signature element ----------
   Steps sit on a pipeline. Each node is a P&ID valve symbol. */
.flow { --node: 40px; list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; position: relative; padding-top: calc(var(--node) / 2); }
.flow::before { content: ""; position: absolute; top: calc(var(--node) / 2 + 9px); left: 0; right: 0; height: 6px; background: var(--grey); border-block: 1px solid #C9D1D9; }
.sec-grey .flow::before { background: var(--white); }
.flow-step { position: relative; }
.flow-node { position: relative; z-index: 1; display: inline-flex; background: inherit; }
.flow-node svg { width: var(--node); height: 24px; fill: var(--white); stroke: var(--navy); stroke-width: 2; stroke-linejoin: round; }
.flow-step:last-child .flow-node svg { fill: var(--gold); stroke: var(--gold-dark); }
.flow-num { display: block; font: 700 var(--t-xs)/1 var(--f-head); color: var(--gold-dark); margin: 1.1rem 0 .4rem; }
.flow h3 { font-size: var(--t-m); margin-bottom: .4rem; }
.flow p { font-size: var(--t-s); margin: 0; }

/* ---------- Quality split ---------- */
.qsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); background: var(--white); margin-bottom: 1.25rem; }
.qcol { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.qcol.is-rex { border-left: 4px solid var(--gold); background: #FBFAF7; }
.qcol h3 { font-size: var(--t-m); }

/* Tick list */
.ticks { list-style: none; display: grid; gap: .6rem; }
.ticks.cols-2 { grid-template-columns: 1fr 1fr; gap: .6rem 2rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark); transform: rotate(-45deg); }
.sec-navy .ticks li::before { border-color: var(--gold); }

/* Regions */
.regions { list-style: none; margin: 1.5rem 0; border-top: 1px solid var(--line); }
.regions li { padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.regions strong { display: inline-block; min-width: 8.5rem; font-family: var(--f-head); color: var(--navy); }

/* Posts */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.pcard a { display: block; text-decoration: none; color: var(--body); }
.pcard-img img, .pcard-img .rex-placeholder { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r); margin-bottom: 1rem; }
.pcard time { font-size: var(--t-xs); color: var(--steel); }
.pcard h3 { font-size: var(--t-m); margin: .35rem 0 .5rem; }
.pcard a:hover h3 { color: var(--blue); text-decoration: underline; }
.pcard p { font-size: var(--t-s); }
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.nav-links .page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); text-decoration: none; border-radius: var(--r); }
.nav-links .current { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* CTA band */
.cta-band { background: var(--blue); color: #D3DCE5; padding-block: clamp(3rem, 2rem + 3vw, 5rem); border-top: 6px solid var(--gold); }
.cta-inner { display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center; }
.cta-band h2 { color: var(--white); font-size: var(--t-xl); max-width: 26ch; }
.cta-band p { margin: 0; max-width: 60ch; }
.cta-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Category page ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; padding: .9rem .8rem; font: 600 var(--t-xs)/1 var(--f-head); color: var(--steel); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a.is-active { color: var(--navy); border-bottom-color: var(--gold); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); }

.spec-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
.spec { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.spec th, .spec td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 34%; font: 600 var(--t-s)/1.4 var(--f-head); color: var(--navy); background: var(--grey); }
.standards { background: var(--navy); color: #C3CFDA; padding: 1.5rem; }
.standards h3 { color: var(--white); font-size: var(--t-m); }
.standards ul { list-style: none; display: grid; gap: .4rem; margin-bottom: 1rem; }
.standards li { font: 600 var(--t-s)/1.4 var(--f-head); color: var(--white); padding-left: .8rem; border-left: 2px solid var(--gold); }
.standards .note { color: #9FB0C2; margin: 0; }
.pending { background: var(--grey); border-left: 3px solid var(--gold); padding: 1.5rem 1.75rem; max-width: 820px; }

.docs { list-style: none; border-top: 1px solid var(--line); }
.docs a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.docs a:hover span { text-decoration: underline; }
.docs small { color: var(--steel); white-space: nowrap; }
.docs-group { font-size: var(--t-l); margin-top: 2.5rem; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font: 600 var(--t-m)/1.4 var(--f-head); color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font-size: 1.4rem; color: var(--gold-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1.1rem; }

/* ---------- Enquiry blocks & form ---------- */
.enquire-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
.form-card { background: var(--white); color: var(--body); padding: clamp(1.25rem, .8rem + 2vw, 2.25rem); border-top: 4px solid var(--gold); }
.on-light .form-card { border: 1px solid var(--line); border-top: 4px solid var(--gold); }
.quote-layout { display: grid; grid-template-columns: 1.5fr .7fr; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
.quote-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.quote-aside h2 { font-size: var(--t-l); }
.contact-list { margin: 0 0 2rem; }
.contact-list > div { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 600 var(--t-xs)/1.2 var(--f-head); color: var(--steel); margin-bottom: .25rem; }
.contact-list dd { margin: 0; }

.q-form fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.q-form legend { font: 700 var(--t-m)/1.3 var(--f-head); color: var(--navy); margin-bottom: 1rem; padding: 0; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.is-compact .f-grid { gap: .85rem 1rem; }
.f-wide { grid-column: 1 / -1; }
.f label { display: block; font: 600 var(--t-xs)/1.3 var(--f-body); color: var(--navy); margin-bottom: .35rem; }
.f input, .f select, .f textarea { width: 100%; min-height: 46px; padding: .65rem .8rem; font: 400 var(--t-s)/1.4 var(--f-body); color: var(--ink); background: var(--white); border: 1px solid #B9C3CD; border-radius: var(--r); }
.f textarea { min-height: 96px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,59,91,.18); }
.f [aria-invalid="true"] { border-color: #B3261E; }
.f input[type="file"] { padding: .5rem; min-height: auto; background: var(--grey); }
.f-hint { font-size: var(--t-xs); color: var(--steel); margin: .35rem 0 0; }
.f-err { font-size: var(--t-xs); color: #B3261E; margin: .35rem 0 0; font-weight: 500; }
.f-consent { font-size: var(--t-s); margin-bottom: 1.5rem; }
.f-consent label { display: flex; gap: .6rem; align-items: flex-start; }
.f-consent input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--navy); flex: none; }
.f-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.q-alert { background: #FCEDEC; border-left: 3px solid #B3261E; padding: 1rem 1.25rem; margin-bottom: 1.5rem; color: #5C1410; font-size: var(--t-s); }
.q-alert p:last-child, .q-success p:last-child { margin: 0; }
.q-success { background: #EEF4EF; border-left: 3px solid #2E6B3A; padding: 1.5rem; color: #1E3B24; }
.q-success h3 { color: #1E3B24; }
.q-form button[disabled] { opacity: .6; cursor: progress; }

/* Prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--t-xl); margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-s); display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.post-figure { margin: 0 0 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0B1A2A; color: #9FB0C2; font-size: var(--t-s); padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer .brand-name { color: var(--white); margin-bottom: .6rem; }
.site-footer .tagline { color: var(--gold); font-weight: 500; }
.f-title { font: 700 var(--t-s)/1.3 var(--f-head); color: var(--white); margin-bottom: 1rem; }
.f-links, .f-contact { list-style: none; display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.site-footer a { color: #C3CFDA; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .btn-gold { color: var(--navy); text-decoration: none; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); font-size: var(--t-xs); }
.footer-base p { margin: 0; }
.legal-links { list-style: none; display: flex; gap: 1.25rem; }

/* WhatsApp float */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 54px; height: 54px; display: grid; place-items: center; background: #1F7A4D; color: var(--white); border-radius: 50%; box-shadow: 0 4px 14px rgba(16,36,58,.25); }
.wa-float:hover { background: #17603C; color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.flow { grid-template-columns: repeat(3, 1fr); row-gap: 2.5rem; }
	.flow::before { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.ind-grid { grid-template-columns: repeat(2, 1fr); }
	.mega-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
	:root { --header-h: 64px; }
	.nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
	.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--navy); position: relative; transition: transform .2s; }
	.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle .bars::before { top: -6px; }
	.nav-toggle .bars::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

	.site-nav { position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem var(--gap) 2rem; background: var(--white); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s; }
	.site-nav.is-open { transform: none; visibility: visible; }
	.site-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav .menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
	.site-nav .menu > li > a { flex: 1; padding: 1rem 0; font-size: var(--t-m); }
	.site-nav .menu > li > a:hover { box-shadow: none; }
	.mega-toggle { padding: 1rem; margin: 0; }
	.mega { position: static; display: none; visibility: visible; opacity: 1; width: 100%; border: 0; }
	.has-mega:hover > .mega, .has-mega:focus-within > .mega { display: none; }
	.has-mega.is-open > .mega { display: block; }
	.mega-inner { width: 100%; grid-template-columns: 1fr; padding: 0 0 1rem; gap: 1rem; }
	.mega-list { grid-template-columns: 1fr; }
	.mega-aside { display: none; }
	.nav-cta { width: 100%; }

	.hero-grid, .cat-hero-grid, .split, .enquire-grid, .quote-layout, .spec-wrap, .cta-inner { grid-template-columns: 1fr; }
	.hero-visual { max-width: 420px; }
	.split-rev .split-media { order: 0; }
	.reasons { grid-template-columns: 1fr 1fr; }
	.reasons > div, .reasons > div:not(:nth-child(3n+1)) { padding: 1.5rem 1.5rem 1.5rem 0; border-left: 0; }
	.reasons > div:nth-child(2n) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
	.post-grid, .vgrid, .vgrid-3 { grid-template-columns: 1fr 1fr; }
	.quote-aside { position: static; }
	.gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.f-grid, .ticks.cols-2, .post-grid, .vgrid, .vgrid-3, .ind-list, .qsplit, .footer-grid { grid-template-columns: 1fr; }
	.qcol.is-rex { border-left: 0; border-top: 4px solid var(--gold); }
	.reasons { grid-template-columns: 1fr; }
	.reasons > div:nth-child(2n) { padding-left: 0; border-left: 0; }
	.ind-grid { grid-template-columns: 1fr; }
	/* Flow turns into a vertical pipeline on phones. */
	.flow { grid-template-columns: 1fr; gap: 0; padding: 0 0 0 3.25rem; }
	.flow::before { display: block; top: 0; bottom: 0; left: 17px; right: auto; width: 6px; height: auto; border-block: 0; border-inline: 1px solid #C9D1D9; }
	.flow-step { padding-bottom: 1.75rem; }
	.flow-node { position: absolute; left: -3.25rem; top: 0; transform: rotate(90deg); }
	.flow-num { margin-top: 0; }
	.hero-actions .btn, .cta-actions .btn, .f-actions .btn-gold { width: 100%; }
	.wa-float { right: 14px; bottom: 14px; }
}

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

@media print {
	.site-header, .site-footer, .wa-float, .subnav, .cta-band { display: none; }
}
