/* =============================================================================
   GIMA-MACHINES — main.css
   Source of truth: 04-Design-Spec.md
   Structure: tokens → reset → base → layout → components → templates → motion → responsive
   ============================================================================= */

/* -------------------- 1. TOKENS -------------------- */
:root {
  /* Brand — core */
  --color-ink:           #020626;
  --color-ink-80:        #1F233F;
  --color-slate:         #5A627D;
  --color-slate-30:      #C9CDD9;

  /* Brand — accent (steel blue — shifted from teal per 2026-04-22) */
  --color-accent:        #0066CC;
  --color-accent-tint:   #4DA6FF;
  --color-accent-deep:   #004FA3;

  /* Signal */
  --color-signal:        #D8232A;

  /* Neutrals */
  --color-bg:            #FFFFFF;
  --color-surface:       #F5F6F8;
  --color-surface-2:     #EDEFF3;
  --color-border:        #E2E5EB;
  --color-border-strong: #C9CDD9;
  --color-text:          #0A0D1F;
  --color-text-muted:    #5A627D;

  /* Semantic aliases */
  --color-link:          var(--color-accent);
  --color-link-hover:    var(--color-accent-deep);
  --color-focus:         var(--color-accent);
  --color-success:       var(--color-accent-deep);
  --color-warning:       #E3A23A;
  --color-error:         var(--color-signal);

  /* Font families */
  --font-display: "Raleway", "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-body:    "DM Sans", "Segoe UI", Roboto, -apple-system, system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Sizes (desktop) */
  --fs-hero:     72px;
  --fs-h1:       56px;
  --fs-h2:       40px;
  --fs-h3:       28px;
  --fs-h4:       22px;
  --fs-body-lg:  18px;
  --fs-body:     16px;
  --fs-small:    14px;
  --fs-micro:    12px;

  /* Sizes (mobile) */
  --fs-hero-m:   44px;
  --fs-h1-m:     38px;
  --fs-h2-m:     30px;
  --fs-h3-m:     24px;
  --fs-h4-m:     20px;

  /* Weights */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    800;

  /* Line-heights */
  --lh-tight:    1.05;
  --lh-snug:     1.2;
  --lh-normal:   1.5;
  --lh-relaxed:  1.6;

  /* Tracking */
  --ls-tight:   -0.02em;
  --ls-normal:   0;
  --ls-wide:     0.08em;
  --ls-wider:    0.16em;

  /* Spacing */
  --space-0:   0;
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10:128px;
  --space-11:160px;

  /* Radius */
  --radius-0:   0;
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Borders & shadows */
  --border-hairline: 1px solid var(--color-border);
  --border-strong:   1px solid var(--color-border-strong);
  --border-accent:   2px solid var(--color-accent);

  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(2, 6, 38, 0.04), 0 1px 1px rgba(2, 6, 38, 0.02);
  --shadow-2: 0 4px 12px rgba(2, 6, 38, 0.08);
  --shadow-3: 0 12px 32px rgba(2, 6, 38, 0.12);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasis: cubic-bezier(0.3, 0, 0, 1);
  --dur-fast:  120ms;
  --dur-base:  200ms;
  --dur-slow:  400ms;
  --dur-xslow: 600ms;

  /* Breakpoints (reference only — used via @media queries) */
  --bp-sm:   480px;
  --bp-md:   768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-xxl: 1536px;

  /* Z-index */
  --z-base:      0;
  --z-raised:    1;
  --z-sticky:   100;
  --z-overlay: 1000;
  --z-modal:   1100;
  --z-toast:   1200;
  --z-tooltip: 1300;
}

/* Dark-surface inversion */
.surface-dark {
  --color-bg:     var(--color-ink);
  --color-text:   #FFFFFF;
  --color-text-muted: var(--color-slate-30);
  --color-border: rgba(255,255,255,0.12);

  background: var(--color-bg);
  color: var(--color-text);
}

/* -------------------- 2. RESET -------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; line-height: var(--lh-relaxed); -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; padding: 0; }
[hidden] { display: none !important; }

/* -------------------- 3. BASE -------------------- */
html {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  background: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-ink); letter-spacing: var(--ls-tight); }
h1 { font-size: clamp(var(--fs-h1-m), 4vw + 1rem, var(--fs-h1)); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
h2 { font-size: clamp(var(--fs-h2-m), 3vw + 0.5rem, var(--fs-h2)); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: var(--ls-normal); }
h3 { font-family: var(--font-body); font-size: var(--fs-h3); font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: var(--ls-normal); }
h4 { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: var(--fw-semibold); line-height: var(--lh-normal); letter-spacing: var(--ls-normal); }
p { max-width: 65ch; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-standard), text-decoration-thickness var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--color-link-hover); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

::selection { background: var(--color-accent); color: #FFF; }

/* Typography utility classes */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-hero-m), 6vw + 1rem, var(--fs-hero));
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-ink);
}
.body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-relaxed); color: var(--color-text); }
.caption { font-size: var(--fs-small); line-height: var(--lh-normal); color: var(--color-text-muted); }
.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  line-height: var(--lh-normal);
}

/* -------------------- 4. LAYOUT -------------------- */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 1024px) {
  .container { padding-inline: var(--space-7); }
}

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }
.section--loose { padding-block: var(--space-11); }
@media (max-width: 767px) {
  .section { padding-block: var(--space-7); }
  .section--tight { padding-block: var(--space-6); }
  .section--loose { padding-block: var(--space-9); }
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
@media (min-width: 1024px) {
  .grid { gap: var(--space-5); }
}

/* Column-span helpers */
.col-12 { grid-column: span 12; }
.col-10 { grid-column: span 12; }
.col-8  { grid-column: span 12; }
.col-7  { grid-column: span 12; }
.col-6  { grid-column: span 12; }
.col-5  { grid-column: span 12; }
.col-4  { grid-column: span 12; }
.col-3  { grid-column: span 12; }

@media (min-width: 768px) {
  .col-6 { grid-column: span 6; }
  .col-8 { grid-column: span 8; }
  .col-4 { grid-column: span 4; }
  .col-12 { grid-column: span 12; }
}
@media (min-width: 1024px) {
  .col-10 { grid-column: span 10; }
  .col-7  { grid-column: span 7; }
  .col-5  { grid-column: span 5; }
  .col-3  { grid-column: span 3; }
}

/* Offsets */
.col-start-2 { grid-column-start: auto; }
@media (min-width: 1024px) {
  .col-start-2 { grid-column-start: 2; }
}

/* Vertical flow helpers */
.flow > * + * { margin-top: var(--space-4); }
.flow-lg > * + * { margin-top: var(--space-5); }
.flow-xl > * + * { margin-top: var(--space-6); }

.on-surface { background: var(--color-surface); }
.on-surface-2 { background: var(--color-surface-2); }

/* -------------------- 5. COMPONENTS -------------------- */

/* 5.1 Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--color-accent); color: #FFF; }
.btn--primary:hover { background: var(--color-accent-deep); color: #FFF; }

.btn--secondary { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--secondary:hover { background: var(--color-ink); color: #FFF; }

.btn--light { background: transparent; color: #FFF; border-color: #FFF; }
.btn--light:hover { background: #FFF; color: var(--color-ink); }

.btn--ghost { background: transparent; color: var(--color-accent); padding: 10px 0; border-radius: 0; }
.btn--ghost:hover { color: var(--color-accent-deep); }

.btn--danger { background: var(--color-signal); color: #FFF; }
.btn--danger:hover { background: #A81820; color: #FFF; }

.btn svg { width: 18px; height: 18px; }

/* 5.2 Link with chevron */
.link-chev {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  letter-spacing: var(--ls-wide);
  font-size: var(--fs-body);
}
.link-chev:hover { color: var(--color-accent-deep); text-decoration: none; }
.link-chev__ico {
  width: 16px; height: 16px;
  transition: transform var(--dur-base) var(--ease-standard);
}
.link-chev:hover .link-chev__ico { transform: translateX(4px); }

/* 5.3 Header (top nav) */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  /* Single, crisp hairline — no heavy shadow. Same as Soraluce/DMG Mori. */
}
.header[data-scrolled="true"] {
  box-shadow: 0 2px 16px rgba(2, 6, 38, 0.08);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: 12px;
}
.header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-ink);
  text-decoration: none;
}
/* Logo at 62px: GIMA text is large and legible, tagline is readable, header stays compact */
.header__logo svg, .header__logo img { height: 62px; width: auto; }

.header__nav { display: none; }
@media (min-width: 1024px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-7);
  }
}
.header__nav a {
  position: relative;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-ink);
  text-decoration: none;
  padding-block: var(--space-2);
  transition: color var(--dur-fast) var(--ease-standard);
}
.header__nav a:hover { color: var(--color-accent); }
.header__nav a[aria-current="page"] { color: var(--color-accent); }
.header__nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -14px;
  height: 2px;
  background: var(--color-accent);
}

.header__right {
  display: none;
  align-items: center;
  gap: var(--space-5);
}
@media (min-width: 1024px) { .header__right { display: flex; } }
/* Header CTA button: tighter padding to sit cleanly inside the compact header */
.header__right .btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header__tel {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: var(--ls-normal);
}
.header__tel:hover { color: var(--color-accent); text-decoration: underline; }

/* Hamburger (mobile) */
.header__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--color-ink);
}
@media (min-width: 1024px) { .header__burger { display: none; } }
.header__burger svg { width: 24px; height: 24px; }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(2, 6, 38, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.drawer[data-open="true"] { opacity: 1; pointer-events: auto; }
.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--color-bg);
  padding: var(--space-6) var(--space-5);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-emphasis);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.drawer[data-open="true"] .drawer__panel { transform: translateX(0); }
.drawer__close {
  align-self: flex-end;
  width: 44px; height: 44px;
  color: var(--color-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer__nav { display: flex; flex-direction: column; gap: var(--space-3); }
.drawer__nav a {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  text-decoration: none;
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.drawer__nav a:hover { color: var(--color-accent); }
.drawer__contact {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

/* 5.4 Footer */
.footer {
  background: var(--color-ink);
  color: #FFF;
  padding-block: var(--space-9) var(--space-6);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--space-8); }
}
.footer__col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-slate-30);
  margin-bottom: var(--space-4);
}
.footer__col a {
  display: block;
  padding-block: var(--space-1);
  color: #FFF;
  text-decoration: none;
  font-size: var(--fs-body);
  transition: color var(--dur-fast) var(--ease-standard);
}
.footer__col a:hover { color: var(--color-accent-tint); }
.footer__contact { font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-relaxed); color: var(--color-slate-30); }
.footer__contact a { color: #FFF; display: inline; padding: 0; }
.footer__contact strong { color: #FFF; display: block; font-weight: var(--fw-semibold); margin-bottom: var(--space-2); }
.footer__social { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.footer__social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  color: #FFF;
  padding: 0;
}
.footer__social a:hover { background: rgba(255,255,255,0.08); color: var(--color-accent-tint); }
.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--fs-small);
  color: var(--color-slate-30);
}
.footer__bottom a { color: var(--color-slate-30); text-decoration: none; }
.footer__bottom a:hover { color: #FFF; }
.footer__legal { display: flex; gap: var(--space-5); flex-wrap: wrap; }

/* 5.5 Hero — variant A (homepage) */
.hero-a {
  position: relative;
  padding-block: var(--space-11) var(--space-9);
  overflow: hidden;
}
.hero-a__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-a__grid { grid-template-columns: 5fr 7fr; gap: var(--space-8); }
}
.hero-a__copy { max-width: 44rem; }
.hero-a__sub {
  margin-top: var(--space-5);
  font-size: var(--fs-body-lg);
  color: var(--color-text-muted);
  max-width: 42rem;
}
.hero-a__ctas {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-a__img {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.hero-a__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 18s linear;
}
.hero-a[data-animate="true"] .hero-a__img img { transform: scale(1.08); }

/* Hero grid-line decoration (optional technical overlay) */
.hero-a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(2,6,38,0.04) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-a > * { position: relative; z-index: 1; }

/* 5.6 Hero — variant B (service/machine detail) */
.hero-b { padding-block: var(--space-9) 0; }
.hero-b__head { max-width: 60rem; margin-bottom: var(--space-8); }
.hero-b__img {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.hero-b__img img { width: 100%; height: 100%; object-fit: cover; }

/* 5.6.1 Hero-B overlay variant — cinematic full-bleed hero, works with existing HTML */
/*
 * Usage: add class="hero-b hero-b--overlay" data-animate="true" to the <section>.
 * The existing .hero-b__img div becomes the absolute background; no HTML restructuring needed.
 */
.hero-b--overlay {
  position: relative;
  overflow: hidden;
  background: var(--color-ink);
  padding-block: 0;
}
/* Container becomes flex column; content pushed to bottom half */
.hero-b--overlay > .container {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-10);
  position: relative;
  z-index: 2;
}
@media (max-width: 767px) {
  .hero-b--overlay > .container { min-height: 78vh; padding-bottom: var(--space-8); }
}
/* Pull the text head down to the lower third via flex spacer */
.hero-b--overlay .hero-b__head {
  margin-top: auto;
  margin-bottom: 0;
  max-width: 68rem;
}

/* hero-b__img breaks out of the container and becomes a true full-bleed background.
 * BUG NOTE: inset: 0 would position relative to .container (which has position:relative),
 * NOT the section. Instead we use the 100vw + translateX(-50%) trick to guarantee
 * full viewport width regardless of container max-width or padding. */
.hero-b--overlay .hero-b__img {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  right: auto !important;
  width: 100vw !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
  overflow: hidden;
  transform: translateX(-50%) !important;
  z-index: 0;
}
/* Gradient overlay — readable at bottom, photo reveals clearly in upper two-thirds */
.hero-b--overlay .hero-b__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 6, 38, 0.94) 0%,
    rgba(2, 6, 38, 0.72) 25%,
    rgba(2, 6, 38, 0.28) 55%,
    rgba(2, 6, 38, 0.04) 100%
  );
  z-index: 1;
}
/* NO grid-line overlay — removed as it looked like visual artifacts */
/* Slow cinematic zoom on the background image */
.hero-b--overlay .hero-b__img img {
  opacity: 0.88 !important;
  transition: transform 22s linear !important;
  will-change: transform;
}
.hero-b--overlay[data-animate="true"] .hero-b__img img { transform: scale(1.09) !important; }

/* FIX: hero-b__img has reveal class in HTML, which starts it at opacity:0.
 * Override so the background image is always immediately visible and keeps its centering transform. */
.hero-b--overlay .hero-b__img.reveal,
.hero-b--overlay .hero-b__img.reveal[data-revealed="true"] {
  opacity: 1 !important;
  transform: translateX(-50%) !important;
  transition: none !important;
}

/* FIX: text elements (crumb, hero-b__head) are static in the flow.
 * Static elements paint BEFORE z-index:0 positioned siblings, so the image was covering the text.
 * Making text elements positioned with a higher z-index fixes the stacking order. */
.hero-b--overlay .crumb,
.hero-b--overlay .hero-b__head {
  position: relative;
  z-index: 3;
}

/* Teal accent edge — left border of the section */
.hero-b--overlay::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--color-accent);
  z-index: 5;
}

/* Crumb on dark surface */
.hero-b--overlay .crumb { padding-top: var(--space-6); padding-bottom: 0; }
.hero-b--overlay .crumb a { color: rgba(255,255,255,0.52); text-decoration: none; }
.hero-b--overlay .crumb a:hover { color: var(--color-accent-tint); }
.hero-b--overlay .crumb li + li::before { color: rgba(255,255,255,0.22); }
.hero-b--overlay .crumb [aria-current="page"] { color: rgba(255,255,255,0.88); }

/* Typography on dark hero */
.hero-b--overlay .eyebrow {
  color: var(--color-accent-tint);
  margin-bottom: var(--space-4);
  letter-spacing: 0.18em;
}
.hero-b--overlay .hero-title {
  color: #FFF;
  font-size: clamp(52px, 8vw + 0.5rem, 96px);
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-shadow: 0 4px 48px rgba(2,6,38,0.60);
}
.hero-b--overlay .lead {
  color: rgba(255,255,255,0.82);
  max-width: 48rem;
  margin-top: var(--space-5);
  font-size: clamp(var(--fs-body), 1.5vw + 0.25rem, var(--fs-body-lg));
  line-height: 1.65;
}

/* Animated scroll hint */
.hero-b__scroll {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  color: rgba(255,255,255,0.45);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  text-decoration: none;
}
.hero-b__scroll svg {
  width: 18px; height: 18px;
  color: var(--color-accent-tint);
  animation: hero-bounce 2.2s ease-in-out infinite;
}
@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  55% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-b__scroll svg { animation: none; }
  .hero-b--overlay .hero-b__img img { opacity: 0.88 !important; transform: none !important; }
}

/* 5.7 Hero — variant C (utility/listing) */
.hero-c {
  padding-block: var(--space-9);
  border-bottom: 1px solid var(--color-border);
}
.hero-c__head { max-width: 56rem; }
.hero-c__sub {
  margin-top: var(--space-4);
  font-size: var(--fs-body-lg);
  color: var(--color-text-muted);
  max-width: 48rem;
}

/* 5.8 Stat block */
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(var(--fs-h1-m), 5vw, var(--fs-hero));
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  color: var(--color-ink);
}
.stat__unit {
  font-family: var(--font-mono);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--color-accent);
  margin-left: var(--space-2);
}
.stat__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: var(--lh-normal);
  max-width: 26rem;
}
.stat-trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-7);
}
@media (min-width: 768px) {
  .stat-trio { grid-template-columns: repeat(3, 1fr); gap: var(--space-7); }
}
.stat-trio .stat { padding-inline: var(--space-2); }
.stat-trio .stat + .stat { border-top: 1px solid var(--color-border); padding-top: var(--space-6); }
@media (min-width: 768px) {
  .stat-trio .stat + .stat { border-top: 0; border-left: 1px solid var(--color-border); padding: 0 0 0 var(--space-7); }
}

/* 5.9 Capability tile */
.tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-bg);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
.tile:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}
.tile__icon { color: var(--color-accent); }
.tile__icon svg { width: 36px; height: 36px; stroke-width: 1.5; }
.tile__title { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--color-ink); line-height: var(--lh-snug); }
.tile__body { font-size: var(--fs-body); color: var(--color-text); line-height: var(--lh-relaxed); }
.tile__cta {
  margin-top: auto;
  padding-top: var(--space-3);
  color: var(--color-accent);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.tile:hover .tile__cta svg { transform: translateX(4px); }
.tile__cta svg { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-standard); }

/* Grids that contain tiles */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tile-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); } }
.tile-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .tile-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* 5.10 Machine card */
.machine-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--dur-base), transform var(--dur-base), border-color var(--dur-base);
}
.machine-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--color-accent); color: var(--color-text); }
.machine-card__img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: var(--color-surface);
}
.machine-card__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.machine-card__title { font-family: var(--font-body); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--color-ink); }
.machine-card__tag { font-size: var(--fs-small); color: var(--color-text-muted); font-family: var(--font-mono); letter-spacing: var(--ls-wide); }

/* 5.11 Realisation tile */
.reali-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
}
.reali-tile__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-emphasis);
}
.reali-tile:hover .reali-tile__img { transform: scale(1.04); }
.reali-tile__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(2,6,38,0.92) 0%, rgba(2,6,38,0.45) 40%, rgba(2,6,38,0) 70%);
  color: #FFF;
  padding: var(--space-5);
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 1;
  transition: opacity var(--dur-base) var(--ease-standard);
}
@media (min-width: 1024px) {
  .reali-tile__overlay { opacity: 0; background: linear-gradient(to top, rgba(2,6,38,0.92) 0%, rgba(2,6,38,0.2) 60%, rgba(2,6,38,0) 100%); }
  .reali-tile:hover .reali-tile__overlay,
  .reali-tile:focus-visible .reali-tile__overlay { opacity: 1; }
}
.reali-tile__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent-tint);
  margin-bottom: var(--space-2);
}
.reali-tile__title {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: #FFF;
  line-height: var(--lh-snug);
}
.reali-tile__meta {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-slate-30);
  letter-spacing: var(--ls-wide);
}

.reali-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .reali-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reali-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); } }
.reali-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .reali-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reali-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* 5.12 Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.gallery button {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: 0;
  background: var(--color-surface);
  transition: transform var(--dur-base) var(--ease-standard);
}
.gallery button:hover { transform: translateY(-2px); }
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-emphasis);
}
.gallery button:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(2, 6, 38, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox__img { max-width: min(1200px, 90vw); max-height: 85vh; object-fit: contain; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
}
.lightbox__close { top: var(--space-5); right: var(--space-5); }
.lightbox__prev { left: var(--space-5); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-5); top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: var(--color-accent); border-color: var(--color-accent); }
.lightbox svg { width: 20px; height: 20px; }

/* 5.13 Pull-quote */
.pullquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-4) 0 var(--space-4) var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(var(--fs-h3-m), 3vw, var(--fs-h3));
  font-weight: var(--fw-regular);
  font-style: italic;
  line-height: var(--lh-snug);
  color: var(--color-ink);
  max-width: 56rem;
}
.pullquote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  font-style: normal;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* 5.14 Partner logo strip */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: center;
  justify-items: center;
}
@media (min-width: 768px) { .logo-strip { grid-template-columns: repeat(6, 1fr); gap: var(--space-7); } }
.logo-strip img {
  max-height: 40px;
  max-width: 100%;
  width: auto;
  filter: grayscale(1) brightness(1.6) contrast(0.8);
  opacity: 0.8;
  transition: filter var(--dur-base) var(--ease-standard), opacity var(--dur-base) var(--ease-standard);
}
.logo-strip img:hover { filter: none; opacity: 1; }
.surface-dark .logo-strip img { filter: grayscale(1) brightness(3) contrast(0.6); opacity: 0.7; }
.surface-dark .logo-strip img:hover { filter: brightness(1.4); opacity: 1; }

/* 5.15 CTA block */
.cta-block {
  background: var(--color-ink);
  color: #FFF;
  padding-block: var(--space-10);
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  pointer-events: none;
}
.cta-block__inner { position: relative; max-width: 72rem; }
.cta-block .eyebrow { color: var(--color-accent-tint); }
.cta-block h2 { color: #FFF; margin-bottom: var(--space-5); }
.cta-block__sub { font-size: var(--fs-body-lg); color: var(--color-slate-30); max-width: 48rem; margin-bottom: var(--space-6); }

/* 5.16 Breadcrumb */
.crumb {
  padding-block: var(--space-5) 0;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wide);
  color: var(--color-text-muted);
}
.crumb ol { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.crumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
.crumb li + li::before { content: "/"; color: var(--color-slate-30); }
.crumb a { color: var(--color-text-muted); text-decoration: none; }
.crumb a:hover { color: var(--color-accent); }
.crumb [aria-current="page"] { color: var(--color-ink); }

/* 5.17 Form */
.form { display: flex; flex-direction: column; gap: var(--space-5); }
.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .form__row { grid-template-columns: repeat(2, 1fr); } }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.field label .req { color: var(--color-signal); margin-left: 2px; }
.field input, .field select, .field textarea {
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  transition: border-color var(--dur-base) var(--ease-standard);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent) inset;
}
.field--invalid input, .field--invalid select, .field--invalid textarea {
  border-color: var(--color-signal);
}
.field__error {
  font-size: var(--fs-small);
  color: var(--color-signal);
  display: none;
}
.field--invalid .field__error { display: block; }

/* 5.18 Contact card */
.contact-card {
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5) var(--space-6);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact-card__block { display: flex; flex-direction: column; gap: var(--space-2); }
.contact-card__block h5 {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.contact-card__row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--color-text);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
}
.contact-card__row svg { color: var(--color-accent); width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.contact-card__row a { color: var(--color-text); text-decoration: none; }
.contact-card__row a:hover { color: var(--color-accent); }
.contact-card__hours {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-text);
  line-height: var(--lh-relaxed);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-5);
}
.contact-card__hours dt { color: var(--color-text-muted); }
.contact-card__hours dd { color: var(--color-ink); }

/* Sticky contact card on wide screens */
@media (min-width: 1024px) {
  .contact-card--sticky { position: sticky; top: calc(var(--space-8) + 80px); }
}

/* 5.19 Floating WhatsApp */
.wa-float {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-sticky);
  width: 56px; height: 56px;
  border-radius: 999px;
  background: #25D366;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #FFF;
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-base) var(--ease-standard);
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.06); color: #FFF; }
.wa-float svg { width: 28px; height: 28px; }

/* 5.20 Section divider */
.divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  position: relative;
  margin-block: var(--space-7);
}
.divider::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 32px; height: 2px;
  background: var(--color-accent);
}

/* 5.21 Spec table */
.spec {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.spec__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
@media (min-width: 640px) {
  .spec__row { grid-template-columns: 180px 1fr; gap: var(--space-5); align-items: baseline; }
}
.spec__label {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.spec__value {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}
.spec__unit {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  color: var(--color-text-muted);
  margin-left: var(--space-1);
}

/* Spec card wrapper */
.spec-card {
  padding: var(--space-6);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.spec-card h3 {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

/* 5.22 Meta row (realisation detail) */
.meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-block: 1px solid var(--color-border);
}
@media (min-width: 640px) { .meta-row { grid-template-columns: repeat(3, 1fr); } }
.meta-row__item { display: flex; flex-direction: column; gap: var(--space-2); }
.meta-row__label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.meta-row__value {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

/* 5.23 Generic prose (article body) */
.prose { max-width: 42rem; font-size: var(--fs-body-lg); color: var(--color-text); line-height: var(--lh-relaxed); }
.prose > * + * { margin-top: var(--space-5); }
.prose h2 { margin-top: var(--space-8); font-size: var(--fs-h3); font-family: var(--font-body); font-weight: var(--fw-semibold); color: var(--color-ink); letter-spacing: var(--ls-normal); }
.prose h3 { margin-top: var(--space-6); font-size: var(--fs-h4); }
.prose ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.prose ul li { padding-left: var(--space-5); position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 10px; height: 2px;
  background: var(--color-accent);
}
.prose strong { font-weight: var(--fw-semibold); color: var(--color-ink); }
.prose a { color: var(--color-link); }

/* Intro lead */
.lead {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  max-width: 48rem;
}

/* -------------------- 6. TEMPLATE BITS -------------------- */

/* Mini logo row (inline partners) */
.mini-logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-7);
  align-items: center;
}
.mini-logos img {
  max-height: 32px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--dur-base), opacity var(--dur-base);
}
.mini-logos img:hover { filter: none; opacity: 1; }

/* Number-led component list (used on MICBOX components section) */
.numbered-list { counter-reset: n; display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 768px) { .numbered-list { grid-template-columns: repeat(2, 1fr); } }
.numbered-list > li { counter-increment: n; padding-left: var(--space-8); position: relative; padding-block: var(--space-3); border-top: 1px solid var(--color-border); }
.numbered-list > li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0; top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: var(--color-accent);
  letter-spacing: var(--ls-normal);
}
.numbered-list li h4 { font-family: var(--font-body); font-size: var(--fs-body-lg); font-weight: var(--fw-semibold); color: var(--color-ink); margin-bottom: var(--space-2); }
.numbered-list li p { font-size: var(--fs-body); color: var(--color-text); max-width: none; }

/* Video embed */
.video-embed {
  aspect-ratio: 16 / 9;
  background: var(--color-ink);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  color: #FFF;
}
.video-embed img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; position: absolute; inset: 0; }
.video-embed__play {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 999px;
  background: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: #FFF;
  transition: transform var(--dur-base) var(--ease-standard);
}
.video-embed:hover .video-embed__play { transform: scale(1.08); }
.video-embed__play svg { width: 28px; height: 28px; margin-left: 4px; }

/* Department card (contact page) */
.dept-card {
  padding: var(--space-5);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.dept-card__name {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}
.dept-card__row { font-size: var(--fs-body); color: var(--color-text); }
.dept-card__row a { color: var(--color-text); text-decoration: none; }
.dept-card__row a:hover { color: var(--color-accent); }
.dept-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-wide);
  margin-right: var(--space-2);
}

/* Form + card layout for contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 7fr 5fr; gap: var(--space-8); } }

/* Map container */
.map-embed {
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  position: relative;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* Utility: section heading block (eyebrow + h2 + optional lead) */
.section-head { max-width: 56rem; margin-bottom: var(--space-7); }
.section-head .lead { margin-top: var(--space-3); }

/* Two-column article layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}
@media (min-width: 1024px) { .article-layout { grid-template-columns: 8fr 4fr; gap: var(--space-8); } }
@media (min-width: 1024px) { .article-layout--7-5 { grid-template-columns: 7fr 5fr; } }

/* Tiny "tag pill" for categories */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  line-height: 1;
}

/* -------------------- 7. MOTION -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-emphasis),
              transform var(--dur-slow) var(--ease-emphasis);
}
.reveal[data-revealed="true"] { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }
.reveal[data-delay="6"] { transition-delay: 360ms; }

/* Respect user motion prefs */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-a__img img { transform: none !important; }
}

/* -------------------- 8. UTILITIES -------------------- */
.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;
}
.skip-link {
  position: absolute;
  left: var(--space-3); top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--color-ink);
  color: #FFF;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease-standard);
  z-index: var(--z-tooltip);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); color: #FFF; }

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.bg-surface { background: var(--color-surface); }

.nowrap { white-space: nowrap; }


/* ============================================================================
   WORDPRESS MOBILE OPTIMIZATIONS — appended by WP theme build
   Targets: 320px phones, 375px phones, 768px tablets
   ============================================================================ */

/* ── Global overflow guard (prevents horizontal scroll on mobile) ── */
html, body { overflow-x: hidden; }

/* ── Container padding on small screens ── */
@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
}

/* ── Header: compact on phones ── */
@media (max-width: 768px) {
  .header__inner { padding-block: 10px; }
  .header__logo img,
  .header__logo svg { height: 48px; }
  .header__nav,
  .header__right { display: none; }
  .header__burger { display: flex; }
}

/* ── Hero B (service pages): title scales down more on phones ── */
@media (max-width: 480px) {
  .hero-b--overlay .hero-title {
    font-size: clamp(32px, 9vw, 52px);
    line-height: 1.05;
  }
  .hero-b--overlay .lead {
    font-size: var(--fs-body);
  }
  .hero-b { min-height: 70vh; }
}

/* ── Homepage hero on phones ── */
@media (max-width: 480px) {
  .hp-hero__h1 {
    font-size: clamp(40px, 11vw, 56px);
    line-height: 1;
  }
  .hp-hero__sub {
    font-size: var(--fs-body);
  }
  .hp-hero__btns {
    flex-direction: column;
  }
  .hp-hero__btns .btn,
  .hp-hero__btns .btn-hero-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ── Service strip on phone: 4-col → 2-col ── */
@media (max-width: 480px) {
  .hp-strip__grid { grid-template-columns: repeat(4, 1fr); }
  .hp-tile { padding: 1rem .5rem; }
  .hp-tile__label { font-size: .62rem; }
}
@media (max-width: 360px) {
  .hp-strip__grid { grid-template-columns: repeat(4, 1fr); overflow-x: auto; }
}

/* ── Stats bar: 4-col → 2-col on phones ── */
@media (max-width: 640px) {
  .hp-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .hp-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,.25); }
  .hp-stat:nth-child(2n) { border-left: 1px solid rgba(255,255,255,.25); }
  .hp-stat:nth-last-child(-n+2) { border-bottom: none; }
}

/* ── Tile grids: 3-col → 2-col → 1-col ── */
@media (max-width: 768px) {
  .tile-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .tile-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .tile-grid--3,
  .tile-grid--4 { grid-template-columns: 1fr; }
}

/* ── Article layout (service pages): sidebar stacks below on tablet ── */
@media (max-width: 1023px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-layout--7-5 { grid-template-columns: 1fr; }
}

/* ── Pull-quote: smaller on phones ── */
@media (max-width: 480px) {
  .pull-quote { font-size: var(--fs-h4); padding-inline: var(--space-4); }
}

/* ── Gallery grid: 3-col → 2-col → 1-col ── */
@media (max-width: 768px) {
  [data-gallery] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  [data-gallery] { grid-template-columns: 1fr; }
}

/* ── Contact layout: stack on tablet ── */
@media (max-width: 1023px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ── Footer grid: 4-col → 2-col → 1-col ── */
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
  .footer__legal { justify-content: center; }
}

/* ── Breadcrumb: wrap on phones ── */
@media (max-width: 480px) {
  .crumb ol { flex-wrap: wrap; gap: 4px; }
  .crumb li { font-size: var(--fs-micro); }
}

/* ── Buttons: full-width on phones where needed ── */
@media (max-width: 480px) {
  .section-cta { flex-direction: column; }
  .section-cta .btn { width: 100%; justify-content: center; }
}

/* ── Realisaties grid ── */
@media (max-width: 768px) {
  .real-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .real-grid { grid-template-columns: 1fr; }
}

/* ── Spec table horizontal scroll on phone ── */
@media (max-width: 640px) {
  .spec-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Drawer panel full width on small phones ── */
@media (max-width: 360px) {
  .drawer__panel { width: 100%; }
}

/* ── Touch target minimum (WCAG 2.5.5) ── */
@media (max-width: 768px) {
  .btn, a.btn, button { min-height: 44px; }
  .drawer__nav a { min-height: 44px; display: flex; align-items: center; }
}

/* ── Tablet-specific adjustments (768px–1024px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .header__nav { display: none; }
  .header__right { display: none; }
  .header__burger { display: flex; }
  .hp-svc-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hp-real-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-group-grid { grid-template-columns: repeat(2, 1fr); }
}
