/* =========================================================================
   Shipvise — main.css
   Vanilla CSS. No framework, no build step. Mobile-first, fluid type,
   BEM-ish naming.

   Tokens mirror packages/config/tailwind-preset.cjs in the platform
   monorepo. Nothing below hard-codes a colour outside :root — if a value
   needs to change, it changes there and everywhere at once.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Fonts
   Self-hosted variable fonts. Drop the real files at:
     /public/assets/fonts/inter-var.woff2
     /public/assets/fonts/jetbrains-mono-var.woff2
   Until then the system stack keeps everything readable and correctly sized.
   ---------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-var.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/fonts/jetbrains-mono-var.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------------------------
   Tokens
   ---------------------------------------------------------------------- */
:root {
    /* Dark structural surfaces */
    --navy-950: #0B1320;
    --navy-900: #101B2B;
    --navy-800: #172235;
    --navy-700: #1E2C43;
    --navy-600: #2A3B55;

    /* Primary blue, derived from the mark */
    --brand-50: #EEF4FA;
    --brand-100: #D7E5F2;
    --brand-200: #AFC9E3;
    --brand-300: #7FA7D0;
    --brand-400: #4E85BC;
    --brand-500: #2A6299;
    --brand-600: #1D5285;
    --brand-700: #174776;
    --brand-800: #123A61;
    --brand-900: #0F2E4F;

    /* Approval, success, forward motion */
    --mint-50: #ECFDF4;
    --mint-100: #D2FBE6;
    --mint-200: #A8F5CE;
    --mint-300: #86EFBB;
    --mint-400: #65E6A7;
    --mint-500: #34C77F;
    --mint-600: #1FA365;
    --mint-700: #187F50;

    /* Warm neutral page surfaces */
    --sand-50: #FCFBF8;
    --sand-100: #F6F4EF;
    --sand-200: #EDEAE2;

    /* Cool neutrals */
    --slate-50: #F8FAFC;
    --slate-100: #EFF2F7;
    --slate-200: #E7EAF0;
    --slate-300: #CFD5E0;
    --slate-400: #AAB5C5;
    --slate-500: #7C8697;
    --slate-600: #5D6675;
    --slate-700: #414A58;
    --slate-800: #2A323F;
    --slate-900: #121A27;

    --warning-100: #FDF1D8;
    --warning-400: #F5B942;
    --warning-600: #B87F11;
    --danger-100: #FDE4E4;
    --danger-400: #F06A6A;
    --danger-600: #C13B3B;

    /* Release lifecycle. Colour is never the only signal — every state also
       renders a glyph and a text label. */
    --state-draft: #7C8697;
    --state-preview: #8B7BF0;
    --state-staging: #2A6299;
    --state-review: #F5B942;
    --state-approved: #34C77F;
    --state-production: #17B8A6;
    --state-failed: #F06A6A;
    --state-rolled-back: #8C89A8;

    /* Semantic aliases */
    --bg-page: #FFFFFF;
    --bg-surface: var(--sand-100);
    --bg-surface-strong: var(--sand-200);
    --bg-dark: var(--navy-950);
    --text-ink: var(--slate-900);
    --text-muted: var(--slate-600);
    --text-on-dark: var(--slate-50);
    --text-on-dark-muted: var(--slate-400);
    --border-subtle: var(--slate-200);
    --border-dark: rgba(255, 255, 255, 0.10);
    --action: var(--brand-700);
    --action-hover: var(--brand-800);
    --focus-ring: var(--brand-500);

    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'Cascadia Mono', Menlo, monospace;

    --fs-display-lg: clamp(2.75rem, 1.6rem + 3.6vw, 4.25rem);
    --fs-display: clamp(2.25rem, 1.5rem + 2.6vw, 3.25rem);
    --fs-h1: clamp(1.95rem, 1.4rem + 1.9vw, 2.75rem);
    --fs-h2: clamp(1.55rem, 1.25rem + 1.1vw, 2.05rem);
    --fs-h3: 1.3rem;
    --fs-lead: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
    --fs-body: 1rem;
    --fs-sm: 0.9375rem;
    --fs-xs: 0.8125rem;

    /* Spacing */
    --space-3xs: 0.25rem;
    --space-2xs: 0.5rem;
    --space-xs: 0.75rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.25rem;
    --space-xl: 3.5rem;
    --space-2xl: 5.5rem;
    --space-3xl: 8rem;

    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.125rem;
    --radius-2xl: 1.5rem;
    --radius-full: 999px;

    --shadow-card: 0 1px 2px rgba(18, 26, 39, 0.04), 0 8px 24px -12px rgba(18, 26, 39, 0.16);
    --shadow-card-hover: 0 2px 4px rgba(18, 26, 39, 0.05), 0 16px 40px -16px rgba(18, 26, 39, 0.22);
    --shadow-dark: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -20px rgba(0, 0, 0, 0.7);

    --container-w: 78rem;
    --prose-w: 68ch;
    --navbar-h: 72px;

    --t-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------------------------------------------------------------
   Reset and base
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--navbar-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.7;
    color: var(--text-ink);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-sm);
    color: var(--text-ink);
    text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-sm); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, kbd, samp, .mono { font-family: var(--font-mono); font-size: 0.9em; }
hr { border: 0; border-top: 1px solid var(--border-subtle); margin: var(--space-lg) 0; }

/* One focus style, defined once, used everywhere. */
:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::selection { background: var(--brand-100); color: var(--brand-900); }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* First focusable element on every page. */
.skip-link {
    position: absolute;
    left: var(--space-sm);
    top: -80px;
    z-index: 1000;
    background: var(--navy-900);
    color: var(--text-on-dark);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    transition: top var(--t-fast);
}
.skip-link:focus { top: var(--space-sm); }

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

/* -------------------------------------------------------------------------
   Section scaffolding
   ---------------------------------------------------------------------- */
.section { padding-block: var(--space-2xl); position: relative; }
.section--tight { padding-block: var(--space-xl); }
.section--surface { background: var(--bg-surface); }
.section--sand { background: var(--sand-50); }

.section--dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--text-on-dark); }
.section--dark .section__lead { color: var(--text-on-dark-muted); }

/* Hairline between two light sections — cheaper and calmer than a shadow. */
.section--divided { border-top: 1px solid var(--border-subtle); }

.section__head {
    max-width: 46rem;
    margin-bottom: var(--space-xl);
}
.section__head--center { margin-inline: auto; text-align: center; }
.section__lead {
    font-size: var(--fs-lead);
    color: var(--text-muted);
    max-width: var(--prose-w);
    margin-bottom: 0;
}
.section__head--center .section__lead { margin-inline: auto; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: var(--space-xs);
}
.eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.6;
}
.section--dark .eyebrow { color: var(--mint-300); }

.prose { max-width: var(--prose-w); }
.prose p { color: var(--text-muted); }
.lead { font-size: var(--fs-lead); color: var(--text-muted); }
.text-muted { color: var(--text-muted); }
.note {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.section--dark .note, .section--dark .text-muted, .section--dark .lead { color: var(--text-on-dark-muted); }
.card--dark .note { color: var(--slate-400); }

/* -------------------------------------------------------------------------
   Grids
   ---------------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-md); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }

/* -------------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------- */
.button {
    --button-bg: transparent;
    --button-fg: var(--text-ink);
    --button-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    min-height: 44px;
    padding: 0.6875rem 1.25rem;
    border: 1px solid var(--button-border);
    border-radius: var(--radius-md);
    background: var(--button-bg);
    color: var(--button-fg);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: background-color var(--t-base), border-color var(--t-base),
                color var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button--primary {
    --button-bg: var(--action);
    --button-fg: #FFFFFF;
    --button-border: var(--action);
    box-shadow: 0 1px 2px rgba(18, 26, 39, 0.10);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.button--primary:hover { --button-bg: var(--action-hover); --button-border: var(--action-hover); }

/* A single sheen crossing the button on hover — one pass, not a loop, so it
   acknowledges the pointer rather than competing with the page. */
.button--primary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        100deg,
        transparent 30%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.button--primary:hover::after { transform: translateX(100%); }

.button--secondary {
    --button-bg: #FFFFFF;
    --button-fg: var(--text-ink);
    --button-border: var(--slate-300);
}
.button--secondary:hover { --button-border: var(--slate-400); --button-bg: var(--slate-50); }

.button--ghost {
    --button-fg: var(--text-muted);
    --button-border: transparent;
}
.button--ghost:hover { --button-fg: var(--text-ink); --button-bg: var(--slate-100); }

.button--sm { min-height: 36px; padding: 0.4375rem 0.875rem; font-size: var(--fs-xs); }
.button--lg { min-height: 52px; padding: 0.875rem 1.75rem; font-size: var(--fs-body); }
.button--block { width: 100%; }

/* On dark surfaces the outline button needs its own contrast, not opacity. */
.section--dark .button--secondary,
.navbar--dark .button--secondary {
    --button-bg: transparent;
    --button-fg: var(--text-on-dark);
    --button-border: rgba(255, 255, 255, 0.28);
}
.section--dark .button--secondary:hover,
.navbar--dark .button--secondary:hover {
    --button-bg: rgba(255, 255, 255, 0.08);
    --button-border: rgba(255, 255, 255, 0.45);
}
.section--dark .button--ghost { --button-fg: var(--text-on-dark-muted); }
.section--dark .button--ghost:hover { --button-fg: var(--text-on-dark); --button-bg: rgba(255, 255, 255, 0.08); }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
}
.button-row--center { justify-content: center; }

/* Inline text link with an underline that grows rather than blinks on. */
.link {
    color: var(--brand-700);
    font-weight: 550;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: 0 100%;
    transition: background-size var(--t-base);
}
.link:hover { background-size: 100% 1px; }
.section--dark .link { color: var(--mint-300); }

.link--arrow::after {
    content: '→';
    display: inline-block;
    margin-left: 0.35em;
    transition: transform var(--t-base);
}
.link--arrow:hover::after { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   Badges
   ---------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.badge__glyph { font-size: 0.7em; line-height: 1; }

.badge--beta { background: var(--mint-50); color: var(--mint-700); border-color: var(--mint-200); }
.badge--limited-beta { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.badge--coming-soon { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.badge--neutral { background: var(--slate-100); color: var(--slate-700); border-color: var(--slate-200); }

.section--dark .badge--beta { background: rgba(101, 230, 167, 0.12); color: var(--mint-300); border-color: rgba(101, 230, 167, 0.28); }
.section--dark .badge--limited-beta { background: rgba(126, 167, 208, 0.14); color: var(--brand-200); border-color: rgba(126, 167, 208, 0.3); }
.section--dark .badge--coming-soon { background: rgba(255, 255, 255, 0.07); color: var(--slate-300); border-color: rgba(255, 255, 255, 0.16); }

/* Public-beta pill above the hero headline. */
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: 0.375rem 0.875rem 0.375rem 0.625rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
    backdrop-filter: blur(6px);
}
.pill__dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background: var(--mint-400);
    box-shadow: 0 0 0 4px rgba(101, 230, 167, 0.18);
    animation: pulse-dot 2.4s ease-in-out infinite;
}
.pill--light {
    border-color: var(--brand-200);
    background: var(--brand-50);
    color: var(--brand-800);
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(101, 230, 167, 0.14); }
    50% { box-shadow: 0 0 0 7px rgba(101, 230, 167, 0.05); }
}

/* -------------------------------------------------------------------------
   Cards
   ---------------------------------------------------------------------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: #FFFFFF;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-slow);
}
.card--hover:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: var(--slate-300);
}

/* -------------------------------------------------------------------------
   Interactive cards

   main.js adds .is-interactive to every .card--hover, but only where the
   pointer is fine and hover is real — so a touch device never gets a tilt it
   cannot undo, and never gets a spotlight stuck where a finger last was.
   The media query below is a second gate for the same reason.

   Both effects are driven by custom properties (--pointer-x/y, --tilt-x/y)
   set from a rAF loop, so the browser only ever recomputes paint and
   composite, never layout.
   ---------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
    .card--hover.is-interactive {
        transform:
            perspective(900px)
            rotateX(var(--tilt-x, 0deg))
            rotateY(var(--tilt-y, 0deg))
            translateY(var(--lift, 0px));
        transform-style: preserve-3d;
        transition: box-shadow var(--t-slow), border-color var(--t-slow),
                    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
        /* Isolating the card is what lets the spotlight sit at z-index -1:
           above the card's own background, below everything in the card,
           and without giving any child a position it did not ask for. */
        isolation: isolate;
    }
    .card--hover.is-interactive:hover { --lift: -3px; }

    /* The spotlight, clipped to the card's own radius through
       `border-radius: inherit`. */
    .card--hover.is-interactive::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        pointer-events: none;
        background: radial-gradient(
            16rem 16rem at var(--pointer-x, 50%) var(--pointer-y, 50%),
            rgba(42, 98, 153, 0.10),
            transparent 68%
        );
        opacity: 0;
        transition: opacity 260ms ease-out;
    }
    .card--hover.is-interactive:hover::before { opacity: 1; }

    .card--dark.is-interactive::before {
        background: radial-gradient(
            16rem 16rem at var(--pointer-x, 50%) var(--pointer-y, 50%),
            rgba(101, 230, 167, 0.10),
            transparent 68%
        );
    }
}
.card__title {
    font-size: var(--fs-h3);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    flex-wrap: wrap;
}
.card__body { color: var(--text-muted); margin-bottom: 0; }
.card__foot { margin-top: auto; padding-top: var(--space-sm); }

.card--dark {
    background: var(--navy-800);
    border-color: var(--border-dark);
    box-shadow: var(--shadow-dark);
    color: var(--text-on-dark);
}
.card--dark .card__title { color: var(--text-on-dark); }
.card--dark .card__body { color: var(--text-on-dark-muted); }

/* A numbered index in the corner, used by the "how it works" stages. */
.card__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    background: var(--brand-50);
    color: var(--brand-700);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 700;
    margin-bottom: var(--space-2xs);
}
.card--dark .card__index { background: rgba(255, 255, 255, 0.08); color: var(--mint-300); }

/* Icon tile above a feature card's title. */
.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: var(--brand-50);
    color: var(--brand-700);
    margin-bottom: var(--space-2xs);
    transition: background-color var(--t-base), color var(--t-base);
}
.card--hover:hover .card__icon { background: var(--brand-700); color: #FFFFFF; }
.card--dark .card__icon { background: rgba(101, 230, 167, 0.12); color: var(--mint-300); }

/* -------------------------------------------------------------------------
   Feature / check lists
   ---------------------------------------------------------------------- */
.tick-list { display: grid; gap: var(--space-2xs); }
.tick-list li {
    display: grid;
    grid-template-columns: 1.125rem 1fr;
    gap: var(--space-2xs);
    align-items: start;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.tick-list li::before {
    content: '';
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.25em;
    border-radius: var(--radius-full);
    background: var(--mint-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23187F50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}
.section--dark .tick-list li { color: var(--text-on-dark-muted); }
.section--dark .tick-list li::before {
    background-color: rgba(101, 230, 167, 0.14);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2386EFBB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5'/%3E%3C/svg%3E");
}

/* A set of short labels — supported stacks, and anything else that is a list
   of names rather than a list of sentences. */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    align-content: start;
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    color: var(--text-ink);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    box-shadow: var(--shadow-card);
    transition: border-color var(--t-base), transform var(--t-base);
}
.chip:hover { border-color: var(--brand-300); transform: translateY(-1px); }
.section--dark .chip {
    background: var(--navy-800);
    border-color: var(--border-dark);
    color: var(--slate-200);
    box-shadow: none;
}

/* Same shape, but for things a scope explicitly does NOT include. */
.cross-list { display: grid; gap: var(--space-2xs); }
.cross-list li {
    display: grid;
    grid-template-columns: 1.125rem 1fr;
    gap: var(--space-2xs);
    align-items: start;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.cross-list li::before {
    content: '';
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.25em;
    border-radius: var(--radius-full);
    background: var(--slate-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%235D6675' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

/* -------------------------------------------------------------------------
   Navbar
   ---------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    transition: background-color var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.navbar[data-scrolled='true'] {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--border-subtle);
    box-shadow: 0 1px 12px rgba(18, 26, 39, 0.05);
}

/* The homepage hero is dark, so the navbar starts transparent over it and
   only becomes a surface once the reader has scrolled past. */
.navbar--dark {
    background: transparent;
    color: var(--text-on-dark);
}
.navbar--dark[data-scrolled='true'] {
    background: rgba(11, 19, 32, 0.88);
    border-bottom-color: var(--border-dark);
    box-shadow: none;
}

.navbar__inner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-height: var(--navbar-h);
}

.navbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 650;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    color: var(--text-ink);
    flex-shrink: 0;
}
.navbar--dark .navbar__brand { color: var(--text-on-dark); }
.navbar__mark { width: 28px; height: 28px; border-radius: 7px; }

.navbar__nav { margin-left: auto; }
.navbar__links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}
.navbar__links > li { position: relative; }

.navbar__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.6875rem;
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 550;
    color: var(--text-muted);
    transition: color var(--t-base), background-color var(--t-base);
}
.navbar__link:hover { color: var(--text-ink); background: var(--slate-100); }
.navbar__link[aria-current='page'] { color: var(--brand-700); }

/* The current page keeps a short rule under it that draws itself in. */
.navbar__link[aria-current='page']::after {
    content: '';
    position: absolute;
    left: 0.6875rem;
    right: 0.6875rem;
    bottom: 0.1875rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: 0 50%;
    animation: rule-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rule-in {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}
.navbar--dark .navbar__link { color: var(--slate-300); }
.navbar--dark .navbar__link:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.navbar--dark .navbar__link[aria-current='page'] { color: #FFFFFF; }

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    flex-shrink: 0;
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: var(--radius);
}
.navbar__toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--t-base), opacity var(--t-base);
}
.navbar__toggle[aria-expanded='true'] .navbar__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded='true'] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded='true'] .navbar__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dropdown — a native <details>, so it works with JavaScript disabled. */
.dropdown { position: relative; }
.dropdown > summary {
    list-style: none;
    cursor: pointer;
}
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown__chevron { transition: transform var(--t-base); flex-shrink: 0; }
.dropdown[open] .dropdown__chevron { transform: rotate(180deg); }

.dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 15rem;
    padding: var(--space-3xs);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    box-shadow: var(--shadow-card-hover);
    z-index: 20;
    animation: dropdown-in 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dropdown__menu--right { left: auto; right: 0; }

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown__option {
    display: block;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius);
    color: var(--text-ink);
    font-size: var(--fs-sm);
    font-weight: 550;
    transition: background-color var(--t-fast);
}
.dropdown__option:hover { background: var(--slate-100); }
.dropdown__option.is-active { color: var(--brand-700); background: var(--brand-50); }
.dropdown__option small {
    display: block;
    font-weight: 400;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.45;
}

/* Language switcher, shared by the navbar and the footer. */
.lang-switch { position: relative; }
.lang-switch__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 36px;
    padding: 0 0.625rem;
    border-radius: var(--radius);
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    transition: color var(--t-base), background-color var(--t-base);
}
.lang-switch__toggle::-webkit-details-marker { display: none; }
.lang-switch__toggle:hover { color: var(--text-ink); background: var(--slate-100); }
.navbar--dark .lang-switch__toggle { color: var(--slate-300); }
.navbar--dark .lang-switch__toggle:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.lang-switch__menu { min-width: 11rem; }

/* Round flag. Decorative only — the language name always sits beside it. */
.flag {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}
.flag__img {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    /* A hairline keeps the white field of the Czech flag from dissolving
       into a light dropdown surface. */
    box-shadow: inset 0 0 0 1px rgba(18, 26, 39, 0.12);
}
.navbar--dark .lang-switch__toggle .flag__img,
.lang-switch--footer .lang-switch__toggle .flag__img {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.lang-switch__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.lang-switch--footer .lang-switch__toggle { color: var(--slate-400); }
.lang-switch--footer .lang-switch__toggle:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.lang-switch--footer .dropdown__menu { top: auto; bottom: calc(100% + 8px); }

/* -------------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    background: var(--navy-950);
    color: var(--text-on-dark);
    padding-block: calc(var(--space-2xl) + var(--navbar-h) * 0.4) var(--space-2xl);
    overflow: hidden;
    /* The navbar sits over the hero, so pull it back up by its own height. */
    margin-top: calc(var(--navbar-h) * -1);
}

/* Two soft light sources and a faint grid. Decorative only — no text sits
   on the brightest part of either.

   The light drifts on a long, slow cycle (28s) with no easing landmarks, so
   it reads as ambience rather than as something demanding attention. The
   grid pans at a different period so the two never visibly loop together. */
.hero::before {
    content: '';
    position: absolute;
    inset: -30% -10% auto -20%;
    height: 90%;
    z-index: -2;
    background:
        radial-gradient(48rem 32rem at 22% 18%, rgba(29, 82, 133, 0.55), transparent 65%),
        radial-gradient(38rem 26rem at 82% 8%, rgba(23, 184, 166, 0.20), transparent 60%);
    filter: blur(4px);
    animation: hero-drift 28s ease-in-out infinite alternate;
    will-change: transform;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 100%);
    animation: hero-grid 40s linear infinite;
}

@keyframes hero-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

/* One full 64px cell per cycle, so the loop point is invisible. */
@keyframes hero-grid {
    from { background-position: 0 0; }
    to { background-position: 64px 64px; }
}

/* Entrance. Pure CSS with `both` fill, so nothing depends on JavaScript and
   the reduced-motion rule (which collapses the duration) still leaves every
   element in its final state rather than at opacity 0. */
.hero__inner > * > .pill,
.hero__title,
.hero__lead,
.hero__inner .button-row,
.hero__note {
    animation: hero-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__inner > * > .pill { animation-delay: 60ms; }
.hero__title { animation-delay: 140ms; }
.hero__lead { animation-delay: 240ms; }
.hero__inner .button-row { animation-delay: 330ms; }
.hero__note { animation-delay: 410ms; }
.hero .lane { animation: hero-enter 720ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both; }

@keyframes hero-enter {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.hero__inner {
    display: grid;
    gap: var(--space-xl);
    align-items: center;
}
@media (min-width: 62rem) {
    .hero__inner { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: var(--space-2xl); }
}

.hero__title {
    font-size: var(--fs-display-lg);
    line-height: 1.06;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin: var(--space-sm) 0 var(--space-md);
}
.hero__lead {
    font-size: var(--fs-lead);
    color: var(--slate-300);
    max-width: 36rem;
    margin-bottom: var(--space-md);
}
.hero__note {
    font-size: var(--fs-sm);
    color: var(--slate-400);
    max-width: 34rem;
    margin-top: var(--space-md);
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Release lane — the recurring visual idea: one change moving through
   defined checkpoints. Rendered as an ordered list, because that is what
   it is; the connecting line and the travelling pulse are decoration.
   ---------------------------------------------------------------------- */
.lane {
    position: relative;
    padding: var(--space-md);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-2xl);
    background: linear-gradient(160deg, rgba(23, 34, 53, 0.92), rgba(11, 19, 32, 0.92));
    box-shadow: var(--shadow-dark);
    backdrop-filter: blur(8px);
}
.lane__title {
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--slate-400);
    margin-bottom: var(--space-md);
}

.lane__steps {
    display: grid;
    gap: 0;
    counter-reset: lane;
}
.lane__step {
    position: relative;
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
}
.lane__step:last-child { padding-bottom: 0; }

/* The corridor itself. Dim by default; the segment leaving the active step
   carries a light travelling down it, which is the whole idea of the panel —
   one change moving from one checkpoint to the next. */
.lane__step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.8125rem;
    top: 1.75rem;
    bottom: 0.25rem;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.10);
    overflow: hidden;
}
.lane__step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.8125rem;
    top: 1.75rem;
    bottom: 0.25rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(101, 230, 167, 0.85) 45%,
        rgba(101, 230, 167, 0.15) 70%,
        transparent 100%
    );
    background-size: 100% 220%;
    background-repeat: no-repeat;
    background-position: 0 -120%;
    opacity: 0;
    transition: opacity 240ms ease-out;
}
.lane__step.is-active:not(:last-child)::after {
    opacity: 1;
    animation: lane-travel 1.9s cubic-bezier(0.4, 0, 0.4, 1) forwards;
}

@keyframes lane-travel {
    from { background-position: 0 -120%; }
    to { background-position: 0 120%; }
}

/* The node the change is sitting at breathes gently while it waits. */
.lane__step.is-active .lane__node::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(101, 230, 167, 0.5);
    animation: node-ping 1.9s ease-out infinite;
}

@keyframes node-ping {
    0% { transform: scale(0.85); opacity: 0.9; }
    70% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

.lane__node {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: var(--navy-800);
    color: var(--slate-300);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    transition: border-color var(--t-slow), background-color var(--t-slow),
                color var(--t-slow), box-shadow var(--t-slow);
}
.lane__step.is-active .lane__node {
    border-color: var(--mint-400);
    background: rgba(101, 230, 167, 0.16);
    color: var(--mint-200);
    box-shadow: 0 0 0 5px rgba(101, 230, 167, 0.10);
}

.lane__label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--slate-200);
    line-height: 1.5;
    transition: color var(--t-slow);
}
.lane__step.is-active .lane__label { color: #FFFFFF; }
.lane__detail {
    display: block;
    font-size: var(--fs-xs);
    color: var(--slate-500);
    margin: 0.125rem 0 0;
    transition: color var(--t-slow);
}
.lane__step.is-active .lane__detail { color: var(--slate-300); }

/* -------------------------------------------------------------------------
   Artifact card — the promoted release, shown as the same digest reaching
   two environments. Anything a person might copy is set in mono.
   ---------------------------------------------------------------------- */
.artifact {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: #FFFFFF;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.artifact__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs) var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--sand-100);
    border-bottom: 1px solid var(--border-subtle);
}
.artifact__field { display: flex; align-items: baseline; gap: 0.4rem; }
.artifact__key {
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.artifact__value {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--text-ink);
    word-break: break-all;
    /* The decode animation swaps characters in place; a fixed advance stops
       the line reflowing while it runs. */
    font-variant-numeric: tabular-nums;
}
.artifact__value.is-decoding { color: var(--brand-500); }
.artifact__envs {
    display: grid;
    gap: 1px;
    background: var(--border-subtle);
}
@media (min-width: 40rem) { .artifact__envs { grid-template-columns: 1fr 1fr; } }
.artifact__env {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: #FFFFFF;
    overflow: hidden;
}

/*
 * Promotion.
 *
 * The production row's release id arrives a beat after the staging one, so
 * the panel acts out its own sentence: the same artifact reaches the second
 * environment without being rebuilt. A light sweeps across the row as it
 * lands.
 *
 * Both rows carry the value in the HTML, so this is decoration on content
 * that is already there — the `js` gate means nothing is hidden unless
 * something is available to reveal it.
 */
.js .artifact__env[data-promote] .artifact__value {
    opacity: 0;
    transform: translateX(-8px);
}
.js .artifact__env[data-promote].is-promoted .artifact__value {
    opacity: 1;
    transform: none;
    transition: opacity 420ms ease-out 120ms, transform 420ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}
.js .artifact__env[data-promote].is-promoted::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(101, 230, 167, 0.28) 50%,
        transparent 80%
    );
    animation: promote-sweep 900ms ease-out both;
}

@keyframes promote-sweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
.artifact__env-name { font-weight: 600; font-size: var(--fs-sm); }
.artifact__foot {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-subtle);
    background: var(--sand-50);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Release-state chip. Icon + label + colour, never colour alone. */
.state {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 650;
    background: var(--slate-100);
    color: var(--slate-700);
}
.state__dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; }
.state--staging { background: var(--brand-50); color: var(--brand-700); }
.state--production { background: rgba(23, 184, 166, 0.12); color: #0E7A6F; }
.state--approved { background: var(--mint-50); color: var(--mint-700); }
.state--review { background: var(--warning-100); color: var(--warning-600); }
.state--failed { background: var(--danger-100); color: var(--danger-600); }

/* -------------------------------------------------------------------------
   Stepper — a numbered sequence, used by /how-it-works

   The rail is the controlled corridor made literal: a muted track with a
   coloured fill that follows the reader down the page. Geometry (--rail-top,
   --rail-height) is measured once by main.js so the track starts and ends at
   the centre of the first and last marker rather than at the edge of the
   list; --rail-progress is then the only thing that changes on scroll.

   Without JavaScript both custom properties stay at their fallbacks, which
   is why the track is drawn with `inset` as well — the sequence still reads
   as a connected sequence, just without the fill.
   ---------------------------------------------------------------------- */
.stepper {
    counter-reset: step;
    display: grid;
    gap: 0;
    position: relative;
}
.stepper::before,
.stepper::after {
    content: '';
    position: absolute;
    left: 1.1875rem;
    width: 2px;
    border-radius: 2px;
    top: var(--rail-top, 1.25rem);
    pointer-events: none;
}
.stepper::before {
    height: var(--rail-height, calc(100% - 2.5rem));
    background: var(--slate-200);
}
.stepper::after {
    height: calc(var(--rail-height, 0px) * var(--rail-progress, 0));
    background: linear-gradient(to bottom, var(--brand-400), var(--mint-500));
    box-shadow: 0 0 10px rgba(52, 199, 127, 0.35);
}

.stepper__item {
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: var(--space-md);
    padding-bottom: var(--space-lg);
}
.stepper__item:last-child { padding-bottom: 0; }

.stepper__marker {
    counter-increment: step;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--brand-200);
    background: #FFFFFF;
    color: var(--brand-700);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    font-weight: 700;
    box-shadow: 0 0 0 4px var(--brand-50);
    transition: border-color var(--t-slow), color var(--t-slow),
                box-shadow var(--t-slow), transform var(--t-slow);
}
.stepper__marker::before { content: counter(step, decimal-leading-zero); }

/* Set by main.js once the rail fill has passed this marker. */
.stepper__item.is-reached .stepper__marker {
    border-color: var(--mint-500);
    color: var(--mint-700);
    box-shadow: 0 0 0 4px var(--mint-50);
    transform: scale(1.06);
}

.stepper__title { font-size: var(--fs-h3); margin-bottom: 0.25rem; }
.stepper__body { color: var(--text-muted); margin-bottom: 0; }

/* -------------------------------------------------------------------------
   Reading progress

   A hairline at the very top of the viewport. It is driven entirely by the
   reader's own scrolling — nothing moves on its own — so it stays even under
   prefers-reduced-motion, where autonomous motion does not.
   ---------------------------------------------------------------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 150;
    pointer-events: none;
    background: transparent;
}
.scroll-progress__bar {
    display: block;
    height: 100%;
    width: 100%;
    transform: scaleX(var(--scroll-progress, 0));
    transform-origin: 0 50%;
    background: linear-gradient(to right, var(--brand-500), var(--mint-400));
    opacity: 0;
    transition: opacity var(--t-base);
}
/* Hidden until the reader has actually moved, so it is not a decoration
   sitting at zero width on every page load. */
.scroll-progress__bar.is-visible { opacity: 1; }

/* -------------------------------------------------------------------------
   Pricing
   ---------------------------------------------------------------------- */
.plans { display: grid; gap: var(--space-md); align-items: start; }
@media (min-width: 56rem) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plan { position: relative; padding: var(--space-lg) var(--space-md); }
.plan--highlighted {
    border-color: var(--brand-300);
    box-shadow: 0 0 0 1px var(--brand-300), var(--shadow-card-hover);
}
.plan__flag {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--brand-700);
    color: #FFFFFF;
    font-size: var(--fs-xs);
    font-weight: 650;
    white-space: nowrap;
}
.plan__name { font-size: var(--fs-h3); margin-bottom: 0.25rem; }
.plan__description { color: var(--text-muted); font-size: var(--fs-sm); min-height: 3rem; }
.plan__price {
    font-size: 1.375rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--brand-700);
    padding-block: var(--space-sm);
    margin-block: var(--space-2xs);
    border-block: 1px solid var(--border-subtle);
    text-wrap: balance;
}
.plan__features { margin-block: var(--space-sm); }

.faq { display: grid; gap: var(--space-2xs); max-width: 52rem; }
.faq__item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    transition: border-color var(--t-base), box-shadow var(--t-base);
}
.faq__item[open] { border-color: var(--brand-200); box-shadow: var(--shadow-card); }
.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    min-height: 44px;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__sign {
    position: relative;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}
.faq__sign::before, .faq__sign::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: var(--brand-600);
    transition: transform var(--t-base);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__item[open] .faq__sign::after { transform: rotate(0deg); }
.faq__question:hover { background: var(--sand-50); border-radius: var(--radius-lg); }
.faq__item[open] .faq__question { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

.faq__answer {
    padding: 0 var(--space-md) var(--space-md);
    color: var(--text-muted);
    max-width: var(--prose-w);
}

/*
 * A wipe rather than a height transition. <details> removes its content from
 * the box tree when closed, so a height transition simply does not run on
 * open — but an animation on the now-rendered content does. clip-path gives
 * the same "unfolding" read without measuring anything.
 */
.faq__item[open] .faq__answer { animation: faq-open 300ms cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes faq-open {
    from { opacity: 0; transform: translateY(-6px); clip-path: inset(0 0 100% 0); }
    to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

/* -------------------------------------------------------------------------
   Callouts
   ---------------------------------------------------------------------- */
.callout {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-subtle);
    border-left-width: 3px;
    border-radius: var(--radius-lg);
    background: var(--sand-50);
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.callout__glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--slate-100);
    color: var(--slate-600);
}
.callout--info { border-left-color: var(--brand-400); }
.callout--info .callout__glyph { background: var(--brand-50); color: var(--brand-700); }
.callout--caution { border-left-color: var(--warning-400); background: #FFFCF5; }
.callout--caution .callout__glyph { background: var(--warning-100); color: var(--warning-600); }
.callout p:last-child { margin-bottom: 0; }
.section--dark .callout {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-dark);
    color: var(--text-on-dark-muted);
}
.section--dark .callout__glyph { background: rgba(255, 255, 255, 0.08); color: var(--slate-300); }

/* -------------------------------------------------------------------------
   Split feature block (text + panel)
   ---------------------------------------------------------------------- */
.split {
    display: grid;
    gap: var(--space-xl);
    align-items: center;
}
@media (min-width: 58rem) {
    .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); }
    .split--reverse > :first-child { order: 2; }
}

/* -------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------- */
.footer {
    background: var(--navy-950);
    color: var(--slate-400);
    padding-block: var(--space-xl) var(--space-md);
    border-top: 1px solid var(--border-dark);
}
.footer__top {
    display: grid;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
}
@media (min-width: 52rem) {
    .footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--space-xl); }
}
.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
    font-weight: 650;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2xs);
}
.footer__tagline { max-width: 26rem; font-size: var(--fs-sm); }
.footer__group-title {
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--slate-300);
    margin-bottom: var(--space-xs);
}
.footer__links { display: grid; gap: 0.125rem; }
.footer__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3125rem 0;
    font-size: var(--fs-sm);
    color: var(--slate-400);
    transition: color var(--t-base);
}
.footer__link:hover { color: #FFFFFF; }
.footer__external-glyph { opacity: 0.55; flex-shrink: 0; }
.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-dark);
    font-size: var(--fs-xs);
}
.footer__notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    max-width: 44rem;
}

/* -------------------------------------------------------------------------
   Modal

   Hidden by default and revealed either by :target (no JavaScript needed,
   the link in the button is a real fragment link) or by .is-open, which
   main.js sets so the panel can open without pushing a hash into the URL.
   ---------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    place-items: center;
    padding: var(--space-md);
}
.modal:target,
.modal.is-open { display: grid; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 32, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: fade-in 180ms ease-out both;
}

.modal__panel {
    position: relative;
    width: min(100%, 30rem);
    max-height: calc(100dvh - var(--space-xl));
    overflow-y: auto;
    padding: var(--space-lg) var(--space-md) var(--space-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    background: #FFFFFF;
    box-shadow: 0 24px 64px -16px rgba(11, 19, 32, 0.45);
    animation: modal-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal__title { font-size: var(--fs-h2); margin: var(--space-xs) 0 var(--space-sm); }
.modal__body { color: var(--text-muted); font-size: var(--fs-sm); }
.modal__actions { margin-top: var(--space-md); }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

/* Locked while the modal is open, so the page behind it does not scroll. */
body.has-modal { overflow: hidden; }

/* -------------------------------------------------------------------------
   404
   ---------------------------------------------------------------------- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 62vh;
    padding-block: var(--space-2xl);
}
.error-page__code {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--brand-200);
    letter-spacing: -0.04em;
}

/* -------------------------------------------------------------------------
   Motion
   Scroll reveal is progressive: [data-reveal] is only hidden when the "js"
   class is on <html>, so with JavaScript off every section is visible.
   ---------------------------------------------------------------------- */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
 * The reveal moves elements with `translate`, not with `transform`.
 *
 * They are separate properties and they compose, which matters because the
 * same elements also carry a transform of their own — the card tilt, the
 * hover lift, the marker scale. Using `transform` here would mean whichever
 * rule came last in the file silently cancelled the other, and the losing
 * one would fail in a way that looks like "the tilt just doesn't work"
 * rather than like a conflict.
 */
.js [data-reveal] {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
                translate 520ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, translate;
}
.js [data-reveal].is-visible {
    opacity: 1;
    translate: none;
    will-change: auto;
}

/* Children of a [data-reveal-group] stagger by their index, set in JS. */
.js [data-reveal-group] > * { --reveal-delay: calc(var(--reveal-index, 0) * 70ms); }

/*
 * Reduced motion.
 *
 * The blanket rule collapses every duration, which is enough for anything
 * built out of a transition or a keyframe — `both`/`forwards` fills leave the
 * element in its final state rather than its first, so nothing disappears.
 *
 * What follows is the set of effects that need more than a duration change:
 * decorative layers are removed outright rather than snapped to their end
 * frame, and hover transforms are dropped so a pointer cannot induce motion.
 *
 * Two things deliberately survive: the reading progress bar and the stepper
 * rail fill. Both are driven only by the reader's own scrolling — they never
 * move on their own, and removing them would take away orientation rather
 * than animation.
 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .js [data-reveal] { opacity: 1; translate: none; }
    .button:hover { transform: none; }
    .card--hover:hover { transform: none; }
    .card--hover.is-interactive { transform: none; }
    .card--hover.is-interactive::before { display: none; }
    .button--primary::after { display: none; }
    .lane__step.is-active .lane__node::after { display: none; }
    .lane__step:not(:last-child)::after { display: none; }
    .artifact__env[data-promote].is-promoted::after { display: none; }
    .stepper__item.is-reached .stepper__marker { transform: none; }
    .hero::before, .hero::after { animation: none; }
}

/* -------------------------------------------------------------------------
   Responsive: the mobile navigation drawer
   ---------------------------------------------------------------------- */
@media (max-width: 63.9375rem) {
    .navbar__toggle { display: flex; }

    .navbar__nav {
        position: fixed;
        inset: var(--navbar-h) 0 auto;
        max-height: calc(100dvh - var(--navbar-h));
        overflow-y: auto;
        margin-left: 0;
        padding: var(--space-sm) var(--space-md) var(--space-lg);
        background: #FFFFFF;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-card-hover);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
    }
    .navbar__nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

    .navbar--dark .navbar__nav {
        background: var(--navy-900);
        border-bottom-color: var(--border-dark);
    }
    .navbar--dark .navbar__nav .navbar__link { color: var(--slate-300); }
    .navbar--dark .navbar__nav .dropdown__menu { background: var(--navy-800); border-color: var(--border-dark); }
    .navbar--dark .navbar__nav .dropdown__option { color: var(--slate-200); }
    .navbar--dark .navbar__nav .dropdown__option:hover { background: rgba(255, 255, 255, 0.08); }

    .navbar__links { flex-direction: column; align-items: stretch; gap: 0; }
    .navbar__link { padding: 0.75rem 0.5rem; font-size: var(--fs-body); min-height: 44px; }

    /* Inside the drawer the dropdown expands in flow rather than floating. */
    .navbar__nav .dropdown__menu {
        position: static;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--border-subtle);
        border-radius: 0;
        margin: 0 0 var(--space-2xs) var(--space-sm);
        padding-left: var(--space-2xs);
        min-width: 0;
        animation: none;
    }

    .navbar__actions .button--desktop { display: none; }
}

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

@media (max-width: 30rem) {
    .button-row .button { width: 100%; }
}
