/* ==========================================================================
   HCM BUILD - site.css

   One hand-written stylesheet. No framework, no preprocessor, no build step.
   The file is split by the banner comments below rather than into several
   files, which avoids a request waterfall on a site that has no bundler.

   Cache busting is asset()'s ?v=<filemtime>, which is what licenses the
   immutable year-long Cache-Control in public/.htaccess.

   ---------------------------------------------------------------------------
   DESIGN TOKENS ARE THE ONLY PLACE A COLOUR OR A SPACE IS DEFINED.

   tools/test.php computes the WCAG contrast of the token pairs this site
   actually uses and fails if one drops below AA. The palette comes from the
   client's logo and the brief; the USAGE RULE below is measured, not assumed:

     navy #0d345c on ivory #F4F1EA    ~11.2:1 body text, headings
     graphite #222425 on off-white    ~15:1   body text
     ivory on navy                    ~11.2:1 inverted sections
     stone #AAA394 on navy            ~5.0:1  text, inverted sections
     graphite on bronze               ~4.9:1  the floating CTA label
     bronze #A58C67 on navy           ~3.9:1  RULES AND BORDERS ONLY -- NOT TEXT
     stone on ivory                   ~2.2:1  RULES AND BORDERS ONLY
     bronze on ivory                  ~2.8:1  LARGE DISPLAY TYPE ONLY

   So stone and bronze are structure on light grounds and text on dark ones.
   A stone caption on ivory is an accessibility failure, not a style choice.
   ========================================================================== */

:root {
    /* ---- ground and ink ------------------------------------------------ */
    /*
     * Lightened twice at the client's request: #071E34 -> #0A2540 on
     * 23 September 2026, then -> #0d345c on the 25th.
     *
     * THE SECOND STEP SPENT THE LAST OF THE HEADROOM ON BRONZE. Bronze text on
     * navy was 5.26:1, then 4.84:1, and at this navy it is 3.94:1 -- under the
     * 4.5 AA floor. Rather than move the client's accent colour, BRONZE IS NO
     * LONGER USED AS TEXT ON A DARK GROUND: the footer link hovers took stone
     * instead, and the floating CTA's label took graphite. Bronze keeps the
     * rules, borders and its use on light grounds. Do not put it back as text
     * on navy without re-measuring.
     *
     * --navy-raised also had to move. At #103050 it was DARKER than the new
     * navy, so every raised surface -- cards and hovers inside dark sections
     * -- would have sunk instead of lifted. #103862 is the lightest value that
     * still keeps stone above 4.5 on it.
     *
     * tests/ContrastTest.php duplicates these hexes as PHP constants and must
     * move with them; a CSS edit does not reach it.
     */
    --navy: #0d345c;
    --navy-deep: #071D31;
    --navy-raised: #103862;
    --ivory: #F4F1EA;
    --off-white: #FAF9F6;
    --graphite: #222425;
    --stone: #AAA394;
    --bronze: #A58C67;

    /* ---- semantic roles, light ground ---------------------------------- */
    --ground: var(--off-white);
    --ground-alt: var(--ivory);
    --ink: var(--navy);
    --ink-body: var(--graphite);

    /* A muted body colour that still passes AA on both light grounds.
       Stone does not, which is why this is a separate token. */
    --ink-muted: #5B5F63;

    --rule: rgba(13, 52, 92, 0.14);
    --rule-strong: rgba(13, 52, 92, 0.28);

    /* ---- semantic roles, dark ground ----------------------------------- */
    --ink-on-dark: var(--ivory);
    --ink-on-dark-muted: var(--stone);
    --rule-on-dark: rgba(244, 241, 234, 0.18);
    --accent: var(--bronze);

    --danger: #8C2F2F;
    --danger-on-dark: #E4A0A0;

    /* ---- type ---------------------------------------------------------- */
    /*
     * CALISTO MT -- ONE L. A double-L spelling was shipped on 23 September
     * and corrected on the 25th. A font stack matches the family name exactly,
     * so the misspelling matched nothing and EVERY visitor got Georgia,
     * including the people who own the font. tests/ContrastTest.php pins this
     * string and asserts the wrong spelling is absent from this file -- which
     * is why it is not written out here either.
     *
     * CALISTO MT IS A LICENSED MONOTYPE FACE and is not self-hosted here.
     * The client supplied it twice -- a single TTF on 23 September and the
     * full four-weight family on the 25th -- both from a "free fonts"
     * download site, with the Regular byte-identical across the two. All four
     * read "Digitized data copyright ... The Monotype Corporation 1991-1997.
     * All rights reserved", carry no licence description and no licence URL,
     * and their OS/2 fsType of 0x0008 governs DOCUMENT embedding, not web
     * serving. It ships with MS Office, which grants no web right either.
     * NONE OF THEM IS DEPLOYED. Serving the face needs a Monotype web licence;
     * see the fuller note in app/Config/config.php. So it is named first and
     * Georgia carries everyone who does not have it installed.
     *
     * Arial is a system font, so neither stack needs an @font-face and the
     * site ships no webfonts at all.
     */
    --font-heading: 'Calisto MT', Georgia, 'Times New Roman', serif;
    --font-body: Arial, Helvetica, sans-serif;

    /* A fluid scale, so there is no per-breakpoint font-size anywhere. */
    --step--2: clamp(0.688rem, 0.66rem + 0.14vw, 0.75rem);
    --step--1: clamp(0.813rem, 0.79rem + 0.11vw, 0.875rem);
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.063rem);
    --step-1: clamp(1.2rem, 1.14rem + 0.3vw, 1.375rem);
    --step-2: clamp(1.45rem, 1.33rem + 0.6vw, 1.85rem);
    --step-3: clamp(1.8rem, 1.55rem + 1.25vw, 2.6rem);
    --step-4: clamp(2.2rem, 1.7rem + 2.5vw, 3.8rem);
    --step-5: clamp(2.6rem, 1.75rem + 4.25vw, 5.5rem);

    /* ---- space --------------------------------------------------------- */
    --space-2xs: 0.375rem;
    --space-xs: 0.625rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: clamp(4rem, 3rem + 5vw, 7.5rem);

    /* ---- measure and rhythm -------------------------------------------- */
    --wrap: 1280px;
    --wrap-narrow: 46rem;
    --measure: 68ch;

    /* Architectural, not soft. A radius belongs on a button, not a building. */
    --radius: 0;

    --header-h: 5.25rem;
    --header-h-compact: 3.75rem;

    /* One scale, recorded here so no component invents its own. */
    --z-header: 100;
    --z-panel: 90;
    --z-cta: 40;
}

/* ==========================================================================
   RESET AND BASE
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink-body);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;

    /* NO overflow-x: hidden. It hides a real horizontal-overflow bug from
       both a scrollbar check and a human, and this project's responsive
       verification measures document scrollWidth -- which that declaration
       would quietly make always correct. Overflow gets fixed, not hidden. */
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin: 0 0 var(--space-sm);
    text-wrap: balance;
}

p, ul, ol { margin: 0 0 var(--space-sm); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

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

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-lg) 0; }

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* ONE focus ring for the whole site. Defined once so no component can
   remove it by styling its own outline away. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: var(--space-sm);
    top: -100px;
    z-index: 200;
    background: var(--navy);
    color: var(--ivory);
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    transition: top 120ms ease;
}

.skip-link:focus { top: var(--space-sm); }

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

/* Reduced motion, as a blanket. Every transition on this site is decorative;
   none of them carries information, so removing all of them loses nothing. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

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

/* ==========================================================================
   LAYOUT PRIMITIVES

   Three classes carry the whole site's rhythm. A section's vertical space is
   ONE token, so every band matches without anyone measuring.
   ========================================================================== */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;

    /* The side gutter. Never a `padding` shorthand anywhere that would zero
       this out -- at 320px this is the only thing keeping text off the edge. */
    padding-inline: clamp(1.25rem, 1rem + 2vw, 3.5rem);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section--flush { padding-block: 0; }

.section--alt { background: var(--ground-alt); }

.section--dark {
    background: var(--navy);
    color: var(--ink-on-dark);
}

.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--ink-on-dark); }
.section--dark strong { color: var(--ink-on-dark); }
.section--dark .eyebrow { color: var(--ink-on-dark-muted); }
.section--dark .lede { color: var(--ink-on-dark); }
.section--dark hr { border-top-color: var(--rule-on-dark); }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-sm); }

.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.4rem; }

/* ==========================================================================
   TYPOGRAPHY COMPONENTS
   ========================================================================== */

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--step--2);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 var(--space-xs);
}

.h-display { font-size: var(--step-5); }
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); }
.h4 { font-size: var(--step-1); }

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

.lede {
    font-size: var(--step-1);
    line-height: 1.5;
    color: var(--ink);
    max-width: 40ch;
}

.section-head { margin-bottom: var(--space-lg); }
.section-head .lede { margin-top: var(--space-sm); }

/* A hairline rule as an architectural device, echoing the logo's divider. */
.rule {
    width: 3.5rem;
    height: 1px;
    background: var(--accent);
    border: 0;
    margin: 0 0 var(--space-md);
}

.section--dark .rule { background: var(--accent); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.5rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;

    /* 44px minimum target, which the padding above only just reaches at the
       smallest step. Stated explicitly so a later font change cannot quietly
       shrink it. */
    min-height: 2.75rem;
}

.btn--primary { background: var(--ink); color: var(--ivory); }
.btn--primary:hover { background: var(--navy-raised); border-color: var(--navy-raised); }

.btn--ghost:hover { background: var(--ink); color: var(--ivory); }

.btn--on-dark { border-color: var(--ink-on-dark); color: var(--ink-on-dark); }
.btn--on-dark:hover { background: var(--ivory); color: var(--navy); }

.btn--on-dark-primary { background: var(--ivory); border-color: var(--ivory); color: var(--navy); }
.btn--on-dark-primary:hover { background: var(--stone); border-color: var(--stone); color: var(--navy); }

.btn--block { width: 100%; justify-content: center; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* An arrow link, the site's quiet default call to action. */
.arrow-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 0.25rem;
    transition: border-color 160ms ease, gap 160ms ease;
}

.arrow-link:hover { border-bottom-color: var(--accent); gap: 0.7rem; }

.section--dark .arrow-link { color: var(--ink-on-dark); border-bottom-color: var(--rule-on-dark); }
.section--dark .arrow-link:hover { border-bottom-color: var(--accent); }

.arrow-link span[aria-hidden] { transition: transform 160ms ease; }
.arrow-link:hover span[aria-hidden] { transform: translateX(2px); }

/* ==========================================================================
   HEADER

   Sticky and COMPACTS on scroll -- deliberately NOT hide-on-scroll. A header
   that slides away takes its own open mobile panel with it, which reads to a
   visitor as "the menu opens and then vanishes".
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--navy);
    color: var(--ink-on-dark);
    border-bottom: 1px solid var(--rule-on-dark);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* space-md from 37.5rem up; the phone bar cannot spare 24px between a
       logo and a wrapped CTA. See the width table under the logo rules. */
    gap: var(--space-sm);
    height: var(--header-h);
    transition: height 180ms ease;
}

.site-header[data-compact="true"] .site-header__bar { height: var(--header-h-compact); }

/*
 * HCM sits CENTRED over the slogan, with a hairline between them -- the
 * lockup the client asked for on 2 October 2026.
 *
 * The divider is a pseudo-element of the <small>, not a separate element, so
 * it inherits that element's display switch below: a rule floating under HCM
 * with nothing beneath it would read as a mistake. Its proportions copy
 * favicon.svg's <rect x="20" y="44" width="24" height="1"> -- 1px, bronze,
 * centred, a little over a third of the mark's width -- which is the same
 * motif .rule is named after.
 *
 * BRONZE AS A RULE, NEVER AS TEXT HERE. On this navy it measures 3.94:1, well
 * under AA, so it is sanctioned for lines and borders only.
 */
/*
 * THE BRAND LOCKUP. Client artwork since 2 October 2026, keyed transparent by
 * tools/make-brand-logo.php; it was live text before that.
 *
 * Heights are set here and the width follows, because the bar's height is the
 * constraint and both crops have a fixed aspect: the phone mark is 2.16:1 and
 * the full lockup 3.36:1.
 *
 * 🚨 THE PHONE WIDTH IS THE TIGHT ONE. At 320px the bar has 23px of spare
 * width over the old text logo, so the mark must stay under about 87px wide --
 * 2.25rem of height puts it at 78px. Raising this height eats the margin
 * before anything visibly overflows, and tools/verify-responsive.mjs is what
 * will tell you.
 */
.site-header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink-on-dark);

    /*
     * 🚨 NEVER SHRINK. As a flex item the link would absorb the squeeze at
     * 320px, and because the image has an explicit height that squeeze comes
     * out as a horizontally compressed wordmark rather than a smaller one.
     * Refusing to shrink turns a silent distortion into an overflow, which
     * tools/verify-responsive.mjs fails on.
     */
    flex-shrink: 0;
}

.site-header__logo picture { display: block; }

/*
 * 🚨 NO max-width HERE, AND THAT IS DELIBERATE.
 *
 * With an explicit height and `width: auto`, a `max-width: 100%` clamps the
 * width while the height stays put -- so the wordmark SQUASHES instead of
 * scaling. It did: at 320px the mark rendered 66x36 against its true 2.16:1,
 * a 15% horizontal compression of a serif wordmark. Nothing failed. Every
 * suite was green, nothing overflowed, and the only way to see it was to
 * measure the rendered box against the intrinsic ratio.
 *
 * The heights below are therefore chosen to FIT without clamping -- 2rem is
 * 69px wide against the 78px the 320px bar has free. If one is ever raised
 * too far the logo will overflow, which tools/verify-responsive.mjs fails on
 * loudly, rather than quietly distorting.
 */
.site-header__logo img {
    display: block;
    width: auto;
    height: 1.75rem;                        /* 28px -> 64px wide */
    transition: height 180ms ease;          /* in step with the bar */
}

/*
 * MEASURED, not guessed. Width free for the logo = the bar's inner width,
 * less the actions group, less the gap:
 *
 *     320px   275 - 191 - 16  =  68px      64px used
 *     360px   314 - 220 - 16  =  78px      64px
 *     390px   342 - 220 - 16  = 106px      83px
 *     600px   544 - 222 - 24  = 298px     209px  (the full lockup)
 *
 * The actions group is 191px at 320 because "Discuss a Project" wraps to two
 * lines there; it is 220px once it fits on one.
 *
 * 🚨 THE "USED" COLUMN MOVES WITH THE ARTWORK. The client's 5 October
 * re-export made the mark ~6% wider per unit of height (2.161:1 -> 2.301:1),
 * which pushed the old 1.875rem height to ~69px against the 68px the 320px
 * bar has free. Re-measure this column after every regeneration rather than
 * assuming the heights still fit.
 */
@media (min-width: 24.375rem) {             /* 390px - an iPhone and up */
    .site-header__logo img { height: 2.25rem; }
}

@media (min-width: 37.5rem) {               /* 600px - the full lockup */
    .site-header__bar { gap: var(--space-md); }

    .site-header__logo img { height: 3.75rem; }

    /* And in the 3.75rem compacted bar, where it cannot be 60px tall. */
    .site-header[data-compact="true"] .site-header__logo img { height: 2.875rem; }
}

.site-header__nav { display: none; }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.site-header__call {
    display: none;
    font-size: var(--step--1);
    color: var(--ink-on-dark-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.site-header__call:hover { color: var(--ink-on-dark); }

/* The burger. Hidden at desktop width, where the real nav takes over. */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    background: transparent;
    border: 1px solid var(--rule-on-dark);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.1rem;
    height: 1px;
    margin-inline: auto;
    background: var(--ink-on-dark);
    transition: transform 180ms ease, opacity 180ms ease;
}

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

/* ==========================================================================
   MOBILE NAV PANEL

   CONTAINED AND SCROLLABLE. The three declarations that matter:

     max-height using --panel-top, which JS MEASURES from the header's own
       bottom edge at open time -- with a literal fallback here, so the panel
       is still bounded and scrollable with JavaScript disabled.
     overflow-y: auto, so a menu longer than the screen can reach its last
       item. Without it the final links are simply unreachable.
     overscroll-behavior: contain, so scrolling to the end of the panel does
       not start scrolling the page behind it.
   ========================================================================== */

.nav-panel {
    background: var(--navy-deep);
    border-top: 1px solid var(--rule-on-dark);
    max-height: calc(100vh - var(--panel-top, 5.25rem));
    max-height: calc(100dvh - var(--panel-top, 5.25rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-block: var(--space-md) var(--space-lg);
}

/* Page scroll is locked only while the panel is open. */
body.nav-open { overflow: hidden; }

.nav-panel__list, .nav-panel__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-panel__list > li { border-bottom: 1px solid var(--rule-on-dark); }

.nav-panel__link {
    display: block;
    padding: 0.95rem 0;
    font-family: var(--font-heading);
    font-size: var(--step-2);
    color: var(--ink-on-dark);
    text-decoration: none;
}

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

.nav-panel__sub { padding: 0 0 var(--space-sm) var(--space-sm); }

.nav-panel__sub a {
    display: block;
    padding: 0.5rem 0;
    font-size: var(--step--1);
    color: var(--ink-on-dark-muted);
    text-decoration: none;
}

.nav-panel__sub a:hover, .nav-panel__sub a[aria-current="page"] { color: var(--ink-on-dark); }

.nav-panel__foot {
    margin-top: var(--space-md);
    display: grid;
    gap: var(--space-xs);
}

.nav-panel__foot a {
    font-size: var(--step--1);
    color: var(--ink-on-dark-muted);
    text-decoration: none;
}

/* ==========================================================================
   DESKTOP NAV AND SERVICES DROPDOWN

   Built on <details>, so it opens and closes with no JavaScript at all --
   including under keyboard control, which is where a div-plus-click dropdown
   usually falls down.
   ========================================================================== */

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a, .nav-drop__summary {
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-on-dark);
    text-decoration: none;
    padding-block: 0.4rem;
    border-bottom: 1px solid transparent;
}

.nav-list a:hover, .nav-drop__summary:hover { border-bottom-color: var(--accent); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--accent); }

.nav-drop { position: relative; }

.nav-drop__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    list-style: none;
}

.nav-drop__summary::-webkit-details-marker { display: none; }
.nav-drop__summary::marker { content: ''; }

.nav-drop__chev { transition: transform 160ms ease; font-size: 0.6em; }
.nav-drop[open] .nav-drop__chev { transform: rotate(180deg); }

.nav-drop__panel {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: -1rem;
    min-width: 21rem;
    background: var(--navy-deep);
    border: 1px solid var(--rule-on-dark);
    padding: var(--space-sm);
    list-style: none;
    margin: 0;
}

.nav-drop__panel li + li { margin-top: 0.15rem; }

.nav-drop__panel a {
    display: block;
    padding: 0.6rem 0.75rem;
    font-size: var(--step--1);
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink-on-dark);
    border-bottom: 0;
}

.nav-drop__panel a:hover { background: var(--navy-raised); border-bottom: 0; }
.nav-drop__panel a small {
    display: block;
    font-size: var(--step--2);
    color: var(--ink-on-dark-muted);
    letter-spacing: 0;
    text-transform: none;
    margin-top: 0.15rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--navy);
    color: var(--ink-on-dark);
    padding-block: var(--space-xl) var(--space-md);
}

.site-footer h2, .site-footer h3 { color: var(--ink-on-dark); }

.site-footer__top {
    display: grid;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--rule-on-dark);
}

.site-footer__brand-line {
    font-family: var(--font-heading);
    font-size: var(--step-1);
    color: var(--ink-on-dark);
    margin: 0 0 var(--space-sm);
    max-width: 22ch;
}

/* One line, once there is width for one line. */
@media (min-width: 37.5rem) {
    .site-footer__brand-line { max-width: none; white-space: nowrap; }
}

/*
 * ACCREDITATION MARKS.
 *
 * Justified row, every mark the same 60px height whatever its own proportions,
 * DIRECTLY ON THE NAVY -- the ivory band was removed on 25 September 2026 so
 * the marks read against the footer itself.
 *
 * WHAT THAT COSTS, MEASURED RATHER THAN GUESSED. These are third-party marks
 * drawn for a white ground, and recolouring one is not ours to do:
 *
 *   bizSAFE Level 3   0% transparent, 76% near-white -- IT IS A WHITE BOX, and
 *                     no rule here can change that; the file has no alpha.
 *   BCA               78% transparent, but a third of the ink is dark maroon,
 *                     so the wording dims against the navy.
 *   ARES ISO x2       82% transparent; the globes read, the pale ISO lines
 *                     inside the artwork do not.
 *
 * The fix is official reversed/white artwork, which BCA, bizSAFE and the ISO
 * bodies publish for dark backgrounds. That is a file swap, not a code change.
 *
 * The margin is the clearance the brief asked for: it sits clear of the brand
 * line above and whatever follows below on the existing space scale.
 */
.site-footer__accreditations {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md) var(--space-lg);
    list-style: none;
    margin: var(--space-md) 0 0;
    padding: 0;
    max-width: 32rem;
}

.site-footer__accreditations img {
    height: 60px;
    width: auto;
    display: block;
}

/* Centred when the row wraps on a narrow screen, so it never reads as ragged. */
@media (max-width: 30rem) {
    .site-footer__accreditations { justify-content: center; gap: var(--space-md); }
}

.site-footer__cols { display: grid; gap: var(--space-lg); }

.site-footer__col h3 {
    font-family: var(--font-body);
    font-size: var(--step--2);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-on-dark-muted);
    margin-bottom: var(--space-xs);
}

.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li + li { margin-top: 0.4rem; }

.site-footer__col a {
    font-size: var(--step--1);
    color: var(--ink-on-dark);
    text-decoration: none;
}

.site-footer__col a:hover { color: var(--ink-on-dark-muted); }

.site-footer__contact { font-size: var(--step--1); color: var(--ink-on-dark-muted); }
.site-footer__contact a { color: var(--ink-on-dark); text-decoration: none; }
.site-footer__contact a:hover { color: var(--ink-on-dark-muted); }
.site-footer__contact address { font-style: normal; margin: 0 0 var(--space-xs); }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
    justify-content: space-between;
    padding-top: var(--space-md);
    font-size: var(--step--2);
    color: var(--ink-on-dark-muted);
}

.site-footer__bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__bottom a { color: var(--ink-on-dark-muted); text-decoration: none; }
.site-footer__bottom a:hover { color: var(--ink-on-dark); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    background: var(--navy);
    color: var(--ink-on-dark);
    overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* The image sits behind display type, so it is darkened enough that the
       text contrast is a property of the layout rather than a property of
       whichever photograph happens to be in the slot. */
    opacity: 0.42;
}

.hero__media figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(46rem, calc(100svh - var(--header-h)));
    padding-block: var(--space-2xl) var(--space-xl);
}

.hero h1 {
    color: var(--ink-on-dark);
    font-size: var(--step-5);
    max-width: 24ch;
    margin-bottom: var(--space-md);
}

.hero__lede {
    font-size: var(--step-1);
    color: var(--ink-on-dark);
    max-width: 44ch;
    line-height: 1.5;
}

.hero__eyebrow { color: var(--ink-on-dark-muted); }

/* The interior-page hero: quieter, no photograph behind the words. */
.page-hero {
    background: var(--navy);
    color: var(--ink-on-dark);
    padding-block: var(--space-xl);
}

.page-hero h1 { color: var(--ink-on-dark); max-width: 30ch; }
.page-hero .eyebrow { color: var(--ink-on-dark-muted); }
.page-hero__lede { font-size: var(--step-1); color: var(--ink-on-dark); max-width: 52ch; line-height: 1.5; }

/* ==========================================================================
   BRAND STATEMENT
   ========================================================================== */

.brand-statement { text-align: left; }

.brand-statement__lines {
    font-family: var(--font-heading);
    font-size: var(--step-5);
    line-height: 1.02;
    color: var(--ink);
    margin: 0 0 var(--space-md);
}

/*
 * THREE LINES ON A PHONE, ONE LINE FROM 600px UP.
 *
 * The client asked for the slogan on one line. At 320px one line of these 43
 * characters computes to roughly 13px -- smaller than the body text under it
 * -- so the staircase stays where it is the only readable option, and the
 * single line takes over as soon as there is room for it.
 */
.brand-statement__lines span { display: block; }
.brand-statement__lines span:nth-child(2) { padding-left: 1.5em; }
.brand-statement__lines span:nth-child(3) { padding-left: 3em; color: var(--accent); }

@media (min-width: 37.5rem) {
    .brand-statement__lines { font-size: var(--step-3); }
    .brand-statement__lines span { display: inline; padding-left: 0; }
    .brand-statement__lines span:nth-child(2) { padding-left: 0.25em; }
    .brand-statement__lines span:nth-child(3) { padding-left: 0.25em; color: var(--accent); }
}

.section--dark .brand-statement__lines { color: var(--ink-on-dark); }

/* ==========================================================================
   MEDIA AND THE ILLUSTRATIVE CAPTION

   The caption is emitted by hcm_image() itself, not by a template, so this is
   the only place it is styled. It must stay legible: an unreadable disclosure
   is not a disclosure.
   ========================================================================== */

.media { margin: 0; position: relative; }

.media__note {
    font-family: var(--font-body);
    font-size: var(--step--2);
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    padding: 0.5rem 0 0;
}

.media--illustrative { display: block; }
.media--render { display: block; }

/* On a dark ground the note needs the lighter ink, and on the hero it sits
   over the photograph, so it gets its own plate rather than relying on
   whatever is behind it. */
.section--dark .media__note, .hero .media__note {
    color: var(--ink-on-dark-muted);
}

.hero .media__note, .page-hero .media__note {
    background: rgba(7, 29, 49, 0.72);
    padding: 0.4rem 0.75rem;
}

/* ==========================================================================
   CARDS AND GRIDS
   ========================================================================== */

.grid { display: grid; gap: var(--space-md); }
.grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

/*
 * A CARDS SECTION HOLDING EXACTLY ONE CARD. /about/ links to the founder
 * page this way, and a lone third-width card in a three-column grid reads
 * as two cards that failed to load rather than one deliberate link. Let it
 * span the row, capped at the prose measure so it does not go full-bleed.
 *
 * Below 40rem the grid is already a single column, so this is a no-op there.
 */
.grid--3 > :only-child { grid-column: 1 / -1; max-width: 34rem; }

.card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    background: var(--off-white);
    border: 1px solid var(--rule);
    padding: var(--space-md);
}

.section--alt .card { background: var(--off-white); }
.section--dark .card { background: var(--navy-raised); border-color: var(--rule-on-dark); }

.card h3 { margin-bottom: 0; }
.card p { font-size: var(--step--1); color: var(--ink-muted); }
.section--dark .card p { color: var(--ink-on-dark-muted); }
.card .arrow-link { margin-top: auto; align-self: flex-start; }

/* ---- the service card, which is a link in its entirety ------------------ */
.service-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--rule);
    background: var(--off-white);
    transition: border-color 160ms ease, transform 160ms ease;
}

.service-card:hover { border-color: var(--accent); }
.service-card__body { padding: var(--space-md); display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.service-card__body h3 { margin: 0; }
.service-card__body p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.service-card__more { margin-top: auto; padding-top: var(--space-sm); font-size: var(--step--1); color: var(--accent); }

/* ==========================================================================
   PROJECT CARDS AND THE FEATURED COMPOSITION

   The brief asks specifically for an editorial composition rather than three
   equal cards, so the featured project gets a full-width asymmetric treatment
   and the rest of the explorer uses the card below it.
   ========================================================================== */

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

.featured__media { position: relative; }
.featured__body { display: flex; flex-direction: column; justify-content: center; gap: var(--space-xs); }
.featured__meta { font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.04em; }
.section--dark .featured__meta { color: var(--ink-on-dark-muted); }
.featured__title { font-size: var(--step-4); margin-bottom: 0; }
.featured__config { font-size: var(--step--1); color: var(--ink-muted); }
.section--dark .featured__config { color: var(--ink-on-dark-muted); }

.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}



/*
 * THE CARD KEEPS A COMMON RATIO WITHOUT CROPPING THE BUILDING.
 *
 * Slot dimensions follow whichever image a project actually has, so the
 * sources are different shapes -- portrait renders sit beside landscape ones.
 * A plain `object-fit: cover` makes the row tidy by cutting the top and bottom
 * off a house, which on a portfolio card is the wrong trade.
 *
 * So the frame stays 16:10 and holds two copies of the same image: the
 * foreground `contain`s, showing the whole building, and a blurred `cover`
 * copy fills the space either side. Same file both times.
 */
.project-card__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--ground-alt);
}

/*
 * THE PORTRAIT ROW on /projects/, since 3 October 2026.
 *
 * The three portrait renders are 0.750, 0.802 and 0.838; 16/19 is 0.842, one
 * shape close enough to all three that the blurred fill absorbs the rest.
 *
 * 🚨 OPT-IN, AND ONLY /projects/ OPTS IN. The same card renders three to a
 * row on the homepage, in related projects and on the service pages. If the
 * frame followed each image there, one portrait beside two landscapes would
 * sit at two different heights in the same row. Only the archive groups its
 * cards by orientation first, so only the archive may ask for this.
 */
.project-card--portrait .project-card__frame { aspect-ratio: 16 / 19; }

.project-card__media-fill,
.project-card__media-main {
    position: absolute;
    inset: 0;
}

/*
 * 🚨 THE <picture> HAS TO BE SIZED TOO, WHICHEVER WAY THE IMAGE IS SIZED.
 *
 * hcm_image() wraps the img in a <picture> when it has AVIF/WebP siblings, so
 * a percentage on the img resolves against that wrapper -- and the wrapper is
 * auto. Leave the wrapper out and `height: 100%` silently became the image's
 * natural height, the frame clipped the overflow, and `contain` cropped
 * exactly like the `cover` it replaced. Measured at the time: a 381x238 frame
 * holding a 381x475 image, with every test green.
 *
 * The same trap applies to the max-height sizing below, which is why the
 * wrapper carries its own rule rather than being skipped as "just a span".
 *
 * The `> *` selectors cover both shapes, because hcm_image() emits a bare
 * <img> when no derivative exists.
 */

/* The blurred layer is MEANT to fill and crop -- that is its whole job. */
.project-card__media-fill { display: block; }

.project-card__media-fill > * {
    display: block;
    width: 100%;
    height: 100%;
}

.project-card__media-fill img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.15);
}

/*
 * The foreground fills the frame.
 *
 * 🚨 NO `width` DECLARATION, BY CLIENT INSTRUCTION, 3 October 2026 -- AND THE
 * IMAGES ARE STRETCHED BECAUSE OF IT. This is not a bug and not an oversight.
 * It was measured, reported with the numbers below, and confirmed.
 *
 * hcm_image() emits width/height ATTRIBUTES on the img. They are presentational
 * hints, so any author `width` beats them -- `width: auto` used to, which let
 * the box be driven by the height cap and kept the ratio. With no `width` at
 * all the attribute applies, `max-width: 100%` clamps the width to the frame,
 * `max-height: 100%` clamps the height separately, and the two clamps do not
 * stay proportional. Measured at 1440px:
 *
 *     Huddington     363x452 -> 381x452    5.0% wider than it is
 *     Hillview       379x452 -> 381x452    (0.5%, lost in rounding)
 *     Jalan Leban    339x452 -> 381x452   12.3%
 *     Berwick Road   317x238 -> 381x238   20.0%
 *     Thomson Green  317x238 -> 381x238   20.0%
 *
 * ⚠️ DO NOT "FIX" THIS by restoring `width: auto`. If the stretch is ever to be
 * undone, that is the one-line revert -- but it is the client's call, not a
 * tidy-up. `object-fit: contain` would also undo it visually while keeping the
 * declaration absent.
 *
 * ⚠️ The blurred fill layer below is now COMPLETELY COVERED -- the foreground
 * is exactly the frame's size. It still downloads and decodes. It is left in
 * place because removing it was not asked for, and because it becomes visible
 * again the moment the stretch is undone.
 */
.project-card__media-main {
    display: flex;
    align-items: center;
    justify-content: center;
}

/*
 * 🚨 width/height 100% HERE, NOT max-width/max-height.
 *
 * The img below is capped with `max-height: 100%`, and a percentage resolves
 * against this wrapper. Give the wrapper a MAX height and its own height is
 * still auto -- that is, whatever the img is -- so the cap resolves against
 * the thing it is supposed to be capping and constrains nothing. Measured
 * exactly that: a 381x452 frame holding a 381x475 image, correct aspect
 * ratio, quietly clipped top and bottom by the frame's overflow:hidden.
 *
 * A definite height here is what makes the img's cap mean something.
 */
.project-card__media-main > * {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.project-card__media-main img {
    display: block;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    transition: transform 420ms ease;
}

.project-card__note { margin: 0.4rem 0 0; }
.project-card:hover .project-card__media-main img { transform: scale(1.02); }

.project-card__body { padding-top: var(--space-sm); display: flex; flex-direction: column; gap: 0.25rem; }
.project-card__meta { font-size: var(--step--2); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.project-card__title { font-size: var(--step-2); margin: 0; }
.project-card__config { font-size: var(--step--1); color: var(--ink-muted); }
.project-card__more { font-size: var(--step--1); color: var(--accent); margin-top: 0.35rem; }

.section--dark .project-card__meta,
.section--dark .project-card__config { color: var(--ink-on-dark-muted); }

/* ==========================================================================
   PROJECT FILTERS

   A real <form> with real <select>s that submits by GET. It works with
   JavaScript off; site.js only removes the need to press the button.
   ========================================================================== */

.filters {
    display: grid;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--ground-alt);
    border: 1px solid var(--rule);
    margin-bottom: var(--space-lg);
}

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

.filters label {
    display: block;
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.3rem;
}

.filters__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: end; }

.filters__count { font-size: var(--step--1); color: var(--ink-muted); }

/* ==========================================================================
   PROCESS AND NUMBERED STEPS
   ========================================================================== */

.steps { display: grid; gap: var(--space-md); counter-reset: step; list-style: none; margin: 0; padding: 0; }

.steps__item { border-top: 1px solid var(--rule); padding-top: var(--space-sm); }
.section--dark .steps__item { border-top-color: var(--rule-on-dark); }

.steps__number {
    font-family: var(--font-body);
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    color: var(--accent);
    display: block;
    margin-bottom: 0.4rem;
}

.steps__item h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.steps__item p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.section--dark .steps__item p { color: var(--ink-on-dark-muted); }

/*
 * THE HOMEPAGE JOURNEY'S STAGE NAMES, under the 2x2 storytelling image.
 *
 * Two columns in the panels' own reading order, so it reads as a legend: 1-2
 * for the top row, 3-4 for the bottom. Live text standing in for the captions
 * cut off the image (tools/make-storytelling-image.php explains why).
 *
 * The numbers are ink, not bronze: bronze on this ground is about 3:1, and
 * these numbers carry the order -- they are not ornament.
 */
.journey-stages {
    counter-reset: journey;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem var(--space-md);
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
    font-size: var(--step--1);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.journey-stages li { counter-increment: journey; }

.journey-stages li::before {
    content: counter(journey) "\00a0\00a0";
    color: var(--ink);
}

/* ==========================================================================
   FACTOR AND CHECKLIST BLOCKS (the section vocabulary)
   ========================================================================== */

.factors { display: grid; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.factors__item { border-top: 1px solid var(--rule); padding-top: var(--space-sm); }
.section--dark .factors__item { border-top-color: var(--rule-on-dark); }
.factors__item h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.factors__item p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.section--dark .factors__item p { color: var(--ink-on-dark-muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }

.checklist li {
    position: relative;
    padding-left: 1.75rem;
    font-size: var(--step-0);
}

.checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 0.85rem;
    height: 1px;
    background: var(--accent);
}

.callout {
    border-left: 2px solid var(--accent);
    padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
    background: var(--ground-alt);
    max-width: var(--measure);
}

.section--dark .callout { background: var(--navy-raised); }

/* ==========================================================================
   TABLES, FACT PANEL AND SPECIFICATIONS

   A table wider than the screen gets a scroller that is REACHABLE BY
   KEYBOARD: role="region" plus tabindex="0", so it can be focused and
   scrolled with the arrow keys. A plain overflow div can only be reached with
   a pointer.
   ========================================================================== */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.section--dark th, .section--dark td { border-bottom-color: var(--rule-on-dark); }
.section--dark th { color: var(--ink-on-dark); }

.facts { border-top: 1px solid var(--rule-strong); }
.facts dl { display: grid; gap: 0; margin: 0; }

.facts__row {
    display: grid;
    gap: 0.2rem;
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--rule);
}

.facts dt {
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.facts dd { margin: 0; font-size: var(--step-0); color: var(--ink); }

/* ==========================================================================
   FAQ

   Native <details>. No JavaScript, no ARIA, and the same array feeds the
   FAQPage structured data so the markup and the schema cannot drift.
   ========================================================================== */

.faq { border-top: 1px solid var(--rule); max-width: var(--measure); }

.faq__item { border-bottom: 1px solid var(--rule); }

.faq__q {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: var(--step-1);
    color: var(--ink);
    list-style: none;
}

.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ''; }

.faq__sign { flex: none; font-family: var(--font-body); font-size: var(--step-0); color: var(--accent); }
.faq__item[open] .faq__sign { transform: rotate(45deg); }

.faq__a { padding-bottom: var(--space-sm); font-size: var(--step--1); color: var(--ink-muted); }
.faq__a p { margin-bottom: 0.6rem; }

/* ==========================================================================
   CTA BAND
   ========================================================================== */

.cta-band { background: var(--navy); color: var(--ink-on-dark); }
.cta-band h2 { color: var(--ink-on-dark); font-size: var(--step-3); max-width: 26ch; }
.cta-band p { color: var(--ink-on-dark); max-width: 46ch; }

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumb { padding-block: var(--space-sm); border-bottom: 1px solid var(--rule); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; font-size: var(--step--2); }
.breadcrumb li { color: var(--ink-muted); }
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb li[aria-current="page"] { color: var(--ink); }
.breadcrumb li + li::before { content: '/'; margin-right: 0.4rem; color: var(--rule-strong); }

/* ==========================================================================
   BEFORE / AFTER COMPARISON

   THE CONTROL IS A REAL <input type="range">, and that is the whole design.

   A range input brings keyboard operation, touch, screen-reader support and a
   sensible focus ring with it -- none of which a div with a pointer handler
   has, and all of which are what make a comparison slider usable. Position is
   driven by ONE custom property, --compare, consumed by clip-path, so the
   browser animates nothing and there is no width or left to keep in sync.

   WITH JAVASCRIPT DISABLED the slider cannot move, so the component renders
   the two images side by side with their own captions instead -- see
   .compare--static, which is the default until site.js adds data-ready.
   ========================================================================== */

.compare { margin: 0; }

.compare__frame {
    position: relative;
    display: grid;
    overflow: hidden;
    background: var(--ground-alt);
}

.compare__frame > * { grid-area: 1 / 1; }

.compare__after { clip-path: inset(0 calc((100 - var(--compare, 50)) * 1%) 0 0); }

.compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--compare, 50) * 1%);
    width: 1px;
    background: var(--ivory);
    pointer-events: none;
}

.compare__range {
    width: 100%;
    margin: var(--space-xs) 0 0;
    accent-color: var(--accent);
}

.compare__labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* The no-JavaScript default: two captioned images, nothing hidden. */
.compare--static .compare__frame { display: grid; grid-template-columns: 1fr; gap: var(--space-xs); overflow: visible; }
.compare--static .compare__frame > * { grid-area: auto; }
.compare--static .compare__after { clip-path: none; }
.compare--static .compare__divider,
.compare--static .compare__range { display: none; }
.compare--static .compare__labels { display: none; }
.compare--static .compare__static-label { display: block; }

.compare__static-label {
    display: none;
    font-size: var(--step--2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding-top: 0.35rem;
}

/* ==========================================================================
   BUILD TIMELINE
   ========================================================================== */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-lg); }

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

.timeline__number {
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    color: var(--accent);
}

.timeline__item h3 { font-size: var(--step-1); margin: 0.2rem 0 0.35rem; }
.timeline__item p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }

/* ==========================================================================
   PROJECT CAROUSEL

   WITHOUT JAVASCRIPT this is a stack of captioned images -- the same thing the
   gallery renders -- and that is the DEFAULT below. site.js adds
   data-ready="true", and only then does the rail appear and the stage collapse
   to one visible slide. A carousel whose slides start hidden shows one image to
   everyone whose script did not run, and on a portfolio page the slides are the
   content.

   The stage is a ONE-CELL GRID STACK -- every slide in grid-area 1 / 1 -- which
   is the same idiom as .compare__frame. No absolute positioning, so the stage
   keeps the height of its tallest slide and nothing jumps.
   ========================================================================== */

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

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

/* The no-JS default: every slide visible, in order. */
.carousel__slide { min-width: 0; }

.carousel__rail { list-style: none; margin: 0; padding: 0; display: none; }

/*
 * The stage image. max-height rather than height, so a slide is never
 * stretched, and object-fit: contain rather than cover because these are the
 * client's own visualisations and cropping one is not ours to do. The renders
 * are different shapes -- one is portrait -- so the image is centred in
 * whatever width 400px of height gives it.
 */
.carousel__slide img {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    object-fit: contain;
}

.carousel__slide figure { margin: 0; }
.carousel__slide figcaption { text-align: center; }

/* ---- enhanced: rail + single stage ---------------------------------- */

.carousel[data-ready="true"] .carousel__rail { display: grid; gap: var(--space-xs); }

.carousel[data-ready="true"] .carousel__stage > * { grid-area: 1 / 1; }

.carousel[data-ready="true"] .carousel__slide[hidden] { display: none; }

.carousel__thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
}

.carousel__thumb img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
    opacity: 0.55;
    transition: opacity 200ms ease;
}

.carousel__thumb:hover img,
.carousel__thumb[aria-current="true"] img { opacity: 1; }

.carousel__thumb[aria-current="true"] { border-color: var(--accent); }

/* ==========================================================================
   GALLERY
   ========================================================================== */

.gallery { display: grid; gap: var(--space-lg); }
.gallery__group h3 {
    font-family: var(--font-body);
    font-size: var(--step--2);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--space-sm);
}
.gallery__items { display: grid; gap: var(--space-sm); grid-template-columns: 1fr; }

/* ==========================================================================
   ARTICLES
   ========================================================================== */

.article-list { display: grid; gap: var(--space-lg); }

.article-card { display: grid; gap: 0.3rem; text-decoration: none; color: inherit; border-top: 1px solid var(--rule); padding-top: var(--space-sm); }
.article-card__meta { font-size: var(--step--2); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.article-card h3 { font-size: var(--step-2); margin: 0; }
.article-card p { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }

.article-body { max-width: var(--measure); }
.article-body h2 { font-size: var(--step-2); margin-top: var(--space-lg); }
.article-body h3 { font-size: var(--step-1); margin-top: var(--space-md); }
.article-body ul, .article-body ol { padding-left: 1.25rem; }
.article-body li + li { margin-top: 0.4rem; }

.article-meta { font-size: var(--step--2); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

.topic-list { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; margin: 0 0 var(--space-lg); padding: 0; }
.topic-list a {
    display: inline-block;
    font-size: var(--step--1);
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--rule-strong);
    text-decoration: none;
    color: var(--ink);
}
.topic-list a:hover, .topic-list a[aria-current="page"] { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ==========================================================================
   ATTRIBUTION BYLINE

   What is left of the team block, which was removed on 23 September 2026 by
   client instruction. .team__role stayed because the testimonial byline on
   the About page uses it, and that is not a team listing.
   ========================================================================== */

.team__role { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }

.section--dark .team__role { color: var(--ink-on-dark-muted); }

/* ==========================================================================
   FORMS
   ========================================================================== */

.form { display: grid; gap: var(--space-md); max-width: 46rem; }
.form__row { display: grid; gap: var(--space-sm); }
.form__field { display: grid; gap: 0.35rem; }

.form label {
    font-size: var(--step--1);
    font-weight: 500;
    color: var(--ink);
}

.form__req { font-weight: 400; color: var(--ink-muted); }
.form__opt { font-weight: 400; color: var(--ink-muted); }
.form__hint { font-size: var(--step--2); color: var(--ink-muted); margin: 0; }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="file"],
.form select,
.form textarea {
    width: 100%;
    font-family: inherit;
    font-size: var(--step-0);
    color: var(--ink);
    background: var(--off-white);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    padding: 0.7rem 0.8rem;
    min-height: 2.75rem;
}

.form textarea { min-height: 9rem; resize: vertical; line-height: 1.6; }

/* The select chevron is a data: URI because the CSP allows img-src data: and
   does not allow an external request. */
.form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23222425' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.7rem;
    padding-right: 2.25rem;
}

.form [aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }

.form__error { font-size: var(--step--1); color: var(--danger); margin: 0; font-weight: 500; }

.form-summary {
    border: 2px solid var(--danger);
    background: #FBF3F3;
    padding: var(--space-sm) var(--space-md);
    color: var(--danger);
}

.form-summary h2 { font-size: var(--step-1); color: var(--danger); margin-bottom: 0.4rem; }
.form-summary ul { margin: 0; padding-left: 1.25rem; font-size: var(--step--1); }
.form-summary a { color: var(--danger); }

.form__choices { display: grid; gap: 0.5rem; }
.form fieldset { border: 0; margin: 0; padding: 0; }
.form legend { font-size: var(--step--1); font-weight: 500; color: var(--ink); padding: 0; margin-bottom: 0.4rem; }

.form__choice { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.form__choice input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; accent-color: var(--navy); }

/* The honeypot. Off-screen rather than display:none, because a bot that reads
   computed styles skips a hidden field -- and a real assistive technology user
   reaching it is told plainly to leave it empty. */
.form__hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

/* ==========================================================================
   FLOATING "DISCUSS A PROJECT" CTA

   The brief is explicit that a green WhatsApp bubble must not dominate the
   design, so this is a restrained bottom-right control that expands into the
   channels that are actually configured. A channel with no confirmed value is
   ABSENT rather than broken -- there is no WhatsApp entry on this site today,
   because no WhatsApp number has been supplied.
   ========================================================================== */

.cta-dock {
    position: fixed;
    right: clamp(1rem, 0.5rem + 1.5vw, 2rem);
    bottom: clamp(1rem, 0.5rem + 1.5vw, 2rem);
    z-index: var(--z-cta);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;

    /* Revealed after one viewport of scrolling, so it never covers the hero's
       own call to action. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
}

body.cta-shown .cta-dock { opacity: 1; visibility: visible; transform: none; }

/* Hidden over the footer, which carries the same links. */
body.footer-reached .cta-dock { opacity: 0; visibility: hidden; }

.cta-dock__channels {
    display: grid;
    gap: 0.4rem;
    justify-items: end;
}

/*
 * 🚨 WITHOUT THIS THE DOCK WAS ALWAYS OPEN. Found 14 October 2026.
 *
 * `display: grid` above outranks the browser's own `[hidden] { display: none }`,
 * so site.js toggling `hidden` changed nothing: every channel showed the moment
 * the dock appeared, over the page, while the toggle's aria-expanded="false"
 * told a screen reader it was closed. Nobody saw it because the dock only
 * appears after scrolling, and screenshots were taken above the fold. It
 * surfaced when the mobile number made the stack one row taller.
 *
 * Same fix as .carousel__slide[hidden] -- any element this file gives a
 * display value AND that script hides with `hidden` needs one of these.
 */
.cta-dock__channels[hidden] { display: none; }

.cta-dock__channel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--navy);
    color: var(--ink-on-dark);
    border: 1px solid var(--rule-on-dark);
    padding: 0.6rem 0.9rem;
    font-size: var(--step--1);
    text-decoration: none;
    min-height: 2.75rem;
}

.cta-dock__channel:hover { background: var(--navy-raised); border-color: var(--accent); }

.cta-dock__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    /* Graphite, not navy: navy on bronze is 3.94:1 at this palette. */
    color: var(--ink-body);
    border: 1px solid var(--accent);
    padding: 0.85rem 1.25rem;
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    min-height: 2.75rem;
    box-shadow: 0 2px 18px rgba(13, 52, 92, 0.22);
}

.cta-dock__toggle:hover { background: var(--ivory); border-color: var(--ivory); }

/* Never printed: it is a screen control, and on paper it covers content. */
@media print {
    .cta-dock, .site-header, .skip-link { display: none !important; }
    body { color: #000; background: #fff; }
}

/* ==========================================================================
   BREAKPOINTS

   MOBILE FIRST, min-width only. Everything above is the 320px layout, and
   each query below adds to it -- so a width nobody thought about gets the
   narrow layout, which is the one that always works.

   Designed and verified at 320, 360, 390, 414, 768, 1024, 1280 and 1440 by
   tools/verify-responsive.mjs, which drives a real layout viewport over CDP
   rather than resizing a window.

   1040 IS THE DESKTOP THRESHOLD and it appears in JavaScript too. If you
   change it here, change DESKTOP in public/assets/js/site.js to match.
   ========================================================================== */

@media (min-width: 40rem) {                 /* 640px */
    .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }

    .filters__row { grid-template-columns: repeat(2, 1fr); }

    .facts__row { grid-template-columns: 12rem 1fr; gap: var(--space-sm); align-items: baseline; }

    .gallery__items { grid-template-columns: repeat(2, 1fr); }

    .steps { grid-template-columns: repeat(2, 1fr); }

    .compare--static .compare__frame { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }

    .timeline__item { grid-template-columns: 1fr 1fr; align-items: start; gap: var(--space-md); }
}

@media (min-width: 56rem) {                 /* 896px */
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }

    .steps { grid-template-columns: repeat(3, 1fr); }

    .featured { grid-template-columns: 1.35fr 1fr; gap: var(--space-lg); align-items: stretch; }

    .site-footer__top { grid-template-columns: 1fr 1.4fr; }
    .site-footer__cols { grid-template-columns: repeat(3, 1fr); }

    .article-list--two { grid-template-columns: repeat(2, 1fr); }

    .form__row--two { grid-template-columns: repeat(2, 1fr); }

    .gallery__items { grid-template-columns: repeat(3, 1fr); }

    /*
     * The rail moves to the left once there is room for it. Below this the
     * rail sits under the stage as a row: a 10% column at 320px is 32px, which
     * is under the 24px tap target once the border is counted, and it looks
     * broken besides.
     */
    .carousel[data-ready="true"] {
        grid-template-columns: minmax(4.5rem, 10%) 1fr;
        gap: var(--space-md);
        align-items: start;
    }

    .carousel[data-ready="true"] .carousel__stage { align-content: center; }
}

@media (min-width: 65rem) {                 /* 1040px - the desktop threshold */
    .site-header__nav { display: block; }

    /* The panel is a phone control. Removed outright at desktop width rather
       than merely hidden, so a stale `hidden` attribute cannot leave it
       laid out and reachable by keyboard behind the page. */
    .nav-panel { display: none !important; }

    .nav-toggle { display: none; }

    .site-header__call { display: inline-block; }

    .grid--4 { grid-template-columns: repeat(4, 1fr); }

    .filters { grid-template-columns: 1fr auto; align-items: end; gap: var(--space-md); }
    /* auto-fit, so a fourth control does not orphan onto its own row. */
    .filters__row { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

    .article-list { grid-template-columns: repeat(3, 1fr); }
    .article-list--two { grid-template-columns: repeat(2, 1fr); }

    .timeline__item { grid-template-columns: 8rem 1fr 1fr; }

    .project-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 80rem) {                 /* 1280px */
    .hero h1 { max-width: 22ch; }

    .split { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--space-2xl); align-items: start; }
}

/* ---- narrow phones ------------------------------------------------------ */
/*
 * The only max-width query in the file. At 320px the two long nav labels and
 * the CTA label together overflow the header, so the CTA drops to its short
 * form. Measured, not guessed.
 */
@media (max-width: 24rem) {                 /* 384px */
    .cta-dock__toggle { padding-inline: 1rem; }
    .brand-statement__lines span:nth-child(2) { padding-left: 0.75em; }
    .brand-statement__lines span:nth-child(3) { padding-left: 1.5em; }
}

/* ==========================================================================
   SPACING UTILITIES

   A short, closed list. There is no utility framework here on purpose: the
   section rhythm is carried by .section and the components space themselves,
   so these exist only for the handful of places a template needs one nudge.
   Their existence is what keeps inline style attributes out of the templates,
   which matters because the CSP would otherwise have to allow them.
   ========================================================================== */

.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mb-lg { margin-bottom: var(--space-lg); }

/* ==========================================================================
   TAP TARGETS

   WCAG 2.2 AA 2.5.8 asks for a 24x24 CSS px minimum, with an exception for a
   link inside a sentence. These rules bring the small standalone links and the
   filter controls up to that, and they exist because
   tools/verify-responsive.mjs measured them and they did not:

     footer column links      16px tall, 6.4px apart  -> 22.4px effective
     footer bottom links      16px tall
     breadcrumb links         14px tall
     project filter selects   19px tall  <- a real defect: the filter form is
                                            not inside .form, so it never
                                            picked up the control sizing

   The selects are the one that mattered. A 19px-tall control on a phone is
   hard to hit for anybody and unusable with a tremor.
   ========================================================================== */

.site-footer__col a,
.site-footer__bottom a {
    display: inline-block;
    padding-block: 0.3rem;
}

.breadcrumb a,
.breadcrumb li[aria-current="page"] {
    display: inline-block;
    padding-block: 0.35rem;
}

/* The filter controls, sharing the form's sizing rather than repeating it. */
.filters select,
.filters input[type="text"] {
    width: 100%;
    font-family: inherit;
    font-size: var(--step--1);
    color: var(--ink);
    background: var(--off-white);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    min-height: 2.75rem;
}

.filters select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23222425' stroke-width='1.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.7rem;
    padding-right: 2.25rem;
}

/* The "Clear" link beside the filter button sits on the same row as a 44px
   button, so it gets the same height rather than floating mid-row. */
.filters__actions .arrow-link {
    padding-block: 0.6rem;
}

/* ---- the last three, each measured rather than guessed -------------------- */

/*
 * The logo link measured 23.98px tall when it was a text wordmark -- the line
 * box rounded to 24 in a report and failed a >= 24 comparison.
 *
 * It is an image now and comfortably over the minimum on its own, but the
 * padding stays: it is what keeps the lockup off the bar's edges, and the
 * heights above are chosen assuming it is here. Removing it does not just
 * change spacing, it changes how much room the logo has.
 */
.site-header__logo {
    padding-block: 0.35rem;
}

/*
 * The consent checkbox was 18.4px. Its label wraps it, so the effective
 * target is larger -- but the control itself is what a pointer aims at, and
 * 24px is the standard. Sized in px rather than rem so a root font-size
 * change cannot quietly drop it below the threshold again.
 */
.form__choice input {
    width: 24px;
    height: 24px;
    margin-top: 0.1rem;
}

/* The privacy link inside the consent sentence. */
.form__choice a {
    display: inline-block;
    padding-block: 0.25rem;
}

/*
 * The header telephone link measured 23px tall, so it gets padding.
 *
 * PADDING ONLY -- NO display DECLARATION. The first version of this rule set
 * display: inline-block, which sits LATER in this file than the
 * .site-header__call { display: none } that hides it below 1040px -- so it
 * overrode that and put the phone number back into the header at every width.
 * At 390px the header then carried a wrapped phone number, the CTA and the
 * burger, which is exactly the cramping the desktop-only rule exists to avoid.
 *
 * The responsive suite did not catch it: nothing overflowed and nothing was
 * unreachable, it was simply the wrong header. Found by looking at a
 * screenshot, which is why the screenshots are taken.
 */
.site-header__call {
    padding-block: 0.35rem;
}

/*
 * flex: none on the burger.
 *
 * It declares width: 2.75rem, and at 320-360px the header's flex row was
 * SHRINKING it to 23px -- a declared width is a basis, not a floor, for a
 * flex item. Measured at 23x44px, which is a control nobody can hit reliably
 * and exactly the kind of defect that only appears at the narrowest widths.
 */
.nav-toggle {
    flex: none;
}

/* ==========================================================================
   HERO MEDIA, CORRECTED AFTER LOOKING AT IT

   The first render laid white display type over a placeholder plate at 42%
   opacity and the two fought: the plate's own caption sat directly behind the
   headline and neither could be read. Two changes, both measured against a
   screenshot rather than reasoned about:

     1. The plate for a full-bleed slot is now drawn WITHOUT text -- see
        content/image-slots.php full_bleed and tools/make-placeholders.php.
     2. A scrim sits between the image and the words, so the contrast of the
        headline is a property of the layout rather than of whichever image
        happens to be in the slot. That matters more, not less, once real
        photography arrives: a bright sky behind white type is the same
        problem.
   ========================================================================== */

.hero__media img { opacity: 0.30; }

.hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(13, 52, 92, 0.94) 0%, rgba(13, 52, 92, 0.55) 45%, rgba(13, 52, 92, 0.25) 100%);
}

/* The caption sits above the scrim, bottom right, out of the text column. */
.hero .media--placeholder,
.hero .media--illustrative { position: static; }

.hero__media figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    font-size: var(--step--2);
    letter-spacing: 0.04em;
}
