@charset "UTF-8";
/* ==========================================================================
   MAGWHIRL — Design System
   ==========================================================================

   Visual language: "Thermal Line".

   Two ideas drive every decision in this file:

     1. ENGINEERING DRAWING — hairline rules, a visible measured grid, generous
        whitespace, and monospaced technical labels. The page should feel set
        out rather than decorated.

     2. THERMAL GRADIENT — a single ember accent emerging from deep navy,
        echoing the heat that runs through the company's actual work. The
        accent is scarce on purpose: when everything is highlighted, nothing is.

   Deliberately dependency-free and unbuilt. Everything here is served as
   written, so the file is organised as a single cascade in this order:

     01  Tokens              06  Header & navigation
     02  Reset & base        07  Components
     03  Typography          08  Page sections
     04  Layout              09  Forms
     05  Motion primitives   10  Utilities & print

   Escaping note for anyone editing templates: this project has no template
   engine, so every dynamic value is escaped in PHP with e(). See STYLEGUIDE.md.
   ========================================================================== */


/* ==========================================================================
   01. TOKENS
   ========================================================================== */

:root {
  /* ---- Brand ramps ------------------------------------------------------ */
  --navy-950: #060A14;
  --navy-900: #0B1730;
  --navy-800: #101F42;
  --navy-700: #152B54;
  --navy-600: #1C3A6B;
  --navy-500: #24457F;
  --navy-400: #3A62A6;
  --navy-300: #6E93CC;
  --navy-200: #AFC5E4;
  --navy-100: #DDE7F5;

  --ember-700: #B85510;
  --ember-600: #D96A10;
  --ember-500: #F58220;
  --ember-400: #FF9A3C;
  --ember-300: #FFB569;
  --ember-200: #FFD2A5;
  --ember-100: #FFE9D4;

  --teal-500: #1D9B86;
  --rose-500: #C2543C;

  /* ---- Semantic surfaces (light) ---------------------------------------- */
  --surface-0: #FFFFFF;
  --surface-1: #F7F9FC;
  --surface-2: #EFF3F9;
  --surface-3: #E3EAF4;
  --surface-inverse: var(--navy-950);

  --ink-1: #0B1220;
  --ink-2: #35425E;
  --ink-3: #5F6E8C;
  /* #617089 rather than a lighter grey: --ink-4 is used for small text
     (card meta, hints, breadcrumbs), so it must clear 4.5:1 against the
     lightest surface it ever sits on, not just against pure white. */
  --ink-4: #617089;
  --ink-inverse: #F4F7FC;

  --line-1: rgba(11, 18, 32, 0.09);
  --line-2: rgba(11, 18, 32, 0.15);
  --line-3: rgba(11, 18, 32, 0.26);

  /* Two accents, because one cannot serve both jobs on a light background.
     --accent is the default and is dark enough for TEXT (5.3:1 on white).
     --accent-bright is the true brand ember from the logo, used only as a
     FILL, always paired with --accent-ink, which gives 7.2:1 on it.
     Using bright ember behind white text would have been 2.6:1 — a clear
     AA failure on the single most important control on the site. */
  --accent: #AD5109;
  --accent-hover: #8F4207;
  --accent-bright: var(--ember-500);
  --accent-bright-hover: var(--ember-600);
  --accent-soft: var(--ember-100);
  --accent-ink: #0B1220;

  --focus-ring: var(--navy-500);

  --success: #157F5F;
  --warning: #9A6212;
  --danger: #B3341F;
  --info: var(--navy-500);

  /* ---- Elevation --------------------------------------------------------
     Two-layer shadows: a tight contact shadow plus a wide ambient one. A
     single blurred shadow reads as a smudge; this reads as a lift.          */
  --shadow-xs: 0 1px 2px rgba(11, 18, 32, 0.05);
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 2px 8px rgba(11, 18, 32, 0.05);
  --shadow-md: 0 2px 4px rgba(11, 18, 32, 0.06), 0 8px 24px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 4px 8px rgba(11, 18, 32, 0.07), 0 18px 48px rgba(11, 18, 32, 0.11);
  --shadow-accent: 0 6px 20px rgba(217, 106, 16, 0.28);

  /* ---- Radii ------------------------------------------------------------ */
  --radius-xs: 4px;
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ---- Type ------------------------------------------------------------- */
  --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid scale. Min values are the 320px reading size, max the 1440px one. */
  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: clamp(0.9375rem, 0.92rem + 0.09vw, 1rem);
  --text-md: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.28vw, 1.1875rem);
  --text-xl: clamp(1.1875rem, 1.1rem + 0.38vw, 1.375rem);

  --display-1: clamp(2.4rem, 1.45rem + 4.2vw, 4.75rem);
  --display-2: clamp(1.95rem, 1.42rem + 2.35vw, 3.35rem);
  --display-3: clamp(1.55rem, 1.28rem + 1.2vw, 2.3rem);
  --display-4: clamp(1.22rem, 1.12rem + 0.45vw, 1.55rem);

  --leading-tight: 1.08;
  --leading-snug: 1.24;
  --leading-normal: 1.55;
  --leading-relaxed: 1.72;

  --tracking-tight: -0.022em;
  --tracking-snug: -0.012em;
  --tracking-wide: 0.06em;
  --tracking-label: 0.16em;

  /* ---- Spacing (4px base) ----------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Section rhythm scales with the viewport so the page breathes on desktop
     without wasting a phone screen. */
  --section-y: clamp(3.5rem, 2.2rem + 6vw, 7.5rem);
  --section-y-sm: clamp(2.5rem, 1.8rem + 3.4vw, 4.5rem);

  /* ---- Layout ----------------------------------------------------------- */
  --container: 1240px;
  --container-wide: 1440px;
  --container-prose: 44rem;
  --gutter: clamp(1.15rem, 0.7rem + 2.1vw, 2.5rem);
  --header-h: 76px;

  /* ---- Motion ----------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 420ms;
  --dur-slower: 720ms;

  --z-base: 1;
  --z-sticky: 100;
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  color-scheme: light;
}

/* ---- Dark mode ---------------------------------------------------------
   Not an inversion. Surfaces move to a warm-shifted navy rather than grey,
   the accent lightens so it keeps its contrast against dark, and shadows are
   replaced by borders because a shadow is invisible on a dark ground.       */

:root[data-theme="dark"] {
  --surface-0: #0A0F1A;
  --surface-1: #0E1524;
  --surface-2: #141D30;
  --surface-3: #1D2941;
  --surface-inverse: #05080F;

  --ink-1: #F1F5FB;
  --ink-2: #C3CFE3;
  --ink-3: #94A3BE;
  --ink-4: #6D7D9B;
  --ink-inverse: #0B1220;

  --line-1: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.15);
  --line-3: rgba(255, 255, 255, 0.26);

  --accent: var(--ember-400);
  --accent-hover: var(--ember-300);
  --accent-bright: var(--ember-400);
  --accent-bright-hover: var(--ember-300);
  --accent-soft: rgba(245, 130, 32, 0.15);
  --accent-ink: #121A2B;

  --focus-ring: var(--navy-300);

  --success: #3FBF98;
  --warning: #E0A63C;
  --danger: #F0705A;
  --info: var(--navy-300);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 6px 24px rgba(255, 154, 60, 0.22);

  color-scheme: dark;
}

/* Follow the OS when the visitor has expressed no preference of their own. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-0: #0A0F1A;
    --surface-1: #0E1524;
    --surface-2: #141D30;
    --surface-3: #1D2941;
    --surface-inverse: #05080F;

    --ink-1: #F1F5FB;
    --ink-2: #C3CFE3;
    --ink-3: #94A3BE;
    --ink-4: #6D7D9B;
    --ink-inverse: #0B1220;

    --line-1: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.15);
    --line-3: rgba(255, 255, 255, 0.26);

    --accent: var(--ember-400);
    --accent-hover: var(--ember-300);
    --accent-bright: var(--ember-400);
    --accent-bright-hover: var(--ember-300);
    --accent-soft: rgba(245, 130, 32, 0.15);
    --accent-ink: #121A2B;

    --focus-ring: var(--navy-300);

    --success: #3FBF98;
    --warning: #E0A63C;
    --danger: #F0705A;
    --info: var(--navy-300);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 6px 14px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 6px 24px rgba(255, 154, 60, 0.22);

    color-scheme: dark;
  }
}


/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets must clear the sticky header. */
  scroll-padding-top: calc(var(--header-h) + var(--space-6));
  -moz-tab-size: 2;
  tab-size: 2;
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink-2);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, canvas, picture {
  display: block;
  max-width: 100%;
}

/* Intrinsic sizing. Browsers derive an aspect-ratio from the width/height
   attributes on their own, so no attribute selector is needed to reserve
   space — and one would be actively harmful: `img[width][height]` scores
   higher than a single class, so it would override every explicit height a
   component sets (the header logo, the footer logo, avatars). */
img, video { height: auto; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; }

ul[class], ol[class] { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

:where(p, li, dd) { text-wrap: pretty; }

hr {
  border: 0;
  border-top: 1px solid var(--line-1);
}

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

/* ---- Focus -------------------------------------------------------------
   Visible on keyboard focus only, but never suppressed outright. The double
   ring keeps it legible against both light and dark surfaces.               */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.on-dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible {
  outline-color: var(--ember-300);
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transform: translateY(-110%);
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -4px;
}

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


/* ==========================================================================
   03. TYPOGRAPHY
   ========================================================================== */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
                 U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--ink-1);
  text-wrap: balance;
}

h1 {
  font-size: var(--display-1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 700;
}

h2 { font-size: var(--display-2); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--display-3); }
h4 { font-size: var(--display-4); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

strong, b { font-weight: 600; color: var(--ink-1); }

/* ---- The technical label ------------------------------------------------
   The monospaced eyebrow is the signature detail of this identity: it reads
   as a drawing reference or a part number rather than a marketing kicker.   */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.eyebrow--plain::before { display: none; }
.eyebrow--muted { color: var(--ink-4); }

.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--ink-3);
  max-width: 56ch;
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

/* ---- Long-form content --------------------------------------------------
   Everything rendered from Markdown lands inside .prose.                     */
.prose {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--ink-2);
}

.prose > * + * { margin-top: 1.35em; }

.prose h2 {
  font-size: var(--display-3);
  margin-top: 2.2em;
  margin-bottom: 0.1em;
  scroll-margin-top: calc(var(--header-h) + var(--space-8));
}

.prose h3 {
  font-size: var(--display-4);
  margin-top: 1.9em;
  margin-bottom: 0.1em;
  scroll-margin-top: calc(var(--header-h) + var(--space-8));
}

.prose h4 {
  font-size: var(--text-lg);
  margin-top: 1.6em;
  margin-bottom: 0.1em;
}

.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }

.prose a {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}

.prose a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--accent); }
.prose ul { list-style: none; padding-left: 0; }

.prose ul > li {
  position: relative;
  padding-left: 1.6em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0.3em;
  top: 0.68em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.prose blockquote {
  margin-inline: 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--accent);
  background: var(--surface-1);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink-2);
  font-size: var(--text-base);
}

.prose blockquote > * + * { margin-top: 0.9em; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-xs);
  color: var(--ink-1);
}

.prose .code-block {
  padding: var(--space-5);
  background: var(--navy-950);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.prose .code-block code {
  padding: 0;
  background: none;
  border: 0;
  color: #DCE5F5;
}

.prose img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-1);
}

.prose hr { margin-block: 2.4em; }

.prose .table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.prose th, .prose td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line-1);
}

.prose th {
  background: var(--surface-1);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.prose tbody tr:last-child td { border-bottom: 0; }

.heading-anchor {
  margin-left: 0.4em;
  color: var(--ink-4);
  opacity: 0;
  text-decoration: none;
  font-weight: 400;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.heading-anchor:focus-visible { opacity: 1; }

.prose mark {
  background: var(--accent-soft);
  color: var(--ink-1);
  padding: 0.05em 0.25em;
  border-radius: var(--radius-xs);
}


/* ==========================================================================
   04. LAYOUT
   ========================================================================== */

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

.container--wide { max-width: var(--container-wide); }
.container--prose { max-width: var(--container-prose); }

.section { padding-block: var(--section-y); }
.section--sm { padding-block: var(--section-y-sm); }
.section--tight { padding-block: var(--space-12); }

.section--muted { background: var(--surface-1); }
.section--edge { border-top: 1px solid var(--line-1); }

/* Dark section: sets the inverse palette for everything inside it, so
   components do not each need a dark variant. */
.section--dark,
.on-dark {
  --surface-0: var(--navy-950);
  --surface-1: #0B1526;
  --surface-2: #101D36;
  --surface-3: #16274A;
  --ink-1: #F2F6FC;
  --ink-2: #C0CDE3;
  --ink-3: #93A3C0;
  --ink-4: #6F809F;
  --line-1: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: var(--ember-400);
  --accent-hover: var(--ember-300);
  --accent-bright: var(--ember-400);
  --accent-ink: #10182A;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  background: var(--surface-0);
  color: var(--ink-2);
}

.grid { display: grid; gap: var(--space-6); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.stack { display: grid; gap: var(--space-4); align-content: start; }
.stack--lg { gap: var(--space-8); }
.stack--sm { gap: var(--space-2); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.split {
  display: grid;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: center;
}

@media (min-width: 62rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-start { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-end { grid-template-columns: 0.85fr 1.15fr; }
  .split--sidebar { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
}

/* ---- Section headers --------------------------------------------------- */
.section-head {
  display: grid;
  gap: var(--space-4);
  max-width: 46rem;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head--split {
  max-width: none;
  align-items: end;
}

@media (min-width: 54rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-8);
  }
  .section-head--split .section-head__text { max-width: 46rem; }
}

.section-head p { color: var(--ink-3); max-width: 54ch; }

/* ---- Blueprint grid overlay --------------------------------------------
   The measured-drawing motif. Pure CSS gradients — no image request.        */
.blueprint {
  position: relative;
  isolation: isolate;
}

.blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--line-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-1) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}

/* The thermal wash: navy ground with an ember bloom rising from one corner. */
.thermal-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 90% at 8% 100%, rgba(245, 130, 32, 0.22) 0%, transparent 62%),
    radial-gradient(90% 100% at 92% 4%, rgba(36, 69, 127, 0.42) 0%, transparent 66%),
    linear-gradient(168deg, var(--navy-900) 0%, var(--navy-950) 58%, #05080F 100%);
}


/* ==========================================================================
   05. MOTION PRIMITIVES
   ==========================================================================
   Scroll reveal is opt-in per element via [data-reveal]. JS adds .is-visible
   when the element enters the viewport. If JS never runs, a no-js fallback in
   the <head> makes everything visible immediately — content must never be
   hidden behind an animation that might not fire.
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal="left"]  { transform: translate3d(-22px, 0, 0); }
[data-reveal="right"] { transform: translate3d(22px, 0, 0); }
[data-reveal="scale"] { transform: scale(0.965); }
[data-reveal="none"]  { transform: none; }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Staggered children — set once on the parent instead of per item. */
[data-reveal-group] > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal-group].is-visible > *:nth-child(n+7) { transition-delay: 420ms; }

@keyframes mgw-fade-up {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes mgw-sheen {
  from { transform: translateX(-120%) skewX(-18deg); }
  to   { transform: translateX(320%) skewX(-18deg); }
}

@keyframes mgw-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(245, 130, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 130, 32, 0); }
}

@keyframes mgw-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -12px, 0); }
}

@keyframes mgw-spin {
  to { transform: rotate(360deg); }
}

/* ---- Reduced motion -----------------------------------------------------
   Honour the preference completely: transitions collapse to near-zero and
   revealed content is shown outright. Nothing is left mid-animation.        */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__media img { transform: none !important; }
}


/* ==========================================================================
   06. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--surface-0) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

/* Over a dark hero the header starts transparent and inverts its palette,
   then resolves to the normal surface once the page scrolls. */
.site-header[data-over-hero="true"]:not(.is-scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  --ink-1: #F2F6FC;
  --ink-2: #CBD6E9;
  --ink-3: #A3B2CC;
  --line-1: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.22);
  color: #E6ECF7;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-1);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  /* Positioning context for the mega panels. They are centred on this row —
     the container — rather than on their trigger, because a 58rem panel
     centred on the first nav item would hang off the left of the viewport. */
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.brand:hover { opacity: 0.82; }

.brand__logo {
  height: 34px;
  width: auto;
}

/* Two logo files, one shown at a time — light artwork over dark surfaces. */
.brand__logo--light { display: none; }

:root[data-theme="dark"] .brand__logo--dark,
.site-header[data-over-hero="true"]:not(.is-scrolled) .brand__logo--dark { display: none; }

:root[data-theme="dark"] .brand__logo--light,
.site-header[data-over-hero="true"]:not(.is-scrolled) .brand__logo--light { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo--dark { display: none; }
  :root:not([data-theme="light"]) .brand__logo--light { display: block; }
}

.site-nav { display: none; }

@media (min-width: 68rem) {
  .site-nav {
    display: flex;
    align-items: stretch;   /* full header height, see .nav-item below */
    gap: var(--space-1);
    margin-inline: auto;
  }
}

/* Items fill the header's height so the pointer never crosses dead space on
   its way from the link down to the panel — that is what makes the menu stay
   open while you move toward it. */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

/* Mega items opt out of being a containing block, so their panel positions
   against .site-header__inner instead. Simple dropdowns keep anchoring to
   their own trigger. */
.nav-item--mega { position: static; }

.nav-link {
  position: relative;       /* anchors the aria-current underline */
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.nav-link:hover { color: var(--ink-1); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--ink-1); font-weight: 600; }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.nav-link__chevron {
  width: 0.7em;
  height: 0.7em;
  transition: transform var(--dur-fast) var(--ease-out);
}

.nav-item:hover .nav-link__chevron,
.nav-item:focus-within .nav-link__chevron { transform: rotate(180deg); }

/* ---- Mega menu ---------------------------------------------------------
   CSS-driven on hover and focus-within so it works before JS loads; JS only
   adds Escape-to-close and outside-click handling.                          */
.mega {
  position: absolute;
  top: calc(100% + 0.55rem);
  /* Centred on the header container, and never wider than the viewport. */
  left: 50%;
  translate: -50% 0;
  width: min(58rem, calc(100vw - (var(--gutter) * 2)));
  /* On a short viewport the panel scrolls rather than running off the bottom. */
  max-height: calc(100svh - var(--header-h) - var(--space-8));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-6);
  background: var(--surface-0);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    visibility var(--dur-base);
}

.nav-item:hover > .mega,
.nav-item:focus-within > .mega,
.mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* An invisible bridge across the gap between the header and the panel, so the
   pointer can travel down without the menu closing under it. */
.mega::before {
  content: "";
  position: absolute;
  inset: -0.6rem 0 auto 0;
  height: 0.6rem;
}

.mega__grid {
  display: grid;
  gap: var(--space-2);
  /* min() stops a track exceeding the panel when it is viewport-constrained. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.mega__link {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
}

.mega__link:hover { background: var(--surface-1); }

.mega__link strong {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-1);
}

.mega__link:hover strong { color: var(--accent); }

.mega__link span {
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: 1.5;
}

.mega__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-1);
}

/* ---- Dropdown (simple list) -------------------------------------------- */
.dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  /* Centred on its own trigger, so an item near either end of the nav cannot
     push the panel off-screen. */
  left: 50%;
  translate: -50% 0;
  min-width: 15rem;
  max-width: min(22rem, calc(100vw - (var(--gutter) * 2)));
  padding: var(--space-2);
  background: var(--surface-0);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    visibility var(--dur-base);
}

.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* `translate` handles the horizontal centring and `transform` the entrance
   slide, so the two never fight each other. */

.dropdown::before {
  content: "";
  position: absolute;
  inset: -0.6rem 0 auto 0;
  height: 0.6rem;
}

.dropdown a {
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  transition: background var(--dur-fast) var(--ease-out);
}

.dropdown a:hover { background: var(--surface-1); }
.dropdown a strong { font-weight: 600; color: var(--ink-1); }
.dropdown a span { font-size: var(--text-xs); color: var(--ink-3); }

/* ---- Header actions ---------------------------------------------------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.icon-btn:hover { background: var(--surface-2); color: var(--ink-1); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}

.header-actions .btn { display: none; }

@media (min-width: 68rem) {
  .header-actions .btn { display: inline-flex; }
  /* .nav-toggle is hidden immediately after its own declaration below.
     Hiding it here instead would not work: the base rule appears later in
     the file at equal specificity, so it would simply win. */
}

/* ---- Mobile navigation ------------------------------------------------- */
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--ink-1);
}

/* Must come after the rule above, not before it. Both selectors score (0,1,0),
   so at equal specificity the later declaration wins regardless of the media
   query — putting this earlier left the burger visible on desktop, where the
   drawer it controls is display:none and the button therefore did nothing. */
@media (min-width: 68rem) {
  .nav-toggle { display: none; }
}

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: var(--z-overlay);
  display: grid;
  align-content: start;
  gap: var(--space-1);
  padding: var(--space-6) var(--gutter) var(--space-16);
  background: var(--surface-0);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.25rem);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    visibility var(--dur-base);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (min-width: 68rem) {
  .mobile-nav { display: none; }
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--line-1);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink-1);
}

.mobile-nav__link[aria-current="page"] { color: var(--accent); }

.mobile-nav details > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-nav details > summary::-webkit-details-marker { display: none; }

.mobile-nav details[open] .mobile-nav__link svg { transform: rotate(180deg); }
.mobile-nav__link svg { width: 1rem; height: 1rem; transition: transform var(--dur-base) var(--ease-out); }

.mobile-nav__sub {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2) var(--space-4);
}

.mobile-nav__sub a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  color: var(--ink-3);
}

.mobile-nav__sub a:hover { background: var(--surface-1); color: var(--ink-1); }

body.nav-open { overflow: hidden; }


/* ==========================================================================
   07. COMPONENTS
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--accent-bright);
  --btn-fg: var(--accent-ink);
  --btn-border: transparent;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.45rem;
  min-height: 46px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); transition-duration: 60ms; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }

/* The sheen pass — a single highlight sweeping the button on hover. */
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%) skewX(-18deg);
}

.btn--primary:hover::after { animation: mgw-sheen 780ms var(--ease-out); }

.btn--primary { box-shadow: var(--shadow-accent); }
.btn--primary:hover { --btn-bg: var(--accent-bright-hover); }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink-1);
  --btn-border: var(--line-2);
}

.btn--secondary:hover {
  --btn-bg: var(--surface-2);
  --btn-border: var(--line-3);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-2);
  --btn-border: transparent;
  padding-inline: var(--space-3);
}

.btn--ghost:hover { --btn-fg: var(--accent); --btn-bg: var(--accent-soft); }

.btn--inverse {
  --btn-bg: var(--surface-0);
  --btn-fg: var(--ink-1);
}

.btn--sm { padding: 0.55rem 1rem; min-height: 38px; font-size: var(--text-xs); }
.btn--lg { padding: 0.95rem 1.85rem; min-height: 54px; font-size: var(--text-base); }
.btn--block { width: 100%; }

/* Arrow that advances on hover — used on every "continue" affordance. */
.btn__arrow { transition: transform var(--dur-base) var(--ease-spring); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
}

.link-arrow svg { width: 1em; height: 1em; transition: transform var(--dur-base) var(--ease-spring); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---- Cards -------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-0);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

/* Whole-card link: the anchor covers the card so the entire surface is
   clickable, while the accessible name still comes from the heading. */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card__media {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 3 / 2;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slower) var(--ease-out);
}

.card:hover .card__media img { transform: scale(1.045); }

.card__media--tall { aspect-ratio: 4 / 5; }
.card__media--square { aspect-ratio: 1 / 1; }
.card__media--product { aspect-ratio: 4 / 3; background: var(--surface-1); }

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  flex: 1;
}

.card__title {
  font-size: var(--display-4);
  font-weight: 600;
  color: var(--ink-1);
  transition: color var(--dur-fast) var(--ease-out);
}

.card:hover .card__title { color: var(--accent); }

.card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--ink-3);
  flex: 1;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-4);
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  margin-top: auto;
  border-top: 1px solid var(--line-1);
}

/* Card index number — the drawing-reference motif again. */
.card__index {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  color: var(--ink-4);
}

/* Service card: an accent rule that draws across on hover. */
.card--service .card__body { padding-top: var(--space-5); }

.card--service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--ember-300));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
  z-index: 2;
}

.card--service:hover::before { transform: scaleX(1); }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.card__icon svg { width: 22px; height: 22px; }

.card--flat {
  background: var(--surface-1);
  border-color: transparent;
}

.card--flat:hover { background: var(--surface-2); box-shadow: none; transform: none; }

/* ---- Badges & tags ------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--success { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.badge--warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.badge--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge--outline { background: transparent; border: 1px solid var(--line-2); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  font-size: var(--text-xs);
  color: var(--ink-3);
  transition: all var(--dur-fast) var(--ease-out);
}

a.tag:hover, .tag.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---- Statistics --------------------------------------------------------- */
.stats {
  display: grid;
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 48rem) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats--3 { grid-template-columns: repeat(3, 1fr); }
}

.stat {
  padding: clamp(var(--space-5), 2.5vw, var(--space-8));
  background: var(--surface-0);
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.stat__value {
  display: flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--ink-1);
  /* Tabular figures stop the number jittering while it counts up. */
  font-variant-numeric: tabular-nums;
}

.stat__suffix { color: var(--accent); }

.stat__label {
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: 1.45;
}

/* ---- Accordion ---------------------------------------------------------- */
.accordion { border-top: 1px solid var(--line-1); }

.accordion__item { border-bottom: 1px solid var(--line-1); }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  padding: var(--space-5) 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink-1);
  transition: color var(--dur-fast) var(--ease-out);
}

.accordion__trigger:hover { color: var(--accent); }

.accordion__icon {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base) var(--ease-out);
}

.accordion__icon::before { width: 13px; height: 2px; }
.accordion__icon::after { width: 2px; height: 13px; }

.accordion__trigger[aria-expanded="true"] .accordion__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}

.accordion__panel > div { overflow: hidden; }

.accordion__trigger[aria-expanded="true"] + .accordion__panel { grid-template-rows: 1fr; }

.accordion__content {
  padding-bottom: var(--space-6);
  max-width: 60ch;
}

/* ---- Testimonials ------------------------------------------------------- */
.quote-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  background: var(--surface-0);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  height: 100%;
}

.quote-card__mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.7;
  color: var(--accent);
  opacity: 0.35;
}

.quote-card blockquote {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--ink-2);
  flex: 1;
}

.quote-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-1);
}

.quote-card__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--navy-700);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}

.quote-card__name { font-weight: 600; color: var(--ink-1); font-size: var(--text-sm); }
.quote-card__role { font-size: var(--text-xs); color: var(--ink-4); }

.rating { display: inline-flex; gap: 2px; color: var(--accent); }
.rating svg { width: 14px; height: 14px; }

/* ---- Timeline ----------------------------------------------------------- */
.timeline {
  position: relative;
  display: grid;
  gap: var(--space-10);
  padding-left: var(--space-8);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line-2) 22%, var(--line-1));
}

.timeline__item { position: relative; display: grid; gap: var(--space-2); }

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--space-8) * -1);
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-0);
  border: 2px solid var(--accent);
}

.timeline__step {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.timeline__title { font-size: var(--display-4); }
.timeline__body { color: var(--ink-3); font-size: var(--text-sm); line-height: var(--leading-relaxed); max-width: 52ch; }

/* ---- Logo wall ---------------------------------------------------------- */
.logo-wall {
  display: grid;
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.logo-wall__item {
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-5);
  background: var(--surface-0);
  min-height: 7rem;
}

.logo-wall__item img {
  max-height: 2.6rem;
  width: auto;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

.logo-wall__item:hover img { filter: none; opacity: 1; }

/* ---- Breadcrumbs -------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.breadcrumb li { display: flex; align-items: center; gap: var(--space-2); }

.breadcrumb li:not(:last-child)::after {
  content: "";
  width: 4px; height: 4px;
  border-right: 1px solid currentColor;
  border-top: 1px solid currentColor;
  rotate: 45deg;
  opacity: 0.65;
}

.breadcrumb a { transition: color var(--dur-fast) var(--ease-out); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink-2); }

/* ---- Pagination --------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
}

.pagination__item {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding-inline: var(--space-3);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: all var(--dur-fast) var(--ease-out);
}

.pagination__item:hover { border-color: var(--line-3); background: var(--surface-1); }

.pagination__item[aria-current="page"] {
  background: var(--ink-1);
  border-color: var(--ink-1);
  color: var(--surface-0);
}

.pagination__gap { color: var(--ink-4); padding-inline: var(--space-1); }
.pagination__item.is-disabled { opacity: 0.4; pointer-events: none; }

/* ---- Back to top -------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: var(--ink-1);
  color: var(--surface-0);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-spring),
    visibility var(--dur-base);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: var(--accent-ink); }
.to-top svg { width: 18px; height: 18px; }

/* ---- Reading progress --------------------------------------------------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: calc(var(--z-header) + 1);
  height: 2px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--ember-500), var(--ember-300));
}

/* ---- Flash messages ----------------------------------------------------- */
.flash {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-1);
  background: var(--surface-1);
  font-size: var(--text-sm);
  animation: mgw-fade-up var(--dur-slow) var(--ease-out);
}

.flash svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.flash--success { border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 9%, var(--surface-0)); color: var(--success); }
.flash--error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 9%, var(--surface-0)); color: var(--danger); }
.flash--warning { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 10%, var(--surface-0)); color: var(--warning); }
.flash--info { border-color: color-mix(in srgb, var(--info) 35%, transparent); background: color-mix(in srgb, var(--info) 8%, var(--surface-0)); color: var(--info); }

/* ---- Empty state -------------------------------------------------------- */
.empty-state {
  display: grid;
  gap: var(--space-4);
  justify-items: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-4);
}

.empty-state__icon svg { width: 24px; height: 24px; }
.empty-state p { color: var(--ink-3); max-width: 42ch; }


/* ==========================================================================
   08. PAGE SECTIONS
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: min(92svh, 54rem);
  padding-block: calc(var(--header-h) + var(--space-16)) var(--space-16);
  overflow: hidden;
  color: #D8E1F0;
  --ink-1: #F5F8FD;
  --ink-2: #C6D2E6;
  --ink-3: #9CACC8;
  --ink-4: #7A8BA9;
  --line-1: rgba(255, 255, 255, 0.11);
  --line-2: rgba(255, 255, 255, 0.19);
  --accent: var(--ember-400);
  --accent-bright: var(--ember-400);
  --accent-soft: rgba(245, 130, 32, 0.16);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Parallax drift set by JS via --hero-shift; falls back to none. */
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.08);
  will-change: transform;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(6, 10, 20, 0.93) 0%, rgba(8, 14, 28, 0.82) 42%, rgba(10, 18, 36, 0.55) 100%),
    radial-gradient(60% 80% at 6% 96%, rgba(245, 130, 32, 0.24) 0%, transparent 60%);
}

.hero__inner {
  display: grid;
  gap: var(--space-8);
  max-width: 46rem;
}

.hero h1 {
  /* Slight negative tracking at display size keeps the line optically even. */
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: transparent;
  background: linear-gradient(96deg, var(--ember-300) 8%, var(--ember-500) 55%, var(--ember-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--ink-2);
  max-width: 44ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line-1);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-4);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  translate: -50% 0;
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-4);
}

.hero__scroll span {
  display: block;
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(180deg, var(--accent), transparent);
  animation: mgw-drift 2.6s var(--ease-in-out) infinite;
}

@media (max-width: 47.9375rem) {
  .hero { min-height: auto; padding-block: calc(var(--header-h) + var(--space-12)) var(--space-16); }
  .hero__scroll { display: none; }
}

/* ---- Page hero (interior pages) ----------------------------------------- */
.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--header-h) + var(--space-12)) var(--space-12);
  background: var(--surface-1);
  border-bottom: 1px solid var(--line-1);
  overflow: hidden;
}

.page-hero__inner { display: grid; gap: var(--space-5); max-width: 52rem; }
.page-hero h1 { font-size: var(--display-2); }
.page-hero p { font-size: var(--text-lg); color: var(--ink-3); max-width: 56ch; }
.page-hero .breadcrumb { margin-bottom: var(--space-2); }

.page-hero--dark {
  background: var(--navy-950);
  border-bottom-color: transparent;
  --ink-1: #F4F7FC;
  --ink-2: #C4D0E4;
  --ink-3: #98A8C4;
  --ink-4: #7789A7;
  --line-1: rgba(255, 255, 255, 0.11);
  --accent: var(--ember-400);
  --accent-bright: var(--ember-400);
  color: var(--ink-2);
}

.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--line-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-1) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(90% 130% at 88% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(90% 130% at 88% 0%, #000 0%, transparent 70%);
}

/* ---- Feature list (why choose us) --------------------------------------- */
.feature-grid {
  display: grid;
  gap: 1px;
  background: var(--line-1);
  border-block: 1px solid var(--line-1);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.feature {
  position: relative;
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  background: var(--surface-0);
  transition: background var(--dur-base) var(--ease-out);
}

.feature:hover { background: var(--surface-1); }

.feature__num {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  color: var(--accent);
}

.feature h3 { font-size: var(--text-xl); }
.feature p { font-size: var(--text-sm); color: var(--ink-3); line-height: var(--leading-relaxed); }

/* ---- Sector strip ------------------------------------------------------- */
.sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.sector-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-pill);
  background: var(--surface-0);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-2);
  transition: all var(--dur-base) var(--ease-out);
}

.sector-chip:hover {
  border-color: var(--accent);
  color: var(--ink-1);
  transform: translateY(-2px);
}

.sector-chip__dot {
  width: 7px; height: 7px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  flex-shrink: 0;
}

/* ---- CTA band ----------------------------------------------------------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-20));
  color: #DFE7F3;
  --ink-1: #F5F8FD;
  --ink-2: #C6D2E6;
  --ink-3: #A0AFCA;
  --line-1: rgba(255, 255, 255, 0.13);
  --accent: var(--ember-400);
  --accent-bright: var(--ember-400);
}

.cta-band__inner {
  display: grid;
  gap: var(--space-6);
  max-width: 42rem;
}

.cta-band h2 { font-size: var(--display-2); }
.cta-band p { color: var(--ink-2); font-size: var(--text-lg); }

/* ---- Newsletter --------------------------------------------------------- */
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  max-width: 32rem;
}

.newsletter-form .field { flex: 1 1 15rem; margin: 0; }

/* ---- Article layout ----------------------------------------------------- */
.article-header { display: grid; gap: var(--space-5); max-width: 48rem; }
.article-header h1 { font-size: var(--display-2); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.article-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.article-hero-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line-1);
  aspect-ratio: 16 / 9;
}

.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.toc {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}

.toc__title {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-4);
}

.toc ol { display: grid; gap: var(--space-1); counter-reset: toc; }

.toc a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid transparent;
  font-size: var(--text-sm);
  color: var(--ink-3);
  line-height: 1.4;
  transition: all var(--dur-fast) var(--ease-out);
}

.toc a:hover { color: var(--ink-1); border-left-color: var(--line-2); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.toc li[data-level="3"] a { padding-left: var(--space-6); font-size: var(--text-xs); }

.share-list { display: flex; gap: var(--space-2); }

.share-list a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  color: var(--ink-3);
  transition: all var(--dur-fast) var(--ease-out);
}

.share-list a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.share-list svg { width: 16px; height: 16px; }

.post-nav {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line-1);
}

@media (min-width: 48rem) {
  .post-nav { grid-template-columns: 1fr 1fr; }
}

.post-nav__link {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  transition: all var(--dur-base) var(--ease-out);
}

.post-nav__link:hover { border-color: var(--line-3); background: var(--surface-1); }
.post-nav__link--next { text-align: right; }

.post-nav__dir {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.post-nav__title { font-family: var(--font-display); font-weight: 600; color: var(--ink-1); }

/* ---- Search results ----------------------------------------------------- */
.result {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line-1);
}

.result__type {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.result h3 { font-size: var(--text-xl); }
.result h3 a:hover { color: var(--accent); }
.result p { font-size: var(--text-sm); color: var(--ink-3); }
.result mark { background: var(--accent-soft); color: var(--ink-1); padding: 0 0.15em; border-radius: 2px; }
.result__url { font-size: var(--text-xs); color: var(--ink-4); }

/* ---- Contact ------------------------------------------------------------ */
.contact-grid { display: grid; gap: clamp(var(--space-8), 4vw, var(--space-16)); }

@media (min-width: 62rem) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
}

.contact-detail {
  display: flex;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--line-1);
}

.contact-detail:last-child { border-bottom: 0; }

.contact-detail__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.contact-detail__icon svg { width: 18px; height: 18px; }
.contact-detail dt { font-size: var(--text-xs); color: var(--ink-4); margin-bottom: 2px; }
.contact-detail dd { font-weight: 500; color: var(--ink-1); }
.contact-detail a:hover { color: var(--accent); }

.map-embed {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-1);
  background: var(--surface-2);
}

.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.hours-list { display: grid; gap: var(--space-2); }

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-2);
  border-bottom: 1px dashed var(--line-1);
  font-size: var(--text-sm);
}

.hours-list li:last-child { border-bottom: 0; }
.hours-list dt, .hours-list span:first-child { color: var(--ink-3); }
.hours-list span:last-child { color: var(--ink-1); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- Spec table --------------------------------------------------------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.spec-table th {
  width: 40%;
  text-align: left;
  font-weight: 500;
  color: var(--ink-3);
  vertical-align: top;
}

.spec-table th, .spec-table td {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line-1);
}

.spec-table td { color: var(--ink-1); font-weight: 500; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* ---- Checklist ---------------------------------------------------------- */
.checklist { display: grid; gap: var(--space-3); }

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.checklist svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* ---- Filter bar --------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--line-1);
}

.filter-bar__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-4);
}


/* ==========================================================================
   09. FORMS
   ========================================================================== */

.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }

.field__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-1);
}

.field__label .req { color: var(--danger); margin-left: 2px; }

.field__hint { font-size: var(--text-xs); color: var(--ink-4); }

.field__error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--danger);
  font-weight: 500;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.75rem 0.95rem;
  min-height: 46px;
  background: var(--surface-0);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  color: var(--ink-1);
  font-size: var(--text-base);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.input::placeholder, .textarea::placeholder { color: var(--ink-4); }

.input:hover, .textarea:hover, .select:hover { border-color: var(--line-3); }

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: var(--danger);
}

.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.textarea { min-height: 9rem; resize: vertical; line-height: var(--leading-normal); }

.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235F6E8C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.check input[type="checkbox"],
.check input[type="radio"] {
  appearance: none;
  width: 19px; height: 19px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-xs);
  background: var(--surface-0);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}

.check input[type="radio"] { border-radius: 50%; }

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10' fill='none'%3E%3Cpath d='M1 5l3.4 3.4L11 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.check input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.field-row { display: grid; gap: var(--space-5); }

@media (min-width: 40rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Honeypot: hidden from people, visible to naive bots. Not display:none —
   some bots skip those — and aria-hidden + tabindex keep it out of the
   accessibility tree and the tab order. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.form-note { font-size: var(--text-xs); color: var(--ink-4); max-width: 40ch; }

/* Loading state for a submitting form. */
.btn.is-loading { color: transparent; pointer-events: none; }

.btn.is-loading::before {
  content: "";
  position: absolute;
  width: 17px; height: 17px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: mgw-spin 620ms linear infinite;
}

/* ---- Search box --------------------------------------------------------- */
.search-box { position: relative; }

.search-box .input { padding-left: 2.85rem; }

.search-box__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  translate: 0 -50%;
  width: 17px; height: 17px;
  color: var(--ink-4);
  pointer-events: none;
}


/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.site-footer {
  position: relative;
  isolation: isolate;
  padding-top: var(--section-y);
  background: var(--navy-950);
  color: #A9B7CE;
  --ink-1: #F2F6FC;
  --ink-2: #BCC9DF;
  --ink-3: #93A2BE;
  --ink-4: #74849F;
  --line-1: rgba(255, 255, 255, 0.09);
  --accent: var(--ember-400);
  --accent-bright: var(--ember-400);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember-500) 22%, var(--navy-400) 62%, transparent);
  opacity: 0.55;
}

.footer-top {
  display: grid;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  padding-bottom: var(--space-12);
}

@media (min-width: 62rem) {
  .footer-top { grid-template-columns: 22rem minmax(0, 1fr); }
}

.footer-brand { display: grid; gap: var(--space-5); align-content: start; }
.footer-brand img { height: 38px; width: auto; }
.footer-brand p { font-size: var(--text-sm); color: var(--ink-3); max-width: 34ch; line-height: var(--leading-relaxed); }

.footer-cols {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: var(--space-4);
}

.footer-col ul { display: grid; gap: var(--space-3); }

.footer-col a {
  font-size: var(--text-sm);
  color: var(--ink-3);
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-top: 1px solid var(--line-1);
  font-size: var(--text-xs);
  color: var(--ink-4);
}

.footer-legal { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-legal a:hover { color: var(--accent); }

.social-list { display: flex; gap: var(--space-2); }

.social-list a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  color: var(--ink-3);
  transition: all var(--dur-fast) var(--ease-out);
}

.social-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 130, 32, 0.1);
  transform: translateY(-2px);
}

.social-list svg { width: 17px; height: 17px; }


/* ==========================================================================
   11. UTILITIES
   ========================================================================== */

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-muted { color: var(--ink-3); }
.text-subtle { color: var(--ink-4); }
.text-accent { color: var(--accent); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mx-auto { margin-inline: auto; }

.flex { display: flex; }
.grid-full { grid-column: 1 / -1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.w-full { width: 100%; }
.relative { position: relative; }

.hide { display: none !important; }

@media (max-width: 47.9375rem) { .hide-sm { display: none !important; } }
@media (min-width: 48rem) { .show-sm-only { display: none !important; } }
@media (max-width: 61.9375rem) { .hide-md { display: none !important; } }

.no-scroll { overflow: hidden; }

/* Only ever applied by JS once it has confirmed it is running. */
.js-only { display: none; }
.has-js .js-only { display: revert; }
.has-js .no-js-only { display: none; }

/* `display: revert` on a .js-only element resolves to the element's UA
   default (block for a div), which beats the [hidden] attribute's own
   display:none. Without this rule the mobile sidebar scrim — .js-only and
   hidden — paints a permanent dark overlay across the whole page. */
[hidden] { display: none !important; }



/* ==========================================================================
   12. PRINT
   ========================================================================== */

@media print {
  :root { --surface-0: #fff; --ink-1: #000; --ink-2: #222; --ink-3: #444; }

  .site-header,
  .site-footer,
  .to-top,
  .read-progress,
  .mobile-nav,
  .cta-band,
  .newsletter-form,
  .share-list,
  .post-nav,
  .filter-bar,
  .pagination { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }

  .section { padding-block: 1rem; }

  a { text-decoration: underline; }

  /* Print the destination of content links so a paper copy stays useful. */
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }

  .card, .quote-card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }

  h1, h2, h3 { break-after: avoid; }
  img { max-width: 100% !important; break-inside: avoid; }
}
