/* Site enhancements — focus, progress, forms, mocks, grain */

html { scroll-padding-top: 3.75rem; }
html.header-expanded { scroll-padding-top: 3.75rem; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.text-body-muted { color: var(--text-muted, #b8bdc2); }

.img-treatment {
    object-fit: cover;
    filter: sepia(12%) saturate(0.85) brightness(0.92);
    transition: filter 0.5s ease, transform 0.7s ease;
}
.group:hover .img-treatment,
.img-treatment:hover { filter: sepia(5%) saturate(1) brightness(1); }

a:focus-visible,
button:focus-visible,
.btn-tactical:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--goldenrod);
    outline-offset: 3px;
}

/* Active nav pill styles live in components.css */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--goldenrod), #d4a017);
    z-index: 10000;
    transition: width 0.1s linear;
}

.sticky-demo-cta {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9990;
    display: none;
}
@media (max-width: 1023px) {
    .sticky-demo-cta.visible { display: block; }
}

.loading-skip {
    margin-top: 1.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(121, 125, 124, 0.4);
    background: transparent;
    color: var(--tech-grey);
    font-family: var(--font-data);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.loading-skip:hover { color: var(--goldenrod); border-color: var(--goldenrod); }

.mock-screen {
    background: linear-gradient(145deg, rgba(12, 28, 48, 0.92) 0%, rgba(7, 16, 24, 0.92) 100%);
    border: 1px solid rgba(210, 205, 195, 0.4);
    font-family: var(--font-data);
}
.mock-screen-bar {
    height: 2rem;
    border-bottom: 1px solid rgba(121, 125, 124, 0.25);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
}
.mock-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(121, 125, 124, 0.5); }
.mock-dot.gold { background: var(--goldenrod); }

.today-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(121, 125, 124, 0.35);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.today-pill.passed { border-color: rgba(34, 197, 94, 0.5); color: #86efac; }
.today-pill.defects { border-color: rgba(250, 204, 21, 0.5); color: #fde047; }
.today-pill.unsafe { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }
.today-pill.missed { border-color: rgba(121, 125, 124, 0.5); color: #9a9e9d; }

/* Capability bands — electric marketing demos (operator, driver, who) */
.capability-band,
.operator-view-band {
    position: relative;
    overflow: hidden;
}

.capability-band::before,
.operator-view-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 80% 50%, rgba(175, 122, 0, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.operator-view-eyebrow {
    font-family: var(--font-data);
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--goldenrod);
    margin-bottom: 0.75rem;
}

.operator-view-headline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.operator-view-lead {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    max-width: 65ch;
}

.operator-view-caps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.operator-view-caps li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--alabaster);
    opacity: 1;
}

.operator-view-caps li i {
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}

/* Tactical gold markers — replaces default list-disc bullets */
ul.list-disc {
    list-style: none;
}

ul.list-disc > li {
    position: relative;
    padding-left: 1rem;
}

ul.list-disc > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 5px;
    height: 5px;
    background: var(--goldenrod);
    transform: rotate(45deg);
    box-shadow: 0 0 6px rgba(175, 122, 0, 0.45);
}

@media (min-width: 768px) {
    ul.list-disc > li::before {
        top: 0.6em;
    }
}

.mock-screen-live {
    border-color: rgba(175, 122, 0, 0.35);
    box-shadow:
        0 0 0 1px rgba(175, 122, 0, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.45),
        0 0 40px rgba(175, 122, 0, 0.06);
}

.mock-screen-live .mock-screen-bar {
    justify-content: flex-start;
}

.today-board-live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #86efac;
}

.today-board-live-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.9); }
}

.today-board-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem 1rem 0.75rem;
}

.today-metric {
    text-align: center;
    padding: 0.65rem 0.35rem;
    border: 1px solid rgba(121, 125, 124, 0.3);
    background: rgba(0, 10, 26, 0.5);
}

.today-metric-value {
    display: block;
    font-family: var(--font-data);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.today-metric-label {
    display: block;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.today-metric.passed .today-metric-value { color: #86efac; }
.today-metric.defects .today-metric-value { color: #fde047; }
.today-metric.unsafe .today-metric-value { color: #fca5a5; }
.today-metric.missed .today-metric-value { color: #9a9e9d; }

.today-board-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0 1rem 0.75rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.6rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.today-board-alert i {
    margin-top: 0.1rem;
    flex-shrink: 0;
    color: #f87171;
}

.today-board-summary {
    margin: 0;
    padding: 0.65rem 1rem 1rem;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tech-grey);
    border-top: 1px solid rgba(121, 125, 124, 0.2);
}

.capability-band-intro .operator-view-lead {
    text-align: center;
}

.driver-mock-checklist {
    padding: 1rem 1.25rem 1.25rem;
    font-size: 0.75rem;
    line-height: 1.6;
}

.app-capture {
    display: block;
    width: 100%;
    height: auto;
    background: #020a1a;
}

.driver-mock-done {
    color: var(--alabaster);
    margin-bottom: 0.5rem;
}

.driver-mock-pending {
    color: var(--goldenrod);
    margin-bottom: 0.75rem;
}

.driver-mock-note {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    color: var(--tech-grey);
    border-top: 1px solid rgba(121, 125, 124, 0.2);
    padding-top: 0.75rem;
    margin: 0;
}

.today-board-live.offline-ok {
    color: var(--silver);
}

.today-board-live.offline-ok .today-board-live-dot {
    background: var(--goldenrod);
    box-shadow: 0 0 8px rgba(175, 122, 0, 0.45);
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .today-board-live-dot { animation: none; }
}

.demo-form input,
.demo-form select,
.demo-form textarea {
    width: 100%;
    background: rgba(0, 10, 26, 0.8);
    border: 1px solid rgba(121, 125, 124, 0.35);
    color: var(--alabaster);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}
.demo-form label {
    display: block;
    font-family: var(--font-data);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--tech-grey);
    margin-bottom: 0.35rem;
}

.demo-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.demo-form-status {
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(121, 125, 124, 0.35);
    text-align: center;
}

.demo-form-status.is-success {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.4);
}

.demo-form-status.is-error {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.demo-form button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: #af7a00;
    color: #000a1a;
    font-family: var(--font-data);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9995;
    background: rgba(0, 10, 26, 0.98);
    border-top: 1px solid rgba(121, 125, 124, 0.3);
    padding: 1rem 1.5rem;
    display: none;
}
.cookie-banner.show { display: block; }

body.cookie-visible .sticky-demo-cta.visible {
    bottom: 5.5rem;
}
@media (max-width: 640px) {
    html {
        scroll-padding-top: max(3.5rem, calc(env(safe-area-inset-top) + 3rem));
    }

    body.cookie-visible .sticky-demo-cta.visible { bottom: 6.5rem; }

    .demo-form input,
    .demo-form select,
    .demo-form textarea {
        font-size: 16px;
    }

    .sticky-demo-cta.visible {
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        left: auto;
        max-width: calc(100vw - 5.5rem);
    }

    .cookie-banner {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    #core-pillars-section > a {
        min-height: 17rem !important;
        padding: 1.75rem !important;
    }

    #core-pillars-section h3 {
        font-size: 1.5rem !important;
    }

    #core-pillars-section > a > div.absolute.top-16 {
        top: 1.25rem !important;
        left: 1.25rem !important;
        right: auto !important;
    }

    .operator-view-headline {
        font-size: clamp(1.35rem, 6vw, 1.75rem);
    }

    .section-hero-title {
        font-size: clamp(1.75rem, 9vw, 2.75rem) !important;
        letter-spacing: 0.02em !important;
        line-height: 1.05 !important;
    }

    #integrations-section h2,
    #fleet-ready-section h2.text-4xl,
    #transformation-section h3.text-4xl,
    #esg-section h2.text-4xl {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.05 !important;
    }

    .mock-screen {
        font-size: 0.72rem;
    }

    .mock-screen-bar {
        flex-wrap: wrap;
        align-content: center;
        height: auto;
        min-height: 2rem;
        padding: 0.35rem 0.5rem;
        gap: 0.2rem 0.35rem;
    }

    .mock-screen-bar > span:not(.mock-dot) {
        font-size: 0.5rem !important;
        letter-spacing: 0.08em !important;
        line-height: 1.35;
        white-space: normal;
    }

    .mock-screen-bar .today-board-live,
    .mock-screen-bar .today-board-live.offline-ok {
        margin-left: auto;
        flex-shrink: 0;
    }

    .today-board-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0.85rem 0.75rem 0.65rem;
    }

    .today-metric {
        padding: 0.55rem 0.4rem;
    }

    .today-metric-value {
        font-size: 1.15rem;
    }

    .today-metric-label {
        font-size: 0.52rem;
        letter-spacing: 0.08em;
        line-height: 1.25;
    }

    .today-board-alert,
    .today-board-summary {
        font-size: 0.55rem;
        line-height: 1.45;
    }

    .today-pill {
        font-size: 0.58rem;
        padding: 0.3rem 0.55rem;
    }

    .hero-intro-actions {
        width: 100%;
        max-width: 22rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-intro-actions > a:not(.btn-tactical),
    .hero-intro-actions > .btn-secondary,
    section .flex.flex-col.sm\:flex-row.gap-4 > a.border {
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-brand-corner {
        overflow: hidden;
    }

    .hero-logo-aura {
        width: 130%;
        height: 130%;
    }

    .read-block {
        padding: 1rem 1rem 1rem 1.15rem;
    }

    #fleet-ready-section .grid.grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #fleet-ready-section .grid.grid-cols-2.md\:grid-cols-4 > div {
        height: 7.5rem;
    }

    footer#footer {
        padding-top: 3.5rem !important;
        padding-bottom: max(3.5rem, env(safe-area-inset-bottom)) !important;
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
    }

    footer#footer .grid.mb-24 {
        margin-bottom: 2.5rem !important;
        gap: 2rem !important;
    }

    footer#footer nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .section-hero-background {
        overflow: hidden;
    }

    nav.flex.flex-wrap.gap-3.mb-12 a,
    nav.flex.flex-wrap.gap-3.mb-8 a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    #rollout-section .flex.gap-6 {
        flex-direction: column;
        gap: 0.35rem;
    }

    #rollout-section .flex.gap-6 > span {
        min-width: 4.5rem;
    }
}

.video-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .video-grid-2 { grid-template-columns: 1fr 1fr; } }

.lang-hidden { display: none !important; }

.section-gold-line::before {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--goldenrod), transparent);
    animation: section-line-grow 1.2s ease-out forwards;
}
@keyframes section-line-grow { to { width: 3rem; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .scanline, #particles-js { display: none !important; }
    video { display: none; }
    .video-poster-fallback { display: block !important; }
}
