/*
 * ZEMTECH, a light software studio.
 * Slate on a cool light ground. Teal is the primary action and every live, active or data
 * state (navy text on it); blue marks technology and system accents. Montserrat speaks,
 * Inter reads. The signature object is a CSS 3D stack of technology layers.
 *
 * Layers: reset, tokens, base, layout, components, motion, utilities.
 */

@layer reset, tokens, base, layout, components, motion, utilities;

/* --- Fonts: self-hosted variable woff2 plus metric-matched fallbacks (no layout shift) --- */

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin-var.311d352d9323.woff2") format("woff2");
    font-weight: 100 900;
    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+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-var.260c81a4759b.woff2") format("woff2");
    font-weight: 100 900;
    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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
        U+FEFF, U+FFFD;
}

/* Measured with fontTools: Montserrat at 700 against Arial Bold, Inter at 400 against Arial. */
@font-face {
    font-family: "Montserrat Fallback";
    src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
    font-weight: 100 900;
    size-adjust: 110.87%;
    ascent-override: 87.31%;
    descent-override: 22.64%;
    line-gap-override: 0%;
}

@font-face {
    font-family: "Inter Fallback";
    src: local("Arial"), local("ArialMT");
    font-weight: 100 900;
    size-adjust: 107.3%;
    ascent-override: 90.29%;
    descent-override: 22.48%;
    line-gap-override: 0%;
}

/* ---------------------------------------------------------------------------------------- */

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

    * {
        margin: 0;
    }

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

    body {
        min-height: 100vh;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

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

    img {
        height: auto;
    }

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

    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        overflow-wrap: break-word;
    }

    ul[role="list"],
    ol[role="list"] {
        list-style: none;
        padding: 0;
    }

    button {
        cursor: pointer;
    }
}

/* ---------------------------------------------------------------------------------------- */

@layer tokens {
    :root {
        color-scheme: light;

        /* Ground and surfaces */
        --bg: #f8fafc;
        --surface: #ffffff;
        --surface-2: #f1f5f9;
        --surface-3: #e9eef5;
        --line: #e2e8f0;
        --line-strong: #cbd5e1;

        /* Ink (on --bg: ink 17:1, ink-2 10:1, ink-3 4.6:1) */
        --ink: #0f172a;
        --ink-2: #334155;
        --ink-3: #64748b;

        /* Signals. Bright teal and blue are fills and light; text uses the -ink shades. */
        --teal: #00d8c6;
        --teal-strong: #00c2b2;
        --teal-ink: #0f766e;
        --teal-soft: #e6fbf8;
        --teal-line: #9aeee5;
        --blue: #3182f6;
        --blue-ink: #2563eb;
        --blue-soft: #edf4ff;
        --navy: #0f172a;
        --amber: #ffb020;
        --amber-ink: #231a00;
        --danger: #dc2626;
        --whatsapp: #25d366;
        --whatsapp-ink: #0b7a3b;

        --brand-gradient: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
        --wash: radial-gradient(60rem 30rem at 85% -10%, rgb(0 216 198 / 0.14), transparent 60%),
            radial-gradient(50rem 30rem at 110% 40%, rgb(49 130 246 / 0.12), transparent 60%);

        /* Type */
        --font-display: "Montserrat", "Montserrat Fallback", system-ui, sans-serif;
        --font-body: "Inter", "Inter Fallback", system-ui, sans-serif;
        --step--2: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
        --step--1: clamp(0.84rem, 0.81rem + 0.15vw, 0.92rem);
        --step-0: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
        --step-1: clamp(1.15rem, 1.07rem + 0.4vw, 1.35rem);
        --step-2: clamp(1.4rem, 1.24rem + 0.8vw, 1.85rem);
        --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
        --step-4: clamp(2.25rem, 1.75rem + 2.5vw, 3.6rem);
        --step-5: clamp(2.7rem, 1.7rem + 4.4vw, 5.2rem);

        /* Space */
        --space-2xs: 0.25rem;
        --space-xs: 0.5rem;
        --space-s: 0.75rem;
        --space-m: 1rem;
        --space-l: 1.5rem;
        --space-xl: 2.25rem;
        --space-2xl: 3.25rem;
        --space-3xl: clamp(4rem, 2.8rem + 6vw, 8rem);

        /* Shape and depth: offset, soft, slate-tinted shadows */
        --radius-s: 8px;
        --radius-m: 12px;
        --radius-l: 18px;
        --radius-xl: 26px;
        --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.05);
        --shadow-s: 0 1px 2px rgb(15 23 42 / 0.04), 0 6px 16px -6px rgb(15 23 42 / 0.1);
        --shadow-m: 0 2px 4px rgb(15 23 42 / 0.04), 0 16px 32px -12px rgb(15 23 42 / 0.16);
        --shadow-l: 0 4px 8px rgb(15 23 42 / 0.04), 0 28px 56px -20px rgb(15 23 42 / 0.28);
        --shadow-teal: 0 10px 22px -10px rgb(0 160 148 / 0.55);

        /* Motion */
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --dur-fast: 150ms;
        --dur: 280ms;

        /* Layout */
        --container: 76rem;
        --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
        --header-h: 4.5rem;
    }
}

/* ---------------------------------------------------------------------------------------- */

@layer base {
    html {
        scroll-padding-top: calc(var(--header-h) + 1rem);
        scrollbar-color: var(--line-strong) var(--bg);
    }

    @media (prefers-reduced-motion: no-preference) {
        html {
            scroll-behavior: smooth;
        }
    }

    body {
        background: var(--bg);
        color: var(--ink-2);
        font-family: var(--font-body);
        font-size: var(--step-0);
        font-feature-settings: "cv11", "ss01";
    }

    h1,
    h2,
    h3,
    h4 {
        font-family: var(--font-display);
        font-weight: 700;
        line-height: 1.12;
        letter-spacing: -0.025em;
        color: var(--ink);
        text-wrap: balance;
    }

    h3 {
        font-size: var(--step-1);
        line-height: 1.34;
        letter-spacing: -0.015em;
    }

    h4 {
        font-size: var(--step-0);
        line-height: 1.35;
        letter-spacing: -0.01em;
    }

    p {
        text-wrap: pretty;
    }

    a {
        color: var(--teal-ink);
        text-decoration-thickness: 1px;
        text-underline-offset: 0.2em;
        transition: color var(--dur-fast) ease;
    }

    a:hover {
        color: var(--ink);
    }

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

    ::selection {
        background: rgb(0 216 198 / 0.28);
        color: var(--ink);
    }

    :focus-visible {
        outline: 2px solid var(--blue-ink);
        outline-offset: 3px;
        border-radius: 4px;
    }

    input,
    textarea {
        caret-color: var(--teal-ink);
    }

    main:focus {
        outline: none;
    }

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

/* ---------------------------------------------------------------------------------------- */

@layer layout {
    .container {
        width: min(100% - 2 * var(--gutter), var(--container));
        margin-inline: auto;
    }

    .container--narrow {
        width: min(100% - 2 * var(--gutter), 48rem);
    }

    .section {
        padding-block: var(--space-3xl);
    }

    .section + .section {
        padding-top: 0;
    }

    /* Text that continues straight on from a page header needs no second run-up */
    .page-hero + .section--prose {
        padding-top: var(--space-2xl);
    }

    .section--prose + .section--prose,
    .section--callout,
    .section--quote,
    .section--code,
    .section--figure {
        padding-block: var(--space-l);
    }

    .section__header {
        max-width: 46rem;
        margin-bottom: var(--space-2xl);
    }

    .section__title {
        font-size: var(--step-3);
        font-weight: 750;
        letter-spacing: -0.03em;
    }

    .section__intro {
        margin-top: var(--space-m);
        max-width: 60ch;
        color: var(--ink-3);
        font-size: var(--step-1);
        line-height: 1.55;
    }

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

    .grid--posts {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    }

    .grid--cases {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------------------------- */

@layer components {
    /* --- Access helpers ------------------------------------------------------------------ */

    .skip-link {
        position: absolute;
        left: var(--space-m);
        top: -5rem;
        z-index: 100;
        padding: var(--space-xs) var(--space-m);
        border-radius: var(--radius-s);
        background: var(--navy);
        color: #fff;
        font-weight: 600;
        text-decoration: none;
    }

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

    /* --- Icons --------------------------------------------------------------------------- */

    .icon {
        width: 1.25rem;
        height: 1.25rem;
        flex: none;
    }

    .icon--sm {
        width: 1rem;
        height: 1rem;
    }

    /* --- Buttons: teal is the one primary action; navy text keeps it at 9.9:1 ------------ */

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-xs);
        min-height: 2.9rem;
        padding: 0.7rem 1.35rem;
        border: 1px solid transparent;
        border-radius: var(--radius-m);
        font-family: var(--font-display);
        font-size: var(--step--1);
        font-weight: 650;
        letter-spacing: -0.005em;
        line-height: 1.1;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
            background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
            color var(--dur-fast) ease;
    }

    .btn .icon {
        transition: transform var(--dur) var(--ease-out);
    }

    .btn:hover {
        transform: translateY(-1px);
    }

    .btn:hover .icon {
        transform: translateX(3px);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn--primary {
        background: var(--teal);
        color: var(--navy);
        box-shadow: var(--shadow-xs);
    }

    .btn--primary:hover {
        background: var(--teal-strong);
        color: var(--navy);
        box-shadow: var(--shadow-teal);
    }

    .btn--ghost {
        border-color: var(--line-strong);
        background: var(--surface);
        color: var(--ink);
    }

    .btn--ghost:hover {
        border-color: var(--teal-ink);
        color: var(--ink);
        box-shadow: var(--shadow-s);
    }

    .btn--dark {
        background: var(--navy);
        color: #fff;
    }

    .btn--dark:hover {
        background: #1e293b;
        color: #fff;
        box-shadow: var(--shadow-m);
    }

    .btn--lg {
        min-height: 3.3rem;
        padding: 0.85rem 1.6rem;
        font-size: var(--step-0);
    }

    .btn--sm {
        min-height: 2.5rem;
        padding: 0.5rem 1rem;
    }

    .btn--block {
        width: 100%;
    }

    .btn--wa .icon {
        color: var(--whatsapp);
    }

    .link-arrow {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        font-weight: 600;
        color: var(--teal-ink);
        text-decoration: none;
    }

    .link-arrow .icon {
        transition: transform var(--dur) var(--ease-out);
    }

    .link-arrow:hover .icon {
        transform: translateX(3px);
    }

    /* Status light: teal only when something is actually live or selected */
    .led {
        display: inline-block;
        width: 0.5rem;
        height: 0.5rem;
        flex: none;
        border-radius: 50%;
        background: var(--line-strong);
    }

    .led.is-on {
        background: var(--teal);
        box-shadow: 0 0 0 3px rgb(0 216 198 / 0.22);
    }

    .part {
        font-size: var(--step--2);
        font-weight: 600;
        letter-spacing: 0.02em;
        font-variant-numeric: tabular-nums;
        color: var(--ink-3);
    }

    /* Quote-list toggle on service cards and the service datasheet */
    .quote-add {
        position: relative;
        z-index: 2;
        display: inline-grid;
        place-items: center;
        width: 2.25rem;
        height: 2.25rem;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: var(--surface);
        color: var(--ink-3);
        transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
            color var(--dur-fast) ease, transform var(--dur) var(--ease-out);
    }

    .quote-add .icon {
        width: 1.05rem;
        height: 1.05rem;
        grid-area: 1 / 1;
    }

    .quote-add:hover {
        border-color: var(--teal-ink);
        color: var(--teal-ink);
        transform: rotate(90deg);
    }

    .quote-add__check,
    .quote-add[aria-pressed="true"] .quote-add__plus {
        display: none;
    }

    .quote-add[aria-pressed="true"] .quote-add__check {
        display: block;
    }

    .quote-add[aria-pressed="true"] {
        border-color: var(--teal);
        background: var(--teal);
        color: var(--navy);
        transform: none;
    }

    .quote-toggle {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        padding: 0.5rem 0.9rem;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink);
        font-size: var(--step--1);
        font-weight: 600;
        transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
    }

    .quote-toggle:hover {
        border-color: var(--teal-ink);
    }

    .quote-toggle[aria-pressed="true"] {
        border-color: var(--teal);
        background: var(--teal-soft);
    }

    .quote-toggle__on,
    .quote-toggle[aria-pressed="true"] .quote-toggle__off {
        display: none;
    }

    .quote-toggle[aria-pressed="true"] .quote-toggle__on {
        display: inline;
    }

    .is-selected .led,
    [aria-pressed="true"] .led {
        background: var(--teal);
        box-shadow: 0 0 0 3px rgb(0 216 198 / 0.22);
    }

    /* --- Header: transparent over the hero, solid glass once the page scrolls ------------ */

    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        border-bottom: 1px solid transparent;
        transition: background-color var(--dur) ease, border-color var(--dur) ease,
            box-shadow var(--dur) ease;
    }

    .site-header.is-scrolled,
    .nav-open .site-header {
        border-color: var(--line);
        background: rgb(255 255 255 / 0.86);
        -webkit-backdrop-filter: saturate(1.6) blur(14px);
        backdrop-filter: saturate(1.6) blur(14px);
        box-shadow: 0 6px 20px -16px rgb(15 23 42 / 0.3);
    }

    .site-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-l);
        min-height: var(--header-h);
    }

    .brand {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        color: var(--ink);
        text-decoration: none;
    }

    .brand:hover {
        color: var(--ink);
    }

    /*
     * --- The ZEMTECH logo --------------------------------------------------------------------
     * Mark (isometric ribbon "S") and logotype (two-tone wordmark over "APPS / AI / SAAS / ML"),
     * both SVG, defined once per page in includes/logo_defs.html. The mark floats and tilts a
     * couple of degrees with a light sheen passing over it; the line reveals word by word, then
     * a teal highlight travels along it. The link around the logo carries its name.
     */
    .svg-defs {
        position: absolute;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    .logo {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
    }

    .logo__mark {
        width: 2.5rem;
        height: auto;
        flex: none;
        overflow: visible;
    }

    /* Height sets the size; the width follows the outlines' own proportions */
    .logo__type {
        height: 1.72rem;
        width: auto;
        overflow: visible;
    }

    .logo--lg .logo__mark {
        width: 3.3rem;
    }

    .logo--lg .logo__type {
        height: 2.2rem;
    }

    .logo__zem {
        fill: var(--navy);
    }

    .logo__tech,
    .logo__s {
        fill: var(--teal);
    }

    .logo__w {
        fill: var(--ink-3);
    }

    /* The ribbon's folds: a faint highlight, as light catching a crease */
    .zm__edge {
        fill: none;
        stroke: #fff;
        stroke-opacity: 0.22;
        stroke-width: 0.7;
    }

    .zm__body {
        transform-origin: 50px 57px;
    }

    .zm__sheen {
        transform: translateX(0) skewX(-18deg);
    }

    .zm--mono .zm__r,
    .zm--mono .zm__l {
        fill: #fff;
    }

    .zm--mono .zm__m {
        fill: rgb(255 255 255 / 0.86);
    }

    .zm--mono .zm__u {
        fill: rgb(255 255 255 / 0.76);
    }

    .zm--mono .zm__e {
        fill: rgb(255 255 255 / 0.6);
    }

    .zm--mono .zm__edge,
    .zm--mono .zm__sheen {
        display: none;
    }

    @media (prefers-reduced-motion: no-preference) {
        .logo .zm__body {
            animation: zm-float 7s ease-in-out infinite;
        }

        .logo .zm__sheen {
            animation: zm-sheen 6.5s ease-in-out 1.2s infinite;
        }

        .logo__tag > * {
            animation: tag-in 0.55s var(--ease-out) both;
        }

        .logo__tag > .logo__w {
            animation: tag-in 0.55s var(--ease-out) both, tag-glow 8s ease-in-out infinite;
        }

        .logo__tag > :nth-child(1) {
            animation-delay: 0.15s, 1.4s;
        }

        .logo__tag > :nth-child(2) {
            animation-delay: 0.25s;
        }

        .logo__tag > :nth-child(3) {
            animation-delay: 0.35s, 1.8s;
        }

        .logo__tag > :nth-child(4) {
            animation-delay: 0.45s;
        }

        .logo__tag > :nth-child(5) {
            animation-delay: 0.55s, 2.2s;
        }

        .logo__tag > :nth-child(6) {
            animation-delay: 0.65s;
        }

        .logo__tag > :nth-child(7) {
            animation-delay: 0.75s, 2.6s;
        }
    }

    @keyframes zm-float {
        0%,
        100% {
            transform: translateY(0) rotate(0deg);
        }

        50% {
            transform: translateY(-2.5px) rotate(-2.5deg);
        }
    }

    @keyframes zm-sheen {
        0%,
        55% {
            transform: translateX(0) skewX(-18deg);
        }

        100% {
            transform: translateX(210px) skewX(-18deg);
        }
    }

    /* In SVG units: 14 is about 3px at the header's size */
    @keyframes tag-in {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }

    /* One word at a time lights teal, then settles back: 0.4s apart along the line */
    @keyframes tag-glow {
        0%,
        12%,
        100% {
            fill: var(--ink-3);
        }

        5% {
            fill: var(--teal-ink);
        }
    }

    .nav-toggle {
        display: none;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink);
    }

    .nav-toggle__close,
    .nav-open .nav-toggle__open {
        display: none;
    }

    .nav-open .nav-toggle__close {
        display: block;
    }

    .nav__list {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        list-style: none;
        padding: 0;
    }

    .nav__link {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.55rem 0.8rem;
        border: 0;
        border-radius: var(--radius-s);
        background: none;
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 550;
        text-decoration: none;
        transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
    }

    .nav__link:hover,
    .nav__trigger[aria-expanded="true"] {
        color: var(--ink);
        background: var(--surface-2);
    }

    .nav__link.is-active,
    .nav__link[aria-current="page"] {
        color: var(--ink);
        box-shadow: inset 0 -2px 0 var(--teal);
        border-radius: 0;
    }

    .nav__chevron {
        transition: transform var(--dur) var(--ease-out);
    }

    .nav__trigger[aria-expanded="true"] .nav__chevron {
        transform: rotate(180deg);
    }

    .nav__item--cta {
        margin-left: var(--space-s);
    }

    /* The quote-list tally on the header button: always shown, filled when the list holds parts */
    .quote-count {
        display: inline-grid;
        place-items: center;
        min-width: 1.35rem;
        height: 1.35rem;
        padding-inline: 0.3rem;
        border: 1px solid rgb(15 23 42 / 0.25);
        border-radius: 999px;
        color: var(--navy);
        font-family: var(--font-body);
        font-size: 0.72rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
    }

    .quote-count.is-on {
        border-color: var(--navy);
        background: var(--navy);
        color: #fff;
    }

    /* Services catalogue menu */
    .nav__item--mega {
        position: static;
    }

    .mega {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-6px);
        border-bottom: 1px solid var(--line);
        background: rgb(255 255 255 / 0.98);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        box-shadow: var(--shadow-l);
        transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
            visibility 0s linear var(--dur);
    }

    .nav__item--mega.is-open .mega,
    .no-js .nav__item--mega:focus-within .mega,
    .no-js .nav__item--mega:hover .mega {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition-delay: 0s;
    }

    .mega__inner {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-xl);
        width: min(100% - 2 * var(--gutter), var(--container));
        margin-inline: auto;
        padding-block: var(--space-xl);
    }

    .mega__heading {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: var(--space-s);
        font-family: var(--font-display);
        font-weight: 700;
        color: var(--ink);
    }

    .mega__tagline {
        margin-top: var(--space-2xs);
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .mega__list {
        display: grid;
        gap: 2px;
        margin-top: var(--space-m);
        list-style: none;
        padding: 0;
    }

    .mega__link {
        display: flex;
        align-items: center;
        gap: var(--space-s);
        padding: 0.5rem 0.6rem;
        border-radius: var(--radius-s);
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 500;
        text-decoration: none;
        transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
    }

    .mega__link:hover {
        background: var(--teal-soft);
        color: var(--ink);
    }

    .mega__icon {
        color: var(--teal-ink);
    }

    .mega__link .part {
        margin-left: auto;
    }

    .mega__all {
        grid-column: 1 / -1;
        justify-self: start;
    }

    @media (max-width: 63.99rem) {
        .nav-toggle {
            display: inline-grid;
        }

        .nav {
            position: fixed;
            inset: var(--header-h) 0 auto;
            max-height: calc(100dvh - var(--header-h));
            overflow-y: auto;
            visibility: hidden;
            opacity: 0;
            transform: translateY(-8px);
            border-bottom: 1px solid var(--line);
            background: var(--surface);
            box-shadow: var(--shadow-l);
            transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
                visibility 0s linear var(--dur);
        }

        .nav-open .nav {
            visibility: visible;
            opacity: 1;
            transform: none;
            transition-delay: 0s;
        }

        .no-js .nav {
            position: static;
            visibility: visible;
            opacity: 1;
            transform: none;
        }

        .nav__list {
            flex-direction: column;
            align-items: stretch;
            gap: 0;
            padding: var(--space-s) var(--gutter) var(--space-l);
        }

        .nav__link {
            width: 100%;
            justify-content: space-between;
            padding: 0.9rem 0.25rem;
            border-bottom: 1px solid var(--line);
            border-radius: 0;
            font-size: var(--step-0);
        }

        .nav__link:hover {
            background: none;
        }

        .nav__item--cta {
            margin: var(--space-l) 0 0;
        }

        .nav__item--cta .btn {
            width: 100%;
        }

        .mega {
            position: static;
            display: none;
            visibility: visible;
            opacity: 1;
            transform: none;
            border: 0;
            box-shadow: none;
            background: none;
        }

        .nav__item--mega.is-open .mega {
            display: block;
        }

        .mega__inner {
            grid-template-columns: 1fr;
            gap: var(--space-l);
            width: 100%;
            padding: var(--space-m) 0;
        }
    }

    /* --- Hero ---------------------------------------------------------------------------- */

    .hero {
        position: relative;
        margin-top: calc(-1 * var(--header-h));
        padding-block: calc(var(--header-h) + clamp(2.5rem, 1rem + 5vw, 5.5rem))
            clamp(3rem, 2rem + 4vw, 5rem);
        background: var(--wash), var(--bg);
        overflow: clip;
    }

    /* A faint engineering grid, fading out towards the copy */
    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(to right, rgb(15 23 42 / 0.045) 1px, transparent 1px),
            linear-gradient(to bottom, rgb(15 23 42 / 0.045) 1px, transparent 1px);
        background-size: 48px 48px;
        -webkit-mask-image: radial-gradient(ellipse 60% 70% at 78% 45%, #000 15%, transparent 70%);
        mask-image: radial-gradient(ellipse 60% 70% at 78% 45%, #000 15%, transparent 70%);
        pointer-events: none;
    }

    .hero__inner {
        position: relative;
        display: grid;
        gap: var(--space-2xl);
        align-items: center;
    }

    @media (min-width: 64rem) {
        .hero__inner {
            grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
            min-height: min(40rem, calc(100svh - var(--header-h) - 6rem));
        }

        /* With motion the hero pins, so it fills the first screen exactly: nothing below it is
           visible at load, and pinning never shifts visible content. */
        .motion .hero {
            display: grid;
            align-content: center;
            min-height: 100svh;
        }
    }

    .hero__title {
        font-size: var(--step-5);
        font-weight: 800;
        line-height: 1.02;
        letter-spacing: -0.04em;
        max-width: 13ch;
    }

    /* "Karachi." in deep teal: 3.6:1 as large display text on the ground */
    .hero__title .hl {
        color: #0d9488;
    }

    .hero__intro {
        margin-top: var(--space-l);
        max-width: 50ch;
        color: var(--ink-3);
        font-size: var(--step-1);
        line-height: 1.55;
    }

    .hero__actions {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-s);
        margin-top: var(--space-xl);
    }

    .hero__spec {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-xs) var(--space-l);
        margin-top: var(--space-xl);
        list-style: none;
        padding: 0;
        color: var(--ink-3);
        font-size: var(--step--1);
        font-weight: 500;
    }

    .hero__spec li {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
    }

    .hero__visual {
        position: relative;
        display: grid;
        place-items: center;
    }

    /*
     * --- The system: an isometric stack of technology layers in CSS 3D --------------------
     * scene (perspective) > float (breathing, cursor tilt) > stack (fixed isometric angle)
     * > layer (height in the stack) > top face + two edges. motion.js drives the layers.
     */
    .system {
        /* Sized from its own width (container units), so stack and labels never collide */
        container-type: inline-size;
        --plate: 40cqi;
        --gap: calc(var(--plate) * 0.1);
        --thick: calc(var(--plate) * 0.035);
        position: relative;
        width: min(100%, 34rem);
        aspect-ratio: 1 / 0.92;
        display: grid;
        place-items: center;
    }

    .system__scene {
        position: relative;
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        perspective: 1600px;
        perspective-origin: 50% 30%;
        transform: translateX(-16%);
    }

    .system__float {
        position: relative;
        transform-style: preserve-3d;
    }

    .system__stack {
        position: relative;
        width: var(--plate);
        height: var(--plate);
        transform-style: preserve-3d;
        transform: rotateX(57deg) rotateZ(-42deg);
        /* The layers rise above the base plate, so the base sits lower: this centres the
           stack's visible mass (about 0.31 plate above the base) in the scene. */
        translate: 0 calc(var(--plate) * 0.31);
    }

    .layer {
        --j: 0;
        position: absolute;
        inset: 0;
        transform-style: preserve-3d;
        transform: translateZ(calc(var(--j) * var(--gap)));
    }

    /* --j counts from the bottom layer (0) upwards */
    .layer:nth-last-child(2) { --j: 1; }
    .layer:nth-last-child(3) { --j: 2; }
    .layer:nth-last-child(4) { --j: 3; }
    .layer:nth-last-child(5) { --j: 4; }
    .layer:nth-last-child(6) { --j: 5; }
    .layer:nth-last-child(7) { --j: 6; }
    .layer:nth-last-child(8) { --j: 7; }
    .layer:nth-last-child(9) { --j: 8; }
    .layer:nth-last-child(10) { --j: 9; }

    /* The body is what falls in; the layer itself is what the scroll story spreads */
    .layer__body {
        position: absolute;
        inset: 0;
        transform-style: preserve-3d;
    }

    .layer__top {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        border-radius: 7px;
        background: linear-gradient(135deg, rgb(0 216 198 / 0.9) 0%, rgb(49 130 246 / 0.88) 100%);
        box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.55), inset 0 0 26px rgb(255 255 255 / 0.22);
        transform: translateZ(var(--thick));
        overflow: hidden;
    }

    /* A light band that sweeps across the glass */
    .layer__top::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / 0.32) 45%,
                transparent 60%);
    }

    .layer:not(:first-child) .layer__body .layer__top {
        background: linear-gradient(135deg, rgb(0 196 182 / 0.72) 0%, rgb(49 130 246 / 0.7) 100%);
    }

    .layer__glow {
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 50% 50%, rgb(255 255 255 / 0.95), rgb(0 216 198 / 0.4)
                    55%, transparent 75%);
        opacity: 0;
    }

    .layer__mark {
        position: relative;
        width: 36%;
        height: auto;
        filter: drop-shadow(0 2px 6px rgb(15 23 42 / 0.22));
        transform: rotate(42deg);
    }

    .layer__edge {
        position: absolute;
        background: linear-gradient(90deg, #0aa597, #1f6fe0);
    }

    .layer__edge--front {
        left: 0;
        width: 100%;
        top: calc(100% - var(--thick));
        height: var(--thick);
        transform-origin: 50% 100%;
        transform: rotateX(-90deg);
        background: linear-gradient(90deg, #0b9e91, #2466d8);
    }

    .layer__edge--side {
        top: 0;
        height: 100%;
        left: calc(100% - var(--thick));
        width: var(--thick);
        transform-origin: 100% 50%;
        transform: rotateY(90deg);
        background: linear-gradient(180deg, #1b7fd0, #1a57c2);
    }

    .system__shadow {
        position: absolute;
        left: 50%;
        top: calc(50% + var(--plate) * 0.5);
        width: calc(var(--plate) * 1.5);
        height: calc(var(--plate) * 0.42);
        border-radius: 50%;
        background: radial-gradient(closest-side, rgb(15 23 42 / 0.26), transparent);
        filter: blur(6px);
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    /*
     * A layer's label: anchored at the slab's screen-right corner (local 100%, 100%) on its top
     * face, then turned back to face the viewer. rotateZ(42deg) rotateX(-57deg) is the inverse
     * of the stack's angle, so the text is flat to the screen while the anchor rides the slab.
     */
    .layer__label {
        position: absolute;
        left: 100%;
        top: 100%;
        display: flex;
        align-items: center;
        white-space: nowrap;
        transform-origin: 0 0;
        transform: translateZ(var(--thick)) rotateZ(42deg) rotateX(-57deg) translateY(-50%);
        color: var(--ink);
        font-family: var(--font-display);
        font-size: var(--step--1);
        font-weight: 650;
        line-height: 1;
    }

    .layer__tick {
        width: calc(var(--plate) * 0.3);
        border-top: 1.5px dashed rgb(15 23 42 / 0.32);
        transform-origin: left center;
    }

    .layer__tag {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding-left: 0.3rem;
    }

    .system__dot {
        width: 0.55rem;
        height: 0.55rem;
        flex: none;
        border-radius: 50%;
        background: var(--teal);
        box-shadow: 0 0 0 3px rgb(0 216 198 / 0.2);
    }

    .system__particles span {
        position: absolute;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--teal);
        opacity: 0;
    }

    @media (max-width: 40rem) {
        .system {
            width: min(100%, 24rem);
            aspect-ratio: 1 / 0.78;
        }

        .hero {
            padding-bottom: var(--space-l);
        }

        .layer__label {
            font-size: var(--step--2);
        }
    }

    /* --- Page hero (inner pages) --------------------------------------------------------- */

    .page-hero {
        position: relative;
        margin-top: calc(-1 * var(--header-h));
        padding-block: calc(var(--header-h) + clamp(2.5rem, 1.5rem + 4vw, 4.5rem))
            clamp(2.5rem, 1.75rem + 3vw, 4rem);
        border-bottom: 1px solid var(--line);
        background: var(--wash), var(--bg);
    }

    .page-hero__title {
        font-size: var(--step-4);
        font-weight: 800;
        letter-spacing: -0.035em;
        max-width: 22ch;
    }

    .page-hero__intro {
        margin-top: var(--space-l);
        max-width: 62ch;
    }

    .lead {
        color: var(--ink-3);
        font-size: var(--step-1);
        line-height: 1.55;
    }

    .breadcrumbs {
        margin-bottom: var(--space-l);
    }

    .breadcrumbs__list {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2xs) var(--space-xs);
        list-style: none;
        padding: 0;
        color: var(--ink-3);
        font-size: var(--step--1);
        font-weight: 500;
    }

    .breadcrumbs__item + .breadcrumbs__item::before {
        content: "/";
        margin-right: var(--space-xs);
        color: var(--line-strong);
    }

    .breadcrumbs a {
        color: var(--ink-3);
        text-decoration: none;
    }

    .breadcrumbs a:hover {
        color: var(--teal-ink);
    }

    /* Service datasheet strip */
    /* Hairlines are each cell's own outline, so an unfilled cell stays plain white */
    .datasheet {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
        gap: 1px;
        margin-top: var(--space-xl);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        overflow: hidden;
        box-shadow: var(--shadow-s);
    }

    .datasheet > div {
        padding: var(--space-m) var(--space-l);
        outline: 1px solid var(--line);
    }

    .datasheet dt {
        color: var(--ink-3);
        font-size: var(--step--2);
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .datasheet dd {
        margin-top: var(--space-2xs);
        color: var(--ink);
        font-weight: 600;
    }

    /* --- Services: groups of modular cards ----------------------------------------------- */

    .jump {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
        margin: calc(-1 * var(--space-l)) 0 var(--space-2xl);
        list-style: none;
        padding: 0;
    }

    .jump__link {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        padding: 0.45rem 1rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 600;
        text-decoration: none;
        transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease,
            background-color var(--dur-fast) ease;
    }

    .jump__link:hover {
        border-color: var(--teal);
        background: var(--teal-soft);
        color: var(--ink);
    }

    .jump__count {
        color: var(--ink-3);
        font-variant-numeric: tabular-nums;
    }

    .cabinet + .cabinet {
        margin-top: var(--space-3xl);
    }

    .cabinet__head {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: var(--space-xs) var(--space-l);
        margin-bottom: var(--space-l);
    }

    .cabinet__title {
        font-size: var(--step-2);
        font-weight: 750;
        letter-spacing: -0.025em;
    }

    .cabinet__tagline {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    /* Counted grid: cabinet_layout marks the cells that stretch, so rows always close */
    .cards {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-m);
    }

    @media (min-width: 40rem) {
        .cards {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .cards--c1 {
            grid-template-columns: minmax(0, 1fr);
        }
    }

    @media (40rem <= width < 64rem) {
        .card--md-full {
            grid-column: 1 / -1;
        }
    }

    @media (min-width: 64rem) {
        .cards {
            gap: var(--space-l);
        }

        .cards--c3 {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .card--span-2 {
            grid-column: span 2;
        }

        .card--span-3 {
            grid-column: span 3;
        }
    }

    .card {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--space-s);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
        transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
            border-color var(--dur-fast) ease;
    }

    /* Hover lifts with `translate`, which composes with the transforms motion.js writes */
    .card:hover,
    .card:focus-within {
        translate: 0 -3px;
        border-color: var(--teal-line);
        box-shadow: var(--shadow-m);
    }

    .card__top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--space-s);
        margin-bottom: var(--space-2xs);
    }

    .card__icon {
        display: inline-grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: var(--radius-m);
        background: var(--teal-soft);
        color: var(--teal-ink);
        transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease;
    }

    .card:hover .card__icon {
        transform: translateY(-2px) rotate(-4deg);
        background: #d4f7f2;
    }

    .card__title {
        font-size: var(--step-1);
        font-weight: 700;
    }

    .card__link {
        color: var(--ink);
        text-decoration: none;
    }

    .card__link:hover {
        color: var(--ink);
    }

    /* The whole card opens the page; the quote toggle stays clickable above the overlay */
    .card__link::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
    }

    .card__link:focus-visible {
        outline: none;
    }

    .card__link:focus-visible::after {
        outline: 2px solid var(--blue-ink);
        outline-offset: 2px;
    }

    .card__text {
        color: var(--ink-3);
        font-size: var(--step--1);
        line-height: 1.6;
    }

    .card__more {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        margin-top: auto;
        padding-top: var(--space-xs);
        color: var(--teal-ink);
        font-size: var(--step--1);
        font-weight: 650;
    }

    .card__more .icon {
        transition: transform var(--dur) var(--ease-out);
    }

    .card:hover .card__more .icon {
        transform: translateX(4px);
    }

    .card.is-selected {
        border-color: var(--teal);
        box-shadow: 0 0 0 1px var(--teal), var(--shadow-s);
    }

    /* The filler cell that closes the catalogue: a teal build card */
    .card--build {
        justify-content: center;
        border: 0;
        background: var(--brand-gradient);
        color: var(--navy);
        overflow: hidden;
    }

    .card--build::before {
        content: "";
        position: absolute;
        inset: auto -30% -60% auto;
        width: 16rem;
        height: 16rem;
        border-radius: 50%;
        background: rgb(255 255 255 / 0.16);
        pointer-events: none;
    }

    .card--build:hover {
        border-color: transparent;
    }

    .card--build__title {
        position: relative;
        font-family: var(--font-display);
        font-size: var(--step-2);
        font-weight: 800;
        line-height: 1.15;
        letter-spacing: -0.03em;
        color: var(--navy);
    }

    .card--build__text {
        position: relative;
        max-width: 34ch;
        /* navy holds 4.8:1 even where the gradient reaches full blue */
        color: var(--navy);
        font-size: var(--step--1);
    }

    .card--build .btn {
        position: relative;
        align-self: flex-start;
        margin-top: var(--space-xs);
    }

    /* --- Data flow: one particle carries a request through the AI line ------------------- */

    .flow {
        position: relative;
        margin: 0 0 var(--space-l);
        padding: var(--space-l) var(--space-l) var(--space-m);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: linear-gradient(180deg, var(--surface), var(--blue-soft));
        overflow: hidden;
    }

    .flow__caption {
        margin-bottom: var(--space-m);
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 500;
    }

    .flow__track {
        position: relative;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        list-style: none;
        padding: 0;
    }

    /* the wire between the nodes */
    .flow__track::before {
        content: "";
        position: absolute;
        left: calc(100% / var(--n, 7) / 2);
        right: calc(100% / var(--n, 7) / 2);
        top: 1.1rem;
        border-top: 2px dashed rgb(49 130 246 / 0.3);
    }

    .flow--n3 { --n: 3; }
    .flow--n4 { --n: 4; }
    .flow--n5 { --n: 5; }
    .flow--n6 { --n: 6; }
    .flow--n7 { --n: 7; }
    .flow--n8 { --n: 8; }
    .flow--n9 { --n: 9; }
    .flow--n10 { --n: 10; }

    .flow__node {
        position: relative;
        display: grid;
        justify-items: center;
        gap: var(--space-xs);
        text-align: center;
    }

    .flow__dot {
        position: relative;
        display: grid;
        place-items: center;
        width: 2.2rem;
        height: 2.2rem;
        border: 1px solid var(--line-strong);
        border-radius: 50%;
        background: var(--surface);
        transition: border-color var(--dur) ease, background-color var(--dur) ease,
            box-shadow var(--dur) ease;
    }

    .flow__dot::after {
        content: "";
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        background: var(--line-strong);
        transition: background-color var(--dur) ease;
    }

    .flow__label {
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 600;
        transition: color var(--dur) ease;
    }

    .flow__node.is-active .flow__dot {
        border-color: var(--teal);
        background: var(--teal-soft);
        box-shadow: 0 6px 14px -6px rgb(0 160 148 / 0.6);
    }

    .flow__node.is-active .flow__dot::after {
        background: var(--teal);
    }

    .flow__node.is-active .flow__label {
        color: var(--ink);
    }

    .flow__particle {
        position: absolute;
        left: 0;
        top: 0;
        width: 0.7rem;
        height: 0.7rem;
        border-radius: 50%;
        background: var(--teal);
        box-shadow: 0 0 0 4px rgb(0 216 198 / 0.25), 0 4px 10px rgb(0 160 148 / 0.5);
        opacity: 0;
        pointer-events: none;
    }

    @media (max-width: 40rem) {
        .flow__track {
            grid-auto-flow: row;
            grid-auto-columns: auto;
            gap: var(--space-s);
        }

        .flow__track::before {
            left: 1.05rem;
            right: auto;
            top: 1.1rem;
            bottom: 1.1rem;
            border-top: 0;
            border-left: 2px dashed rgb(49 130 246 / 0.3);
        }

        .flow__node {
            grid-auto-flow: column;
            justify-content: start;
            align-items: center;
            gap: var(--space-s);
            text-align: left;
        }
    }

    /* --- Feature grids (why us), spec sheets --------------------------------------------- */

    .features {
        display: grid;
        gap: var(--space-m);
        list-style: none;
        padding: 0;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
    }

    .feature {
        display: flex;
        flex-direction: column;
        gap: var(--space-s);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
        transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
            border-color var(--dur-fast) ease;
    }

    .feature:hover {
        translate: 0 -3px;
        border-color: var(--teal-line);
        box-shadow: var(--shadow-m);
    }

    .feature__icon {
        display: inline-grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: var(--radius-m);
        background: var(--teal-soft);
        color: var(--teal-ink);
    }

    .feature__title {
        font-size: var(--step-1);
    }

    .feature__text {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    @media (min-width: 56rem) {
        .features--bento {
            grid-template-columns: repeat(3, 1fr);
        }

        .features--bento .feature:first-child {
            grid-row: span 2;
            justify-content: flex-end;
            background: var(--brand-gradient);
            border: 0;
        }

        .features--bento .feature:first-child :is(.feature__title, .feature__text) {
            color: var(--navy);
        }

        .features--bento .feature:first-child .feature__title {
            font-size: var(--step-3);
            font-weight: 800;
        }

        .features--bento .feature:nth-child(4) {
            grid-column: span 2;
        }
    }

    /* Wider tracks: six checks sit as two full rows of three, never four and two */
    .features--checklist {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    }

    .features--checklist .feature {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: var(--space-m);
        border: 0;
        background: none;
        box-shadow: none;
        padding: 0 0 var(--space-l);
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .features--checklist .feature:hover {
        translate: none;
    }

    .features--checklist .feature__icon {
        grid-row: span 2;
        width: auto;
        height: auto;
        background: none;
    }

    .spec {
        border-top: 1px solid var(--line-strong);
    }

    .spec__row {
        display: grid;
        gap: var(--space-xs) var(--space-xl);
        padding-block: var(--space-l);
        border-bottom: 1px solid var(--line);
    }

    @media (min-width: 48rem) {
        .spec__row {
            grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
            align-items: baseline;
        }
    }

    .spec__key {
        font-family: var(--font-display);
        font-size: var(--step-1);
        font-weight: 700;
        line-height: 1.3;
        color: var(--ink);
    }

    .spec__value {
        max-width: 60ch;
        color: var(--ink-3);
    }

    /* --- Stats --------------------------------------------------------------------------- */

    .stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
        gap: var(--space-m);
    }

    .stat {
        display: flex;
        flex-direction: column-reverse;
        justify-content: flex-end;
        gap: var(--space-2xs);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
    }

    .stat__value {
        font-family: var(--font-display);
        font-size: var(--step-3);
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.03em;
        color: var(--ink);
    }

    .stat__label {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .stat__source {
        order: -1;
        font-size: var(--step--2);
    }

    /* --- Process: the build line (pinned and horizontal on desktop with motion) ---------- */

    .process {
        position: relative;
    }

    .process__track {
        display: grid;
        gap: var(--space-m);
        list-style: none;
        padding: 0;
    }

    @media (min-width: 48rem) {
        .process__track {
            grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
        }
    }

    .process__step {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--space-xs);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        box-shadow: var(--shadow-xs);
        transition: border-color var(--dur) ease, box-shadow var(--dur) ease, opacity var(--dur) ease;
    }

    .process__number {
        display: inline-grid;
        place-items: center;
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: var(--space-xs);
        border: 1px solid var(--teal-line);
        border-radius: 50%;
        background: var(--teal-soft);
        color: var(--teal-ink);
        font-family: var(--font-display);
        font-size: var(--step--1);
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        transition: background-color var(--dur) ease, color var(--dur) ease;
    }

    .process__title {
        font-size: var(--step-1);
    }

    .process__text {
        color: var(--ink-3);
        font-size: var(--step--1);
        max-width: 42ch;
    }

    .process__step.is-active {
        border-color: var(--teal);
        box-shadow: var(--shadow-m);
    }

    .process__step.is-active .process__number {
        background: var(--teal);
        color: var(--navy);
    }

    .process__step.is-past {
        opacity: 0.62;
    }

    .process__done {
        display: flex;
        align-items: center;
        gap: var(--space-s);
        margin-top: var(--space-xl);
        color: var(--ink-2);
        font-weight: 600;
    }

    .process__done .icon {
        color: var(--teal-ink);
    }

    .process__track,
    .process__done {
        width: min(100% - 2 * var(--gutter), var(--container));
        margin-inline: auto;
    }

    .process__rail {
        display: none;
    }

    /* Pinned below the header, the whole line (heading, rail, stations) sits centred on screen */
    @media (min-width: 64rem) {
        .motion-ok .section--process {
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-height: calc(100svh - var(--header-h));
            padding-block: var(--space-2xl);
        }
    }

    /* Desktop with motion: wide stations on a rail that the page scroll drives sideways */
    @media (min-width: 64rem) {
        .motion-ok .process--rail .process__viewport {
            overflow: clip;
        }

        .motion-ok .process--rail .process__track {
            display: flex;
            gap: var(--space-l);
            width: max-content;
            margin-inline: 0;
            padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2));
        }

        .motion-ok .process--rail .process__step {
            width: 26rem;
            min-height: 16rem;
            padding: var(--space-xl);
        }

        .motion-ok .process--rail .process__title {
            font-size: var(--step-2);
        }

        .motion-ok .process--rail .process__rail {
            display: block;
            position: relative;
            width: min(100% - 2 * var(--gutter), var(--container));
            height: 3px;
            margin: 0 auto var(--space-xl);
            border-radius: 3px;
            background: var(--line);
            overflow: hidden;
        }
    }

    .process__rail-fill {
        position: absolute;
        inset: 0;
        background: var(--brand-gradient);
        transform-origin: left center;
        transform: scaleX(0);
    }

    /* --- Proof spotlight, example scenario ----------------------------------------------- */

    .proof {
        display: grid;
        gap: var(--space-s);
        padding: var(--space-xl);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        box-shadow: var(--shadow-s);
    }

    .proof__title {
        font-size: var(--step-2);
    }

    .proof__title a {
        color: var(--ink);
        text-decoration: none;
    }

    .proof__meta {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
    }

    .proof__text {
        max-width: 60ch;
    }

    .scenario {
        padding: var(--space-xl);
        border: 1px dashed #e9a91d;
        border-radius: var(--radius-l);
        background: #fffbeb;
    }

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

    .scenario__title {
        font-size: var(--step-2);
    }

    .scenario__note {
        margin-top: var(--space-xs);
        color: #7c5a00;
        font-size: var(--step--1);
    }

    .scenario__body {
        display: grid;
        gap: var(--space-m);
        margin-top: var(--space-l);
    }

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

    .scenario__body dt {
        color: #7c5a00;
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .scenario__body dd {
        margin-top: var(--space-2xs);
    }

    /* Amber marks anything unverified: example scenarios and facts still to confirm */
    .sticker {
        display: inline-block;
        padding: 0.2rem 0.55rem;
        border-radius: 6px;
        background: var(--amber);
        color: var(--amber-ink);
        font-size: var(--step--2);
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    /* --- Case studies: application notes and the product showcase ------------------------ */

    .note {
        position: relative;
        display: grid;
        border: 1px solid var(--line);
        border-radius: var(--radius-xl);
        background: var(--surface);
        box-shadow: var(--shadow-s);
        overflow: hidden;
        transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur-fast) ease;
    }

    .note:hover {
        border-color: var(--teal-line);
        box-shadow: var(--shadow-m);
    }

    @media (min-width: 56rem) {
        .note {
            grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        }
    }

    .note__plate {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--space-l);
        padding: var(--space-xl);
        background: var(--wash), var(--surface-2);
        border-bottom: 1px solid var(--line);
    }

    @media (min-width: 56rem) {
        .note__plate {
            border-bottom: 0;
            border-right: 1px solid var(--line);
        }
    }

    .note__plate img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .note__status {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        color: var(--ink-2);
    }

    .note__spec {
        position: relative;
        display: grid;
        margin: 0;
        padding: 0;
        list-style: none;
        border-top: 1px solid var(--line-strong);
    }

    .note__spec > li,
    .note__spec > div {
        display: grid;
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: var(--space-s);
        align-items: baseline;
        padding-block: 0.65rem;
        border-bottom: 1px solid var(--line);
        color: var(--ink);
        font-size: var(--step--1);
    }

    .note__spec > div {
        grid-template-columns: 6rem minmax(0, 1fr);
    }

    .note__spec--plain > li {
        grid-template-columns: minmax(0, 1fr);
    }

    .note__step,
    .note__spec dt {
        color: var(--teal-ink);
        font-size: var(--step--2);
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    .note__spec dt {
        color: var(--ink-3);
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .note__body {
        display: flex;
        flex-direction: column;
        gap: var(--space-m);
        padding: var(--space-xl);
    }

    .note__title {
        font-size: var(--step-2);
        font-weight: 750;
    }

    .note__title a {
        color: var(--ink);
        text-decoration: none;
    }

    .note__title a::after {
        content: "";
        position: absolute;
        inset: 0;
    }

    .note__meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-xs);
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .note__text {
        max-width: 60ch;
    }

    .note .chips,
    .note .link-arrow {
        position: relative;
        z-index: 1;
    }

    .note:hover .note__title a {
        color: var(--teal-ink);
    }

    .work-more {
        display: grid;
        gap: var(--space-l);
        margin-top: var(--space-l);
    }

    /* The showcase: a product story beside the facts, pinned and scrubbed on desktop */
    .showcase {
        position: relative;
        display: grid;
        gap: var(--space-xl);
        padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
        border: 1px solid var(--line);
        border-radius: var(--radius-xl);
        background: var(--wash), var(--surface);
        box-shadow: var(--shadow-m);
        overflow: hidden;
    }

    @media (min-width: 64rem) {
        .showcase {
            grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
            align-items: center;
            min-height: 34rem;
        }
    }

    .showcase__title {
        font-size: var(--step-4);
        font-weight: 800;
        letter-spacing: -0.035em;
    }

    .showcase__title a {
        color: var(--ink);
        text-decoration: none;
    }

    .showcase__meta {
        display: inline-flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-xs);
        margin-top: var(--space-s);
        color: var(--ink-3);
        font-size: var(--step--1);
        font-weight: 500;
    }

    .showcase__text {
        margin-top: var(--space-m);
        max-width: 46ch;
    }

    .showcase__steps {
        display: grid;
        gap: 0;
        margin-top: var(--space-l);
        list-style: none;
        padding: 0;
        border-top: 1px solid var(--line);
    }

    .showcase__step {
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr);
        gap: var(--space-s);
        padding-block: 0.6rem;
        border-bottom: 1px solid var(--line);
        color: var(--ink-2);
        font-size: var(--step--1);
        transition: color var(--dur) ease;
    }

    .showcase__step span:first-child {
        color: var(--ink-3);
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    /* While the story scrubs, steps light up as their stage arrives */
    .showcase.is-scrubbed .showcase__step {
        color: var(--ink-3);
    }

    .showcase.is-scrubbed .showcase__step.is-active {
        color: var(--ink);
    }

    .showcase__step.is-active span:first-child {
        color: var(--teal-ink);
    }

    .showcase__actions {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-s);
        margin-top: var(--space-l);
    }

    .showcase__stage {
        position: relative;
        aspect-ratio: 4 / 3;
        min-height: 18rem;
    }

    .showcase__note {
        position: absolute;
        right: 0;
        bottom: -0.25rem;
        color: var(--ink-3);
        font-size: var(--step--2);
        font-weight: 500;
    }

    /* Stages are layered; without motion only the finished product (the dashboard) shows */
    .stage {
        position: absolute;
        inset: 0 0 1.5rem;
        display: grid;
        place-items: center;
        visibility: hidden;
        opacity: 0;
    }

    .stage--dash {
        visibility: visible;
        opacity: 1;
    }

    .device {
        position: relative;
        border: 1px solid var(--line-strong);
        background: var(--surface);
        box-shadow: var(--shadow-l);
    }

    .device--phone {
        width: 11rem;
        height: 20rem;
        padding: 0.9rem 0.8rem;
        border-radius: 1.6rem;
        border-width: 6px;
        border-color: #1e293b;
    }

    .device--laptop {
        width: 100%;
        max-width: 30rem;
        aspect-ratio: 16 / 10;
        padding: 0.9rem;
        border-radius: 0.9rem 0.9rem 0.3rem 0.3rem;
        border-width: 6px;
        border-color: #1e293b;
    }

    .device--laptop::after {
        content: "";
        position: absolute;
        left: -12%;
        right: -12%;
        bottom: -1.1rem;
        height: 0.7rem;
        border-radius: 0 0 0.8rem 0.8rem;
        background: linear-gradient(#cbd5e1, #94a3b8);
    }

    .ui-bar {
        height: 0.5rem;
        border-radius: 4px;
        background: var(--surface-3);
    }

    .ui-bar--teal {
        background: var(--teal);
    }

    .ui-bar--blue {
        background: var(--blue);
    }

    .ui-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .ui-label {
        color: var(--ink-3);
        font-size: 0.68rem;
        font-weight: 600;
    }

    .ui-title {
        color: var(--ink);
        font-family: var(--font-display);
        font-size: 0.82rem;
        font-weight: 700;
    }

    /* Stage 1: the table and its QR code */
    .tent {
        display: grid;
        justify-items: center;
        gap: 0.6rem;
        padding: 1.2rem 1.4rem 1rem;
        border: 1px solid var(--line);
        border-radius: 1rem;
        background: var(--surface);
        box-shadow: var(--shadow-l);
    }

    .qr {
        width: 7.5rem;
        height: 7.5rem;
        color: var(--ink);
    }


    /* Stage 2: stars, a voice note */
    .stars {
        display: flex;
        gap: 0.2rem;
        color: #f5b301;
    }

    .stars .icon {
        width: 1.1rem;
        height: 1.1rem;
    }

    .wave {
        display: flex;
        align-items: center;
        gap: 3px;
        height: 2.2rem;
    }

    .wave span {
        width: 4px;
        border-radius: 2px;
        background: var(--teal);
    }

    .mic {
        display: grid;
        place-items: center;
        width: 3rem;
        height: 3rem;
        margin-inline: auto;
        border-radius: 50%;
        background: var(--teal);
        color: var(--navy);
        box-shadow: var(--shadow-teal);
    }

    /* Stage 3: the analysis */
    .analysis {
        width: min(100%, 22rem);
        padding: 1.1rem;
        border: 1px solid var(--line);
        border-radius: 1rem;
        background: var(--surface);
        box-shadow: var(--shadow-l);
    }

    .tagset {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .tag {
        padding: 0.2rem 0.55rem;
        border-radius: 999px;
        background: var(--teal-soft);
        color: var(--teal-ink);
        font-size: 0.7rem;
        font-weight: 700;
    }

    .tag--blue {
        background: var(--blue-soft);
        color: var(--blue-ink);
    }

    /* Stage 4: the dashboard */
    .dash {
        display: grid;
        grid-template-columns: 3.2rem 1fr;
        gap: 0.7rem;
        height: 100%;
    }

    .dash__side {
        display: grid;
        align-content: start;
        gap: 0.45rem;
        padding: 0.5rem;
        border-radius: 0.5rem;
        background: var(--surface-2);
    }

    .dash__main {
        display: grid;
        grid-template-rows: auto 1fr auto;
        gap: 0.6rem;
        min-width: 0;
    }

    .dash__cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.45rem;
    }

    .dash__card {
        display: grid;
        gap: 0.35rem;
        padding: 0.5rem;
        border: 1px solid var(--line);
        border-radius: 0.5rem;
    }

    .chart {
        width: 100%;
        height: 100%;
        min-height: 4rem;
    }

    .chart .area {
        fill: url(#df-area);
    }

    .chart .line {
        fill: none;
        stroke: var(--teal);
        stroke-width: 2;
        vector-effect: non-scaling-stroke;
    }

    .bars {
        display: grid;
        gap: 0.35rem;
    }

    .bars .ui-row .ui-label {
        width: 4rem;
        flex: none;
    }

    .ui-track {
        flex: 1;
        min-width: 0;
    }

    .ui-track .ui-bar {
        display: block;
    }

    .phone-ui {
        display: grid;
        gap: 0.8rem;
    }

    .ui-lines {
        display: grid;
        gap: 0.4rem;
        margin-block: 0.8rem 1rem;
    }

    .analysis .ui-label {
        margin-top: 0.35rem;
    }

    .analysis .tagset {
        margin-top: 0.45rem;
    }

    .wa-card {
        display: grid;
        gap: 0.35rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
        border-radius: 0.6rem;
        background: #e7f8ee;
    }

    .wa-card .ui-title {
        font-size: 0.72rem;
    }

    .w-34 { width: 34%; }
    .w-56 { width: 56%; }
    .w-58 { width: 58%; }
    .w-64 { width: 64%; }
    .w-70 { width: 70%; }
    .w-74 { width: 74%; }
    .w-82 { width: 82%; }
    .w-88 { width: 88%; }

    /* The voice note: fifteen bars of a waveform */
    .wave span:nth-child(3n + 1) { height: 35%; }
    .wave span:nth-child(3n + 2) { height: 80%; }
    .wave span:nth-child(3n) { height: 55%; }
    .wave span:nth-child(4n) { height: 100%; }
    .wave span:nth-child(5n) { height: 25%; }

    .dash-phone {
        position: absolute;
        right: -2%;
        bottom: 2%;
        width: 7.5rem;
        height: 13.5rem;
        padding: 0.6rem 0.55rem;
        border-radius: 1.2rem;
        border: 5px solid #1e293b;
        background: var(--surface);
        box-shadow: var(--shadow-l);
    }

    @media (max-width: 40rem) {
        .showcase__stage {
            aspect-ratio: auto;
            min-height: 16rem;
        }

        .dash-phone {
            display: none;
        }
    }

    /* --- Posts, carousel ----------------------------------------------------------------- */

    .card--post {
        gap: var(--space-s);
        padding: 0;
        overflow: hidden;
    }

    .card--post > :not(.card__media) {
        margin-inline: var(--space-l);
    }

    .card--post > :last-child {
        margin-bottom: var(--space-l);
    }

    .card--post .card__title {
        margin-top: var(--space-l);
        line-height: 1.3;
    }

    .card__media {
        aspect-ratio: 16 / 9;
        border-bottom: 1px solid var(--line);
        background: var(--surface-2);
    }

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

    .card--post .card__media + .card__title {
        margin-top: var(--space-xs);
    }

    .card__meta {
        margin-top: auto;
        color: var(--ink-3);
        font-size: var(--step--2);
        font-weight: 500;
    }

    .carousel__track {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(min(85%, 22rem), 1fr);
        gap: var(--space-l);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        list-style: none;
        padding: var(--space-2xs) var(--space-2xs) var(--space-s);
        margin: calc(-1 * var(--space-2xs));
    }

    .carousel__track::-webkit-scrollbar {
        display: none;
    }

    .carousel__slide {
        display: grid;
        scroll-snap-align: start;
    }

    .carousel__controls {
        display: flex;
        gap: var(--space-xs);
        margin-top: var(--space-l);
    }

    .carousel__button {
        display: inline-grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: var(--surface);
        color: var(--ink);
        transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
    }

    .carousel__button:hover:not(:disabled) {
        border-color: var(--teal-ink);
        box-shadow: var(--shadow-s);
    }

    .carousel__button:disabled {
        opacity: 0.4;
        cursor: default;
    }

    .no-js .carousel__controls,
    .carousel__controls[hidden] {
        display: none;
    }

    /* --- FAQ ----------------------------------------------------------------------------- */

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

    .faq__item {
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        background: var(--surface);
        transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
    }

    .faq__item[open] {
        border-color: var(--teal-line);
        box-shadow: var(--shadow-s);
    }

    .faq__question {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-m);
        padding: var(--space-m) var(--space-l);
        cursor: pointer;
        list-style: none;
    }

    .faq__question::-webkit-details-marker {
        display: none;
    }

    .faq__question h3 {
        font-size: var(--step-0);
        font-weight: 650;
        line-height: 1.4;
    }

    .faq__icon {
        position: relative;
        flex: none;
        width: 1.75rem;
        height: 1.75rem;
        border: 1px solid var(--line);
        border-radius: 50%;
        transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease,
            border-color var(--dur) ease;
    }

    .faq__icon::before,
    .faq__icon::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 0.7rem;
        height: 1.5px;
        border-radius: 1px;
        background: var(--ink);
        transform: translate(-50%, -50%);
    }

    .faq__icon::after {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .faq__item[open] .faq__icon {
        transform: rotate(45deg);
        border-color: var(--teal);
        background: var(--teal-soft);
    }

    .faq__answer {
        padding: 0 var(--space-l) var(--space-l);
        color: var(--ink-2);
        max-width: 68ch;
    }

    /* --- Closing call to action ---------------------------------------------------------- */

    .section--cta {
        padding-block: var(--space-2xl) var(--space-3xl);
    }

    .cta {
        position: relative;
        display: grid;
        gap: var(--space-l);
        padding: clamp(2rem, 1.25rem + 4vw, 4.5rem);
        border-radius: var(--radius-xl);
        background: radial-gradient(40rem 22rem at 100% 0%, rgb(255 255 255 / 0.55), transparent 60%),
            linear-gradient(120deg, #7ff0e6 0%, #56e0d3 35%, #7fb5fb 100%);
        color: var(--navy);
        overflow: hidden;
        box-shadow: var(--shadow-l);
    }

    @media (min-width: 56rem) {
        .cta {
            grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
            align-items: center;
        }
    }

    .cta__copy {
        position: relative;
        display: grid;
        gap: var(--space-m);
    }

    .cta__title {
        max-width: 16ch;
        font-size: var(--step-4);
        font-weight: 800;
        letter-spacing: -0.035em;
        color: var(--navy);
    }

    .cta__text {
        max-width: 48ch;
        color: #10304a;
        font-size: var(--step-1);
        line-height: 1.5;
    }

    .cta__list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-xs);
        color: var(--navy);
        font-size: var(--step--1);
        font-weight: 600;
    }

    .cta__list[hidden] {
        display: none;
    }

    .cta__list .chip {
        border-color: rgb(15 23 42 / 0.2);
        background: rgb(255 255 255 / 0.55);
        color: var(--navy);
    }

    .cta__actions {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-s);
        margin-top: var(--space-xs);
    }

    .cta .btn--ghost {
        border-color: rgb(15 23 42 / 0.3);
        background: rgb(255 255 255 / 0.55);
    }

    .cta .btn--ghost:hover {
        border-color: var(--navy);
        background: rgb(255 255 255 / 0.8);
    }

    .cta .btn--wa .icon {
        color: var(--whatsapp-ink);
    }

    .cta :focus-visible {
        outline-color: var(--navy);
    }

    .cta__art {
        position: relative;
        width: 100%;
        max-width: 22rem;
        justify-self: end;
    }

    .cta__path {
        fill: none;
        stroke: var(--navy);
        stroke-width: 2;
        stroke-dasharray: 2 8;
        stroke-linecap: round;
        opacity: 0.35;
    }

    .cta__plane {
        fill: #fff;
        stroke: var(--navy);
        stroke-width: 2;
        stroke-linejoin: round;
    }

    .cta__plane-fold {
        fill: none;
        stroke: var(--navy);
        stroke-width: 2;
        stroke-linejoin: round;
    }

    @media (max-width: 55.99rem) {
        .cta__art {
            display: none;
        }
    }

    /* --- Forms and contact ---------------------------------------------------------------- */

    .contact {
        display: grid;
        gap: var(--space-xl);
        align-items: start;
    }

    @media (min-width: 60rem) {
        .contact {
            grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
        }
    }

    .slip {
        padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
        border: 1px solid var(--line);
        border-radius: var(--radius-xl);
        background: var(--surface);
        box-shadow: var(--shadow-m);
    }

    .slip__title {
        margin-bottom: var(--space-l);
        font-size: var(--step-2);
    }

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

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

    .form__group {
        display: grid;
        gap: var(--space-xs);
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .form__group legend {
        margin-bottom: var(--space-xs);
    }

    .form__label {
        color: var(--ink);
        font-size: var(--step--1);
        font-weight: 600;
    }

    .form__label span {
        color: var(--ink-3);
        font-weight: 500;
    }

    .form input[type="text"],
    .form input[type="email"],
    .form input[type="tel"],
    .form input[type="number"],
    .form input[type="url"],
    .form select,
    .form textarea {
        width: 100%;
        min-height: 3rem;
        padding: 0.7rem 0.9rem;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink);
        font-size: var(--step-0);
        transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
    }

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

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

    .form input:focus,
    .form select:focus,
    .form textarea:focus {
        outline: none;
        border-color: var(--teal-ink);
        box-shadow: 0 0 0 4px rgb(0 216 198 / 0.18);
    }

    .form__field--error input,
    .form__field--error textarea,
    .form__field--error select {
        border-color: var(--danger);
    }

    /* Multiple choice (services): Django 6 renders fieldset > div > div > label */
    .form__group > div {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
        gap: var(--space-xs);
    }

    .form__group > div > div:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .form__group label {
        display: flex;
        align-items: center;
        gap: var(--space-s);
        height: 100%;
        padding: 0.65rem 0.85rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink-2);
        font-size: var(--step--1);
        cursor: pointer;
        transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
    }

    .form__group label:hover {
        border-color: var(--line-strong);
    }

    .form__group label:has(input:checked) {
        border-color: var(--teal);
        background: var(--teal-soft);
        color: var(--ink);
    }

    .form input[type="checkbox"],
    .form input[type="radio"] {
        width: 1.05rem;
        height: 1.05rem;
        flex: none;
        accent-color: var(--teal-ink);
    }

    .form__help {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .form__error,
    .form__errors {
        color: var(--danger);
        font-size: var(--step--1);
        font-weight: 600;
    }

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

    .contact__title {
        font-size: var(--step-1);
    }

    .contact__list {
        display: grid;
        gap: var(--space-xs);
        list-style: none;
        padding: 0;
    }

    .contact__item {
        display: flex;
        align-items: center;
        gap: var(--space-s);
        padding: var(--space-m) var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink-2);
        text-decoration: none;
        transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
    }

    a.contact__item:hover {
        border-color: var(--teal-line);
        box-shadow: var(--shadow-s);
        color: var(--ink);
    }

    .contact__item .icon {
        color: var(--teal-ink);
    }

    .contact__item .icon-wa {
        color: var(--whatsapp-ink);
    }

    .thanks__whatsapp {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-s);
        margin-top: var(--space-xl);
        color: var(--ink-2);
    }

    /* --- Case study facts ------------------------------------------------------------------ */

    .facts {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
        gap: 1px;
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
        overflow: hidden;
    }

    .facts__item {
        padding: var(--space-m) var(--space-l);
        outline: 1px solid var(--line);
    }

    .facts__item--wide {
        grid-column: 1 / -1;
    }

    .facts dt {
        color: var(--ink-3);
        font-size: var(--step--2);
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .facts dd {
        margin-top: var(--space-2xs);
        color: var(--ink);
        font-weight: 600;
    }

    /* --- Prose, figures, callouts, quotes, code, sources, tables, chips ------------------ */

    .prose {
        max-width: 68ch;
        color: var(--ink-2);
    }

    .prose > * + * {
        margin-top: var(--space-m);
    }

    .prose > :first-child {
        margin-top: 0;
    }

    .page-article .section--prose .prose {
        margin-inline: auto;
    }

    .prose h2 {
        margin-top: var(--space-2xl);
        font-size: var(--step-2);
    }

    .prose h3 {
        margin-top: var(--space-xl);
    }

    .prose ul,
    .prose ol {
        padding-left: 1.3rem;
    }

    .prose li + li {
        margin-top: var(--space-xs);
    }

    .prose li::marker {
        color: var(--teal-ink);
    }

    .prose a {
        text-decoration-color: rgb(15 118 110 / 0.4);
    }

    .prose a:hover {
        text-decoration-color: currentColor;
    }

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

    .figure__caption {
        margin-top: var(--space-s);
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .callout {
        display: flex;
        gap: var(--space-m);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
    }

    .callout--tip {
        background: var(--teal-soft);
        border-color: var(--teal-line);
    }

    .callout--warning {
        background: #fffbeb;
        border-color: #f6d88a;
    }

    .callout__icon {
        margin-top: 0.15rem;
        color: var(--ink-3);
    }

    .callout--tip .callout__icon {
        color: var(--teal-ink);
    }

    .callout--warning .callout__icon {
        color: #9a6700;
    }

    .quote {
        display: grid;
        gap: var(--space-m);
        padding: var(--space-xl);
        border-radius: var(--radius-l);
        background: var(--surface);
        border: 1px solid var(--line);
    }

    .quote__mark {
        width: 2rem;
        height: 2rem;
        color: var(--teal-ink);
    }

    .quote__text {
        font-family: var(--font-display);
        font-size: var(--step-2);
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -0.02em;
        color: var(--ink);
    }

    .quote__attribution {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .code-block {
        padding: var(--space-l);
        border-radius: var(--radius-l);
        background: var(--navy);
        color: #e2e8f0;
        font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
        font-size: var(--step--1);
        line-height: 1.6;
        overflow-x: auto;
    }

    .sources__title {
        font-size: var(--step-1);
    }

    .sources {
        margin-top: var(--space-m);
        padding-left: 1.3rem;
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .sources li + li {
        margin-top: var(--space-xs);
    }

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

    .table {
        width: 100%;
        border-collapse: collapse;
        font-size: var(--step--1);
        font-variant-numeric: tabular-nums;
    }

    .table caption {
        padding: var(--space-m) var(--space-l);
        color: var(--ink-3);
        text-align: left;
    }

    .table th,
    .table td {
        padding: var(--space-s) var(--space-l);
        border-top: 1px solid var(--line);
        text-align: left;
        vertical-align: top;
    }

    .table thead th {
        background: var(--surface-2);
        color: var(--ink);
        font-weight: 650;
    }

    .table tbody th {
        color: var(--ink);
        font-weight: 600;
    }

    .chips {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
        list-style: none;
        padding: 0;
    }

    .chip {
        display: inline-flex;
        align-items: center;
        padding: 0.3rem 0.7rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
        color: var(--ink-2);
        font-size: var(--step--2);
        font-weight: 600;
    }

    /* --- Team, article, author, related links, pagination ------------------------------- */

    .team {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
        gap: var(--space-l);
        list-style: none;
        padding: 0;
    }

    .person {
        display: grid;
        gap: var(--space-xs);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
    }

    .person__photo {
        width: 5rem;
        height: 5rem;
        border-radius: 50%;
        margin-bottom: var(--space-xs);
    }

    .person__role {
        color: var(--teal-ink);
        font-size: var(--step--1);
        font-weight: 600;
    }

    .person__bio {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .article__meta {
        margin-top: var(--space-m);
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .article__footer {
        display: grid;
        gap: var(--space-xl);
        padding-block: var(--space-2xl) var(--space-3xl);
    }

    .author {
        display: flex;
        gap: var(--space-l);
        padding: var(--space-l);
        border: 1px solid var(--line);
        border-radius: var(--radius-l);
        background: var(--surface);
    }

    .author__photo {
        width: 4rem;
        height: 4rem;
        border-radius: 50%;
    }

    .author__name {
        color: var(--ink);
        font-weight: 700;
    }

    .author__role {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .author__bio {
        margin-top: var(--space-xs);
        font-size: var(--step--1);
    }

    .related-links__title {
        color: var(--ink);
        font-weight: 700;
    }

    .related-links ul {
        margin-top: var(--space-xs);
        padding-left: 1.2rem;
    }

    .pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-l);
        margin-top: var(--space-2xl);
    }

    .pagination__link {
        padding: 0.55rem 1.1rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-m);
        background: var(--surface);
        color: var(--ink);
        font-weight: 600;
        text-decoration: none;
    }

    .pagination__status {
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .empty {
        padding: var(--space-2xl);
        border: 1px dashed var(--line-strong);
        border-radius: var(--radius-l);
        color: var(--ink-3);
        text-align: center;
    }

    /* --- Footer --------------------------------------------------------------------------- */

    .site-footer {
        border-top: 1px solid var(--line);
        background: var(--surface);
    }

    .footer__grid {
        display: grid;
        gap: var(--space-2xl) var(--space-xl);
        padding-block: var(--space-3xl) var(--space-2xl);
    }

    @media (min-width: 48rem) {
        .footer__grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (min-width: 64rem) {
        .footer__grid {
            grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
        }
    }

    .footer__tagline {
        margin-top: var(--space-s);
        max-width: 28ch;
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .footer__contact {
        display: grid;
        gap: var(--space-xs);
        margin-top: var(--space-l);
        font-style: normal;
    }

    .footer__line {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        color: var(--ink-2);
        font-size: var(--step--1);
        text-decoration: none;
    }

    a.footer__line:hover {
        color: var(--teal-ink);
    }

    .footer__line .icon {
        color: var(--ink-3);
    }

    .footer__line .icon-wa {
        color: var(--whatsapp-ink);
    }

    .footer__social {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
        margin-top: var(--space-l);
        list-style: none;
        padding: 0;
    }

    .footer__social a {
        display: inline-grid;
        place-items: center;
        min-width: 2.5rem;
        height: 2.5rem;
        padding-inline: 0.6rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
        color: var(--ink-2);
        font-size: var(--step--2);
        font-weight: 600;
        text-decoration: none;
        transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease,
            translate var(--dur) var(--ease-out);
    }

    .footer__social a:hover {
        border-color: var(--teal);
        color: var(--teal-ink);
        translate: 0 -2px;
    }

    .footer__social .icon {
        width: 1.05rem;
        height: 1.05rem;
    }

    .footer__heading {
        color: var(--ink);
        font-family: var(--font-display);
        font-size: var(--step--1);
        font-weight: 700;
    }

    .footer__links {
        display: grid;
        gap: var(--space-xs);
        margin-top: var(--space-m);
        list-style: none;
        padding: 0;
        font-size: var(--step--1);
    }

    .footer__links a {
        color: var(--ink-3);
        text-decoration: none;
    }

    .footer__links a:hover {
        color: var(--teal-ink);
    }

    .footer__bottom {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-s) var(--space-l);
        padding-block: var(--space-l);
        border-top: 1px solid var(--line);
        color: var(--ink-3);
        font-size: var(--step--1);
    }

    .footer__meta {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-l);
        list-style: none;
        padding: 0;
    }

    .footer__meta a {
        color: var(--ink-3);
        text-decoration: none;
    }

    .footer__meta a:hover {
        color: var(--teal-ink);
    }

    /* --- Floating: WhatsApp and the quote tray -------------------------------------------- */

    .wa-float {
        position: fixed;
        right: var(--space-l);
        bottom: var(--space-l);
        z-index: 40;
        display: grid;
        place-items: center;
        width: 3.4rem;
        height: 3.4rem;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: var(--surface);
        box-shadow: var(--shadow-m);
        transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
            opacity var(--dur) ease, visibility 0s;
    }

    .wa-float:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-l);
    }

    /* Held back (hidden and unfocusable) while the hero fills a phone or tablet screen */
    .wa-float.is-held {
        visibility: hidden;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out),
            visibility 0s linear var(--dur);
    }

    .wa-float__icon {
        width: 1.6rem;
        height: 1.6rem;
        color: var(--whatsapp-ink);
    }

    .tray {
        position: fixed;
        left: 50%;
        bottom: var(--space-l);
        z-index: 45;
        display: flex;
        align-items: center;
        gap: var(--space-m);
        max-width: min(calc(100% - 2 * var(--space-m) - 4rem), 46rem);
        padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-l);
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgb(255 255 255 / 0.94);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        box-shadow: var(--shadow-l);
        transform: translateX(-50%);
    }

    .tray[hidden] {
        display: none;
    }

    .tray__label {
        display: inline-flex;
        align-items: center;
        gap: var(--space-xs);
        color: var(--ink);
        font-size: var(--step--1);
        font-weight: 700;
        white-space: nowrap;
    }

    .tray__codes {
        overflow: hidden;
        min-width: 0;
        color: var(--ink-2);
        font-size: var(--step--1);
        font-weight: 500;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .tray__actions {
        display: flex;
        align-items: center;
        gap: var(--space-2xs);
        flex: none;
    }

    .tray .btn {
        border-radius: 999px;
    }

    .tray__clear {
        padding: 0.5rem 0.75rem;
        border: 0;
        background: none;
        color: var(--ink-3);
        font-size: var(--step--1);
        font-weight: 600;
    }

    .tray__clear:hover {
        color: var(--ink);
    }

    .tray .quote-count {
        display: none;
    }

    @media (max-width: 40rem) {
        .tray {
            left: var(--space-m);
            right: calc(var(--space-l) + 3.4rem + var(--space-xs));
            max-width: none;
            transform: none;
            padding-left: var(--space-m);
        }

        .tray .quote-count {
            display: inline-grid;
        }

        .tray__codes,
        .tray__clear {
            display: none;
        }
    }

    .page-contact .tray {
        display: none;
    }
}

/* ---------------------------------------------------------------------------------------- */

@layer motion {
    /*
     * html.motion is set in <head> when the visitor allows motion; motion.js adds motion-ok
     * once it runs. Only the hero's layers wait hidden for their entrance, and site.js lifts
     * this if the motion script never arrives, so nothing stays invisible.
     */
    .motion:not(.motion-ok) .system__stack .layer {
        opacity: 0;
    }

    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}

/* ---------------------------------------------------------------------------------------- */

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

    @media print {
        .site-header,
        .site-footer,
        .wa-float,
        .tray,
        .hero__visual,
        .carousel__controls,
        .section--cta {
            display: none !important;
        }

        body {
            background: #fff;
        }
    }
}
