/* ============================================================
   Vendables — Design System
   Premium enterprise vending technology aesthetic
   ============================================================ */

:root {
    /* Brand */
    --accent: #2f6bff;
    --accent-2: #14d1c4;
    --accent-grad: linear-gradient(120deg, #3b82f6 0%, #14d1c4 100%);

    /* Light theme surfaces */
    --bg: #ffffff;
    --bg-alt: #eef3fb;
    --surface: #ffffff;
    --surface-2: #f4f7fc;
    --ink: #0b1220;
    --ink-2: #2c3a4f;
    --muted: #586579;
    --border: #dde4ef;
    --border-strong: #c5d0e0;

    /* Dark sections (constant, used in both themes) */
    --dark-bg: #070b16;
    --dark-bg-2: #0d1426;
    --dark-ink: #eef2f9;
    --dark-muted: #9aa7bd;
    --dark-border: rgba(255, 255, 255, 0.10);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15, 23, 42, 0.07);
    --shadow-md: 0 10px 32px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);

    --container: 1200px;
    --space: clamp(3.5rem, 7vw, 6.5rem);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body.dark-mode {
    --bg: #070b16;
    --bg-alt: #0c1322;
    --surface: #0f1828;
    --surface-2: #121c2e;
    --ink: #eef2f9;
    --ink-2: #c4cee0;
    --muted: #8d9bb3;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Stop iOS Safari inflating text on orientation change */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

#main-content {
    transition: opacity 0.25s ease-in-out;
}

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    font-weight: 700;
}

p { color: var(--ink-2); }

a { color: var(--accent); text-decoration: none; }

img, svg { max-width: 100%; }
img { height: auto; }

/* ---------------------- Accessibility ---------------------- */
/* Visible keyboard focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

#main-content:focus { outline: none; }

/* Skip link — hidden until focused */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 300;
    padding: 0.7rem 1.1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.ic {
    width: 22px;
    height: 22px;
    display: block;
}

/* ---------------------- Layout ---------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--space) 0;
    background: var(--bg);
}

.section.alt { background: var(--bg-alt); }

.section.dark {
    background:
        radial-gradient(1100px 480px at 12% -10%, rgba(47, 107, 255, 0.22), transparent 60%),
        radial-gradient(900px 420px at 100% 0%, rgba(20, 209, 196, 0.14), transparent 55%),
        var(--dark-bg);
    color: var(--dark-ink);
}

.section.dark .section-title,
.section.dark h3,
.section.dark h4 { color: var(--dark-ink); }

.section.dark p { color: var(--dark-muted); }

.container.narrow { max-width: 820px; }

/* ---------------------- Section heads ---------------------- */
.section-head {
    max-width: 760px;
    margin: 0 auto 3.25rem;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.eyebrow-light {
    color: var(--accent-2);
}

.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-intro {
    font-size: 1.075rem;
    color: var(--muted);
}

/* ---------------------- Buttons ---------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.btn .ic { width: 18px; height: 18px; }

.btn.lg { padding: 1rem 1.7rem; font-size: 1rem; }

.btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 22px rgba(47, 107, 255, 0.28);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47, 107, 255, 0.38);
}

.btn.light {
    background: #fff;
    color: #0b1220;
}

.btn.light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}

.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn.ghost-light {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.32);
}

.btn.ghost-light:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.link-arrow .ic { width: 18px; height: 18px; transition: transform 0.2s ease; }
.link-arrow:hover .ic { transform: translateX(4px); }

/* ---------------------- Header / Nav ---------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg); /* fallback for browsers without color-mix() */
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 72px;
    transition: height 0.25s ease;
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header.scrolled .nav { height: 60px; }

.header-progress {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    width: 0%;
    background: var(--accent-grad);
    z-index: 1;
    transition: width 0.1s linear;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: block;
    flex-shrink: 0;
    border-radius: 8px;
}

.brand-mark svg,
.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-name {
    font-size: 1.2rem;
    color: var(--ink);
}

@media (max-width: 640px) {
    .brand-mark { width: 28px; height: 28px; }
    .brand-name { font-size: 1.1rem; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.nav-links > a {
    color: var(--ink-2);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links > a:hover { color: var(--ink); background: var(--surface-2); }

.nav-links > a.active { color: var(--accent); }

.nav-cta-mobile { display: none; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------- Hero ---------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
    color: var(--dark-ink);
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(4rem, 7vw, 6rem);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 460px at 8% 0%, rgba(47, 107, 255, 0.30), transparent 55%),
        radial-gradient(760px 460px at 100% 10%, rgba(20, 209, 196, 0.20), transparent 55%),
        linear-gradient(180deg, #070b16 0%, #0a1020 100%);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(80% 80% at 50% 30%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(80% 80% at 50% 30%, #000 40%, transparent 100%);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-title {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    color: #fff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--dark-muted);
    max-width: 38ch;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.25rem;
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-border);
}

.hero-stats .stat-num { color: #fff; }
.hero-stats .stat-label { color: var(--dark-muted); }

/* ---------------------- Stats ---------------------- */
.stat-num {
    /* Scales down on small screens: values like "Hardware → Cloud" use
       non-breaking characters and overflow fixed-size grid cells otherwise */
    font-size: clamp(1.3rem, 1rem + 1.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--muted);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--dark-border);
}

.section.dark .stats-row .stat-num { color: #fff; }
.section.dark .stats-row .stat-label { color: var(--dark-muted); }

/* ---------------------- Trust strip ---------------------- */
.trust {
    padding: 2.25rem 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.trust-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.trust-regions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
}

.region-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
    background: var(--surface);
}

.region-chip .ic { width: 15px; height: 15px; color: var(--accent); }
.region-chip.muted { color: var(--muted); }

/* ---------------------- Brand strip ("trusted by") ----------------------
   Deliberately distinct from the pill-shaped .region-chip strip: rectangular
   wordmark tiles, monochrome, no icons. Reads as one uniform, understated set. */
.brands {
    padding: clamp(2.75rem, 5vw, 4rem) 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.brands-label {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.75rem;
}

.brand-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    max-width: 980px;
    margin: 0 auto;
}

.brand-wordmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-weight: 600;
    font-size: 0.97rem;
    letter-spacing: -0.01em;
    box-shadow: var(--shadow-sm);
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.brand-wordmark:hover {
    color: var(--ink);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .brand-wordmark { font-size: 0.88rem; padding: 0.6rem 1rem; }
    .brand-grid { gap: 0.6rem; }
}

/* ---------------------- Grids & cards ---------------------- */
.grid {
    display: grid;
    gap: 1.4rem;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.card-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(20, 209, 196, 0.14));
    color: var(--accent);
    margin-bottom: 1.1rem;
}

.section.dark .card {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--dark-border);
}

.section.dark .card-ico {
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-2);
}

.card h3 {
    font-size: 1.12rem;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--muted);
}

.section.dark .card p { color: var(--dark-muted); }

/* ---------------------- Split sections ---------------------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.split.reverse .split-copy { order: 2; }
.split.reverse .split-visual { order: 1; }

.split-copy .section-title { text-align: left; }
.split-copy p { font-size: 1.05rem; margin-bottom: 1.25rem; }

/* ---------------------- Feature list ---------------------- */
.feature-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
    margin: 1.25rem 0 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--ink-2);
    font-weight: 500;
}

.feature-list .tick {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-list .tick .ic { width: 15px; height: 15px; }

.section.dark .feature-list li { color: var(--dark-ink); }

/* ---------------------- Steps / process ---------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    counter-reset: step;
}

.step {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
}

.step-n {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-grad);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.step h4 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step p { font-size: 0.92rem; color: var(--muted); }

/* ---------------------- Region grid ---------------------- */
.regions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

.region {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.region:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.region.wide { grid-column: 1 / -1; }

.region-flag {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(20, 209, 196, 0.14));
    color: var(--accent);
    margin-bottom: 1rem;
}

.region h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.region p { color: var(--muted); font-size: 0.95rem; }

/* ---------------------- CTA band ---------------------- */
.cta-band {
    background:
        radial-gradient(700px 320px at 0% 0%, rgba(20, 209, 196, 0.28), transparent 60%),
        var(--accent-grad);
    color: #fff;
}

.cta-band-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}

.cta-band h2 {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0.5rem 0 0.75rem;
}

.cta-band p { color: rgba(255, 255, 255, 0.9); margin: 0; }
.cta-band .eyebrow-light { color: rgba(255, 255, 255, 0.85); }

.cta-band-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
}

.cta-band-actions .btn { width: 100%; justify-content: center; }

/* ---------------------- Page hero (sub pages) ---------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
    color: var(--dark-ink);
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    text-align: center;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 50% -20%, rgba(47, 107, 255, 0.3), transparent 60%),
        radial-gradient(600px 300px at 90% 0%, rgba(20, 209, 196, 0.18), transparent 55%),
        linear-gradient(180deg, #070b16, #0b1222);
}

.page-hero-inner { position: relative; max-width: 800px; }

.page-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3rem);
    margin-bottom: 1rem;
}

.page-hero p {
    color: var(--dark-muted);
    font-size: 1.12rem;
    max-width: 60ch;
    margin: 0 auto;
}

.page-hero .hero-cta { justify-content: center; margin-top: 1.75rem; }

/* ---------------------- Prose ---------------------- */
.prose p { font-size: 1.075rem; margin-bottom: 1.25rem; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.prose-meta { color: var(--muted); font-size: 0.9rem; margin-top: 2rem; }

/* ---------------------- Mock panels / diagrams ---------------------- */
.mock {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-visual .mock {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

.mock-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.hero-visual .mock-head {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.hero-visual .mock-dot { background: rgba(255, 255, 255, 0.25); }
.mock-dot:nth-child(1) { background: #ff5f57; }
.mock-dot:nth-child(2) { background: #febc2e; }
.mock-dot:nth-child(3) { background: #28c840; }

.mock-title {
    margin-left: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
}

.hero-visual .mock-title { color: #cdd7e8; }

.mock-live {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: #16a34a;
    letter-spacing: 0.03em;
}

.mock-body { padding: 1.2rem; }

.mock-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.mock-metric {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem;
}

.hero-visual .mock-metric {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.mm-label { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 0.3rem; }
.hero-visual .mm-label { color: #9fb0ca; }
.mm-val { font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.hero-visual .mm-val { color: #fff; }
.mm-val.warn { color: #f59e0b; }

.mock-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 96px;
    padding: 0.5rem 0.25rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.hero-visual .mock-bars { border-color: rgba(255, 255, 255, 0.08); }

.mock-bars span {
    flex: 1;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, var(--accent), rgba(20, 209, 196, 0.7));
    opacity: 0.85;
}

.mock-rows { display: grid; gap: 0.55rem; }

.mock-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-2);
}

.hero-visual .mock-row { color: #cdd7e8; }

.rdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rdot.ok { background: #28c840; }
.rdot.warn { background: #f59e0b; }

/* Layers mock */
.mock-layers {
    padding: 1.5rem;
    display: grid;
    gap: 0.8rem;
    box-shadow: var(--shadow-lg);
}

.lyr {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.lyr .ic { color: var(--accent); width: 20px; height: 20px; }
.lyr-1 { margin-left: 0; }
.lyr-2 { margin-left: 1.25rem; }
.lyr-3 { margin-left: 2.5rem; }
.lyr-4 { margin-left: 3.75rem; background: linear-gradient(135deg, rgba(47,107,255,0.12), rgba(20,209,196,0.12)); }

/* Capability cloud (fabrication / partner build) */
.cap-cloud { justify-content: flex-start; gap: 0.55rem; }
.cap-cloud .region-chip { background: var(--surface-2); }
.cap-cloud .region-chip .ic { width: 16px; height: 16px; }

/* Flow mock */
.mock-flow {
    padding: 1.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.flow-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    min-width: 84px;
}

.flow-node .ic { color: var(--accent); width: 22px; height: 22px; }
.flow-arrow { color: var(--muted); display: flex; align-items: center; }
.flow-arrow .ic { width: 18px; height: 18px; }

/* Table mock */
.mock-table .tbl { display: grid; gap: 0; font-size: 0.88rem; }
.tbl-row {
    display: grid;
    grid-template-columns: 0.5fr 1.4fr 0.5fr 0.7fr;
    gap: 0.5rem;
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    color: var(--ink-2);
}
.tbl-row:last-child { border-bottom: none; }
.tbl-h { font-weight: 700; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tag {
    justify-self: start;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.tag.ok { background: rgba(40, 200, 64, 0.14); color: #1f9d3a; }
.tag.warn { background: rgba(245, 158, 11, 0.16); color: #b6770a; }
.tag.bad { background: rgba(239, 68, 68, 0.14); color: #d33; }

/* ---------------------- Contact ---------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.contact-form-wrap .section-title { text-align: left; }

.form { display: grid; gap: 1.1rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.field { display: grid; gap: 0.45rem; }

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem; /* >= 16px prevents iOS Safari zoom-on-focus */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

.form-status {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0;
}

.form-status.success { color: #1f9d3a; font-weight: 600; }

.contact-aside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.contact-aside h3 { font-size: 1.2rem; margin-bottom: 1.1rem; }

.contact-list { list-style: none; display: grid; gap: 1.1rem; margin-bottom: 1.5rem; }
.contact-list li { display: flex; gap: 0.8rem; align-items: flex-start; }

.ca-ico {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(20, 209, 196, 0.14));
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ca-label {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.contact-list a, .contact-list span { color: var(--ink-2); font-weight: 500; }
.contact-list a:hover { color: var(--accent); }
.contact-regions .ca-label { margin-bottom: 0.6rem; }
.contact-regions .trust-regions { justify-content: flex-start; }

/* ---------------------- Footer ---------------------- */
.site-footer {
    background: var(--dark-bg-2);
    color: var(--dark-ink);
    padding-top: clamp(3rem, 6vw, 4.5rem);
    border-top: 1px solid var(--dark-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}

.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: var(--dark-muted); margin: 1rem 0 1.25rem; font-size: 0.95rem; max-width: 38ch; }
.footer-regions { justify-content: flex-start; }
.footer-regions .region-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--dark-muted);
}

.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.footer-nav { list-style: none; display: grid; gap: 0.6rem; }
.footer-nav a, .footer-nav span { color: var(--dark-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; }

.footer-cta { margin-top: 1.1rem; color: var(--dark-ink); border-color: rgba(255, 255, 255, 0.25); }
.footer-cta:hover { border-color: var(--accent-2); color: var(--accent-2); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem;
    margin-top: 0;
    border-top: 1px solid var(--dark-border);
    font-size: 0.85rem;
    color: var(--dark-muted);
}

.footer-bottom p { color: var(--dark-muted); margin: 0; }
.footer-tagline { opacity: 0.8; }

/* ---------------------- Mega-menu / grouped nav ---------------------- */
.nav-group { position: relative; display: inline-flex; }
.nav-group[data-group="solutions"] { position: static; }

.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink-2);
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-trigger:hover { color: var(--ink); background: var(--surface-2); }
.nav-trigger.has-active { color: var(--accent); }
.nav-caret { display: inline-flex; transition: transform 0.2s ease; }
.nav-caret .ic { width: 15px; height: 15px; }
.nav-group.open .nav-caret { transform: rotate(180deg); }

.nav-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem;
    min-width: 270px;
    z-index: 210;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-group.open .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-panel.nav-mega {
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: min(900px, 100%);
    padding: 1rem;
}

.nav-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.15fr;
    gap: 0.5rem 1.25rem;
}

.nav-col-h {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0.35rem 0.6rem 0.5rem;
}

.nav-col ul, .nav-simple { list-style: none; display: grid; gap: 0.15rem; }
.nav-simple { min-width: 250px; }

.nav-link-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.6rem;
    border-radius: 10px;
    color: var(--ink);
    transition: background-color 0.18s ease;
}

.nav-link-item:hover { background: var(--surface-2); }
.nav-link-item.active { background: linear-gradient(135deg, rgba(47, 107, 255, 0.10), rgba(20, 209, 196, 0.10)); }

.nli-ic {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(20, 209, 196, 0.12));
    color: var(--accent);
}

.nli-ic .ic { width: 18px; height: 18px; }
.nli-text { display: grid; gap: 0.1rem; }
.nli-title { font-weight: 600; font-size: 0.92rem; color: var(--ink); line-height: 1.3; }
.nli-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }

.nav-col-feature { border-left: 1px solid var(--border); padding-left: 1.1rem; }

.nav-feature-card {
    display: grid;
    gap: 0.3rem;
    padding: 1.1rem;
    border-radius: 12px;
    color: #fff;
    background:
        radial-gradient(420px 200px at 0% 0%, rgba(20, 209, 196, 0.45), transparent 60%),
        var(--accent-grad);
    box-shadow: var(--shadow-md);
}

.nav-feature-card .nli-ic { background: rgba(255, 255, 255, 0.18); color: #fff; }
.nav-feature-card .nli-title { color: #fff; font-size: 1.02rem; }
.nav-feature-card .nli-desc { color: rgba(255, 255, 255, 0.92); }

.nav-feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.nav-feature-cta .ic { width: 15px; height: 15px; }

/* ---------------------- Back-to-top ---------------------- */
.back-to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 150;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.back-to-top .ic { width: 20px; height: 20px; }

/* ---------------------- Scroll-reveal ---------------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--rd, 0s);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------------------- Metric band (count-up) ---------------------- */
.metrics-section { padding: clamp(2.25rem, 4.5vw, 3.5rem) 0; }

.metric-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

.metric-band .stat { text-align: center; }
.metric-band .stat-num { font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--accent); }
.metric-band .stat-label { margin-top: 0.35rem; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .metric-band .stat-num[data-count] {
        background: var(--accent-grad);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

/* ---------------------- FAQ accordion ---------------------- */
.faq-wrap, .narrow-faq { max-width: 820px; margin: 0 auto; }
.faq-list { display: grid; gap: 0.75rem; }

.faq-group-title { font-size: 1.25rem; margin: 2.25rem 0 0.9rem; }
.faq-group-title:first-child { margin-top: 0; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-q { margin: 0; font-size: 1rem; }

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    padding: 1.1rem 1.25rem;
}

.faq-trigger:hover { color: var(--accent); }
.faq-icon { flex-shrink: 0; color: var(--muted); transition: transform 0.25s ease; }
.faq-icon .ic { width: 20px; height: 20px; }
.faq-item.open .faq-icon { transform: rotate(180deg); color: var(--accent); }
.faq-answer-inner { padding: 0 1.25rem 1.2rem; color: var(--muted); }
.faq-answer-inner a { color: var(--accent); font-weight: 600; }
.center-meta { text-align: center; }

/* ---------------------- Quote / testimonial ---------------------- */
.quote-band { max-width: 760px; margin: 0 auto; }

.quote-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.quote-ico { display: inline-flex; color: var(--accent); opacity: 0.45; margin-bottom: 0.5rem; }
.quote-ico .ic { width: 30px; height: 30px; }
.quote-card blockquote { font-size: 1.2rem; line-height: 1.55; color: var(--ink); font-weight: 500; margin: 0 0 1rem; letter-spacing: -0.01em; }
.quote-card figcaption { display: grid; gap: 0.1rem; }
.quote-name { font-weight: 700; color: var(--ink); }
.quote-role { font-size: 0.85rem; color: var(--muted); }

/* ---------------------- Integration tags ---------------------- */
.int-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

.int-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* ---------------------- Engagement tiers (pricing) ---------------------- */
.tiers { align-items: stretch; }

.tier {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tier-featured { box-shadow: var(--shadow-md); outline: 2px solid var(--accent); outline-offset: -2px; }

.tier-badge {
    position: absolute;
    top: -0.8rem;
    left: 1.9rem;
    background: var(--accent-grad);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.tier-ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(20, 209, 196, 0.14));
    color: var(--accent);
    margin-bottom: 1rem;
}

.tier-name { font-size: 1.3rem; margin-bottom: 0.3rem; }
.tier-tagline { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.5rem; }
.tier .feature-list { margin: 0.75rem 0 1rem; }
.tier-note { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin: 0 0 1.1rem; }
.tier-cta { margin-top: auto; width: 100%; justify-content: center; }

/* ---------------------- Guide cards (insights) ---------------------- */
.guide-card { display: flex; flex-direction: column; }
.guide-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 0.5rem; }

.guide-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(20, 209, 196, 0.12));
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
}

.guide-meta { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.guide-card .link-arrow { margin-top: auto; }
.guide-soon { margin-top: auto; font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* ---------------------- Comparison table ---------------------- */
.prose-compare { margin: 1.5rem 0 2rem; }

.compare {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.compare-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.compare-row:last-child { border-bottom: 0; }

.compare-head {
    background: var(--surface-2);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.compare-feature { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.compare-cell { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; }
.compare-cell.yes { color: var(--ink); }
.compare-cell.no { color: var(--muted); }

.cmp-ic {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cmp-ic .ic { width: 13px; height: 13px; }

/* ---------------------- Takeaways callout ---------------------- */
.takeaways {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0 2rem;
}

.takeaways h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.takeaways .feature-list { margin: 0; }

/* ---------------------- Contact form: honeypot, errors ---------------------- */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field-error { font-size: 0.8rem; color: #d33; font-weight: 600; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.14); }
.form-status.error { color: #d33; font-weight: 600; }

/* ---------------------- Footer contact line ---------------------- */
.footer-contact { margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--dark-muted); }
.footer-contact a { color: var(--dark-ink); }
.footer-contact a:hover { color: var(--accent-2); }

/* ---------------------- Scrollbar ---------------------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .cols-4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { grid-template-columns: 1fr; }
    /* Copy (headline + CTAs) first, dashboard mock after — keeps the
       message above the fold on tablet/mobile; centre the mock. */
    .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
    .cta-band-inner { grid-template-columns: 1fr; }
    .cta-band-actions { flex-direction: row; flex-wrap: wrap; }
    .cta-band-actions .btn { width: auto; }
}

@media (max-width: 960px) {
    .nav-cta { display: none; }
    .nav-toggle { display: inline-flex; }

    /* Comfortable ~44px touch targets for the header controls */
    .theme-toggle, .nav-toggle { width: 44px; height: 44px; }

    /* Anchored to the header bottom (tracks the 72px -> 60px condensed
       height) instead of a hard-coded fixed offset. */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease;
        /* dvh tracks mobile Safari's collapsing URL bar; vh is the fallback */
        max-height: calc(100vh - 72px);
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.nav-open .nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Keep the page from scrolling behind the open menu */
    body.nav-open { overflow: hidden; }

    .nav-links > a { padding: 0.85rem 0.5rem; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
    .nav-links > a:last-of-type { border-bottom: none; }
    .nav-cta-mobile { display: inline-flex; justify-content: center; margin-top: 0.75rem; }
    .nav-links > a.nav-cta-mobile { border-radius: var(--radius-sm); padding: 0.9rem 1.4rem; border-bottom: none; }

    /* Tablet mid-breakpoint: three-across card grids get cramped below
       ~960px; two columns reads better until they stack at 720px. */
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }

    /* Give the contact form full width before the two-column layout
       squeezes inputs; the aside follows underneath. */
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

    /* Footer: brand block full-width, link columns three-across */
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: 1 / -1; }

    /* Grouped nav becomes an inline accordion on mobile */
    .nav-group { display: block; width: 100%; }
    .nav-trigger {
        width: 100%;
        justify-content: space-between;
        padding: 0.85rem 0.5rem;
        font-size: 1rem;
        color: var(--ink);
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    .nav-trigger:hover { background: transparent; }
    .nav-panel,
    .nav-panel.nav-mega {
        position: static;
        width: 100%;
        min-width: 0;
        opacity: 1;
        visibility: hidden;
        transform: none;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease, visibility 0.28s;
    }
    .nav-group.open > .nav-panel { visibility: visible; max-height: 1400px; }
    .nav-mega-grid { grid-template-columns: 1fr; gap: 0; padding: 0.25rem 0 0.5rem; }
    .nav-col-feature { border-left: 0; padding-left: 0; margin-top: 0.5rem; }
    .nav-col-h { margin: 0.85rem 0.5rem 0.4rem; }
    .nav-link-item { padding: 0.7rem 0.5rem; }
    .nav-feature-card { margin: 0 0.5rem; }
}

@media (max-width: 720px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-copy { order: 1; }
    .split.reverse .split-visual { order: 2; }
    .split-copy .section-title { text-align: left; }
    .steps { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .regions { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form .btn { width: 100%; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .hero-stats { gap: 1.5rem; }
    .mock-flow { gap: 0.35rem; }
    .flow-node { min-width: 70px; padding: 0.8rem 0.6rem; }
    .lyr-2, .lyr-3, .lyr-4 { margin-left: 0; }
    .metric-band { grid-template-columns: 1fr 1fr; }
    .tiers { gap: 1.6rem; }
    .tier-featured { order: -1; }
}

@media (max-width: 460px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .mock-metrics { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 1.25rem; }
    .stats-row { grid-template-columns: 1fr; gap: 1.1rem; }
    .metric-band { grid-template-columns: 1fr; gap: 0.9rem; }
    .compare-row { grid-template-columns: 1.2fr 0.85fr 0.85fr; padding: 0.7rem 0.6rem; gap: 0.35rem; }
    .compare-cell { font-size: 0.8rem; gap: 0.3rem; }
    .compare-head { font-size: 0.68rem; }
    .quote-card { padding: 1.5rem; }
    .quote-card blockquote { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
    .back-to-top { transform: none !important; }
}
