/* ==========================================================================
   EMS Marketing Site — Marketing Concept
   Brand: Deep Navy + Teal palette, Satoshi typography.
   ========================================================================== */

:root {
    --primary: #00B3B8;
    --primary-dark: #009296;
    --primary-soft: #e6f8f8;
    --accent: #00B3B8;     /* teal, used for CTAs / badges / highlights */
    --surface: #ffffff;
    --surface-2: #F5F7F9;
    --surface-3: #E8EBEE;
    --bg: #F5F7F9;
    --bg-alt: #E8EBEE;
    --ink: #0A1B33;
    --text: #1a2a40;
    --text-soft: #3d5068;
    --text-muted: #7b8fa3;
    --border: #dde3ea;
    --border-strong: #c5cdd6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(10,27,51,0.06);
    --shadow: 0 6px 24px rgba(10,27,51,0.08), 0 1px 3px rgba(10,27,51,0.04);
    --shadow-lg: 0 24px 60px rgba(10,27,51,0.12);
    --max: 1200px;
    --transition: 0.25s ease;
    --section-pad: 96px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600; font-size: 14px;
    border: 1px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary); color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark); border-color: var(--primary-dark);
    color: #fff; transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,179,184,0.35);
}
.btn-secondary {
    background: var(--surface); color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    background: var(--surface-2); border-color: var(--text-soft);
    color: var(--ink);
}
.btn-ghost {
    background: transparent; color: var(--text-soft);
    border-color: transparent;
}
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ===== Gold Standard certificate icon ===== */
.gold-icon {
    display: inline-block;
    width: 1.05em;
    height: 1.05em;
    vertical-align: -0.18em;
    flex-shrink: 0;
    /* Subtle glow so the icon reads as "premium" against any background */
    filter: drop-shadow(0 1px 2px rgba(160, 117, 27, 0.25));
}
.gold-icon-lg { width: 1.4em; height: 1.4em; vertical-align: -0.28em; }

/* When the icon is used inside a hero-eyebrow (replacing the .dot),
   align the eyebrow content properly. */
.hero-eyebrow .gold-icon { margin-right: 2px; }

/* Inline gold-standard mark for inside paragraph text */
.gold-mark {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #009296;
    font-weight: 700;
}
.gold-mark .gold-icon { width: 1em; height: 1em; }

/* ===== Pricing: monthly / annual toggle ===== */
.billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    margin: 0 auto 28px;
    font-size: 13px;
}
.billing-toggle button {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.billing-toggle button:hover { color: var(--ink); }
.billing-toggle button.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(15,23,42,0.08);
}
.billing-toggle .save-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--primary-soft); color: var(--primary-dark);
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.billing-toggle button.active .save-pill {
    background: var(--primary); color: #fff;
}

/* The annual sub-line ("billed annually as $X") under each price */
.price-billing-note {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    min-height: 1.3em; /* prevents layout jump when toggling */
}

/* ===== Header / Nav ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245,247,249,0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition);
}
.site-header.scrolled {
    border-bottom-color: var(--border);
    background: rgba(245,247,249,0.95);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 16px; color: var(--ink);
}
.logo-mark {
    width: auto; height: 21px;
    background: none;
    border-radius: 0;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.logo-mark img {
    height: 100%; width: auto; object-fit: contain;
}
.logo small {
    display: block; font-weight: 400; font-size: 11px; color: var(--text-muted);
    margin-top: -2px;
}
.nav-links {
    display: flex; align-items: center; gap: 28px;
    list-style: none;
}
.nav-links a {
    color: var(--text-soft); font-weight: 500; font-size: 14px;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Nav dropdown — used by the Solutions menu. CSS-only on desktop;
   on mobile the items just collapse inline inside the .nav-links list. */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--text-soft); font-weight: 500; font-size: 14px;
    background: none; border: 0; padding: 0;
    cursor: pointer;
}
.nav-dropdown-toggle:hover, .nav-dropdown:focus-within .nav-dropdown-toggle { color: var(--ink); }
.nav-dropdown-toggle i { font-size: 10px; opacity: 0.7; transition: transform var(--transition); }
.nav-dropdown:hover .nav-dropdown-toggle i,
.nav-dropdown:focus-within .nav-dropdown-toggle i { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: 100%; left: -12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    min-width: 280px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    list-style: none;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    transition: background var(--transition);
}
.nav-dropdown-menu a:hover { background: var(--surface-2); color: var(--ink); }
.nav-dropdown-menu .item-title { display: block; font-weight: 600; color: var(--ink); font-size: 14px; }
.nav-dropdown-menu .item-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }
.nav-toggle {
    display: none;
    width: 36px; height: 36px; border-radius: 8px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-soft);
    align-items: center; justify-content: center;
}

/* ===== Sign-in dropdown ===== */
.signin-dropdown { position: relative; }
.signin-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-soft);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.signin-toggle:hover, .signin-dropdown.open .signin-toggle {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.signin-toggle .signin-chev { font-size: 9px; opacity: 0.7; transition: transform var(--transition); }
.signin-dropdown.open .signin-toggle .signin-chev { transform: rotate(180deg); }
.signin-menu {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    min-width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 200;
}
.signin-dropdown.open .signin-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.signin-menu a {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 12px;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    transition: background var(--transition);
}
.signin-menu a:hover { background: var(--surface-2); }
.signin-menu a .signin-ic {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.signin-menu a .signin-txt strong {
    display: block; font-size: 14px; font-weight: 700; color: var(--ink);
    margin-bottom: 2px;
}
.signin-menu a .signin-txt span { font-size: 12px; color: var(--text-muted); display: block; }
.signin-menu .signin-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 4px;
}
.signin-menu .signin-foot {
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    text-align: center;
}
.signin-menu .signin-foot a {
    display: inline; padding: 0; color: var(--accent); font-weight: 600;
}
.signin-menu .signin-foot a:hover { background: transparent; text-decoration: underline; }

/* ===== Hero ===== */
.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(800px 400px at 80% -10%, rgba(0,179,184,0.18), transparent 60%),
        radial-gradient(600px 400px at -10% 60%, rgba(160,117,85,0.10), transparent 60%);
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: var(--primary-soft); color: var(--primary-dark);
    border: 1px solid rgba(0,179,184,0.3);
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 20px;
}
.hero-eyebrow .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,179,184,0.25);
}
.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 20px;
}
.hero h1 .accent { color: var(--primary-dark); }
.hero-sub {
    font-size: 18px; color: var(--text-soft);
    max-width: 540px;
    margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
    margin-top: 28px;
    display: flex; flex-wrap: wrap; gap: 22px;
    font-size: 13px; color: var(--text-muted);
}
.hero-meta i { color: var(--primary); margin-right: 6px; }

/* Hero visual: a stylised dashboard tile with a stamping pipeline */
.hero-visual {
    position: relative;
    aspect-ratio: 1.05 / 1;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #ffffff 0%, var(--primary-soft) 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.hero-visual .pill {
    position: absolute;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    display: flex; align-items: center; gap: 10px;
    animation: float 6s ease-in-out infinite;
}
.hero-visual .pill .icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.hero-visual .pill .label { font-weight: 600; color: var(--ink); font-size: 12px; line-height: 1.2; }
.hero-visual .pill .meta { color: var(--text-muted); font-size: 11px; line-height: 1.2; }
.hero-visual .pill-1 {
    top: 10%; left: 8%;
    animation-delay: 0s;
}
.hero-visual .pill-1 .icon { background: var(--primary-soft); color: var(--primary-dark); }
.hero-visual .pill-2 {
    top: 28%; right: 8%;
    animation-delay: 1.5s;
}
.hero-visual .pill-2 .icon { background: #fdf6e7; color: #8a6d1c; }
.hero-visual .pill-3 {
    bottom: 14%; left: 14%;
    animation-delay: 3s;
}
.hero-visual .pill-3 .icon { background: #edf4ed; color: #2c5e3c; }
.hero-visual .pill-4 {
    bottom: 32%; right: 12%;
    animation-delay: 4.5s;
}
.hero-visual .pill-4 .icon { background: #fdf0ee; color: #8a1f15; }
.hero-visual .grid-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,179,184,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,179,184,0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 75%);
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* ===== Section primitives ===== */
section { padding: var(--section-pad) 0; }
.section-eyebrow {
    display: inline-block;
    padding: 5px 11px;
    background: var(--primary-soft); color: var(--primary-dark);
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.15;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.section-sub {
    font-size: 17px;
    color: var(--text-soft);
    max-width: 640px;
    margin-bottom: 56px;
}
.section-head { text-align: center; margin: 0 auto 56px; max-width: 720px; }
.section-head .section-sub { margin: 0 auto; }

/* ===== Feature grid ===== */
.features {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.feature-card {
    padding: 30px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
    margin-bottom: 18px;
}
.feature-card h3 {
    font-size: 17px; font-weight: 700; color: var(--ink);
    margin-bottom: 8px; letter-spacing: -0.01em;
}
.feature-card p { font-size: 14px; color: var(--text-soft); }

/* ===== Pipeline (how it works) ===== */
.pipeline { background: var(--bg-alt); }
.pipeline-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    position: relative;
}
.pipeline-steps::before {
    content: '';
    position: absolute;
    top: 28px; left: 8%; right: 8%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.5;
    z-index: 0;
}
.pipeline-step {
    position: relative; z-index: 1;
    text-align: center;
    padding: 0 6px;
}
.pipeline-step .num {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--primary-dark);
    font-weight: 800; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 12px rgba(0,179,184,0.25);
}
.pipeline-step h4 {
    font-size: 15px; font-weight: 700; color: var(--ink);
    margin-bottom: 6px;
}
.pipeline-step p { font-size: 13px; color: var(--text-soft); }

/* ===== Scrollytelling pipeline ("Dock to Dispatch") =====
   Outer .dd-track is 5x viewport tall — gives us 5 viewports of scroll
   to advance the pinned content through 5 stages. The .dd-pin is
   position:sticky inside the track, so the user *feels* the section
   freeze while they scroll, then it releases when the track ends and
   the next section comes up. Mobile collapses to a stacked layout. */
.dock-dispatch {
    background: var(--bg-alt);
    padding: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.dd-intro {
    padding: 96px 0 48px;
}
.dd-track {
    position: relative;
    /* 5 stages × 100vh of scroll each = 500vh.
       Add a little padding so transitions land cleanly. */
    height: 520vh;
}
.dd-pin {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 64px;
    align-items: center;
    padding: 24px 0 60px;
}
.dd-progress {
    position: relative;
    padding: 12px 0;
    display: flex; flex-direction: column;
    gap: 38px;
}
.dd-progress-line {
    position: absolute;
    left: 18px; top: 28px; bottom: 28px; width: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.dd-progress-bar {
    position: absolute;
    left: 0; top: 0; width: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: height 0.3s ease;
    height: 0;
}
.dd-dot {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 14px;
    cursor: default;
}
.dd-dot .num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.dd-dot .lbl {
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.dd-dot.passed .num { background: var(--primary); border-color: var(--primary); color: #fff; }
.dd-dot.passed .lbl { color: var(--text-soft); }
.dd-dot.active .num {
    background: var(--primary); border-color: var(--primary); color: #fff;
    box-shadow: 0 0 0 6px rgba(0,179,184,0.18);
    transform: scale(1.05);
}
.dd-dot.active .lbl { color: var(--ink); font-weight: 700; }

.dd-content {
    position: relative;
    height: 100%;
    overflow: hidden;
}
.dd-stage {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-content: center;
}
.dd-stage.active {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}
.dd-stage-text { display: flex; flex-direction: column; justify-content: center; }
.dd-stage-eyebrow {
    font-size: 12px; font-weight: 700; color: var(--primary-dark);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 12px;
}
.dd-stage h3 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800; color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    line-height: 1.15;
}
.dd-stage > .dd-stage-text > p {
    font-size: 16px; color: var(--text-soft);
    margin-bottom: 22px;
}
.dd-feature-list { list-style: none; }
.dd-feature-list li {
    font-size: 14px; color: var(--text);
    padding: 6px 0;
    display: flex; gap: 10px; align-items: flex-start;
}
.dd-feature-list li i { color: var(--primary); font-size: 12px; margin-top: 6px; flex-shrink: 0; }

/* Per-stage visual mock — sized to fit viewport-pinned area */
.dd-stage-visual {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    height: 100%;
    max-height: 480px;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.dd-mock-bar {
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 700; color: var(--ink);
}
.dd-mock-bar i { color: var(--primary); }
.dd-mock-body {
    flex: 1; padding-top: 14px;
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden;
}

/* Tile rows used inside the mock visuals */
.dd-tile {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; color: var(--text);
}
.dd-tile .ic {
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.dd-tile .ic.warn { background: #fdf6e7; color: #8a6d1c; }
.dd-tile .ic.alert { background: #fdf0ee; color: #8a1f15; }
.dd-tile .ic.ok { background: #edf4ed; color: #2c5e3c; }
.dd-tile .name { font-weight: 600; color: var(--ink); }
.dd-tile .meta { color: var(--text-muted); font-size: 11px; }
.dd-tile .badge {
    margin-left: auto;
    padding: 2px 8px; border-radius: 999px;
    font-size: 10px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary-dark);
}
.dd-tile .badge.warn { background: #fef3c7; color: #92400e; }
.dd-tile .badge.alert { background: #fde8e5; color: #8a1f15; }
.dd-tile .badge.ok { background: #edf4ed; color: #166534; }

.dd-zone-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.dd-zone-cell {
    aspect-ratio: 1.4 / 1;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: var(--text-muted);
}
.dd-zone-cell.fill1 { background: rgba(0,179,184,0.18); border-color: rgba(0,179,184,0.35); color: var(--primary-dark); }
.dd-zone-cell.fill2 { background: rgba(0,179,184,0.4); border-color: var(--primary); color: var(--primary-dark); }
.dd-zone-cell.fill3 { background: rgba(160,117,85,0.4); border-color: var(--accent); color: #5a3818; }

.dd-cal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}
.dd-cal-day {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 6px;
    min-height: 80px;
}
.dd-cal-day .d {
    font-size: 10px; color: var(--text-muted); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.dd-cal-day .po {
    margin-top: 4px;
    background: var(--primary-soft); color: var(--primary-dark);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 9px; font-weight: 700;
    margin-bottom: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dd-cal-day .po.alt { background: rgba(160,117,85,0.18); color: #5a3818; }

.dd-report-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: 6px;
    font-size: 12px;
}
.dd-report-row .lbl { color: var(--text-soft); }
.dd-report-row .val { font-weight: 700; color: var(--ink); font-family: 'SF Mono', Monaco, monospace; }

/* Mobile fallback — drop the pin, stack stages, keep the stage cards. */
@media (max-width: 960px) {
    .dd-track { height: auto; }
    .dd-pin {
        position: relative; top: auto;
        height: auto;
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 0 60px;
    }
    .dd-progress {
        flex-direction: row; gap: 0;
        justify-content: space-between;
        margin-bottom: 32px;
    }
    .dd-progress-line { display: none; }
    .dd-progress-bar { display: none; }
    .dd-dot { flex-direction: column; gap: 6px; align-items: center; }
    .dd-dot .lbl { font-size: 11px; text-align: center; }
    .dd-content {
        height: auto; overflow: visible;
        display: flex; flex-direction: column; gap: 48px;
    }
    .dd-stage {
        position: relative; inset: auto;
        opacity: 1; visibility: visible; transform: none;
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .dd-stage-visual { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
    /* Drop the pin animation in reduced-motion mode — show all stages stacked */
    .dd-track { height: auto; }
    .dd-pin { position: relative; top: auto; height: auto; padding: 0; }
    .dd-content { height: auto; overflow: visible; display: flex; flex-direction: column; gap: 48px; }
    .dd-stage { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; }
}

/* ===== Compliance ===== */
.compliance {
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.compliance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.compliance-list {
    display: flex; flex-direction: column; gap: 22px;
    margin-top: 32px;
}
.compliance-item {
    display: flex; gap: 18px;
}
.compliance-item .check {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.compliance-item h4 {
    font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px;
}
.compliance-item p { font-size: 14px; color: var(--text-soft); }

.compliance-card {
    padding: 32px;
    background: linear-gradient(160deg, var(--surface), var(--primary-soft));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}
.stamp-tile {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.stamp-tile .label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.8px; }
.stamp-tile .qty { font-size: 22px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.stamp-tile .delta { font-size: 11px; color: var(--success); }

/* ===== Personas panel ("Who is EMS for?") ===== */
.personas { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.personas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.persona-card {
    position: relative;
    padding: 32px 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.persona-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(160deg, transparent 60%, rgba(0,179,184,0.08) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
}
.persona-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: inherit;
}
.persona-card:hover::after { opacity: 1; }
.persona-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 18px;
}
.persona-card.alt .persona-icon { background: rgba(160,117,85,0.12); color: var(--accent); }
.persona-card h3 {
    font-size: 20px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}
.persona-card .lead {
    font-size: 15px; color: var(--text-soft);
    margin-bottom: 18px;
    line-height: 1.55;
}
.persona-bullets {
    list-style: none;
    margin-bottom: 22px;
    flex: 1;
}
.persona-bullets li {
    font-size: 13.5px; color: var(--text);
    padding: 5px 0;
    display: flex; gap: 10px; align-items: flex-start;
}
.persona-bullets li i { color: var(--primary); font-size: 11px; margin-top: 6px; flex-shrink: 0; }
.persona-card .arrow {
    font-size: 14px; font-weight: 600; color: var(--primary-dark);
    display: inline-flex; align-items: center; gap: 8px;
}
.persona-card:hover .arrow i { transform: translateX(4px); transition: transform var(--transition); }

/* ===== Industries section ("Built for every excise-regulated industry") ===== */
.industries { background: var(--surface); border-bottom: 1px solid var(--border); }
.industries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 880px) { .industries-grid { grid-template-columns: 1fr; } }
.industry-card {
    position: relative;
    padding: 28px 28px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: all var(--transition);
}
.industry-card.live {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(0,179,184,0.18);
}
.industry-card.coming {
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
}
.industry-card.coming::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent 0 14px, rgba(0,179,184,0.04) 14px 16px);
    pointer-events: none;
}
.industry-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
    position: relative; z-index: 1;
}
.industry-card.coming .industry-icon { background: var(--surface-3); color: var(--text-muted); }
.industry-card h3 {
    font-size: 19px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    position: relative; z-index: 1;
}
.industry-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 14px;
    position: relative; z-index: 1;
}
.industry-status.live    { background: var(--primary-soft); color: var(--primary-dark); }
.industry-status.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; box-shadow: 0 0 0 3px rgba(0,179,184,0.25); }
.industry-status.soon    { background: #fef3c7; color: #92400e; }
.industry-status.later   { background: var(--surface-2); color: var(--text-muted); }
.industry-card .lead {
    font-size: 14px; color: var(--text-soft);
    margin-bottom: 16px;
    position: relative; z-index: 1;
}
.industry-bullets { list-style: none; flex: 1; position: relative; z-index: 1; margin-bottom: 18px; }
.industry-bullets li {
    font-size: 13.5px; color: var(--text);
    padding: 5px 0;
    display: flex; gap: 10px; align-items: flex-start;
}
.industry-bullets li i { color: var(--primary); font-size: 11px; margin-top: 6px; flex-shrink: 0; }
.industry-card.coming .industry-bullets li i { color: var(--text-muted); }
.industry-cta {
    font-size: 13px; font-weight: 600; color: var(--primary-dark);
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
    position: relative; z-index: 1;
}
.industry-cta i { font-size: 11px; }
.industry-cta:hover { color: var(--ink); }

/* ===== Pain / Solution split (used on persona pages) ===== */
.pain-section { background: var(--bg-alt); }
.pain-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.pain-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}
.pain-card h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.pain-card p { font-size: 14px; color: var(--text-soft); }

/* "Built to grow with you" call-out used on the self-importer page */
.growth-callout {
    margin-top: 80px;
    padding: 36px;
    background: linear-gradient(135deg, var(--surface), var(--primary-soft));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}
.growth-callout .icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.growth-callout h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.growth-callout p { font-size: 14px; color: var(--text-soft); margin-bottom: 0; }

@media (max-width: 960px) {
    .personas-grid { grid-template-columns: 1fr; }
    .pain-grid { grid-template-columns: 1fr; }
    .growth-callout { grid-template-columns: 1fr; text-align: center; }
    .growth-callout .icon { margin: 0 auto; }
}

/* ===== Use case / portal section ===== */
.portal-section { background: var(--bg-alt); }
.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 64px;
    align-items: center;
}
.portal-mock {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.portal-mock-bar {
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.portal-mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.portal-mock-bar .dot:nth-child(1) { background: #fc6058; }
.portal-mock-bar .dot:nth-child(2) { background: #fdbc40; }
.portal-mock-bar .dot:nth-child(3) { background: #34c849; }
.portal-mock-bar .url {
    margin-left: 16px; font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px; color: var(--text-muted);
}
.portal-mock-body { padding: 20px; }
.portal-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.portal-row .lhs { display: flex; align-items: center; gap: 12px; }
.portal-row .icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.portal-row .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.portal-row .meta { font-size: 11px; color: var(--text-muted); }
.portal-row .badge {
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
    background: var(--primary-soft); color: var(--primary-dark);
}
.portal-row .badge-warn { background: #fef3c7; color: #92400e; }
.portal-row .badge-ok { background: #edf4ed; color: #166534; }

/* ===== Stats strip ===== */
.stats {
    background: var(--ink); color: #fff;
    padding: 56px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stats .num {
    font-size: 38px; font-weight: 800; letter-spacing: -0.02em;
    color: #fff; line-height: 1;
}
.stats .lbl { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 6px; }

/* ===== Final CTA ===== */
.cta-band {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
    padding: 80px 0;
}
.cta-band h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 800; letter-spacing: -0.01em;
    margin-bottom: 14px;
}
.cta-band p {
    font-size: 17px; color: rgba(255,255,255,0.85);
    max-width: 540px; margin: 0 auto 28px;
}
.cta-band .btn-primary {
    background: #fff; color: var(--primary-dark);
    border-color: #fff;
}
.cta-band .btn-primary:hover {
    background: var(--bg-alt); color: var(--ink);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.cta-band .btn-secondary {
    background: transparent; color: #fff; border-color: rgba(255,255,255,0.4);
}
.cta-band .btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ===== Pricing page ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: stretch;
}
.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    display: flex; flex-direction: column;
    transition: all var(--transition);
    position: relative;
}
.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.price-card.featured {
    border-color: var(--primary);
    box-shadow: 0 12px 36px rgba(0,179,184,0.2);
    transform: scale(1.02);
}
.price-card.featured::before {
    content: 'Most popular';
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    padding: 4px 12px;
    background: var(--accent); color: #fff;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.5px;
}
.price-tier {
    font-size: 13px; font-weight: 700; color: var(--primary-dark);
    text-transform: uppercase; letter-spacing: 0.8px;
}
.price-amount {
    margin: 12px 0 4px;
    display: flex; align-items: baseline; gap: 4px;
}
.price-amount .num {
    font-size: 42px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.02em;
    transition: font-size 0.2s ease;
}
.price-amount .num.js-price-cents {
    font-size: 24px;
}
.price-card.annual-view .price-amount .num {
    font-size: 34px;
}
.price-card.annual-view .price-amount .num.js-price-cents {
    font-size: 20px;
}
.price-amount .per {
    font-size: 14px; color: var(--text-muted);
}
.price-amount .custom {
    font-size: 28px; font-weight: 800; color: var(--ink);
}
.price-volume {
    font-size: 13px; color: var(--text-soft);
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.price-features { list-style: none; margin-bottom: 28px; flex: 1; }
.price-features li {
    font-size: 13.5px; color: var(--text);
    padding: 6px 0;
    display: flex; align-items: flex-start; gap: 10px;
}
.price-features li i {
    color: var(--primary); font-size: 11px; margin-top: 6px; flex-shrink: 0;
}
.price-features li.muted { color: var(--text-muted); }
.price-features li.muted i { color: var(--text-muted); opacity: 0.5; }
.price-card .btn { width: 100%; }

.pricing-faq {
    margin-top: 80px;
    max-width: 760px; margin-left: auto; margin-right: auto;
}
.faq-item {
    border-top: 1px solid var(--border);
    padding: 22px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    font-size: 16px; font-weight: 600; color: var(--ink);
}
.faq-q i { color: var(--text-muted); transition: transform var(--transition); }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a {
    margin-top: 12px;
    font-size: 14px; color: var(--text-soft);
    display: none;
}
.faq-item.open .faq-a { display: block; }

/* ===== Contact page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: start;
}
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label {
    font-size: 12px; font-weight: 700; color: var(--text);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.form-field input, .form-field select, .form-field textarea {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    font-family: inherit;
    outline: none;
    transition: all var(--transition);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-card .btn { width: 100%; padding: 14px; }
.form-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; text-align: center; }

.contact-aside { display: flex; flex-direction: column; gap: 22px; }
.contact-block {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.contact-block h4 {
    font-size: 13px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 8px;
}
.contact-block p { font-size: 15px; color: var(--ink); font-weight: 600; }
.contact-block .meta { font-size: 13px; color: var(--text-soft); font-weight: 400; margin-top: 4px; }
.contact-block i {
    color: var(--primary); margin-right: 8px;
}

/* ===== Legal pages (terms / privacy) ===== */
.legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 80px 24px;
}
.legal h1 {
    font-size: 36px; font-weight: 800; color: var(--ink);
    margin-bottom: 8px; letter-spacing: -0.02em;
}
.legal .updated {
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 40px;
}
.legal h2 {
    font-size: 20px; font-weight: 700; color: var(--ink);
    margin: 36px 0 12px; letter-spacing: -0.01em;
}
.legal h3 {
    font-size: 16px; font-weight: 700; color: var(--ink);
    margin: 24px 0 8px;
}
.legal p, .legal li {
    font-size: 15px; color: var(--text-soft);
    margin-bottom: 12px; line-height: 1.7;
}
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 16px; }
.legal a { color: var(--primary-dark); text-decoration: underline; }

/* ===== Documentation pages =====
   Two-column layout: sticky table-of-contents on the left, body on the right.
   On mobile the TOC collapses to a top-of-page nav. */
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    max-width: 1100px;
    margin: 60px auto 80px;
    padding: 0 24px;
}
@media (max-width: 960px) { .docs-layout { grid-template-columns: 1fr; gap: 24px; padding: 0 20px; margin-top: 32px; } }

.docs-toc {
    position: sticky; top: 88px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}
.docs-toc-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.7px;
    margin-bottom: 12px;
}
.docs-toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.docs-toc-list li { line-height: 1.4; }
.docs-toc-list a {
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-soft);
    border-left: 2px solid transparent;
    transition: all var(--transition);
}
.docs-toc-list a:hover { background: var(--surface-2); color: var(--ink); }
.docs-toc-list a.active {
    background: var(--primary-soft); color: var(--primary-dark);
    border-left-color: var(--primary);
    font-weight: 600;
}
.docs-toc-list .sub { padding-left: 18px; font-size: 12.5px; }

@media (max-width: 960px) {
    .docs-toc { position: static; max-height: none; padding-right: 0; }
    .docs-toc-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .docs-toc-list .sub { display: none; }
    .docs-toc-list a { padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--border); border-left: 0; }
    .docs-toc-list a.active { background: var(--primary-soft); border-color: var(--primary); }
}

.docs-body { min-width: 0; }
.docs-body .breadcrumb {
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 18px;
}
.docs-body .breadcrumb a { color: var(--primary-dark); }
.docs-body .breadcrumb i { font-size: 9px; margin: 0 7px; opacity: 0.5; }
.docs-body h1 {
    font-size: 36px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.02em; margin-bottom: 10px; line-height: 1.15;
}
.docs-body .lead {
    font-size: 17px; color: var(--text-soft); max-width: 720px;
    margin-bottom: 32px;
}
.docs-body h2 {
    font-size: 24px; font-weight: 800; color: var(--ink);
    letter-spacing: -0.01em;
    margin: 56px 0 14px;
    scroll-margin-top: 96px;
}
.docs-body h3 {
    font-size: 18px; font-weight: 700; color: var(--ink);
    margin: 32px 0 10px;
    scroll-margin-top: 96px;
}
.docs-body h4 {
    font-size: 14px; font-weight: 700; color: var(--ink);
    margin: 22px 0 6px;
}
.docs-body p, .docs-body li {
    font-size: 15px; color: var(--text-soft);
    line-height: 1.7; margin-bottom: 14px;
}
.docs-body ul, .docs-body ol { padding-left: 22px; margin-bottom: 18px; }
.docs-body li { margin-bottom: 6px; }
.docs-body strong { color: var(--ink); font-weight: 600; }
.docs-body a { color: var(--primary-dark); text-decoration: underline; }
.docs-body code {
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13.5px;
    color: var(--ink);
    border: 1px solid var(--border);
}
.docs-body pre {
    background: #0A1B33;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 22px;
}
.docs-body pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: inherit; }
.docs-body hr {
    border: 0; height: 1px; background: var(--border); margin: 40px 0;
}
.docs-body img { border-radius: var(--radius); border: 1px solid var(--border); margin: 16px 0; max-width: 100%; }

/* Callouts (note / tip / warning) */
.callout {
    padding: 16px 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}
.callout strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 13px; }
.callout p { font-size: 14px; color: var(--text); margin-bottom: 0; }
.callout.tip     { background: var(--primary-soft); border-left-color: var(--primary); }
.callout.warning { background: #fef3c7; border-left-color: var(--warning); color: #78350f; }
.callout.warning strong { color: #78350f; }
.callout.warning p { color: #78350f; }
.callout.alert   { background: #fde8e5; border-left-color: var(--error); color: #8a1f15; }
.callout.alert strong, .callout.alert p { color: #8a1f15; }
.callout.info    { background: #edf2f5; border-left-color: var(--info); color: #1e3a5a; }
.callout.info strong, .callout.info p { color: #1e3a5a; }

/* Step blocks (numbered tutorial steps) */
.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: 0; }
.step .step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
    flex-shrink: 0;
}
.step-body h3 { margin-top: 0; font-size: 17px; }
.step-body p:last-child { margin-bottom: 0; }

/* Prev / next pager */
.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .docs-pager { grid-template-columns: 1fr; } }
.docs-pager a {
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    display: flex; flex-direction: column; gap: 4px;
}
.docs-pager a:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.docs-pager .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.docs-pager .ttl { font-weight: 700; color: var(--ink); font-size: 15px; }
.docs-pager .next { text-align: right; }

/* Coming-soon badge for stub doc-card links */
.coming-soon {
    display: inline-block;
    padding: 2px 8px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-muted);
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-left: 6px;
    border: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
    background: var(--ink);
    color: #cbd5e1;
    padding: 64px 0 32px;
    font-size: 14px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand .logo { color: #fff; }
.footer-brand .logo-mark { background: none; border-radius: 0; padding: 0; }
.footer-brand .logo-mark img { filter: brightness(0) invert(1); }
.footer-brand .logo small { color: rgba(255,255,255,0.55); }
.footer-brand p {
    font-size: 13.5px; color: rgba(255,255,255,0.65);
    margin-top: 14px; max-width: 280px;
    line-height: 1.6;
}
.footer-col h5 {
    font-size: 12px; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 0.7px;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-newsletter {
    margin-top: 18px;
    display: flex; gap: 8px;
}
.footer-newsletter input {
    flex: 1;
    padding: 9px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    outline: none;
}
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.5); }
.footer-newsletter input:focus { border-color: rgba(255,255,255,0.45); }
.footer-newsletter button {
    padding: 9px 14px; background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
}
.footer-newsletter button:hover { background: var(--primary-dark); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 28px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}
.footer-bottom .legal-links {
    display: flex; gap: 22px;
}
.footer-bottom .legal-links a { color: rgba(255,255,255,0.65); }
.footer-bottom .legal-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}
.footer-social a:hover { background: var(--primary); color: #fff; }

/* ===== Scroll reveal animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Utility ===== */
.text-center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    :root { --section-pad: 64px; }
    .nav-links {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 16px 24px;
        gap: 14px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: inline-flex; }
    .signin-toggle .signin-label { display: none; }
    .signin-menu { right: -8px; min-width: 260px; }

    .hero-grid, .compliance-grid, .portal-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { aspect-ratio: 1.4 / 1; }

    .feature-grid { grid-template-columns: 1fr; }
    .pipeline-steps { grid-template-columns: 1fr 1fr; gap: 32px; }
    .pipeline-steps::before { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
    .price-card.featured { transform: none; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== Mobile (≤768px) — EMS Branding Law mirror =====
 * Aligns marketing's mobile layout with the admin + portal apps:
 * stacked content, tighter spacing, single-column grids, prevent
 * iOS auto-zoom on inputs. The 960px breakpoint above already
 * collapses the nav into the hamburger; these rules tighten the
 * smaller-phone experience further. */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }

    /* Container padding tighter on phones */
    .container { padding-left: 16px; padding-right: 16px; }

    /* Header: ensure logo doesn't overflow on tight widths */
    .site-header { padding: 10px 0; }
    .logo-mark img { max-height: 28px; width: auto; }
    .nav-actions { gap: 8px; }
    .nav-actions .btn-sm { padding: 6px 10px; font-size: 12px; }
    .nav-actions .btn span, .nav-actions .signin-label { display: none; }

    /* Section padding slightly reduced */
    section { padding: 36px 0; }

    /* All inline 2-column grids stack */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Pricing grid stacks (matches the existing 960px rule) */
    .pricing-grid { grid-template-columns: 1fr; gap: 14px; }
    .price-card { padding: 28px 22px; }

    /* Stat / pipeline / industry / docs grids stack */
    .pipeline-steps, .feature-grid, .industries-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }

    /* Headings sized down to match Brand Law mobile rules */
    h1 { font-size: 32px !important; line-height: 1.15; }
    h2 { font-size: 24px !important; }
    h3 { font-size: 18px !important; }

    /* Prevent iOS auto-zoom on input focus (matches admin + portal) */
    input, select, textarea { font-size: 16px; }

    /* Min tap targets — matches Brand Law §5.1 */
    .btn { min-height: 38px; }
    .btn-sm { min-height: 32px; }
}

@media (max-width: 540px) {
    .hero { padding: 60px 0 50px; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .pipeline-steps { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
    h1 { font-size: 28px !important; }
    h2 { font-size: 22px !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-visual .pill { animation: none; }
    html { scroll-behavior: auto; }
}
