/* ==========================================================================
   Tenaxis Group — site styles
   Palette M3 · Basalt and corten
   ========================================================================== */

:root {
  /* Material palette */
  --basalt: #2A2B2D;
  --basalt-deep: #222325;
  --granite: #74726E;
  --limestone: #E3DED5;
  --corten: #9A4524;
  --oxide: #6B3220;

  /* Semantic tokens */
  --paper: #F5F3EF;
  --surface: #FFFFFF;
  --ink: #1F2022;
  --body: #45464A;
  --muted: #6C6A66;
  --line: #E3DED5;
  --field-line: #8C877F;
  --on-dark: #F5F3EF;
  --on-dark-muted: #B5B1AA;
  --line-dark: rgba(245, 243, 239, 0.14);
  --danger: #B42318;

  /* Type */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 104px);
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 8px;
  --header-h: 76px;

  /* Material textures (grayscale noise, blended over a solid colour) */
  --noise-rock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='5' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-rust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.03' numOctaves='6' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; }
h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-stretch: 112%;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.4vw, 84px); }
h2 { font-size: clamp(30px, 3.4vw, 46px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); letter-spacing: -0.01em; line-height: 1.25; }
.tone { color: var(--muted); }
:focus-visible { outline: 2px solid var(--corten); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .cta-card :focus-visible { outline-color: var(--on-dark); }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tight { padding: calc(var(--section) * 0.6) 0; }
.section--flush-top { padding-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--corten); flex: none; }
.on-dark .eyebrow { color: var(--on-dark-muted); }

.lead { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.6; color: var(--body); max-width: 60ch; }
.muted { color: var(--muted); }

.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { margin-top: 16px; }
.section-head--center { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.section-head--center .lead { margin: 0 auto; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.split--top { align-items: start; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }

/* Dark material sections: basalt with a rock texture */
.on-dark { position: relative; isolation: isolate; background: var(--basalt); color: var(--on-dark-muted); }
.on-dark::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise-rock), var(--noise-grain);
  background-size: 260px 260px, 200px 200px;
  mix-blend-mode: overlay; opacity: 0.32;
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark .tone { color: var(--on-dark-muted); }
.on-dark .lead { color: var(--on-dark-muted); }

/* --------------------------------------------------------------------------
   Icons
   -------------------------------------------------------------------------- */
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-box {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper); color: var(--corten);
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--corten); color: #fff; }
.btn--primary:hover { background: var(--oxide); }
.btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--granite); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--outline-light { color: var(--on-dark); border-color: rgba(245, 243, 239, 0.35); }
.btn--outline-light:hover { border-color: var(--on-dark); }
.btn--sm { min-height: 44px; padding: 9px 16px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--corten);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: color 0.15s ease;
}
.link-arrow:hover { color: var(--oxide); }
.link-arrow .icon { width: 18px; height: 18px; }

/* Placeholder for details still to be confirmed by Tenaxis */
.tbc {
  font-family: var(--mono); font-size: 0.82em; font-weight: 500; color: var(--corten);
  background: rgba(154, 69, 36, 0.07); border: 1px dashed rgba(154, 69, 36, 0.5);
  border-radius: 4px; padding: 1px 7px; white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 239, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
/* Supplied logo PNGs, trimmed to the artwork */
.brand__logo { display: block; height: 42px; width: auto; }
.brand__logo--footer { height: 46px; }
.brand__text { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.brand__name { font-weight: 700; font-stretch: 125%; letter-spacing: 0.08em; font-size: 18px; }
.brand__sub { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; color: var(--muted); }
.on-dark .brand { color: var(--on-dark); }
.on-dark .brand__sub { color: var(--on-dark-muted); }

.nav__links { display: flex; gap: 2px; list-style: none; padding: 0; }
.nav__links a {
  position: relative; display: block; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; color: var(--body); text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); background: rgba(31, 32, 34, 0.05); }
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--corten);
}
.nav__toggle {
  display: none; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); align-items: center; justify-content: center; cursor: pointer;
}
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; overflow-y: auto;
  background: var(--paper); border-top: 1px solid var(--line); padding: 16px var(--gutter) 40px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu a:not(.btn) {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 4px;
  font-size: 22px; font-weight: 600; font-stretch: 112%; color: var(--ink); text-decoration: none;
}
.mobile-menu a[aria-current="page"] { color: var(--corten); }
.mobile-menu .btn { width: 100%; margin-top: 28px; }

/* --------------------------------------------------------------------------
   Media placeholders
   Drop an image at the src path and it replaces the placeholder.
   -------------------------------------------------------------------------- */
.media { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--limestone); }
.media::before {
  content: attr(data-label); position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; line-height: 1.5; color: var(--muted);
  background: repeating-linear-gradient(135deg, transparent 0 11px, rgba(31, 32, 34, 0.055) 11px 12px);
}
.media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media--dark { background: var(--basalt); }
.media--dark::before {
  color: var(--on-dark-muted);
  background: repeating-linear-gradient(135deg, transparent 0 11px, rgba(245, 243, 239, 0.05) 11px 12px);
}
.r-16x9 { aspect-ratio: 16 / 9; }
.r-3x2 { aspect-ratio: 3 / 2; }
.r-4x3 { aspect-ratio: 4 / 3; }
.r-4x5 { aspect-ratio: 4 / 5; }
.r-1x1 { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   Home hero (after Xurya: rounded image frame with a notched stats panel)
   -------------------------------------------------------------------------- */
.hero { padding-top: 8px; }
.hero__wrap { position: relative; }
.hero__frame {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg);
  min-height: clamp(480px, 70vh, 680px); display: flex; align-items: center;
  background: var(--basalt); color: var(--on-dark);
}
.hero__frame .media { position: absolute; inset: 0; border-radius: 0; z-index: -2; }
.hero__frame .media::before { align-items: flex-start; justify-content: flex-end; padding: 28px 32px; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20, 20, 22, 0.78) 0%, rgba(20, 20, 22, 0.4) 42%, rgba(20, 20, 22, 0) 68%);
}
.hero__content { padding: clamp(28px, 6vw, 80px); max-width: 820px; }
.hero h1 { color: var(--on-dark); font-size: clamp(40px, 5.4vw, 74px); max-width: 13ch; }
.hero h1 .tone { color: var(--on-dark-muted); }
.hero .eyebrow { color: var(--on-dark-muted); }
.hero__lead { color: #DAD6CF; margin: 20px 0 32px; max-width: 34ch; font-size: clamp(17px, 1.4vw, 19px); }

.hero__stats {
  position: absolute; right: var(--gutter); bottom: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(3, auto); gap: 0 48px;
  background: var(--paper); border-top-left-radius: var(--radius-lg);
  padding: 32px 12px 0 40px;
}
/* concave corners where the panel meets the frame */
.hero__stats::before, .hero__stats::after {
  content: ""; position: absolute; width: var(--radius-lg); height: var(--radius-lg);
  background: radial-gradient(circle at 0 0, transparent calc(var(--radius-lg) - 0.5px), var(--paper) var(--radius-lg));
}
.hero__stats::before { top: calc(var(--radius-lg) * -1); right: 0; }
.hero__stats::after { bottom: 0; left: calc(var(--radius-lg) * -1); }
.hero__stats { margin: 0; }
.hero__stats dd { margin: 0; }
.stat__value { font-stretch: 112%; font-weight: 600; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; }
.stat__label { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--muted); }

/* --------------------------------------------------------------------------
   Sub-page hero
   -------------------------------------------------------------------------- */
.page-hero { padding: clamp(44px, 6vw, 80px) 0 clamp(32px, 4vw, 48px); }
.page-hero h1 { margin-top: 22px; max-width: 18ch; font-size: clamp(40px, 5.4vw, 72px); }
.page-hero .lead { margin-top: 26px; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }

/* --------------------------------------------------------------------------
   Feature grid (after Xurya: 3 x 2 hairline grid)
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.feature { background: var(--surface); padding: clamp(24px, 3vw, 36px); }
.feature h3 { margin-top: 36px; }
.feature p { margin-top: 10px; font-size: 16px; color: var(--muted); }
/* three-up variant: stays 3 columns, then stacks to one; never leaves an empty cell */
.feature-grid--3 .feature { padding: clamp(22px, 2.6vw, 32px); }
.feature__n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--corten); }
.feature-grid--3 .feature h3 { margin-top: 36px; }
.section-foot { margin-top: 24px; display: flex; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Materials (elements)
   -------------------------------------------------------------------------- */
.mat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mat {
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: clamp(22px, 2.4vw, 30px);
  background: rgba(245, 243, 239, 0.025);
}
.mat__head { display: flex; align-items: center; gap: 18px; }
.element {
  position: relative; width: 60px; height: 60px; flex: none; border-radius: 10px;
  border: 1px solid rgba(245, 243, 239, 0.28); display: grid; place-items: center;
  font-stretch: 112%; font-weight: 600; font-size: 24px; color: var(--on-dark);
}
.element small { position: absolute; top: 5px; left: 7px; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--on-dark-muted); }
.mat h3 { font-size: 19px; }
.mat p { margin-top: 4px; font-size: 14px; }
.grades { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.grades li {
  font-family: var(--mono); font-size: 13px; color: var(--on-dark);
  border: 1px solid var(--line-dark); border-radius: 6px; padding: 4px 10px;
}
.materials-note { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }

/* --------------------------------------------------------------------------
   Precision spec tiles
   -------------------------------------------------------------------------- */
.spec-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.spec { padding: 20px 22px; border-left: 1px solid var(--line); }
.spec:first-child { border-left: 0; }
.spec__k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.spec__v { margin-top: 8px; font-stretch: 112%; font-weight: 600; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.spec--accent .spec__v { color: var(--corten); }
/* inside a two-column split the tiles go 2 x 2 */
.split .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split .spec:nth-child(3) { border-left: 0; }
.split .spec:nth-child(n+3) { border-top: 1px solid var(--line); }

.checklist { list-style: none; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--corten); margin-top: 3px; width: 20px; height: 20px; }
.on-dark .checklist .icon { color: var(--on-dark); }

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; list-style: none; padding: 0; }
.steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.step { position: relative; border-top: 1px solid var(--line); padding-top: 22px; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 36px; height: 2px; background: var(--corten); }
.step__n { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--corten); }
.step h3 { margin-top: 14px; font-size: 19px; }
.step p { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card-grid--2 .media { aspect-ratio: 16 / 9; }

/* Home materials statement */
.material-band { padding: clamp(64px, 9vw, 120px) 0; }
.material-band h2 { margin-top: 18px; max-width: 20ch; font-size: clamp(32px, 4.4vw, 60px); }
.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; transition: border-color 0.15s ease;
}
a.card:hover { border-color: var(--granite); }
.card .media { border-radius: 0; }
.card__body { padding: clamp(22px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body p { font-size: 16px; color: var(--muted); }
.card__body .link-arrow { margin-top: auto; padding-top: 8px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tags li { font-family: var(--mono); font-size: 12px; color: var(--body); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); }

/* Capability rows (image + copy, alternating) */
.cap-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.cap-row + .cap-row { margin-top: clamp(64px, 9vw, 120px); }
.cap-row--flip .cap-row__media { order: 2; }
.cap-row h2 { font-size: clamp(30px, 3.4vw, 44px); margin-top: 18px; }
.cap-row .lead { margin-top: 20px; }
.cap-row .checklist { margin-top: 28px; }
.mini-specs { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.mini-specs > div { padding: 16px 16px 0 0; }
.mini-specs > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.mini-specs dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mini-specs dd { margin: 6px 0 0; font-weight: 600; color: var(--ink); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th {
  text-align: left; padding: 14px 22px; background: var(--paper); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
td { padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.table-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Certification block */
.cert {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start;
}
.cert__badge {
  width: 132px; height: 132px; border-radius: 50%; border: 1.5px dashed var(--corten);
  display: grid; place-items: center; text-align: center; color: var(--corten);
  font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.04em; padding: 12px;
}
.cert__badge strong { display: block; font-family: var(--font); font-stretch: 112%; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.status {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--corten);
  border: 1px solid rgba(154, 69, 36, 0.4); border-radius: 999px; padding: 5px 12px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--corten); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; margin-top: 24px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }

/* Gallery */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.gallery .media:first-child { grid-row: span 2; height: 100%; }

/* --------------------------------------------------------------------------
   CTA card (corten with rust texture)
   -------------------------------------------------------------------------- */
.cta-card {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--corten); color: #fff; padding: clamp(32px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 64px; align-items: end;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise-rust), var(--noise-grain); background-size: 300px 300px, 200px 200px;
  mix-blend-mode: multiply; opacity: 0.45;
}
.cta-card h2 { color: #fff; margin-top: 18px; }
.cta-card h2 .tone { color: rgba(255, 255, 255, 0.74); }
.cta-card p { color: rgba(255, 255, 255, 0.9); margin-top: 18px; max-width: 46ch; }
.cta-card .eyebrow { color: rgba(255, 255, 255, 0.85); }
.cta-card .eyebrow::before { background: #fff; }
.cta-card .btn-row { justify-content: flex-end; }
.cta-card .btn--outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.cta-card .btn--outline-light:hover { border-color: #fff; }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--corten); }
.field .optional { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  min-height: 50px; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--corten); box-shadow: 0 0 0 3px rgba(154, 69, 36, 0.2); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { font-size: 14px; color: var(--danger); }
.field__error:empty { display: none; }
.field__hint { font-size: 14px; color: var(--muted); }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.form__foot p { font-size: 14px; color: var(--muted); max-width: 40ch; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; }
.form-status:empty { display: none; }
.form-status.is-error { background: #FBEDEB; color: var(--danger); }
.form-success { text-align: left; }
.form-success[hidden] { display: none; }
.form-success .icon-box { margin-bottom: 20px; }
.form-success h2 { font-size: clamp(26px, 2.6vw, 34px); }
.form-success p { margin-top: 12px; }

.info-list { display: grid; gap: 16px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-item h3 { font-size: 17px; }
.info-item p, .info-item a { font-size: 16px; color: var(--muted); }
.info-item a { color: var(--corten); font-weight: 600; text-underline-offset: 4px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { padding: clamp(48px, 6vw, 72px) 0 28px; margin-top: var(--section); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.footer-brand p { margin-top: 20px; max-width: 34ch; font-size: 15px; }
.footer-brand .link-arrow { margin-top: 20px; color: var(--on-dark); }
.footer-col h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-muted); font-stretch: 100%; }
.footer-col ul { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 4px; }
.footer-col a { display: inline-block; padding: 6px 0; font-size: 15px; color: var(--on-dark); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  margin-top: clamp(36px, 4.5vw, 56px); padding-top: 22px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 14px;
}
/* the CTA band sits directly above the footer */
.cta-section + .site-footer { margin-top: 0; }
.cta-section { padding-bottom: var(--section); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__stats { gap: 0 32px; padding-left: 32px; }
}

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .section-head, .split, .page-hero__grid, .cap-row, .contact-grid, .cta-card { grid-template-columns: minmax(0, 1fr); }
  .cap-row--flip .cap-row__media { order: 0; }
  .feature-grid, .mat-grid, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .cta-card .btn-row { justify-content: flex-start; }

  /* Stats move out of the frame and sit below it */
  .hero__frame { min-height: 560px; }
  .hero__content { padding-bottom: clamp(28px, 6vw, 80px); }
  .hero__stats {
    position: static; border-radius: 0; padding: 28px 0 0; background: none;
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  }
  .hero__stats::before, .hero__stats::after { display: none; }
  .stat__value { white-space: normal; }
}

@media (max-width: 860px) {
  .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .feature-grid--3 .feature h3 { margin-top: 20px; }
  .section-foot { justify-content: flex-start; }
}

@media (max-width: 760px) {
  /* narrow screens: the text covers the photo, so shade it top to bottom */
  .hero__shade { background: linear-gradient(180deg, rgba(20, 20, 22, 0.88) 0%, rgba(20, 20, 22, 0.78) 55%, rgba(20, 20, 22, 0.45) 100%); }
  .hero__frame .media img { object-position: 85% 70% !important; }

  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(3) { border-left: 0; }
  .spec:nth-child(n+3) { border-top: 1px solid var(--line); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .media:first-child { grid-row: auto; }
  .cert { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .feature-grid, .mat-grid, .card-grid, .card-grid--2, .card-grid--4, .steps { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__stats { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__stats .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
  .stat__label { margin-top: 0; text-align: right; }
  .mini-specs { grid-template-columns: minmax(0, 1fr); }
  .mini-specs > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .mini-specs > div { padding-bottom: 14px; }
  .brand__sub { display: none; }
  .brand__logo { height: 34px; }
  .hero__frame .media::before { align-items: flex-end; justify-content: center; padding: 16px; }
  .btn-row .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 12px; }
}
