/* ==========================================================================
   Xin Pai Precision Alucraft — Direction A "Graphite & Aluminium"
   Mobile-first, vanilla CSS. Tokens first, then base, components, sections.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* palette */
  --graphite-950: #0f1211;
  --graphite-900: #161a19;
  --graphite-800: #1d2220;
  --graphite-600: #333a37;
  --alu-50: #eef0f1;
  --alu-100: #dfe3e6;
  --alu-200: #c9ced3;
  --alu-300: #a9b0b6;
  --alu-400: #8e979e;
  --alu-600: #5b636a;
  --field-border: #767f86;   /* >= 3:1 on white, for control outlines */
  --green: #3ab54a;
  --green-bright: #4cc75c;
  --green-deep: #1f7a3a;
  --green-text: #166534;
  --cream: #f3efe7;
  --cream-2: #faf8f3;
  --oak: #d9b98c;
  --danger: #b42318;

  /* type */
  --font-display: "Sora", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.6rem, 7vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
  --fs-h2-xl: clamp(2.4rem, 1.4rem + 4vw, 4.25rem);
  --fs-h3: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;

  /* spacing scale */
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --section-pad: clamp(4rem, 3rem + 5vw, 8rem);

  /* layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  --header-h: 64px;
  --radius-s: 6px;
  --radius-m: 10px;

  /* motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-mid: 280ms;
  --t-slow: 550ms;

  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
}

/* theme scopes */
/* Dark surfaces: the sections, plus the two dialogs, which sit in the top layer
   outside any section and so need the tokens applied directly. */
.t-dark,
.drawer,
.lightbox {
  --bg: var(--graphite-950);
  --bg-2: var(--graphite-900);
  --bg-3: var(--graphite-800);
  --fg: var(--alu-50);
  --fg-2: var(--alu-300);
  --fg-3: var(--alu-400);
  --line: rgba(238, 240, 241, 0.13);
  --line-strong: rgba(238, 240, 241, 0.3);
  --accent: var(--green);
  --accent-fg: var(--green);
  --focus: var(--green);
  color-scheme: dark;
}
.t-dark { background: var(--bg); color: var(--fg); }
.t-dark--raised { --bg: var(--graphite-900); --bg-2: var(--graphite-800); }
.t-light {
  --bg: var(--alu-50);
  --bg-2: #ffffff;
  --bg-3: var(--alu-100);
  --fg: var(--graphite-950);
  --fg-2: var(--alu-600);
  --fg-3: var(--alu-600);
  --line: rgba(15, 18, 17, 0.13);
  --line-strong: rgba(15, 18, 17, 0.32);
  --accent: var(--green-deep);
  --accent-fg: var(--green-text);
  --focus: var(--green-deep);
  color-scheme: light;
  background: var(--bg);
  color: var(--fg);
}
.t-cream {
  --bg: var(--cream);
  --bg-2: var(--cream-2);
  --bg-3: #e9e3d6;
  --fg: var(--graphite-950);
  --fg-2: var(--alu-600);
  --fg-3: var(--alu-600);
  --line: rgba(15, 18, 17, 0.13);
  --line-strong: rgba(15, 18, 17, 0.32);
  --accent: var(--green-deep);
  --accent-fg: var(--green-text);
  --focus: var(--green-deep);
  color-scheme: light;
  background: var(--bg);
  color: var(--fg);
}

/* Dialogs live outside the section scopes, so they carry the dark tokens themselves
   (see the .t-dark, .drawer, .lightbox rule above) without taking a background. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  background: var(--graphite-950);
  color: var(--alu-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
/* The rule above is an author style, so it outranks the browser's own
   [hidden] { display: none } no matter the specificity. Without this, any
   image or video carrying the hidden attribute stays on screen. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--focus, var(--green)); outline-offset: 3px; border-radius: 2px; }
main:focus, section:focus { outline: none; }
::selection { background: var(--green); color: var(--graphite-950); }

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

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--green);
  color: var(--graphite-950);
  font-weight: 600;
  border-radius: var(--radius-s);
  translate: 0 -200%;
  transition: translate var(--t-fast) var(--ease-out);
}
.skip-link:focus-visible { translate: 0 0; outline-color: var(--alu-50); }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: var(--s-5);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-fg);
}
.eyebrow-num {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}
.eyebrow-num::after { content: ""; width: 2rem; height: 1px; background: var(--line-strong); }
.h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; max-width: 16ch; }
.h2--xl { font-size: var(--fs-h2-xl); letter-spacing: -0.035em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--fg-2); max-width: 58ch; text-wrap: pretty; }
.prose p { max-width: 62ch; color: var(--fg-2); text-wrap: pretty; }
.prose p + p { margin-block-start: var(--s-5); }
.section-head > .h2 + .lead { margin-block-start: var(--s-5); }
.section-head--wide { margin-block-end: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-fg);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent-fg);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
  transition: text-decoration-color var(--t-fast), gap var(--t-fast);
}
.text-link:hover { text-decoration-color: currentColor; gap: 0.6rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0 1.5rem;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), translate var(--t-fast);
}
.btn:active { translate: 0 1px; }
.btn-sm { min-height: 44px; padding: 0 1.125rem; font-size: 0.875rem; }
.btn-primary { background: var(--green); color: var(--graphite-950); }
.btn-primary:hover { background: var(--green-bright); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); background: rgba(127, 127, 127, 0.08); }
.btn svg { flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--alu-50);
  background: transparent;
  transition: background-color var(--t-mid), border-color var(--t-mid), backdrop-filter var(--t-mid);
  border-block-end: 1px solid transparent;
}
.site-header::before {
  /* gradient scrim so the header reads over the hero video before scroll */
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  background: linear-gradient(to bottom,
    rgba(15, 18, 17, 0.88) 0%,
    rgba(15, 18, 17, 0.82) 55%,
    rgba(15, 18, 17, 0.55) 78%,
    rgba(15, 18, 17, 0) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--t-mid);
  z-index: -1;
}
html:not(.js) .site-header,
.site-header.is-scrolled {
  background: rgba(15, 18, 17, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-block-end-color: rgba(238, 240, 241, 0.12);
}
html:not(.js) .site-header::before,
.site-header.is-scrolled::before { opacity: 0; }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.brand { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; }
.brand-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.brand-tile img { width: 44px; height: 44px; object-fit: cover; }
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.14em; }
.brand-sub { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; color: var(--alu-300); }

.site-nav { display: none; }
.nav-list { display: flex; gap: 0.25rem; }
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--alu-200);
  transition: color var(--t-fast);
}
.nav-list a::after {
  content: "";
  position: absolute;
  inset-inline: 0.875rem;
  inset-block-end: 8px;
  height: 2px;
  background: var(--green);
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--t-mid) var(--ease-out);
}
.nav-list a:hover { color: #fff; }
.nav-list a:hover::after { scale: 1 1; }
.nav-list a:is(.is-current, [aria-current="true"]) { color: #fff; }
.nav-list a:is(.is-current, [aria-current="true"])::after { scale: 1 1; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.wa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  border-radius: var(--radius-s);
  color: var(--alu-100);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.wa-link:hover { color: var(--green); background: rgba(255, 255, 255, 0.06); }
.wa-text { display: none; }
.header-cta { display: none; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.625rem;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color var(--t-fast);
}
.menu-btn:hover { background: rgba(255, 255, 255, 0.06); }
.menu-label { display: none; }

@media (min-width: 480px) {
  .header-cta { display: inline-flex; }
  .menu-label { display: inline; }
}
@media (min-width: 1100px) {
  .site-nav { display: block; }
  .menu-btn { display: none; }
  .nav-list a { padding: 0 0.7rem; }
  .nav-list a::after { inset-inline: 0.7rem; }
}
@media (min-width: 1280px) {
  .nav-list a { padding: 0 0.875rem; }
  .nav-list a::after { inset-inline: 0.875rem; }
  .wa-text { display: inline; }
  .wa-link { padding: 0 0.875rem; }
  .header-actions { gap: 0.75rem; }
}

/* ---------- Drawer (mobile menu) ---------- */
.drawer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--alu-50);
  overflow: hidden;
}
.drawer::backdrop { background: rgba(15, 18, 17, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.drawer-sheet {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(100vw, 420px);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.625rem var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
  background: var(--graphite-950);
  border-inline-start: 1px solid rgba(238, 240, 241, 0.12);
  overflow-y: auto;
}
@media (prefers-reduced-motion: no-preference) {
  .drawer[open] .drawer-sheet { animation: drawer-in var(--t-mid) var(--ease-out); }
  @keyframes drawer-in { from { translate: 100% 0; } to { translate: 0 0; } }
  .drawer[open]::backdrop { animation: fade-in var(--t-mid) ease; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
}
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--header-h) - 1.25rem);
  padding-block-end: 0.75rem;
  border-block-end: 1px solid rgba(238, 240, 241, 0.12);
}
.drawer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  transition: background-color var(--t-fast);
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.06); }
.drawer-nav { flex: 1; padding-block: var(--s-5); }
.drawer-list li + li { border-block-start: 1px solid rgba(238, 240, 241, 0.1); }
.drawer-list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  min-height: 56px;
  padding: 0.75rem 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color var(--t-fast), padding-inline-start var(--t-mid) var(--ease-out);
}
.drawer-list a:hover, .drawer-list a.is-current { color: var(--green); padding-inline-start: 0.75rem; }
.drawer-num { font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.12em; color: var(--alu-400); font-family: var(--font-body); }
.drawer-actions { display: grid; gap: 0.625rem; }
.drawer-foot { margin-block-start: var(--s-5); font-size: var(--fs-small); color: var(--alu-300); }
.drawer-foot a { display: inline-block; padding-block: 0.5rem; }
.drawer-foot a:hover { color: var(--green); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-block-start: calc(-1 * var(--header-h));
}
.hero-stage {
  position: relative;
  isolation: isolate;
  min-height: clamp(600px, 100vh, 820px);
  min-height: clamp(600px, 100svh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
@media (min-width: 600px) {
  .hero-stage {
    min-height: clamp(600px, 100vh, 900px);
    min-height: clamp(600px, 100svh, 900px);
  }
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  z-index: -2;
  background: var(--graphite-900);
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(15, 18, 17, 0.96) 0%, rgba(15, 18, 17, 0.72) 32%, rgba(15, 18, 17, 0.28) 68%, rgba(15, 18, 17, 0.12) 100%),
    linear-gradient(to right, rgba(15, 18, 17, 0.55) 0%, rgba(15, 18, 17, 0.1) 60%);
}
.hero-content {
  position: relative;
  padding-block: calc(var(--header-h) + 3rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: var(--s-5);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--alu-200);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(58, 181, 74, 0.2); flex: none; }
.hero-title {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 13ch;
  color: #fff;
}
.hero-sub {
  margin-block-start: var(--s-5);
  max-width: 56ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--alu-200);
  text-wrap: pretty;
}
.hero-sub--full { display: none; }
@media (min-width: 600px) {
  .hero-sub--full { display: block; }
  .hero-sub--short { display: none; }
}
.nowrap { white-space: nowrap; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: var(--s-6); }
.hero-ctas .btn-ghost { border-color: rgba(238, 240, 241, 0.4); color: #fff; }
.hero-ctas .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.media-toggle {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 18, 17, 0.55);
  border: 1px solid rgba(238, 240, 241, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.media-toggle:hover { background: rgba(15, 18, 17, 0.8); border-color: rgba(238, 240, 241, 0.6); }
.media-toggle .ico-play { display: none; }
.media-toggle[data-state="paused"] .ico-play { display: block; }
.media-toggle[data-state="paused"] .ico-pause { display: none; }
.hero-toggle { inset-inline-end: var(--gutter); inset-block-end: clamp(1.25rem, 1rem + 1vw, 2rem); }

.hero-trust {
  position: relative;
  background: var(--graphite-950);
  border-block: 1px solid rgba(238, 240, 241, 0.12);
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.875rem 1.25rem 0.875rem 0;
  margin-inline-end: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--alu-300);
}
.trust-list li:last-child { margin-inline-end: 0; }
.trust-list li::before { content: ""; width: 6px; height: 6px; background: var(--green); flex: none; }
@media (max-width: 599px) {
  .trust-list li { padding-block: 0.625rem; }
}
@media (min-width: 1280px) {
  .trust-list { flex-wrap: nowrap; justify-content: space-between; }
  .trust-list li { flex: 0 1 auto; white-space: nowrap; padding: 1.125rem 1.25rem; margin: 0; border-inline-end: 1px solid rgba(238, 240, 241, 0.12); }
  .trust-list li:last-child { border-inline-end: 0; }
  .trust-list li:first-child { padding-inline-start: 0; }
  .trust-list li:last-child { padding-inline-end: 0; }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--section-pad);
  scroll-margin-top: calc(var(--header-h) - 1px);
}
.hairline-top { border-block-start: 1px solid var(--line); }

.split { display: grid; gap: var(--s-5); }
.split-head { align-self: start; }
.split-body { align-self: end; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2rem, 6vw, 6rem); align-items: end; }
  .split-head { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.split .eyebrow { margin-block-end: var(--s-5); }

/* ruled grid: cells separated by hairlines using the gap trick */
.ruled-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.ruled-grid > li { background: var(--bg); }

/* reveal */
.js .reveal { opacity: 0; translate: 0 18px; }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { transition: opacity var(--t-slow) ease, translate var(--t-slow) var(--ease-out); }
  .js .ruled-grid.reveal > li, .js .steps.reveal > li {
    opacity: 0;
    translate: 0 12px;
    transition: opacity var(--t-slow) ease, translate var(--t-slow) var(--ease-out);
    transition-delay: calc(var(--i, 0) * 55ms + 80ms);
  }
  .js .reveal.is-in > li { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal > li { opacity: 1; translate: none; transition: none; }
}

/* ---------- About ---------- */
.d-figures .split { margin-block-end: clamp(3rem, 2.5rem + 3vw, 5rem); }
.facts { grid-template-columns: 1fr; }
.fact { display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
.fact-num {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.fact-prefix { font-size: 0.42em; font-weight: 600; letter-spacing: 0.02em; color: var(--fg-2); vertical-align: 0.35em; margin-inline-end: 0.15em; }
.fact-label { font-size: var(--fs-small); line-height: 1.5; color: var(--fg-2); max-width: 24ch; text-wrap: pretty; }
@media (min-width: 600px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Material ---------- */
.material-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1.5rem + 2vw, 3rem); }
.material-media { max-width: 360px; }
.clip-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--graphite-800);
  box-shadow: 0 0 0 1px var(--line);
}
.material-video { width: 100%; height: 100%; object-fit: cover; }
.clip-toggle { inset-inline-end: 0.75rem; inset-block-end: 0.75rem; }
.material-media figcaption { margin-block-start: 1rem; font-size: var(--fs-small); line-height: 1.5; color: var(--fg-3); max-width: 40ch; }

/* panel cross-section diagram */
.panel-section {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
  margin-block-start: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-2);
}
.panel-section-label {
  margin: 0 0 0.5rem;
  color: var(--fg-3);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel-section-svg { display: block; width: 100%; height: auto; }
.ps-lam { fill: var(--oak); }
.ps-skin { fill: var(--alu-200); }
.ps-core { fill: rgba(169, 176, 182, 0.16); }
.panel-section-legend {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: center;
}
.panel-section-legend li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg-2);
  font-size: var(--fs-xs);
  line-height: 1.4;
}
.ps-key { width: 16px; height: 8px; flex: 0 0 auto; border-radius: 2px; }
.ps-key-lam { background: var(--oak); }
.ps-key-skin { background: var(--alu-200); }
.ps-key-core { background: rgba(169, 176, 182, 0.16); box-shadow: inset 0 0 0 1px var(--alu-600); }

@media (min-width: 760px) {
  .panel-section {
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(1.75rem, 3vw, 3rem);
  }
}

/* ---------- Panel illustrations ----------
   Two images side by side in place of the drawn cross-section. Each opens in
   the lightbox, because these are dense diagrams that need the room. */
.panel-figures { margin-block-start: clamp(2.5rem, 2rem + 2vw, 4rem); }
.panel-figures .panel-section-label { margin-block-end: clamp(0.875rem, 0.7rem + 0.5vw, 1.25rem); }
.panel-figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.panel-figure { display: flex; flex-direction: column; }
.panel-figure-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
  cursor: zoom-in;
  isolation: isolate;
}
.panel-figure-btn img { display: block; width: 100%; height: auto; transition: scale 700ms var(--ease-out); }
.panel-figure-btn:hover img { scale: 1.02; }
.panel-figure-btn:focus-visible { outline-offset: 4px; }
.panel-figure-zoom {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0.75rem;
  inset-block-start: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(15, 18, 17, 0.72);
  color: var(--alu-50);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background var(--t-mid), scale var(--t-mid);
}
.panel-figure-btn:hover .panel-figure-zoom { background: var(--green); color: var(--graphite-950); scale: 1.06; }
.panel-figure-caption {
  margin-block-start: 0.75rem;
  color: var(--fg-2);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-wrap: pretty;
}
@media (min-width: 760px) {
  .panel-figure-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .panel-figure-btn img { transition: none; }
  .panel-figure-btn:hover img { scale: 1; }
}

/* ---------- Manufacturing Processes ----------
   Image over a short description. Separate cards rather than the ruled-grid
   gap trick, because the number of stages is set in the CMS and an incomplete
   last row would otherwise show as an empty ruled cell. */
/* Same breathing room between the heading and the cards as Steps and Serve.
   `.d-cards` is on every section built from the cards design (inc/designs.php). */
.d-cards .split { margin-block-end: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.mfg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.mfg-step {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
}
.mfg-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-3); }
.mfg-media img { width: 100%; height: 100%; object-fit: cover; transition: scale 700ms var(--ease-out); }
.mfg-step:hover .mfg-media img { scale: 1.04; }
.mfg-play:hover img { scale: 1.04; }
/* Until a photo is added, the card shows its stage number rather than a gap. */
.mfg-media--empty {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(127, 127, 127, 0.07) 10px 20px),
    var(--bg-3);
}
/* Scoped to its own class: a bare `span` here also matched .play-badge and
   dimmed the play button to 40% on a stage that had a clip but no photo. */
.mfg-media--empty .mfg-ghost {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 3vw, 3rem);
  font-weight: 600;
  color: var(--fg-3);
  opacity: 0.4;
}
/* A stage that carries a clip: the media block becomes the play button. */
.mfg-play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  isolation: isolate;
  font: inherit;
  color: inherit;
}
.mfg-play.mfg-media--empty { display: grid; }
.mfg-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 18, 17, 0.35), rgba(15, 18, 17, 0) 55%);
  transition: opacity var(--t-mid);
}
.mfg-play .play-badge { width: 52px; height: 52px; }
.mfg-play:hover .play-badge { background: var(--green); scale: 1.06; }
.mfg-play:focus-visible { outline-offset: 4px; }
.mfg-body { display: flex; flex-direction: column; gap: 0.5rem; padding: clamp(1.125rem, 0.9rem + 1vw, 1.5rem); flex: 1; }
.mfg-body .num { color: var(--green); font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; }
.mfg-body h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.mfg-body p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; text-wrap: pretty; }
@media (min-width: 560px) { .mfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .mfg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .mfg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .mfg-media img { transition: none; }
  .mfg-step:hover .mfg-media img, .mfg-play:hover img { scale: 1; }
  .mfg-play:hover .play-badge { scale: 1; }
}

.benefits { grid-template-columns: 1fr; }
.benefit { display: flex; flex-direction: column; gap: 0.625rem; padding: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); }
.benefit h3 { font-size: var(--fs-h3); }
.benefit p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; max-width: 34ch; }
.benefit .num { margin-block-end: 0.5rem; }
@media (min-width: 600px) { .benefits { grid-template-columns: repeat(2, 1fr); } }

/* 600-759px: the clip sits beside the heading and the benefits run full width,
   so the tall 9/16 crop never leaves an empty column next to it. */
@media (min-width: 600px) and (max-width: 759.98px) {
  .material-grid {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    grid-template-areas: "media head" "benefits benefits";
    column-gap: clamp(1.75rem, 4vw, 2.5rem);
    align-items: start;
  }
  .material-head { grid-area: head; }
  .material-media { grid-area: media; max-width: 100%; }
  .material-grid .benefits { grid-area: benefits; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 760-899px: enough room for the clip to run beside heading and benefits together. */
@media (min-width: 760px) and (max-width: 899.98px) {
  .material-grid {
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
    grid-template-areas: "media head" "media benefits";
    column-gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
  }
  .material-head { grid-area: head; }
  .material-media { grid-area: media; max-width: 100%; }
  .material-grid .benefits { grid-area: benefits; grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .material-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "media head" "media benefits";
    column-gap: clamp(2.5rem, 5vw, 5rem);
    row-gap: clamp(2rem, 1.5rem + 2vw, 3rem);
    align-items: start;
  }
  .material-head { grid-area: head; }
  .material-media { grid-area: media; max-width: 440px; position: sticky; top: calc(var(--header-h) + 1.5rem); }
  .benefits { grid-area: benefits; }
}

/* ---------- Products ---------- */
.product-grid { grid-template-columns: 1fr; }
.product { display: flex; flex-direction: column; }
.product-media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-3); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: scale 700ms var(--ease-out); }
.product:hover .product-media img { scale: 1.04; }
.product-body { display: flex; flex-direction: column; gap: 0.625rem; padding: clamp(1.25rem, 1rem + 1.5vw, 1.75rem) clamp(1.25rem, 1rem + 1.5vw, 1.75rem) 1rem; flex: 1; }
.product-body h3 { font-size: var(--fs-h3); }
.product-body p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; flex: 1; max-width: 36ch; }
.product-body .text-link { font-size: var(--fs-small); margin-block-start: 0.25rem; }
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } .product-media { aspect-ratio: 3 / 4; } }
@media (prefers-reduced-motion: reduce) { .product-media img { transition: none; } .product:hover .product-media img { scale: 1; } }

/* ---------- Projects rail ---------- */
.section-head-row { display: flex; flex-direction: column; gap: var(--s-5); margin-block-end: clamp(2rem, 1.5rem + 2vw, 3rem); }
.rail-controls { display: flex; align-items: center; gap: 0.5rem; }
.rail-hint { margin-inline-end: auto; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.rail-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--alu-600);
  color: var(--fg);
  transition: background-color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
}
.rail-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.rail-btn[disabled] { opacity: 0.3; cursor: default; }
.rail-btn[disabled]:hover { background: transparent; color: var(--fg); border-color: var(--alu-600); }
@media (min-width: 900px) {
  .section-head-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .rail-controls { padding-block-end: 0.25rem; }
  .rail-hint { margin-inline-end: 0.75rem; }
}

.rail-wrap { position: relative; }
.rail {
  --rail-gap: 1rem;
  --edge: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 300px);
  gap: var(--rail-gap);
  padding-inline: var(--edge);
  padding-block: 0.25rem 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; }
@media (min-width: 600px) { .rail { --rail-gap: 1.25rem; grid-auto-columns: 300px; } }
@media (min-width: 1100px) { .rail { grid-auto-columns: 320px; } }
.proj-play {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: 0 0 0 1px var(--line);
  isolation: isolate;
}
.proj-play img { width: 100%; height: 100%; object-fit: cover; transition: scale 700ms var(--ease-out); }
.proj-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 18, 17, 0.45), rgba(15, 18, 17, 0) 45%);
  transition: opacity var(--t-mid);
}
.proj-play:hover img { scale: 1.04; }
.proj-tag {
  position: absolute;
  z-index: 2;
  inset-inline-start: 0.75rem;
  inset-block-start: 0.75rem;
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  background: rgba(15, 18, 17, 0.7);
  color: var(--alu-50);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.play-badge {
  position: absolute;
  z-index: 2;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(238, 240, 241, 0.92);
  color: var(--graphite-950);
  box-shadow: 0 8px 24px rgba(15, 18, 17, 0.35);
  transition: background-color var(--t-fast), scale var(--t-mid) var(--ease-out);
}
.play-badge svg { margin-inline-start: 3px; }
.proj-play:hover .play-badge { background: var(--green); scale: 1.06; }
.proj-play:focus-visible { outline-offset: 4px; }
.proj-title { margin-block-start: 1rem; font-size: 1.0625rem; letter-spacing: -0.01em; }
.proj-caption { margin-block-start: 0.375rem; font-size: var(--fs-small); line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.rail-progress { position: relative; height: 1px; background: var(--line-strong); margin-block-start: 0.5rem; }
.rail-thumb { position: absolute; inset-block: -1px 0; inset-inline-start: 0; width: 20%; background: var(--accent); transition: translate var(--t-fast) linear, width var(--t-fast); }
@media (prefers-reduced-motion: reduce) { .proj-play img, .play-badge { transition: none; } .proj-play:hover img { scale: 1; } }

/* ---------- Sustainability ---------- */
.split--sustain { margin-block-end: clamp(3rem, 2.5rem + 3vw, 5rem); }
.split--sustain .h2 { max-width: 12ch; }
.commitments { grid-template-columns: 1fr; }
.commit { display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem); }
.commit-num {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 2.6rem + 4.5vw, 6rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--graphite-600);
  margin-block-end: 0.75rem;
  font-variant-numeric: tabular-nums;
}
@supports (-webkit-text-stroke: 1px #000) {
  .commit-num { color: transparent; -webkit-text-stroke: 1.25px rgba(238, 240, 241, 0.38); }
  /* The outline above is light, for Sustainability's dark background. On a light
     or cream background — possible now that the design can be reused — it
     needs to be dark, or the numbers disappear. */
  .t-light .commit-num, .t-cream .commit-num { -webkit-text-stroke-color: rgba(15, 18, 17, 0.3); }
}
.commit h3 { font-size: var(--fs-h3); position: relative; padding-inline-start: 1.125rem; }
.commit h3::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.55em; width: 8px; height: 2px; background: var(--green); }
.commit p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.65; max-width: 40ch; text-wrap: pretty; }
@media (min-width: 700px) { .commitments { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .commitments { grid-template-columns: repeat(3, 1fr); } }

/* Blank cells that finish an incomplete last row of a ruled grid (ruled_fillers()
   in inc/designs.php). Without them the grid's hairline-coloured background shows
   through the missing cells as a grey block. Each is shown only at the column
   count it was made for; the breakpoints match .commitments and .facts. */
.ruled-fill { display: none; }
@media (min-width: 700px) and (max-width: 1099.98px) { .commitments > .fill-2 { display: block; } }
@media (min-width: 1100px) { .commitments > .fill-3 { display: block; } }
@media (min-width: 600px) and (max-width: 1179.98px) { .facts > .fill-2 { display: block; } }
@media (min-width: 1180px) { .facts > .fill-4 { display: block; } }

/* ---------- Process ---------- */
.d-steps .split { margin-block-end: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.steps { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: step; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.5rem 0 1.75rem;
  border-block-start: 1px solid var(--line-strong);
}
.step::before { content: ""; position: absolute; inset-block-start: -1px; inset-inline-start: 0; width: 2.5rem; height: 2px; background: var(--accent); }
.step-num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; color: var(--fg-2); line-height: 1; margin-block-end: 0.5rem; }
.step h3 { font-size: var(--fs-h3); }
.step p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; max-width: 32ch; text-wrap: pretty; }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); column-gap: clamp(1.5rem, 3vw, 3rem); } .step { padding-block-end: 0.5rem; } }

/* ---------- Who we serve ---------- */
.serve .split { margin-block-end: clamp(2.5rem, 2rem + 3vw, 4rem); }
.audiences { grid-template-columns: 1fr; }
.audience { display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
.audience-icon { color: var(--green); margin-block-end: 0.75rem; }
.audience h3 { font-size: var(--fs-h3); }
.audience p { color: var(--fg-2); font-size: var(--fs-small); line-height: 1.6; max-width: 34ch; text-wrap: pretty; }
@media (min-width: 600px) { .audiences { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .audiences { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 1.5rem + 2vw, 3rem); }
.contact-side { display: flex; flex-direction: column; gap: var(--s-6); }
.contact-company { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.contact-address { margin-block-start: 0.5rem; color: var(--fg-2); line-height: 1.6; }
.contact-list { margin: 1.5rem 0 0; display: flex; flex-direction: column; }
.contact-row { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; column-gap: 1rem; padding-block: 0.375rem; border-block-start: 1px solid var(--line); }
.contact-row:last-child { border-block-end: 1px solid var(--line); }
.contact-row dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.contact-row dd { margin: 0; }
.contact-row a, .contact-site { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.contact-row a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; transition: color var(--t-fast), text-decoration-color var(--t-fast); }
.contact-row a:hover { color: var(--accent-fg); text-decoration-color: currentColor; }
.contact-details .btn { margin-block-start: 1.5rem; align-self: flex-start; }

.map-card {
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(15, 18, 17, 0.05) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(15, 18, 17, 0.05) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--bg-3);
}
.map-static { display: flex; flex-direction: column; gap: 0.5rem; padding: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); }
.map-pin { color: var(--accent); margin-block-end: 0.25rem; }
.map-heading { font-size: 1.125rem; }
.map-address { color: var(--fg-2); font-size: var(--fs-small); max-width: 36ch; }
.map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-block-start: 0.5rem; }
.map-card iframe { display: block; width: 100%; height: 320px; border: 0; }

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.form-heading { font-size: 1.5rem; letter-spacing: -0.02em; margin-block-end: 0.25rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label { font-weight: 600; font-size: var(--fs-small); }
.field-hint { font-size: 0.8125rem; color: var(--fg-2); line-height: 1.4; }
.field-pair { display: grid; gap: 1.125rem; }
.field-hint--pair, .field-error--pair { grid-column: 1 / -1; }
.field-hint--pair { margin-block-start: -0.5rem; }
.field-error { display: none; font-size: 0.8125rem; font-weight: 600; color: var(--danger); line-height: 1.4; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 1rem; height: 1rem; margin-inline-end: 0.4rem; border-radius: 50%; background: var(--danger); color: #fff; font-size: 0.6875rem; line-height: 1; vertical-align: 0.1em; }
.field.has-error .field-error, .field-pair.has-error .field-error--pair { display: block; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.875rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-s);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--alu-400); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 1px; border-color: var(--green-deep); }
.field :is(input, textarea, select):user-invalid, .field.has-error :is(input, textarea, select), .field-pair.has-error :is(input[name="phone"], input[name="email"]) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}
.field :is(input, textarea):user-invalid + .field-error, .field :is(input, textarea):user-invalid ~ .field-error { display: block; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.5rem; cursor: pointer; }
.select-wrap svg { position: absolute; inset-inline-end: 0.875rem; inset-block-start: 50%; translate: 0 -50%; pointer-events: none; color: var(--fg-2); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; visibility: hidden; }
.form-foot { display: flex; flex-direction: column; gap: 0.75rem; margin-block-start: 0.25rem; }
.form-foot .btn { align-self: flex-start; min-width: 12rem; }
.form-foot .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-noscript { font-size: var(--fs-small); color: var(--fg-2); }
.form-status { display: block; padding: 1rem 1.125rem; border-radius: var(--radius-s); font-size: var(--fs-small); line-height: 1.55; border: 1px solid var(--line); }
.form-status:empty { padding: 0; border: 0; background: none; }
.form-status.is-ok { background: rgba(31, 122, 58, 0.1); border-color: rgba(31, 122, 58, 0.35); color: var(--green-text); }
.form-status.is-error { background: rgba(180, 35, 24, 0.07); border-color: rgba(180, 35, 24, 0.35); color: var(--danger); }
.form-status.is-fallback { background: var(--alu-50); color: var(--fg); }
.form-status .status-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-block-start: 0.5rem; }
.form-status .status-links a { color: var(--accent-fg); }
@media (min-width: 600px) {
  .field-pair { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
}
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
}

/* ---------- Footer ---------- */
.site-footer { border-block-start: 1px solid var(--line); padding-block: clamp(3rem, 2.5rem + 2vw, 4.5rem) 2rem; color: var(--alu-300); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-tagline { max-width: 32ch; line-height: 1.55; }
.footer-heading { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--alu-50); margin-block-end: 1rem; }
.footer-address p { line-height: 1.6; max-width: 36ch; }
.footer-address a, .footer-nav a { display: inline-block; padding-block: 0.4rem; color: var(--alu-200); transition: color var(--t-fast); }
.footer-address a:hover, .footer-nav a:hover { color: var(--green); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); column-gap: 2rem; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-block-start: 3rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); font-size: var(--fs-small); }
.back-top { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 600; color: var(--alu-200); transition: color var(--t-fast); }
.back-top:hover { color: var(--green); }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 0.9fr); gap: 2rem; }
  .footer-brand { grid-column: auto; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(100% - 2rem, 980px);
  max-height: min(100vh - 2rem, 900px);
  max-height: min(100dvh - 2rem, 900px);   /* dvh also tracks the iOS URL bar */
  margin: auto;
  padding: 0;
  border: 1px solid rgba(238, 240, 241, 0.14);
  border-radius: 14px;
  background: var(--graphite-900);
  color: var(--alu-50);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox::backdrop { background: rgba(6, 8, 7, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox-inner { position: relative; display: grid; grid-template-rows: auto auto; max-height: inherit; overflow-y: auto; }
.lightbox-media { background: #000; display: grid; place-items: center; }
.lightbox-media video {
  width: 100%;
  height: auto;
  max-height: min(62vh, 620px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
}
.lightbox-media img { display: block; max-width: 100%; max-height: min(72vh, 900px); width: auto; height: auto; object-fit: contain; }
/* A diagram needs the full width far more than it needs a side panel, so the
   image mode drops to a single column and puts the caption underneath. */
.lightbox.is-image { max-width: min(96vw, 1400px); }
.lightbox.is-image .lightbox-media { background: var(--graphite-950); padding: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox-info { padding: 1.25rem 4.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.lightbox-tag { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
.lightbox-title { font-size: 1.375rem; letter-spacing: -0.02em; }
.lightbox-caption { color: var(--alu-300); font-size: var(--fs-small); line-height: 1.55; max-width: 44ch; }
.lightbox-close {
  position: absolute;
  inset-inline-end: 0.75rem;
  inset-block-start: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.875rem 0 0.75rem;
  border-radius: 999px;
  background: rgba(15, 18, 17, 0.75);
  border: 1px solid rgba(238, 240, 241, 0.25);
  color: #fff;
  font-weight: 600;
  font-size: var(--fs-small);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.lightbox-close:hover { background: var(--green); color: var(--graphite-950); border-color: var(--green); }
@media (min-width: 760px) {
  .lightbox-inner { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
  .lightbox.is-image .lightbox-inner { grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
  .lightbox.is-image .lightbox-info { justify-content: flex-start; padding: 1.25rem 4.5rem 1.5rem 1.5rem; }
  .lightbox-media video { max-height: min(84vh, 800px); }
  .lightbox.is-image .lightbox-media img { max-height: min(78vh, 1000px); }
  .lightbox-info { padding: 2rem 2rem 2rem 2rem; justify-content: flex-end; }
  .lightbox-close { inset-inline-end: 1rem; inset-block-start: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in 240ms var(--ease-out); }
  @keyframes lb-in { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
  .lightbox[open]::backdrop { animation: fade-in 240ms ease; }
}

/* Paired fields sit in a stretched grid row; pushing the control down keeps the two
   inputs on the same baseline even when only one of them carries a hint. */
.field-pair .field > input,
.field-pair .field > select,
.field-pair .field > .select-wrap,
.field-pair .field > textarea { margin-block-start: auto; }

/* Landscape phones: keep headline, subhead and both CTAs on the first screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .hero-stage { min-height: 0; }
  .hero-content { padding-block: 4.5rem 1.5rem; }
  .hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }
  .hero-lead { font-size: 0.95rem; max-width: 46ch; }
  .trust-list li { padding-block: 0.5rem; }
  .drawer-list a { padding-block: 0.6rem; }
  .drawer-top { padding-block: 0.75rem; }
}

/* Short viewports: shrink the player so the title and caption still fit in the dialog. */
@media (max-height: 620px) {
  .lightbox-media video { max-height: 46vh; }
  .lightbox-media img { max-height: 52vh; }
  .lightbox-inner { grid-template-rows: auto minmax(0, auto); }
}

/* No native <dialog>: the drawer can never open, so reveal the inline nav in its
   place. It wraps onto a second line on narrow screens, which is fine as a fallback. */
.no-dialog .site-nav { display: block; }
.no-dialog .nav-list { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.no-dialog .header-inner { flex-wrap: wrap; height: auto; padding-block: 0.5rem; }
.no-dialog .site-header { height: auto; }
