/*
 * LoopRun
 * Dark cartography. Not a SaaS template.
 *
 * Palette and surfaces mirror the app (Core/Theme.swift): near-black canvas,
 * blue accent, teal for selected scenery, route colours teal/coral/white.
 */

:root {
    --bg: #0f1012;
    --surface: #18191c;
    --text: #f2f2f2;
    --dim: #9a9aa0;
    --faint: #8a8a92;
    --accent: #1e90ff;
    --teal: #2dd4bf;
    --route-teal: #4ECDC4;
    --route-coral: #FF6B6B;
    --hairline: rgba(255, 255, 255, 0.07);
    --card: rgba(255, 255, 255, 0.03);
    --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: rgba(30, 144, 255, 0.35); }

/* Keep anchored section headings clear of the fixed nav. */
section[id], header[id] { scroll-margin-top: 64px; }

/* Film grain, barely there. Keeps big dark surfaces from going flat. */
.grain {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.28;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ─── Shared bits ─── */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 18px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
}

.section-head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head h2 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.section-sub {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--dim);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.18s var(--ease-out), filter 0.18s, background 0.18s, border-color 0.18s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--accent);
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.15) inset, 0 8px 24px -8px rgba(30, 144, 255, 0.5);
}

.btn-primary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hairline);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 15px 28px;
    font-size: 0.95rem;
    border-radius: 14px;
}

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

/* ─── Nav ─── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 14px 24px;
    transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(15, 16, 18, 0.72);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    min-height: 44px;
}

.nav-brand svg { border-radius: 5px; }

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.15s;
    padding: 12px 0;
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.18s, border-color 0.18s;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.28);
}

/* ─── Hero ─── */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero-map {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.street-grid {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 1;
    fill: none;
}

.arterials {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 1.6;
    fill: none;
}

.routes-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* pathLength="100" normalises every route so one dash pattern fits all. */
.route {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.route-1 { animation: draw 2.8s var(--ease-out) 0.4s forwards; }
.route-2 { animation: draw 2.6s var(--ease-out) 0.8s forwards; }
.route-3 { animation: draw 2.2s var(--ease-out) 1.2s forwards; }
.route-3-glow { animation: draw 2.2s var(--ease-out) 1.2s forwards; }

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.runner {
    opacity: 0;
    animation: runner-in 0.6s ease 3.6s forwards;
}

@keyframes runner-in {
    to { opacity: 1; }
}

.pulse-ring {
    animation: pulse 2.4s ease-out 2s infinite;
}

@keyframes pulse {
    0% { r: 16; opacity: 0.12; }
    100% { r: 40; opacity: 0; }
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(15, 16, 18, 0.85) 0%, rgba(15, 16, 18, 0.35) 45%, transparent 70%),
        linear-gradient(to top, var(--bg) 0%, transparent 40%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 24px 100px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 40px;
}

.hero-text h1 {
    font-size: clamp(3rem, 7.5vw, 5.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin-bottom: 22px;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--dim);
    line-height: 1.65;
    max-width: 440px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-note {
    display: block;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--faint);
}

/* Phone */

.hero-phone {
    position: relative;
    display: flex;
    justify-content: center;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(30, 144, 255, 0.16) 0%, transparent 60%);
    pointer-events: none;
}

.phone {
    position: relative;
    width: clamp(240px, 23vw, 296px);
    aspect-ratio: 390 / 800;
    padding: 9px;
    border-radius: 52px;
    background: #050506;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 30px 80px -20px rgba(0, 0, 0, 0.8),
        0 0 60px -20px rgba(30, 144, 255, 0.15);
    transform: perspective(1200px) rotateY(-9deg) rotateX(2deg);
    transition: transform 0.35s var(--ease-out);
    will-change: transform;
}

/* Side buttons */
.phone::before,
.phone::after {
    content: '';
    position: absolute;
    width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.16);
}

.phone::before { left: -4px; top: 120px; height: 52px; }
.phone::after { right: -4px; top: 150px; height: 78px; }

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 43px;
    overflow: hidden;
    background: var(--surface);
}

/* Dynamic Island */
.phone-screen::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 78px;
    height: 22px;
    border-radius: 12px;
    background: #050506;
    z-index: 4;
}

.p-statusbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 0;
    font-size: 11px;
    font-weight: 600;
}

.p-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.p-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.p-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 8px 14px 16px;
    background: rgba(27, 28, 32, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px 22px 0 0;
}

.p-grabber {
    width: 34px;
    height: 4.5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0 auto 12px;
}

.p-sheet-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.p-back {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.p-title {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
}

.p-count {
    font-size: 9.5px;
    font-weight: 500;
    color: var(--dim);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.p-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 7px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.p-row-selected {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(30, 144, 255, 0.55);
}

.p-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    flex-shrink: 0;
}

.p-marker-white { background: white; color: var(--surface); }
.p-marker-teal { background: rgba(78, 205, 196, 0.16); color: var(--route-teal); }
.p-marker-coral { background: rgba(255, 107, 107, 0.16); color: var(--route-coral); }

.p-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.p-row-name {
    font-size: 12px;
    font-weight: 600;
}

.p-row-metrics {
    font-family: var(--mono);
    font-size: 8.5px;
    color: var(--dim);
    white-space: nowrap;
}

.p-chevron { color: var(--dim); flex-shrink: 0; }

.p-cta {
    margin-top: 10px;
    padding: 12px;
    border-radius: 16px;
    background: var(--accent);
    color: white;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
}

/* Apple Watch Ultra */

.watch {
    position: absolute;
    bottom: -30px;
    left: -60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.watch-band {
    width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

.watch-band-top {
    height: 44px;
    background: linear-gradient(180deg, #2a2a2e 0%, #1f1f22 100%);
    border-radius: 6px 6px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    overflow: hidden;
}

.watch-band-bottom {
    height: 52px;
    background: linear-gradient(180deg, #1f1f22 0%, #2a2a2e 100%);
    border-radius: 0 0 6px 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    overflow: hidden;
}

.band-texture {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin-top: 10px;
}

.band-tab {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 6px;
    border-radius: 3px;
    background: #e85d2e;
}

.watch-case {
    position: relative;
    width: 112px;
    aspect-ratio: 44 / 52;
    padding: 7px;
    border-radius: 24px;
    background: linear-gradient(165deg, #4a4a50 0%, #2c2c30 40%, #1a1a1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 20px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 40px -16px rgba(30, 144, 255, 0.1);
}

/* Crown guard: the raised ridge on the right side of the Ultra */
.watch-crown-guard {
    position: absolute;
    right: -6px;
    top: 22%;
    width: 7px;
    height: 38px;
    border-radius: 3px;
    background: linear-gradient(180deg, #4a4a50 0%, #2c2c30 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.4);
}

/* Digital crown sits inside the guard */
.watch-crown {
    position: absolute;
    right: -5px;
    top: calc(22% + 8px);
    width: 5px;
    height: 18px;
    border-radius: 2.5px;
    background: linear-gradient(180deg, #5a5a60 0%, #3a3a40 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1;
}

/* Orange Action Button on the left (signature Ultra feature) */
.watch-action-btn {
    position: absolute;
    left: -5px;
    top: 30%;
    width: 5px;
    height: 14px;
    border-radius: 2.5px;
    background: #e85d2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -1px 0 4px rgba(232, 93, 46, 0.3);
}

.watch-screen {
    width: 100%;
    height: 100%;
    border-radius: 17px;
    overflow: hidden;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    gap: 4px;
}

.w-header {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.w-time-elapsed {
    font-size: 9px;
    font-weight: 600;
    color: var(--teal);
    font-family: var(--mono);
}

.w-metric-primary {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.w-pace {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-family: var(--mono);
    line-height: 1;
}

.w-unit {
    font-size: 9px;
    color: var(--dim);
    font-weight: 600;
}

.w-metrics-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.w-metric {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.w-val {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--mono);
}

.w-label {
    font-size: 8px;
    color: var(--faint);
    font-weight: 500;
}

.w-route {
    width: 80%;
    height: 20px;
    margin-top: 2px;
}

.watch-badge {
    margin-top: 10px;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
    background: var(--bg);
    border: 1px solid rgba(45, 212, 191, 0.25);
    padding: 3px 9px;
    border-radius: 8px;
}

/* Scroll cue */

.scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--dim);
    animation: cue-bob 2.2s ease-in-out infinite;
}

@keyframes cue-bob {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
    50% { transform: translate(-50%, 6px); opacity: 1; }
}

/* ─── Stats ─── */

.stats {
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.015);
}

.stats-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.stat + .stat { border-left: 1px solid var(--hairline); }

.stat-num {
    font-family: var(--mono);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dim);
    margin-left: 2px;
}

.stat-label {
    font-size: 0.76rem;
    color: var(--dim);
}

/* ─── How it works ─── */

.how {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(80px, 11vw, 130px) 24px;
}

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

/* Marching dashes between the steps: a route being drawn, left to right. */
.steps-line {
    position: absolute;
    top: 27px;
    left: 18%;
    right: 18%;
    height: 2px;
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.22) 0 7px,
        transparent 7px 14px
    );
    background-size: 28px 2px;
    animation: march 1.4s linear infinite;
}

@keyframes march {
    to { background-position: 28px 0; }
}

.step {
    position: relative;
    text-align: center;
    padding: 0 12px;
}

.step-icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 17px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--teal);
}

.step-num {
    display: block;
    margin-bottom: 10px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--faint);
}

.step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 10px;
}

.step p {
    font-size: 0.88rem;
    color: var(--dim);
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* ─── Features bento ─── */

.features {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(80px, 11vw, 130px) 24px;
}

.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.card {
    position: relative;
    padding: 28px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--hairline);
    overflow: hidden;
    transition: transform 0.25s var(--ease-out), border-color 0.25s, background 0.25s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.045);
}

.card-routes { grid-column: span 7; }
.card-voice { grid-column: span 5; }
.card-tracking { grid-column: span 5; }
.card-freehand { grid-column: span 7; }

.card-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.2);
    color: var(--accent);
}

.card-voice .card-icon { background: rgba(78, 205, 196, 0.1); border-color: rgba(78, 205, 196, 0.22); color: var(--route-teal); }
.card-tracking .card-icon { background: rgba(45, 212, 191, 0.1); border-color: rgba(45, 212, 191, 0.22); color: var(--teal); }
.card-freehand .card-icon { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); color: var(--text); }

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9rem;
    color: var(--dim);
    line-height: 1.6;
    max-width: 420px;
}

.card-visual {
    margin-top: 24px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.card-visual svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Voice cue bubble */

.card-voice .card-visual {
    padding: 18px;
    background: transparent;
    border: none;
}

.cue {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cue-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(30, 144, 255, 0.14);
    color: var(--accent);
    flex-shrink: 0;
}

.cue-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.cue-main {
    font-size: 0.88rem;
    font-weight: 600;
}

.cue-next {
    font-size: 0.72rem;
    color: var(--dim);
}

.cue-wave {
    display: inline-flex;
    align-items: center;
    gap: 2.5px;
    height: 22px;
}

.cue-wave i {
    width: 3px;
    border-radius: 2px;
    background: var(--route-teal);
    animation: wave 1.1s ease-in-out infinite;
}

.cue-wave i:nth-child(1) { height: 8px; animation-delay: 0s; }
.cue-wave i:nth-child(2) { height: 16px; animation-delay: 0.12s; }
.cue-wave i:nth-child(3) { height: 11px; animation-delay: 0.24s; }
.cue-wave i:nth-child(4) { height: 18px; animation-delay: 0.36s; }
.cue-wave i:nth-child(5) { height: 9px; animation-delay: 0.48s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Tracking visual */

.card-tracking .card-visual {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.pace-num {
    display: block;
    font-family: var(--mono);
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.pace-label {
    display: block;
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--dim);
}

.splits {
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.splits i {
    width: 16px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(to top, rgba(30, 144, 255, 0.45), rgba(30, 144, 255, 0.9));
}

.splits .splits-best {
    background: linear-gradient(to top, rgba(45, 212, 191, 0.45), rgba(45, 212, 191, 0.95));
}

/* Freehand visual */

.card-freehand .card-visual {
    padding: 14px 10px 12px;
}

.sketch-snap {
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
}

.in .sketch-snap,
.card-freehand.in .sketch-snap {
    animation: snap 1.8s var(--ease-out) 0.3s forwards;
}

@keyframes snap {
    to { stroke-dashoffset: 0; }
}

.sketch-legend {
    display: flex;
    gap: 18px;
    padding: 4px 10px 0;
    font-size: 0.7rem;
    color: var(--dim);
}

.sketch-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-rough { background: rgba(255, 255, 255, 0.3); }
.legend-snap { background: var(--accent); }

/* ─── Pricing ─── */

.pricing {
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(80px, 11vw, 130px) 24px;
}

.plans {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    max-width: 680px;
    margin: 0 auto;
}

.plan {
    flex: 1;
    min-width: 260px;
    padding: 30px 26px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--hairline);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease-out), border-color 0.25s;
}

.plan:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.13);
}

.plan-featured {
    position: relative;
    background: linear-gradient(160deg, rgba(45, 212, 191, 0.07), rgba(30, 144, 255, 0.05) 55%, rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(45, 212, 191, 0.28);
    box-shadow: 0 0 50px -18px rgba(45, 212, 191, 0.35);
}

.plan-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    margin-bottom: 16px;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.plan-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dim);
    letter-spacing: 0;
}

.plan-math {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--faint);
    margin-bottom: 22px;
}

.plan ul {
    list-style: none;
    margin-bottom: 26px;
    flex: 1;
}

.plan li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--dim);
    padding: 5px 0;
}

.plan li::before {
    content: '';
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    background: var(--teal);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.plan-btn { width: 100%; }

/* ─── Final CTA ─── */

.cta {
    position: relative;
    padding: clamp(110px, 15vw, 180px) 24px;
    overflow: hidden;
    border-top: 1px solid var(--hairline);
}

.cta-map {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-map svg {
    width: 100%;
    height: 100%;
}

.cta-map::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 55% at 50% 50%, transparent 0%, var(--bg) 78%);
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.cta-inner h2 {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin-bottom: 18px;
}

.cta-inner p {
    font-size: 1rem;
    color: var(--dim);
    margin-bottom: 32px;
}

.cta-note {
    display: block;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--faint);
}

/* ─── Footer ─── */

.footer {
    padding: 36px 24px;
    border-top: 1px solid var(--hairline);
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.footer-logo svg { border-radius: 4px; }

.footer-tagline {
    font-size: 0.75rem;
    color: var(--faint);
}

.footer-links {
    display: flex;
    gap: 22px;
}

.footer-links a {
    font-size: 0.78rem;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.15s;
    padding: 13px 0;
}

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

/* ─── Reveal on scroll (JS adds .js, IO adds .in) ─── */

.js .reveal,
.js .reveal-group > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js .reveal.in,
.js .reveal-group.in > * {
    opacity: 1;
    transform: translateY(0);
}

.js .reveal-group.in > *:nth-child(2) { transition-delay: 0.08s; }
.js .reveal-group.in > *:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-group.in > *:nth-child(4) { transition-delay: 0.24s; }

/* ─── Responsive ─── */

/* Absurdly tall viewports (portrait monitors, tiling setups): keep the hero
   a hero instead of a wall of map. */
@media (min-height: 1400px) {
    .hero { min-height: 980px; }
}

@media (max-width: 1020px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 64px;
        padding-top: 140px;
        text-align: center;
    }

    .hero-text { max-width: 560px; margin: 0 auto; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }

    .hero-shade {
        background:
            linear-gradient(to top, var(--bg) 0%, rgba(15, 16, 18, 0.55) 45%, rgba(15, 16, 18, 0.35) 100%);
    }

    .phone { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }
    .watch { left: -40px; bottom: -20px; }

    .scroll-cue { display: none; }
}

@media (max-width: 720px) {
    .nav-links { display: none; }

    .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .stat + .stat { border-left: none; }

    .steps { grid-template-columns: 1fr; gap: 40px; }
    .steps-line { display: none; }

    .card-routes, .card-voice, .card-tracking, .card-freehand { grid-column: span 12; }

    .plans { flex-direction: column; }
    .plan { min-width: unset; }
}

@media (max-width: 480px) {
    .hero-inner { padding-left: 20px; padding-right: 20px; }
    .hero-text h1 { font-size: 2.75rem; }

    .phone {
        width: 232px;
        border-radius: 44px;
    }

    .phone-screen { border-radius: 36px; }

    .watch { left: -20px; bottom: -16px; }
    .watch-case { width: 92px; border-radius: 20px; }
    .watch-screen { border-radius: 14px; padding: 8px 6px; }
    .watch-band { width: 46px; }
    .watch-band-top { height: 36px; }
    .watch-band-bottom { height: 42px; }
    .w-pace { font-size: 18px; }

    .card { padding: 22px; }

    .footer-inner { flex-direction: column; text-align: center; }
    .footer-brand { flex-direction: column; gap: 8px; }
}

/* ─── Reduced motion: everything arrives already drawn ─── */

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

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .route, .route-3-glow { stroke-dashoffset: 0; }
    .runner { display: none; }
    .sketch-snap { stroke-dashoffset: 0; }

    .js .reveal,
    .js .reveal-group > * {
        opacity: 1;
        transform: none;
    }
}
