/* ==========================================================================
   TranspoPH — public marketing site
   --------------------------------------------------------------------------
   Hand-written rather than Tailwind CDN (which the authenticated console
   uses) for three reasons: this page is the first impression and must paint
   without waiting on a CDN, the CDN build prints a "not for production"
   console warning, and the motion work here needs finer control than utility
   classes give.

   Palette follows brand/README.md: navy #0B3F6A, blue #0B5FA5, sky #1E9BE9,
   amber #F5A623 (the one warm accent — used sparingly, for the pickup node).
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */

:root {
    --ink-900: #060f1c;
    --ink-800: #0a1729;
    --ink-700: #0d2036;
    --ink-600: #122c47;

    --navy: #0b3f6a;
    --blue: #0b5fa5;
    --sky: #1e9be9;
    --sky-soft: #7cc6f5;
    --amber: #f5a623;

    --paper: #ffffff;
    --paper-tint: #f5f8fc;
    --paper-edge: #e4ecf5;

    --slate-900: #0f2033;
    --slate-700: #33475e;
    --slate-500: #64809c;
    --slate-400: #8aa2ba;
    --slate-300: #b9c9d9;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 1px 2px rgba(6, 15, 28, .06), 0 2px 8px rgba(6, 15, 28, .04);
    --shadow: 0 4px 12px rgba(6, 15, 28, .07), 0 16px 40px rgba(6, 15, 28, .07);
    --shadow-lg: 0 8px 24px rgba(6, 15, 28, .1), 0 32px 80px rgba(6, 15, 28, .14);
    --shadow-glow: 0 0 0 1px rgba(30, 155, 233, .18), 0 20px 60px rgba(11, 95, 165, .35);

    --shell: 1200px;
    --gutter: clamp(20px, 5vw, 48px);

    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* --- Reset -------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--slate-700);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
    color: var(--slate-900);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

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

::selection { background: rgba(30, 155, 233, .22); }

/* --- Layout primitives -------------------------------------------------- */

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 11vw, 148px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vw, 104px); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 20px;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sky), var(--amber));
}

.eyebrow--center { justify-content: center; }

.section-head h2 {
    font-size: clamp(31px, 4.6vw, 52px);
    margin-bottom: 20px;
}

.lede {
    font-size: clamp(16.5px, 1.6vw, 19.5px);
    color: var(--slate-500);
    line-height: 1.6;
}

.grad-text {
    background: linear-gradient(102deg, var(--sky) 4%, #57b8f2 42%, var(--amber) 130%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
    transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out),
        background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: linear-gradient(135deg, var(--sky), var(--blue) 78%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 10px 26px rgba(11, 95, 165, .38);
}

.btn--primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 16px 38px rgba(11, 95, 165, .5); }

.btn--ghost-light {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn--ghost-light:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }

.btn--outline {
    border-color: var(--paper-edge);
    background: #fff;
    color: var(--slate-900);
    box-shadow: var(--shadow-sm);
}

.btn--outline:hover { border-color: var(--sky-soft); box-shadow: var(--shadow); }

.btn--sm { padding: 10px 19px; font-size: 14.5px; }
.btn--lg { padding: 17px 34px; font-size: 16.5px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* --- Navigation --------------------------------------------------------- */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 90;
    padding-block: 16px;
    transition: background-color .35s ease, box-shadow .35s ease, padding .35s ease,
        border-color .35s ease;
    border-bottom: 1px solid transparent;
}

.nav.is-stuck {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom-color: var(--paper-edge);
    padding-block: 10px;
    box-shadow: 0 4px 24px rgba(6, 15, 28, .05);
}

.nav__inner { display: flex; align-items: center; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.brand__word {
    font-size: 20.5px;
    font-weight: 800;
    letter-spacing: -.035em;
    color: #fff;
    transition: color .35s ease;
}

.brand__word b { color: var(--sky); font-weight: 800; }
.nav.is-stuck .brand__word { color: var(--slate-900); }

.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav__link {
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
    transition: color .2s ease, background-color .2s ease;
}

.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav.is-stuck .nav__link { color: var(--slate-500); }
.nav.is-stuck .nav__link:hover { color: var(--slate-900); background: var(--paper-tint); }

.nav__actions { display: flex; align-items: center; gap: 10px; flex: none; }

.nav__signin {
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
    transition: color .2s ease, background-color .2s ease;
}

.nav__signin:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav.is-stuck .nav__signin { color: var(--slate-700); }
.nav.is-stuck .nav__signin:hover { background: var(--paper-tint); }

.nav__toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    padding: 0;
    place-items: center;
}

.nav__toggle span {
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    position: relative;
    transition: background-color .2s ease;
}

.nav__toggle span::before,
.nav__toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: inherit;
    transition: transform .3s var(--ease-out);
}

.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav.is-stuck .nav__toggle { border-color: var(--paper-edge); background: var(--paper-tint); }
.nav.is-stuck .nav__toggle span, .nav.is-stuck .nav__toggle span::before,
.nav.is-stuck .nav__toggle span::after { background: var(--slate-900); }

.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

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

.hero {
    position: relative;
    padding-top: clamp(132px, 17vw, 190px);
    padding-bottom: clamp(80px, 11vw, 128px);
    background: radial-gradient(120% 130% at 12% -10%, #14395e 0%, var(--ink-800) 45%, var(--ink-900) 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }

.hero__grid {
    position: absolute;
    inset: -10% -10% 0 -10%;
    background-image:
        linear-gradient(rgba(124, 198, 245, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 198, 245, .07) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(100% 78% at 50% 8%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(100% 78% at 50% 8%, #000 20%, transparent 78%);
}

.hero__routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95; }

.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    animation: drift 22s var(--ease-in-out) infinite alternate;
}

.hero__blob--a { width: 620px; height: 620px; top: -220px; right: -160px; background: rgba(11, 95, 165, .8); }
.hero__blob--b { width: 480px; height: 480px; bottom: -200px; left: -120px; background: rgba(30, 155, 233, .42); animation-delay: -8s; }
.hero__blob--c { width: 320px; height: 320px; top: 34%; left: 46%; background: rgba(245, 166, 35, .2); animation-delay: -14s; }

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(38px, -34px, 0) scale(1.13); }
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

.hero h1 {
    color: #fff;
    font-size: clamp(38px, 6.1vw, 70px);
    letter-spacing: -.042em;
    margin-bottom: 24px;
}

.hero__lede {
    font-size: clamp(17px, 1.75vw, 20.5px);
    color: rgba(226, 238, 250, .8);
    max-width: 41ch;
    margin-bottom: 34px;
}

.hero .btn-row { margin-bottom: 30px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(226, 238, 250, .92);
    margin-bottom: 28px;
}

.pill__tag {
    padding: 3px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}

.hero__note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(200, 218, 236, .62);
}

.hero__note svg { width: 16px; height: 16px; flex: none; color: var(--sky); }

/* Live operations card cluster ------------------------------------------- */

.hero__stage { position: relative; min-height: 430px; }

.glass {
    background: linear-gradient(150deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 28px 70px rgba(3, 10, 20, .5);
}

.opcard { padding: 22px; position: relative; z-index: 2; }

.opcard__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.opcard__title { font-size: 14.5px; font-weight: 700; color: #fff; letter-spacing: -.01em; }

.live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #35d07f;
    box-shadow: 0 0 0 0 rgba(53, 208, 127, .6);
    animation: ping 2.2s ease-out infinite;
    flex: none;
}

@keyframes ping {
    0%   { box-shadow: 0 0 0 0 rgba(53, 208, 127, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(53, 208, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0); }
}

.opcard__meta { margin-left: auto; font-size: 12px; font-weight: 600; color: rgba(200, 218, 236, .6); font-variant-numeric: tabular-nums; }

.ticket { display: flex; gap: 13px; padding: 11px 0; }
.ticket + .ticket { border-top: 1px dashed rgba(255, 255, 255, .1); }

.ticket__id {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--amber);
    background: rgba(245, 166, 35, .13);
    border: 1px solid rgba(245, 166, 35, .28);
    border-radius: 7px;
    padding: 3px 8px;
    height: fit-content;
    flex: none;
}

.ticket__body { min-width: 0; flex: 1; }
.ticket__name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 3px; }

.ticket__route {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: rgba(200, 218, 236, .66);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket__route svg { width: 12px; height: 12px; flex: none; opacity: .7; }

.chip {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    flex: none;
}

.chip--new       { background: rgba(148, 176, 205, .18); color: #cfe0f0; border: 1px solid rgba(148, 176, 205, .3); }
.chip--dispatch  { background: rgba(30, 155, 233, .2);  color: #9ed5f8; border: 1px solid rgba(30, 155, 233, .38); }
.chip--transit   { background: rgba(245, 166, 35, .18); color: #f7c877; border: 1px solid rgba(245, 166, 35, .34); }
.chip--done      { background: rgba(53, 208, 127, .17); color: #8fe6bb; border: 1px solid rgba(53, 208, 127, .32); }

.float-card {
    position: absolute;
    padding: 15px 17px;
    border-radius: var(--radius);
    z-index: 3;
    animation: bob 7s var(--ease-in-out) infinite alternate;
}

@keyframes bob {
    from { transform: translateY(0); }
    to   { transform: translateY(-15px); }
}

.float-card--driver { right: -14px; top: -26px; width: 214px; animation-delay: -1.4s; }
.float-card--eta    { left: -30px; bottom: 8px; width: 200px; animation-delay: -3.6s; }

.float-card__label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(200, 218, 236, .55);
    margin-bottom: 7px;
}

.float-card__value { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.2; }
.float-card__sub { font-size: 12.5px; color: rgba(200, 218, 236, .65); margin-top: 3px; }

.avatar-row { display: flex; align-items: center; gap: 11px; }

.avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    font-size: 14px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--sky), var(--navy));
    border: 2px solid rgba(255, 255, 255, .22);
}

/* --- Metric strip ------------------------------------------------------- */

.metrics {
    background: var(--ink-900);
    border-top: 1px solid rgba(124, 198, 245, .1);
    padding-block: clamp(38px, 5vw, 58px);
    color: #fff;
}

.metrics__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 40px);
}

.metric { text-align: center; }

.metric__value {
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    background: linear-gradient(160deg, #fff 30%, var(--sky-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 9px;
    font-variant-numeric: tabular-nums;
}

.metric__label { font-size: 13.5px; color: rgba(200, 218, 236, .6); line-height: 1.45; }

/* --- Problem / contrast panel ------------------------------------------- */

.contrast {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.5vw, 26px);
    margin-top: 8px;
}

.panel {
    padding: clamp(26px, 3vw, 38px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--paper-edge);
    background: #fff;
}

.panel--before { background: var(--paper-tint); }

.panel--after {
    background: linear-gradient(165deg, var(--ink-800), var(--ink-900));
    border-color: transparent;
    color: rgba(226, 238, 250, .78);
    box-shadow: var(--shadow-lg);
}

.panel h3 { font-size: 21px; margin-bottom: 20px; }
.panel--after h3 { color: #fff; }

.panel__tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.panel--before .panel__tag { background: #e9eef4; color: var(--slate-500); }
.panel--after .panel__tag { background: rgba(30, 155, 233, .18); color: var(--sky-soft); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.55; }
.checklist svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.panel--before .checklist svg { color: #c2ccd8; }
.panel--after .checklist svg { color: #35d07f; }

/* --- Lifecycle storyboard ("the process video") ------------------------- */

.flow {
    background: linear-gradient(180deg, var(--ink-900), #071426 60%, var(--ink-800));
    color: #fff;
    overflow: hidden;
    position: relative;
}

.flow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 55% at 50% 0%, rgba(11, 95, 165, .38), transparent 70%);
    pointer-events: none;
}

.flow .section-head h2 { color: #fff; }
.flow .lede { color: rgba(200, 218, 236, .72); }
.flow .eyebrow { color: var(--sky-soft); }

.stage {
    position: relative;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(2, 8, 18, .6);
}

.stage__viewport {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 320px;
    background:
        radial-gradient(90% 90% at 20% 15%, rgba(11, 63, 106, .55), transparent 60%),
        linear-gradient(160deg, #08182b, #050e1b);
}

.stage__map { position: absolute; inset: 0; width: 100%; height: 100%; }

.stage__caption {
    position: absolute;
    left: clamp(18px, 3vw, 34px);
    bottom: clamp(18px, 3vw, 30px);
    right: clamp(18px, 3vw, 34px);
    max-width: 430px;
}

.stage__step {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sky-soft);
    margin-bottom: 11px;
}

.stage__step i {
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(30, 155, 233, .2);
    border: 1px solid rgba(30, 155, 233, .45);
    font-style: normal;
    font-size: 11px;
}

.stage__title { font-size: clamp(20px, 2.6vw, 28px); color: #fff; margin-bottom: 9px; }
.stage__copy { font-size: 15px; color: rgba(200, 218, 236, .76); line-height: 1.55; }

.stage__panels > [data-panel] {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity .55s var(--ease-out), transform .7s var(--ease-out), visibility .55s;
}

.stage__panels > [data-panel].is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.stage__rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.rail-btn {
    position: relative;
    padding: 17px 16px 19px;
    background: transparent;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .07);
    text-align: left;
    color: rgba(200, 218, 236, .55);
    transition: background-color .3s ease, color .3s ease;
}

.rail-btn:last-child { border-right: 0; }
.rail-btn:hover { background: rgba(255, 255, 255, .05); color: rgba(226, 238, 250, .9); }
.rail-btn.is-active { color: #fff; background: rgba(30, 155, 233, .09); }

.rail-btn__n { font-family: var(--mono); font-size: 11px; opacity: .6; display: block; margin-bottom: 5px; }
.rail-btn__t { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }

.rail-btn__bar {
    position: absolute;
    left: 0; bottom: 0;
    height: 2px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--sky), var(--amber));
}

.rail-btn.is-active .rail-btn__bar { animation: railfill var(--dwell, 4200ms) linear forwards; }
.stage.is-paused .rail-btn.is-active .rail-btn__bar { animation-play-state: paused; }

@keyframes railfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Map primitives used inside the storyboard panels */
.route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-line--ghost { stroke: rgba(124, 198, 245, .16); stroke-width: 3; }
.route-line--live  { stroke: url(#routeGrad); stroke-width: 4; filter: drop-shadow(0 0 8px rgba(30, 155, 233, .6)); }

.draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
[data-panel].is-active .draw { animation: draw 2.4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.node { transform-box: fill-box; transform-origin: center; }
[data-panel].is-active .node--pulse { animation: nodepulse 2s ease-in-out infinite; }
@keyframes nodepulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

.radar { transform-box: fill-box; transform-origin: center; }
[data-panel].is-active .radar { animation: radar 2.6s ease-out infinite; }
@keyframes radar {
    from { transform: scale(.35); opacity: .85; }
    to   { transform: scale(2.6); opacity: 0; }
}

.mover { offset-rotate: 0deg; }
[data-panel].is-active .mover { animation: move 5s linear infinite; }
@keyframes move { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* Floating labels pinned over the storyboard map */
.map-chip {
    position: absolute;
    z-index: 3;
    padding: 10px 14px;
    border-radius: 13px;
    background: rgba(10, 23, 41, .72);
    border: 1px solid rgba(124, 198, 245, .28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(2, 8, 18, .5);
    max-width: min(240px, 46vw);
    animation: chipin .6s var(--ease-out) .5s both;
}

@keyframes chipin {
    from { opacity: 0; transform: translateY(10px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

.map-chip__k {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--sky-soft);
    margin-bottom: 4px;
}

.map-chip__v { display: block; font-size: 13.5px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.map-chip--sig { padding-bottom: 6px; }
.map-chip .sig { width: 150px; height: 40px; margin-top: 2px; }

@media (max-width: 620px) {
    .map-chip { padding: 8px 11px; max-width: 55vw; }
    .map-chip__v { font-size: 12px; }
}

/* --- Feature grid ------------------------------------------------------- */

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.feature {
    padding: clamp(24px, 2.6vw, 32px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--paper-edge);
    background: #fff;
    position: relative;
    overflow: hidden;
    transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s ease;
}

.feature::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sky), var(--amber));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease-out);
}

.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.feature:hover::after { transform: scaleX(1); }

.feature__icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: grid; place-items: center;
    margin-bottom: 20px;
    background: linear-gradient(145deg, rgba(30, 155, 233, .13), rgba(11, 95, 165, .09));
    border: 1px solid rgba(30, 155, 233, .18);
    color: var(--blue);
}

.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18.5px; margin-bottom: 11px; letter-spacing: -.025em; }
.feature p { font-size: 15px; color: var(--slate-500); line-height: 1.6; }

/* --- Alternating product showcases -------------------------------------- */

.showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(40px, 6vw, 84px);
    align-items: center;
}

.showcase + .showcase { margin-top: clamp(72px, 9vw, 128px); }
.showcase--flip .showcase__art { order: -1; }

.showcase h2 { font-size: clamp(27px, 3.5vw, 40px); margin-bottom: 18px; }
.showcase p { font-size: 16.5px; color: var(--slate-500); margin-bottom: 26px; }

.bullets { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 14px; }
.bullets li { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; }

.bullets i {
    display: grid; place-items: center;
    width: 23px; height: 23px; flex: none; margin-top: 1px;
    border-radius: 50%;
    background: rgba(53, 208, 127, .13);
    color: #17a55e;
    font-style: normal;
}

.bullets i svg { width: 13px; height: 13px; }
.bullets b { color: var(--slate-900); font-weight: 700; }

/* Console mockup */
.mock {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--paper-edge);
    box-shadow: var(--shadow-lg);
}

.mock__chrome {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 15px;
    background: var(--paper-tint);
    border-bottom: 1px solid var(--paper-edge);
}

.mock__dot { width: 10px; height: 10px; border-radius: 50%; background: #d6dfe9; }

.mock__url {
    margin-left: 9px;
    flex: 1;
    background: #fff;
    border: 1px solid var(--paper-edge);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 11.5px;
    color: var(--slate-400);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock__body { display: grid; grid-template-columns: 132px minmax(0, 1fr); min-height: 330px; }

.mock__side { background: var(--ink-800); padding: 15px 11px; }
.mock__side-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(200, 218, 236, .58);
    margin-bottom: 3px;
}
.mock__side-item.is-active { background: var(--blue); color: #fff; }

.mock__main { padding: 16px; background: #fbfdff; }

.mock__row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 62px;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--paper-edge);
    margin-bottom: 7px;
}

.mock__tt { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--blue); }
.mock__bar { height: 7px; border-radius: 4px; background: #e8eff6; }
.mock__bar + .mock__bar { margin-top: 5px; width: 62%; background: #f0f5fa; }

.mock__pill {
    font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 7px; border-radius: 999px; text-align: center;
}

.mock__pill--a { background: rgba(30, 155, 233, .13); color: var(--blue); }
.mock__pill--b { background: rgba(245, 166, 35, .16); color: #b97708; }
.mock__pill--c { background: rgba(53, 208, 127, .15); color: #17a55e; }

.mock__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.mock__stat { padding: 11px; border-radius: 10px; background: #fff; border: 1px solid var(--paper-edge); }
.mock__stat b { display: block; font-size: 19px; color: var(--slate-900); letter-spacing: -.03em; }
.mock__stat span { font-size: 10px; color: var(--slate-400); }

/* Phone mockup */
.phone {
    width: min(300px, 78%);
    margin-inline: auto;
    border-radius: 42px;
    padding: 11px;
    background: linear-gradient(165deg, #1c2c40, #0a1420);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .07) inset;
    position: relative;
}

.phone::before {
    content: "";
    position: absolute;
    top: 22px; left: 50%;
    transform: translateX(-50%);
    width: 92px; height: 22px;
    background: #0a1420;
    border-radius: 999px;
    z-index: 4;
}

.phone__screen {
    border-radius: 32px;
    overflow: hidden;
    background: #f4f8fc;
    aspect-ratio: 9 / 18.6;
    display: flex;
    flex-direction: column;
}

.phone__top {
    background: linear-gradient(150deg, var(--navy), var(--ink-800));
    padding: 40px 18px 20px;
    color: #fff;
}

.phone__status { font-size: 10.5px; color: rgba(200, 218, 236, .6); margin-bottom: 14px; display: flex; justify-content: space-between; }
.phone__greet { font-size: 12px; color: rgba(200, 218, 236, .7); }
.phone__name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }

.phone__body { padding: 14px; display: grid; gap: 10px; flex: 1; align-content: start; }

.job {
    background: #fff;
    border: 1px solid var(--paper-edge);
    border-radius: 14px;
    padding: 13px;
    box-shadow: var(--shadow-sm);
}

.job__top { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.job__id { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--blue); }
.job__chip { margin-left: auto; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: rgba(245, 166, 35, .16); color: #b97708; }
.job__leg { display: flex; gap: 9px; font-size: 11.5px; color: var(--slate-500); }
.job__leg + .job__leg { margin-top: 7px; }
.job__leg b { color: var(--slate-900); font-weight: 600; display: block; font-size: 12px; }

.job__pin { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 4px; }
.job__pin--up { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 166, 35, .18); }
.job__pin--down { background: var(--sky); box-shadow: 0 0 0 3px rgba(30, 155, 233, .18); }

.job__cta {
    margin-top: 12px;
    padding: 9px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* --- Platform / multi-tenant band --------------------------------------- */

.band {
    background: linear-gradient(150deg, var(--ink-800), var(--ink-900));
    color: #fff;
    border-radius: var(--radius-xl);
    padding: clamp(34px, 5vw, 66px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.band::before {
    content: "";
    position: absolute;
    width: 460px; height: 460px;
    right: -140px; top: -180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 155, 233, .38), transparent 68%);
}

.band__inner { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 60px); align-items: center; }
.band h2 { color: #fff; font-size: clamp(26px, 3.2vw, 38px); margin-bottom: 18px; }
.band p { color: rgba(200, 218, 236, .76); font-size: 16.5px; margin-bottom: 26px; }

.tenant-list { display: grid; gap: 11px; }

.tenant {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 17px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    transition: transform .35s var(--ease-out), background-color .35s ease;
}

.tenant:hover { transform: translateX(6px); background: rgba(255, 255, 255, .1); }

.tenant__mark {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 800; color: #fff;
}

.tenant__name { font-size: 14.5px; font-weight: 700; color: #fff; }
.tenant__slug { font-family: var(--mono); font-size: 11.5px; color: rgba(200, 218, 236, .55); }

.tenant__state {
    margin-left: auto;
    font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(53, 208, 127, .16); color: #8fe6bb; border: 1px solid rgba(53, 208, 127, .3);
}

.tenant__state--trial { background: rgba(30, 155, 233, .16); color: #9ed5f8; border-color: rgba(30, 155, 233, .32); }

/* --- Pricing ------------------------------------------------------------ */

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); align-items: start; }

.plan {
    padding: clamp(26px, 3vw, 36px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--paper-edge);
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.plan--featured {
    background: linear-gradient(165deg, var(--ink-800), var(--ink-900));
    border-color: transparent;
    color: rgba(200, 218, 236, .78);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.plan--featured h3 { color: #fff; }

.plan__flag {
    position: absolute;
    top: 18px; right: 18px;
    font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    padding: 5px 11px; border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    color: #fff;
}

.plan h3 { font-size: 17px; margin-bottom: 8px; letter-spacing: -.02em; }
.plan__blurb { font-size: 14px; color: var(--slate-500); margin-bottom: 22px; min-height: 42px; }
.plan--featured .plan__blurb { color: rgba(200, 218, 236, .62); }

.plan__price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 5px; }
.plan__price b { font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.04em; color: var(--slate-900); }
.plan--featured .plan__price b { color: #fff; }
.plan__price span { font-size: 14px; color: var(--slate-400); }
.plan__cycle { font-size: 12.5px; color: var(--slate-400); margin-bottom: 24px; }

.plan .checklist { margin-bottom: 28px; }
.plan .checklist li { font-size: 14.5px; }
.plan .checklist svg { width: 18px; height: 18px; color: #17a55e; }
.plan--featured .checklist svg { color: #6fe0ab; }
.plan .btn { width: 100%; margin-top: auto; }

.plan-note { text-align: center; font-size: 14px; color: var(--slate-400); margin-top: 28px; }

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

.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 12px; }

.qa {
    border: 1px solid var(--paper-edge);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.qa[open] { border-color: var(--sky-soft); box-shadow: var(--shadow-sm); }

.qa summary {
    padding: 19px 24px;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -.02em;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
    content: "";
    margin-left: auto;
    width: 11px; height: 11px; flex: none;
    border-right: 2.2px solid var(--slate-400);
    border-bottom: 2.2px solid var(--slate-400);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .3s var(--ease-out);
}

.qa[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.qa__body { padding: 0 24px 22px; font-size: 15.5px; color: var(--slate-500); line-height: 1.65; }

/* --- Final CTA ---------------------------------------------------------- */

.cta {
    position: relative;
    overflow: hidden;
    background: radial-gradient(110% 130% at 50% 0%, #14395e, var(--ink-900) 62%);
    color: #fff;
    text-align: center;
    isolation: isolate;
}

.cta__glow {
    position: absolute;
    width: 700px; height: 700px;
    left: 50%; top: -55%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(30, 155, 233, .28), transparent 62%);
    z-index: -1;
}

.cta h2 { color: #fff; font-size: clamp(31px, 4.8vw, 56px); margin-bottom: 20px; }
.cta p { font-size: clamp(16.5px, 1.7vw, 19.5px); color: rgba(200, 218, 236, .74); max-width: 54ch; margin: 0 auto 34px; }
.cta .btn-row { justify-content: center; }

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

.footer { background: var(--ink-900); color: rgba(200, 218, 236, .62); padding-block: clamp(48px, 6vw, 72px) 34px; }

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: clamp(28px, 4vw, 56px);
    padding-bottom: 38px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.footer__about { font-size: 14.5px; line-height: 1.65; max-width: 34ch; margin-top: 16px; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 16px; font-weight: 800; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer a { font-size: 14.5px; transition: color .2s ease; }
.footer a:hover { color: #fff; }

.footer__base {
    padding-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

/* --- Scroll reveal ------------------------------------------------------ */

/* The hidden starting state is deliberately scoped to html.js, which is set
   by an inline script in the document head. If scripting is disabled, blocked,
   or throws before the observer is wired, every section simply renders
   visible instead of the page appearing blank below the hero — the animation
   is an enhancement, never a precondition for reading the page. */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
    transition-delay: var(--delay, 0ms);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1080px) {
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hero__inner, .showcase, .band__inner, .contrast { grid-template-columns: minmax(0, 1fr); }
    .showcase--flip .showcase__art { order: 0; }
    .hero__stage { min-height: 0; margin-top: 26px; }
    .float-card--driver { right: 0; top: -18px; }
    .float-card--eta { left: 0; }
    .metrics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
    .stage__rail { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .rail-btn { padding: 13px 9px 15px; }
    .rail-btn__t { font-size: 11.5px; }
    .stage__caption { max-width: none; }

    .nav__links {
        position: absolute;
        inset: calc(100% + 8px) var(--gutter) auto var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px;
        border-radius: var(--radius);
        background: #fff;
        border: 1px solid var(--paper-edge);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .3s ease, transform .3s var(--ease-out), visibility .3s;
    }

    .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
    .nav__link, .nav.is-stuck .nav__link { color: var(--slate-700); padding: 12px 14px; border-radius: 10px; }
    .nav__toggle { display: grid; order: 3; }
    .nav__signin { display: none; }
    .nav__actions .btn { padding: 10px 18px; font-size: 14.5px; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .features { grid-template-columns: minmax(0, 1fr); }
    .footer__grid { grid-template-columns: 1fr; }
    .stage__rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rail-btn:nth-child(5) { grid-column: 1 / -1; }
    .stage__viewport { aspect-ratio: 4 / 5; }
    .float-card { display: none; }
    .btn-row .btn { width: 100%; }
}

/* --- Motion preferences ------------------------------------------------- */

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

    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .js [data-reveal] { opacity: 1; transform: none; }
    .draw { stroke-dashoffset: 0; }
}

@media print {
    .nav, .stage__rail, .hero__bg { display: none; }
    body { color: #000; background: #fff; }
}
