/* ============================================================
   DESIGN TOKENS — the only place colors are ever defined.
   Swap the "brand red" (--color-accent-primary) or any hue here
   and the entire site follows. Nothing below this block should
   ever hard-code a hex value.
   ============================================================ */
:root {
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;
    --space-6: 6rem;
    --space-7: 9rem;

    --radius-sm: 4px;
    --radius-md: 10px;
    --max-width: 1200px;

    --dur-fast: 0.2s;
    --dur-med: 0.45s;
    --dur-theme: 0.6s;
    /* snappier, more premium-feeling curve than the generic ease-out */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* DARK THEME — deep vacuum, red as ember, not fire */
:root,
html[data-theme="dark"] {
    --color-bg-base: #07070a;
    --color-bg-elevated: #101015;
    --color-bg-elevated-2: #17171d;
    --color-text-primary: #eef0f3;
    --color-text-muted: #9a9ba5;
    --color-border: rgba(255, 255, 255, 0.09);
    --color-border-strong: rgba(255, 255, 255, 0.16);

    --color-accent-primary: #c81e3a;
    /* brand red slot — swappable */
    --color-accent-primary-soft: rgba(200, 30, 58, 0.14);
    --color-accent-secondary: #6a4cff;
    /* violet */
    --color-accent-tertiary: #ff9a3d;
    /* amber */
    --color-glow: rgba(200, 30, 58, 0.55);

    --gradient-accretion: conic-gradient(from 0deg,
            #07070a 0deg,
            var(--color-accent-tertiary) 40deg,
            var(--color-accent-primary) 110deg,
            var(--color-accent-secondary) 200deg,
            #07070a 260deg,
            var(--color-accent-primary) 330deg,
            #07070a 360deg);

    --scrim-hero: linear-gradient(180deg, rgba(7, 7, 10, 0.35) 0%, rgba(7, 7, 10, 0.55) 55%, rgba(7, 7, 10, 0.95) 100%);
    --scrim-section: rgba(7, 7, 10, 0.72);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-ambient: 0 30px 80px -20px rgba(200, 30, 58, 0.25);
    --noise-opacity: 0.05;
}

/* LIGHT THEME — not an invert. Warmer base, cooler shadows, red goes deeper/quieter */
html[data-theme="light"] {
    --color-bg-base: #f2efe9;
    --color-bg-elevated: #ffffff;
    --color-bg-elevated-2: #e9e4db;
    --color-text-primary: #1b1a1f;
    --color-text-muted: #5c5a63;
    --color-border: rgba(20, 18, 25, 0.10);
    --color-border-strong: rgba(20, 18, 25, 0.20);

    --color-accent-primary: #a3122b;
    --color-accent-primary-soft: rgba(163, 18, 43, 0.10);
    --color-accent-secondary: #4b2fb0;
    --color-accent-tertiary: #b85f16;
    --color-glow: rgba(163, 18, 43, 0.30);

    --gradient-accretion: conic-gradient(from 0deg,
            #f2efe9 0deg,
            var(--color-accent-tertiary) 40deg,
            var(--color-accent-primary) 110deg,
            var(--color-accent-secondary) 200deg,
            #f2efe9 260deg,
            var(--color-accent-primary) 330deg,
            #f2efe9 360deg);

    --scrim-hero: linear-gradient(180deg, rgba(242, 239, 233, 0.25) 0%, rgba(242, 239, 233, 0.55) 55%, rgba(242, 239, 233, 0.97) 100%);
    --scrim-section: rgba(242, 239, 233, 0.80);
    --shadow-elevated: 0 20px 50px rgba(30, 20, 15, 0.10);
    --shadow-ambient: 0 30px 80px -20px rgba(163, 18, 43, 0.16);
    --noise-opacity: 0.035;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    position: relative;
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.55;
    transition: background var(--dur-theme) var(--ease), color var(--dur-theme) var(--ease);
    overflow-x: hidden;
}

/* subtle film-grain texture — gives the whole page tactile depth instead
   of flat vector fills. Pure CSS, no image request. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-glow);
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- HEADER / NAV ---------- */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--color-bg-base) 60%, transparent);
    border-bottom: 1px solid transparent;
    transition: background var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}

header.site-header.scrolled {
    background: color-mix(in srgb, var(--color-bg-base) 86%, transparent);
    border-bottom-color: var(--color-border);
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.35);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-2);
}

.logo-mark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-mark .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 10px var(--color-glow);
}

nav.primary-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

nav.primary-nav a {
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--color-text-muted);
    transition: color var(--dur-fast) var(--ease);
    position: relative;
    padding-bottom: 2px;
}

nav.primary-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--color-accent-primary);
    transition: width var(--dur-fast) var(--ease);
}

nav.primary-nav a:hover,
nav.primary-nav a:focus-visible {
    color: var(--color-text-primary);
}

nav.primary-nav a:hover::after,
nav.primary-nav a:focus-visible::after {
    width: 100%;
}

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

.theme-toggle {
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.theme-toggle:hover {
    border-color: var(--color-accent-primary);
    transform: rotate(18deg);
}

.theme-toggle:active {
    transform: scale(0.9) rotate(18deg);
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-primary);
    width: 38px;
    height: 38px;
}

@media (max-width: 768px) {
    nav.primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
        background: var(--color-bg-elevated);
        padding: var(--space-3) clamp(1.25rem, 4vw, 2.5rem);
        border-bottom: 1px solid var(--color-border);
        transform-origin: top;
        transform: scaleY(0);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--dur-med) var(--ease), opacity var(--dur-med) var(--ease);
    }

    nav.primary-nav.open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    overflow: hidden;
    /* pointer position, updated by JS, drives the ambient glow below */
    --mx: 50%;
    --my: 45%;
}

.hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-visual canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.no-canvas .hero-fallback-img,
.reduced-motion .hero-fallback-img {
    opacity: 1;
}

.reduced-motion .hero-visual canvas {
    display: none;
}

/* cursor-follow ambient glow — pure decoration, skipped for touch/reduced motion via JS */
.hero-pointer-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(500px circle at var(--mx) var(--my), var(--color-accent-primary-soft), transparent 65%);
    transition: opacity var(--dur-med) var(--ease);
    mix-blend-mode: screen;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: var(--scrim-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content .eyebrow {
    margin-bottom: var(--space-2);
}

.hero h1 {
    font-size: clamp(2.4rem, 6.2vw, 4.6rem);
    line-height: 1.05;
    max-width: 18ch;
    margin-bottom: var(--space-3);
}

/* Force the typed line onto its own row always, regardless of how many
   characters have been typed — prevents the first line reflowing/jumping
   mid-animation. */
.hero h1 .accent {
    display: block;
    color: var(--color-accent-primary);
    margin-top: 0.12em;
    min-height: 1.05em;
}

.hero h1 .accent .typed-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    margin-left: 3px;
    vertical-align: -0.08em;
    background: var(--color-accent-primary);
    animation: cursor-blink 0.9s steps(1) infinite;
}

@keyframes cursor-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero h1 .accent .typed-cursor {
        display: none;
    }
}

.hero p.sub {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--color-text-muted);
    max-width: 46ch;
    margin-bottom: var(--space-3);
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.trust-chip {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-bg-base) 55%, transparent);
    backdrop-filter: blur(6px);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
}

.trust-chip svg {
    width: 12px;
    height: 12px;
    stroke: var(--color-accent-primary);
    flex-shrink: 0;
}

/* ---------- HERO FLOATING VERIFICATION CARD (dashboard-style widget) ---------- */
.hero-content-row {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-5);
    align-items: center;
}

@media (max-width: 980px) {
    .hero-content-row {
        grid-template-columns: 1fr;
    }

    .verify-panel {
        margin-top: var(--space-4);
        max-width: 380px;
    }
}

.verify-panel {
    position: relative;
    z-index: 2;
    background: color-mix(in srgb, var(--color-bg-elevated) 78%, transparent);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-elevated);
    padding: var(--space-3);
    animation: panel-float 6s ease-in-out infinite;
}

@keyframes panel-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .verify-panel {
        animation: none;
    }
}

.verify-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

.verify-panel-head .label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.verify-panel-head .live-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--color-accent-primary);
}

.verify-panel-head .live-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--color-glow);
    }

    50% {
        box-shadow: 0 0 0 5px transparent;
    }
}

.verify-panel-list {
    display: grid;
    gap: 0.65rem;
}

.verify-panel-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--color-text-muted);
    opacity: 0.4;
    transition: opacity var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
}

.verify-panel-row.checked {
    opacity: 1;
    color: var(--color-text-primary);
}

.verify-panel-row .check-mark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--color-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.verify-panel-row.checked .check-mark {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}

.verify-panel-row .check-mark svg {
    width: 10px;
    height: 10px;
    stroke: var(--color-bg-elevated);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.verify-panel-row.checked .check-mark svg {
    opacity: 1;
    transform: scale(1);
    stroke: #fff;
}

.verify-panel-foot {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.95rem 1.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.btn-primary {
    background: var(--color-accent-primary);
    color: #fff;
}

/* sheen sweep on hover — cheap, GPU-only (transform), reads as "premium" */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s var(--ease);
}

.btn-primary:hover::before {
    left: 130%;
}

.btn-primary svg {
    transition: transform var(--dur-fast) var(--ease);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px -6px var(--color-glow);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

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

.btn-primary:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-accent-secondary);
    outline-offset: 3px;
}

/* ---------- GENERIC SECTION ---------- */
section {
    position: relative;
    padding-block: var(--space-6);
}

.section-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

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

.section-inner {
    position: relative;
    z-index: 1;
}

.section-head {
    max-width: 62ch;
    margin-bottom: var(--space-5);
}

.section-head h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    margin-top: var(--space-1);
}

/* ---------- SCROLL REVEALS (GPU-only, retrigger both directions) ---------- */
.reveal,
.reveal-card,
.reveal-btn {
    will-change: transform, opacity;
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
}

.reveal.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal-card {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.97);
}

.reveal-card.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.reveal-btn {
    opacity: 0;
    transform: translate3d(-18px, 0, 0);
}

.reveal-btn.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-card,
    .reveal-btn {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* stagger steps left-to-right */
.steps .step:nth-child(1) {
    --reveal-delay: 0s;
}

.steps .step:nth-child(2) {
    --reveal-delay: 0.08s;
}

.steps .step:nth-child(3) {
    --reveal-delay: 0.16s;
}

.steps .step:nth-child(4) {
    --reveal-delay: 0.24s;
}

/* ---------- WHAT WE DO ---------- */
.what-we-do .grid-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-5);
    align-items: center;
}

.what-we-do p.body-text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 52ch;
}

.visual-frame {
    position: relative;
    aspect-ratio: 4/3;
}

.visual-frame-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-elevated);
    transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}

.visual-frame:hover .visual-frame-inner {
    transform: translateY(-4px);
    box-shadow: var(--shadow-ambient);
}

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

.visual-frame.procedural .visual-frame-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accretion);
    opacity: 0.5;
    mix-blend-mode: screen;
}

.visual-frame .verify-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.6;
}

/* HUD-style corner brackets — ties the "verified" language to the visual
   language: a targeting reticle around every data visual on the page */
.visual-frame .hud-corners span {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-accent-primary);
    opacity: 0.8;
}

.visual-frame .hud-corners .c-tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.visual-frame .hud-corners .c-tr {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.visual-frame .hud-corners .c-bl {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.visual-frame .hud-corners .c-br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.verify-badge {
    position: absolute;
    bottom: var(--space-2);
    left: var(--space-2);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-primary);
    background: color-mix(in srgb, var(--color-bg-base) 70%, transparent);
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(6px);
}

/* scanning sweep line — reads as an active verification pass over the data */
.visual-frame .scan-sweep {
    position: absolute;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, transparent, var(--color-accent-primary-soft) 45%, transparent);
    animation: scan-sweep 4.5s linear infinite;
    pointer-events: none;
}

@keyframes scan-sweep {
    0% {
        top: -40%;
    }

    100% {
        top: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .visual-frame .scan-sweep {
        animation: none;
        display: none;
    }
}

/* floating registry badges — small proof-points orbiting the What We Do
   visual, naming the real registry sources the pipeline checks against */
.registry-badges {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.registry-badge {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.03em;
    color: var(--color-text-primary);
    background: color-mix(in srgb, var(--color-bg-base) 75%, transparent);
    border: 1px solid var(--color-border-strong);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    animation: badge-drift 7s ease-in-out infinite;
}

.registry-badge.b1 {
    top: 12%;
    right: -6%;
    animation-delay: 0s;
}

.registry-badge.b2 {
    top: 42%;
    left: -8%;
    animation-delay: 1.2s;
}

.registry-badge.b3 {
    bottom: 14%;
    right: -4%;
    animation-delay: 2.4s;
}

@keyframes badge-drift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 900px) {
    .registry-badges {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registry-badge {
        animation: none;
    }
}

@media (max-width: 900px) {
    .what-we-do .grid-2 {
        grid-template-columns: 1fr;
    }

    .visual-frame {
        order: -1;
    }
}

/* ---------- HOW WE WORK ---------- */
.how-we-work {
    background: var(--color-bg-elevated);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    position: relative;
}

/* connecting line threading the four steps together on desktop —
   reinforces "pipeline", not four disconnected boxes */
.steps::before {
    content: '';
    position: absolute;
    top: 41px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-strong) 15%, var(--color-border-strong) 85%, transparent);
    z-index: 0;
}

@media (max-width: 900px) {
    .steps::before {
        display: none;
    }
}

.step {
    position: relative;
    z-index: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    background: var(--color-bg-base);
    overflow: hidden;
    transition: border-color var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}

.step:hover {
    border-color: var(--color-accent-primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-ambient);
}

/* oversized ghost step number in the corner — structural device that
   actually encodes real sequence (this is a genuine ordered pipeline) */
.step .ghost-index {
    position: absolute;
    top: -0.35em;
    right: 0.1em;
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--color-text-primary);
    opacity: 0.05;
    line-height: 1;
    pointer-events: none;
}

.step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-accent-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: background var(--dur-fast) var(--ease);
}

.step:hover .step-icon {
    background: var(--color-accent-primary);
}

.step:hover .step-icon svg {
    stroke: #fff;
}

.step-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.step-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-accent-primary);
    transition: stroke var(--dur-fast) var(--ease);
}

.step .tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.step h3 {
    font-size: 1.1rem;
    margin-block: 0.5rem 0.5rem;
}

.step p {
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

@media (max-width: 900px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* ---------- BUILT TO SCALE ---------- */
.built-to-scale {
    overflow: hidden;
}

.built-to-scale .section-bg {
    opacity: 0.16;
}

.built-to-scale .grid-2 {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-5);
    align-items: center;
}

.built-to-scale p.body-text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 50ch;
}

.vertical-marquee {
    margin-top: var(--space-4);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.vertical-marquee-track {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    animation: marquee-scroll 22s linear infinite;
}

.vertical-marquee:hover .vertical-marquee-track {
    animation-play-state: paused;
}

.vertical-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    white-space: nowrap;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated-2);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.vertical-tag.is-next::before {
    content: '+';
    color: var(--color-accent-primary);
    font-weight: 600;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vertical-marquee-track {
        animation: none;
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .built-to-scale .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- CONTACT ---------- */
.contact {
    background: var(--color-bg-elevated);
}

.contact .section-bg {
    opacity: 0.10;
}

.contact-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-5);
}

.contact p.body-text {
    color: var(--color-text-muted);
    max-width: 42ch;
}

.contact-meta {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.contact-meta-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.contact-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-accent-primary);
    flex-shrink: 0;
}

form.contact-form {
    display: grid;
    gap: var(--space-2);
    background: var(--color-bg-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    box-shadow: var(--shadow-elevated);
    transition: box-shadow var(--dur-med) var(--ease);
}

form.contact-form:focus-within {
    box-shadow: var(--shadow-ambient);
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.field input,
.field textarea {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-radius: var(--radius-sm);
    padding: 0.8rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

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

.field textarea {
    resize: vertical;
    min-height: 110px;
}

.contact-form .btn-primary {
    justify-self: start;
    border: none;
    margin-top: 0.4rem;
}

@media (max-width: 900px) {
    .contact-inner {
        grid-template-columns: 1fr;
    }
}

/* ---------- FOOTER ---------- */
footer.site-footer {
    position: relative;
    padding-block: var(--space-4);
    border-top: 1px solid var(--color-border);
    overflow: hidden;
}

footer .section-bg {
    opacity: 0.12;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-nav {
    display: flex;
    gap: var(--space-3);
}

.footer-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    transition: color var(--dur-fast) var(--ease);
}

.footer-nav a:hover {
    color: var(--color-text-primary);
}

.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;
}