:root{
    /* Base materials */
    --bg0: #0b0d10;
    --bg1: #0f1216;
    --panel: rgba(20, 23, 28, .88);
    --panel-soft: rgba(26, 29, 34, .72);

    --stroke: rgba(58, 64, 72, .85);
    --stroke-soft: rgba(58, 64, 72, .45);

    /* Text */
    --txt: #f2f4f7;
    --muted: #b3bac4;
    --muted2: #8b929c;

    /* Signal / wiring colours (from ECU loom palette) */
    --sig-cyan:  #39d6c6;
    --sig-blue:  #5a7cff;
    --sig-amber: #f2c94c;
    --sig-red:   #e0564a;
    --sig-green: #4cd964;

    /* Status mapping */
    --good: var(--sig-green);
    --warn: var(--sig-amber);
    --active: var(--sig-cyan);

    /* Effects */
    --shadow: 0 30px 80px rgba(0,0,0,.75);
    --radius: 18px;
    --radius-lg: 26px;

    /* IMPORTANT: your old CSS uses these but they weren't defined */
    --r2: var(--radius-lg);
    --teal: var(--sig-cyan);
    --blue: var(--sig-blue);
    --amber: var(--sig-amber);
}


*{ box-sizing:border-box; }
html,body{ height:100%; scroll-behavior:smooth; }

body{
    margin:0;
    color:var(--txt);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

    background:
            radial-gradient(1200px 800px at 50% -20%,
            rgba(255,255,255,.04),
            transparent 60%),
            radial-gradient(1000px 600px at 70% 70%,
            rgba(255,255,255,.03),
            transparent 65%),
            linear-gradient(
                    180deg,
                    var(--bg0),
                    var(--bg1)
            );

    overflow-x:hidden;
}

.bg__metal{
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.25;
    background:
            linear-gradient(
                    90deg,
                    rgba(255,255,255,.04),
                    rgba(255,255,255,0) 20%,
                    rgba(255,255,255,.03) 40%,
                    rgba(255,255,255,0) 60%,
                    rgba(255,255,255,.02) 80%,
                    rgba(255,255,255,0)
            );
    mix-blend-mode: overlay;
}



/* Cinematic background stack */
.bg{ position:fixed; inset:0; pointer-events:none; z-index:-1; }
.bg__noise{
    position:absolute; inset:0;
    opacity:.12;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}
.bg__vignette{
    position:absolute; inset:0;
    background: radial-gradient(circle at 50% 30%, transparent 35%, rgba(0,0,0,.55) 80%);
    opacity:.85;
}
.bg__grid{
    position:absolute; inset:0;
    opacity:.16;
    background-image:
            linear-gradient(to right, rgba(90,100,115,.22) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(90,100,115,.18) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at 50% 25%, black 28%, transparent 70%);
    animation: gridDrift 10s ease-in-out infinite;
}
@keyframes gridDrift{
    0%,100%{ transform: translate3d(0,0,0); }
    50%{ transform: translate3d(0,-10px,0); }
}
.bg__glow{
    position:absolute; inset:-2px;
    background:
            radial-gradient(800px 260px at 18% 10%, rgba(57,214,198,.12), transparent 60%),
            radial-gradient(900px 320px at 86% 12%, rgba(90,124,255,.10), transparent 60%),
            radial-gradient(1000px 520px at 50% 92%, rgba(242,201,76,.07), transparent 65%);
    filter: blur(10px);
    opacity:.65;
    animation: glowBreath 6s ease-in-out infinite;
}
@keyframes glowBreath{
    0%,100%{ opacity:.65; transform: translateY(0); }
    50%{ opacity:.95; transform: translateY(-8px); }
}
.bg__dust{
    position:absolute; inset:0;
    background:
            radial-gradient(2px 2px at 10% 20%, rgba(241,244,255,.20), transparent 60%),
            radial-gradient(1.5px 1.5px at 35% 60%, rgba(241,244,255,.16), transparent 60%),
            radial-gradient(1px 1px at 70% 35%, rgba(241,244,255,.15), transparent 60%),
            radial-gradient(1.5px 1.5px at 90% 70%, rgba(241,244,255,.14), transparent 60%);
    opacity:.35;
    animation: dustFloat 9s ease-in-out infinite;
}
.bg__terrain{
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
            radial-gradient(2px 2px at 15% 75%, rgba(200,180,140,.18), transparent 60%),
            radial-gradient(1.5px 1.5px at 35% 65%, rgba(160,150,120,.16), transparent 60%),
            radial-gradient(1px 1px at 70% 80%, rgba(140,130,100,.14), transparent 60%),
            radial-gradient(1.5px 1.5px at 90% 60%, rgba(180,160,120,.15), transparent 60%);
    opacity:.35;
    animation: terrainFloat 12s ease-in-out infinite;
}

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

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

.wrap{ width:min(1160px, calc(100% - 40px)); margin:0 auto; padding:34px 0 70px; }

/* HERO */
.hero{
    position:relative;
    border-radius: var(--r2);
    background: linear-gradient(180deg, rgba(10,14,24,.82), rgba(7,10,18,.62));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    overflow:hidden;
}
.hero:after{
    content:"";
    position:absolute; inset:0;
    border-radius: inherit;
    pointer-events:none;
    box-shadow:
            inset 0 0 0 1px rgba(52,246,208,.18),
            inset 0 0 90px rgba(52,246,208,.05),
            inset 0 0 110px rgba(214,179,106,.05);
    opacity:.95;
}
.hero__edge{
    position:absolute; left:0; right:0; bottom:0;
    height: 10px;
    background: repeating-linear-gradient(135deg,
    rgba(214,179,106,.65) 0 10px,
    rgba(0,0,0,0) 10px 20px);
    opacity:.32;
}

.hero__top{
    position:relative; z-index:1;
    display:flex; align-items:center; justify-content:space-between;
    padding: 18px 18px 0;
    gap:14px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand__mark{
    width:14px; height:14px; border-radius:4px;
    background: linear-gradient(135deg, var(--sig-cyan), var(--sig-blue));
    box-shadow: 0 0 0 4px rgba(57,214,198,.10), 0 0 18px rgba(57,214,198,.18);
}
.brand__text{
    font-weight:900;
    letter-spacing:.65px;
    text-transform: uppercase;
    color: rgba(241,244,255,.92);
    font-size: 12px;
}

.hero__pill{
    display:inline-flex; align-items:center; gap:10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,.28);
    border:1px solid var(--stroke);
    color: var(--muted);
    text-transform: uppercase;
    font-weight:900;
    letter-spacing:.7px;
    font-size: 12px;
}
.pill__dot{
    width:9px; height:9px; border-radius:50%;
    background: var(--sig-cyan);
    box-shadow: 0 0 0 4px rgba(57,214,198,.12), 0 0 16px rgba(57,214,198,.20);
    animation: dotPulse 2.1s ease-in-out infinite;
}
@keyframes dotPulse{
    0%,100%{ transform: scale(1); opacity:.9; }
    50%{ transform: scale(1.25); opacity:1; }
}

.hero__main{
    position:relative; z-index:1;
    padding: 18px 18px 20px;
    display:grid;
    grid-template-columns: 1.25fr .95fr;
    gap: 16px;
}

.hero__title{
    -webkit-text-stroke: 1px rgba(0,0,0,.25);
}

.hero__sub{
    text-shadow: 0 2px 14px rgba(0,0,0,.65);
}

.hero__stats{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}
.stat{
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.20);
    border-radius: 16px;
    padding: 12px;
    position:relative;
    overflow:hidden;
}
.stat:before{
    content:"";
    position:absolute; inset:-2px;
    background: linear-gradient(90deg, transparent, rgba(52,246,208,.10), transparent);
    transform: translateX(-130%);
    animation: sweep 4.4s ease-in-out infinite;
    opacity:.8;
}
@keyframes sweep{
    0%{ transform: translateX(-140%); }
    55%{ transform: translateX(140%); }
    100%{ transform: translateX(140%); }
}
.stat__k{
    font-weight:900;
    letter-spacing:.65px;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(241,244,255,.92);
}
.stat__v{
    margin-top:6px;
    color: var(--muted);
    font-size: 12.8px;
    line-height:1.45;
}

.hero__ctaRow{
    display:flex; align-items:center; gap:14px;
    margin-top: 16px;
}
.cta{
    display:inline-flex; align-items:center; justify-content:center;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration:none;
    font-weight:900;
    letter-spacing:.75px;
    text-transform: uppercase;
    color: var(--txt);
    border:1px solid rgba(57,214,198,.60);
    background: rgba(57,214,198,.10);
    box-shadow: 0 0 0 6px rgba(57,214,198,.05);
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.cta:hover{
    transform: translateY(-1px);
    border-color: rgba(242,201,76,.60);
    background: rgba(242,201,76,.08);
}
.ctaHint{
    color: var(--muted2);
    font-size: 12.5px;
}

.hero__panel{ display:flex; flex-direction:column; gap:12px; }

.panelCard{
    border-radius: 20px;
    border:1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.32));
    padding: 14px;
    position:relative;
    overflow:hidden;
}
.panelCard:after{
    content:"";
    position:absolute; inset:0;
    pointer-events:none;
    box-shadow:
            inset 0 0 0 1px rgba(214,179,106,.14),
            inset 0 0 90px rgba(52,246,208,.05);
    opacity:.95;
    border-radius: inherit;
}
.panelCard__cap{
    font-size: 11px;
    letter-spacing:.75px;
    text-transform: uppercase;
    color: var(--muted2);
    font-weight:900;
}
.panelCard__big{
    margin-top: 10px;
    font-size: 34px;
    font-weight: 1000;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.panelCard__sub{
    margin-top: 8px;
    color: var(--muted);
    line-height:1.6;
    font-size: 13.5px;
}
.panelCard__bar{
    margin-top: 12px;
    height: 10px;
    border-radius: 999px;
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.30);
    overflow:hidden;
}
.panelCard__bar span{
    display:block;
    height:100%;
    background: linear-gradient(90deg, var(--sig-cyan), var(--sig-blue), var(--sig-amber));
    filter: saturate(1.05);
    animation: barGlow 2.8s ease-in-out infinite;
}
@keyframes barGlow{
    0%,100%{ opacity:.75; }
    50%{ opacity:1; }
}
.panelCard__foot{
    margin-top: 12px;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.chip{
    display:inline-flex;
    padding: 8px 10px;
    border-radius: 999px;
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.25);
    color: var(--muted);
    font-size: 12px;
    font-weight:800;
    letter-spacing:.3px;
}

/* Section headers (timeline) */
.section-title{
    margin: 22px 0 12px;
    display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
}
.section-title h2{
    margin:0;
    font-size: 16px;
    letter-spacing:1.2px;
    text-transform: uppercase;
    color: rgba(241,244,255,.88);
}

/* Timeline filters */
.filters{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.fbtn{
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.22);
    color: var(--muted);
    padding: 9px 11px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .75px;
    text-transform: uppercase;
    font-size: 11px;
    cursor:pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.fbtn:hover{ transform: translateY(-1px); border-color: rgba(242,201,76,.55); }
.fbtn.is-active{
    color: var(--txt);
    border-color: rgba(57,214,198,.60);
    background: rgba(57,214,198,.10);
}

/* TIMELINE - trail map style */
.timeline{ position:relative; padding: 8px 0; }
#timeline{ scroll-margin-top: 20px; }

.rail{
    position:absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg,
    rgba(57,214,198,.0),
    rgba(57,214,198,.24),
    rgba(90,124,255,.20),
    rgba(242,201,76,.14),
    rgba(57,214,198,.0)
    );
    filter: drop-shadow(0 0 18px rgba(57,214,198,.12));
}
.rail:after{
    content:"";
    position:absolute; left:-6px; right:-6px;
    height: 170px;
    top: -170px;
    background: linear-gradient(180deg, transparent, rgba(57,214,198,.45), rgba(90,124,255,.26), transparent);
    animation: railFlow 3.2s linear infinite;
    opacity:.85;
}
@keyframes railFlow{ 0%{ transform: translateY(0); } 100%{ transform: translateY(calc(100% + 340px)); } }

.milestone{
    display:grid;
    grid-template-columns: 1fr 56px 1fr;
    gap: 14px;
    margin: 16px 0;
    align-items: stretch;
    perspective: 900px;
    position: relative;
}

.milestone.is-hidden{ display:none; }

.node{ display:flex; justify-content:center; align-items:flex-start; }

/* Connector from pin to card (desktop). Helps the eye follow the rail. */
.left, .right{ position:relative; }

.milestone:nth-child(odd) .right::before,
.milestone:nth-child(even) .left::before{
    content:"";
    position:absolute;
    top: 52px;
    height: 2px;
    width: 22px;
    background: linear-gradient(90deg, rgba(57,214,198,.0), rgba(57,214,198,.28), rgba(90,124,255,.16));
    filter: drop-shadow(0 0 10px rgba(57,214,198,.10));
    opacity: .9;
}
.milestone:nth-child(odd) .right::before{ left: -22px; }
.milestone:nth-child(even) .left::before{ right: -22px; transform: rotate(180deg); }
.pin{
    width: 22px;
    height: 22px;
    margin-top: 30px;
    border-radius: 8px;
    transform: rotate(45deg);
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.30);
    box-shadow: 0 0 0 8px rgba(52,246,208,.04);
    position:relative;
}
.milestone[data-status="complete"] .pin{
    border-color: rgba(73,242,155,.75);
    box-shadow: 0 0 0 8px rgba(73,242,155,.06), 0 0 24px rgba(73,242,155,.12);
}
.milestone[data-status="active"] .pin{
    border-color: rgba(255,204,102,.85);
    box-shadow: 0 0 0 8px rgba(255,204,102,.08), 0 0 26px rgba(255,204,102,.14);
    animation: pinPulse 1.55s ease-in-out infinite;
}
.milestone[data-status="upcoming"] .pin{
    border-color: rgba(122,167,255,.75);
    box-shadow: 0 0 0 8px rgba(122,167,255,.06), 0 0 20px rgba(122,167,255,.10);
}
@keyframes pinPulse{
    0%,100%{ transform: rotate(45deg) scale(1); }
    50%{ transform: rotate(45deg) scale(1.12); }
}

.card{
    border-radius: 22px;
    border:1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.34));
    box-shadow: var(--shadow);
    overflow:hidden;
    transform: translateY(12px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease, border-color .22s ease;
    position:relative;
}
.card.reveal{ opacity: 1; transform: translateY(0); }
.card:after{
    content:"";
    position:absolute; inset:0;
    pointer-events:none;
    box-shadow:
            inset 0 0 0 1px rgba(52,246,208,.14),
            inset 0 0 100px rgba(214,179,106,.04);
    opacity:.95;
}
.card:hover{
    border-color: rgba(214,179,106,.55);
    transform: translateY(-2px);
}

.card-inner{
    padding: 14px;
    display:grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    position:relative;
    z-index:1;
}

.thumb{
    border-radius: 18px;
    border:1px solid var(--stroke);
    background: radial-gradient(120px 70px at 30% 35%, rgba(52,246,208,.10), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.48));
    overflow:hidden;
    width: 140px;
    height: 140px;
    position:relative;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; opacity:.95; filter:saturate(1.05) contrast(1.05); }
.thumb .ph{
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-weight:900;
    letter-spacing:.7px;
    text-transform:uppercase;
    font-size:12px;
    color: rgba(241,244,255,.55);
}
.thumb:before{
    content:"";
    position:absolute; inset:-35% -70%;
    background: linear-gradient(90deg, transparent, rgba(52,246,208,.10), rgba(122,167,255,.10), transparent);
    transform: rotate(16deg) translateX(-70%);
    animation: shimmer 5.0s ease-in-out infinite;
    opacity:.85;
}
@keyframes shimmer{
    0%{ transform: rotate(16deg) translateX(-75%); }
    55%{ transform: rotate(16deg) translateX(75%); }
    100%{ transform: rotate(16deg) translateX(75%); }
}

.meta{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.quarter{
    font-size:12px;
    color: var(--muted2);
    letter-spacing: .9px;
    font-weight:900;
    text-transform: uppercase;
}
.title{
    margin: 6px 0 0;
    font-size: 18px;
    letter-spacing:.5px;
    text-transform: uppercase;
}
.tagline{
    margin: 10px 0 0;
    color: var(--muted);
    line-height:1.7;
    font-size: 13.6px;
}

.status{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding: 8px 10px;
    border-radius: 999px;
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.22);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .75px;
    font-weight:900;
    font-size: 11px;
}
.status i{
    width: 10px; height:10px; border-radius:50%;
    background: var(--sig-blue);
    box-shadow: 0 0 14px rgba(90,124,255,.18);
}
.milestone[data-status="complete"] .status i{ background: var(--good); box-shadow:0 0 14px rgba(73,242,155,.22); }
.milestone[data-status="active"] .status i{ background: var(--amber); box-shadow:0 0 14px rgba(255,204,102,.22); }
.milestone[data-status="upcoming"] .status i{ background: var(--blue); }

.actions{ margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; }
.btn{
    border:1px solid rgba(57,214,198,.60);
    background: rgba(57,214,198,.10);
    color: var(--txt);
    padding: 11px 14px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: .9px;
    text-transform: uppercase;
    font-size: 12px;
    cursor:pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{
    transform: translateY(-1px);
    border-color: rgba(242,201,76,.60);
    background: rgba(242,201,76,.08);
}

/* Alternate left/right */
.milestone:nth-child(odd) .left { opacity:0; }
.milestone:nth-child(odd) .right { grid-column: 3; }
.milestone:nth-child(even) .right { opacity:0; }
.milestone:nth-child(even) .left { grid-column: 1; }

@media (max-width: 900px){
    .hero__main{ grid-template-columns: 1fr; }
    .hero__stats{ grid-template-columns: 1fr; }
    .rail{ left: 18px; transform:none; }
    .milestone{ grid-template-columns: 36px 1fr; }
    .left,.right{ grid-column:2 !important; opacity:1 !important; }
    .node{ grid-column:1; }
}

@media (max-width: 900px){
    .rail{ opacity: .55; }
    .rail:after{ opacity: .55; }
}

/* About section */
.about{
    margin-top: 22px;
    border-radius: var(--r2);
    border:1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.34));
    box-shadow: var(--shadow);
    overflow:hidden;
    position:relative;
}
.about:after{
    content:"";
    position:absolute; inset:0;
    pointer-events:none;
    box-shadow:
            inset 0 0 0 1px rgba(214,179,106,.14),
            inset 0 0 120px rgba(52,246,208,.04);
    opacity:.95;
    border-radius: inherit;
}
.about-inner{ position:relative; z-index:1; padding: 18px; }
.about h3{
    margin:0 0 10px;
    letter-spacing:1.2px;
    text-transform: uppercase;
    font-size: 14px;
    color: rgba(241,244,255,.88);
}
.about p{
    margin:0 0 10px;
    color: var(--muted);
    line-height:1.75;
    font-size: 13.7px;
    max-width: 95ch;
}
footer{
    margin-top: 20px;
    text-align:center;
    color: rgba(241,244,255,.42);
    font-size: 12px;
    padding-top: 12px;
    letter-spacing:.6px;
    text-transform: uppercase;
}

/* Modal */
.modal-backdrop{
    position:fixed; inset:0;
    background: rgba(0,0,0,.72);
    display:none;
    align-items:center;
    justify-content:center;
    padding: 20px;
    z-index: 50;
    backdrop-filter: blur(9px);
}
.modal{
    width:min(920px, 100%);
    border-radius: 26px;
    border:1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(10,14,24,.92), rgba(7,10,18,.92));
    box-shadow: var(--shadow);
    overflow:hidden;
    transform: translateY(10px) scale(.985);
    opacity: 0;
    transition: transform .16s ease, opacity .16s ease;
    position:relative;
}
.modal.open{ transform: translateY(0) scale(1); opacity: 1; }
.modal:after{
    content:"";
    position:absolute; inset:0;
    border-radius: inherit;
    pointer-events:none;
    box-shadow:
            inset 0 0 0 1px rgba(52,246,208,.14),
            inset 0 0 140px rgba(214,179,106,.05);
    opacity:.95;
}
.modal-inner{ position:relative; z-index:1; padding: 16px; }
.modal-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.modal-title{
    margin:0;
    text-transform: uppercase;
    letter-spacing:.9px;
    font-size: 16px;
}
.modal-sub{
    margin-top:6px;
    color: var(--muted2);
    text-transform: uppercase;
    letter-spacing: .9px;
    font-weight: 900;
    font-size: 12px;
}
.close{
    width: 44px; height: 44px;
    border-radius: 16px;
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.26);
    color: var(--txt);
    cursor:pointer;
    font-size: 18px;
    font-weight: 900;
    transition: transform .12s ease;
}
.close:hover{ transform: translateY(-1px); }
.modal-body{
    margin-top: 14px;
    display:grid;
    grid-template-columns: 200px 1fr;
    gap: 14px;
}
.modal-thumb{
    border-radius: 18px;
    border:1px solid var(--stroke);
    background: rgba(0,0,0,.25);
    overflow:hidden;
    min-height: 200px;
    position:relative;
}
.modal-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.modal-thumb .ph{
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    color: rgba(241,244,255,.55);
    font-weight:900;
    letter-spacing:.7px;
    text-transform: uppercase;
    font-size: 12px;
}
.modal-list{ margin:0; padding-left: 18px; }
.modal-list li{ margin: 8px 0; color: var(--muted); line-height:1.75; font-size: 13.7px; }

@media (max-width: 720px){
    .modal-body{ grid-template-columns: 1fr; }
    .modal-thumb{ min-height: 220px; }
}

@media (prefers-reduced-motion: reduce){
    .bg__grid,.bg__glow,.bg__dust,.pill__dot,.stat:before,.thumb:before,.rail:after{ animation:none !important; }
    .card,.modal{ transition:none !important; }
}

/* HERO background video */
.hero{
    position:relative;
    isolation:isolate; /* keeps blending clean */
}

/* container for the video layers */
.heroVideo{
    position:absolute;
    inset:0;
    z-index:0;
    overflow:hidden;
    border-radius: inherit;
}

/* video itself */
.heroVideo__media{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    filter: contrast(1.06) saturate(1.05) brightness(.78);
    opacity:.92;
}

/* optional tech tint + subtle animated feel */
.heroVideo__blend{
    position:absolute;
    inset:0;
    background:
            linear-gradient(
                    180deg,
                    rgba(11,13,16,.78),
                    rgba(11,13,16,.40),
                    rgba(11,13,16,.88)
            ),
            radial-gradient(
                    900px 500px at 30% 40%,
                    rgba(0,0,0,.28),
                    transparent 65%
            );
    opacity:.25; /* key fix */
    pointer-events:none;
}


/* fades top/bottom to blend into background */
.heroVideo__fade{
    position:absolute;
    left:0; right:0;
    height: 22%;
    pointer-events:none;
}
.heroVideo__fade--top{
    top:0;
    background: linear-gradient(
            to bottom,
            rgba(5,6,10,1) 0%,
            rgba(5,6,10,.80) 35%,
            rgba(5,6,10,0) 100%
    );
}
.heroVideo__fade--bottom{
    bottom:0;
    height: 35%;
    background: linear-gradient(
            to top,
            rgba(9,13,18,1) 0%,
            rgba(9,13,18,.85) 25%,
            rgba(9,13,18,.55) 50%,
            rgba(9,13,18,0) 100%
    );
}

/* ensure hero content stays above the video */
.hero__top,
.hero__main,
.hero__edge{
    position:relative;
    z-index:1;
}

/* accessibility / motion preference */
@media (prefers-reduced-motion: reduce){
    .heroVideo__media{ display:none; }
}
.heroVideo__scrim{
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
            linear-gradient(90deg,
            rgba(0,0,0,.82) 0%,
            rgba(0,0,0,.62) 28%,
            rgba(0,0,0,.30) 52%,
            rgba(0,0,0,0) 75%);
    opacity: .92;
}

/* iOS Safari overscroll + safe-area fixes */
html{
    background: var(--bg0);            /* prevents white overscroll */
    height: 100%;
}

body{
    min-height: 100%;
    background-color: var(--bg0);      /* fallback if gradients fail */
    padding-bottom: env(safe-area-inset-bottom);
}

/* keep your main wrapper clear of the home indicator */
.wrap{
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* Don’t clip the whole timeline (it clips cards on mobile) */
.timeline{ overflow: visible; }

/* Mobile: keep rail line, remove the animated beam that causes bleed */
@media (max-width: 900px){
    .rail:after{ display:none !important; }
    .rail{ opacity:.45; }
}

/* mobile: keep the rail but kill the big moving glow that looks like a bug */
@media (max-width: 900px){
    .rail{ opacity: .45; }
    .rail:after{ display:none; } /* this is the "beam" */
}

/* 2) iOS Safari: fixed background layers can cause edge/strip artifacts */
@supports (-webkit-touch-callout: none){
    .bg{
        position:absolute; /* avoid fixed compositing artifacts on iOS */
        inset:0;
    }
    body{ background-color: var(--bg0); }
    html{ background: var(--bg0); }
}

@media (max-width: 900px){
    .rail{ width: 2px; }
    .pin{ box-shadow: 0 0 0 6px rgba(52,246,208,.04); }
}

/* HARD STOP: no horizontal scroll anywhere */
html, body{
    overflow-x: hidden;
}

/* iOS Safari can still allow side-pan inside children, so clamp the page */
.wrap,
.timeline{
    max-width: 100%;
    overflow-x: clip; /* better than hidden; doesn't create scrollbars */
}

/* MOBILE: make sure the timeline grid can actually shrink */
@media (max-width: 900px){

    /* force the "content column" to be shrinkable */
    .milestone{
        grid-template-columns: 36px minmax(0, 1fr) !important;
    }

    /* allow the card column to shrink inside grid */
    .left, .right, .card{
        min-width: 0 !important;
    }

    /* stop inner grids from forcing overflow */
    .card-inner{
        grid-template-columns: 120px minmax(0, 1fr) !important;
    }
    .thumb{
        width: 120px !important;
        height: 120px !important;
    }

    /* long uppercase headings can push width */
    .title, .tagline, .panelCard__sub, .about p{
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* rail must be anchored in-view on mobile */
    .rail{
        left: 18px !important;
        transform: none !important;
    }
}

/* ================================
   PREMIUM MOBILE STACKED TIMELINE
   (desktop unchanged)
================================== */
@media (max-width: 900px){

    /* stop any sideways scroll */
    html, body{ overflow-x:hidden; }

    /* rail pinned into view */
    .rail{
        left: 18px !important;
        transform: none !important;
        width: 2px;
        opacity: .45;
        filter: drop-shadow(0 0 12px rgba(52,246,208,.10));
    }
    .rail:after{ display:none !important; } /* remove the "beam" on mobile */

    /* milestone layout: node column + card column */
    .milestone{
        grid-template-columns: 36px minmax(0, 1fr) !important;
        gap: 12px;
        margin: 14px 0;
    }
    .left, .right{
        grid-column: 2 !important;
        opacity: 1 !important;
        min-width: 0;
    }
    .node{ grid-column: 1 !important; }

    .pin{
        width: 18px;
        height: 18px;
        border-radius: 7px;
        margin-top: 24px;
        box-shadow: 0 0 0 6px rgba(52,246,208,.04);
    }

    /* Card becomes a stacked layout */
    .card{
        border-radius: 22px;
        overflow: hidden;
    }

    .card-inner{
        grid-template-columns: 1fr !important; /* stack */
        gap: 12px !important;
        padding: 14px !important;
        min-width: 0;
    }

    /* Thumbnail becomes a wide banner */
    .thumb{
        width: 100% !important;
        height: 160px !important;
        border-radius: 18px !important;
        overflow: hidden;
        border: 1px solid var(--stroke);
        background:
                radial-gradient(120px 70px at 30% 35%, rgba(52,246,208,.10), transparent 60%),
                linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.55));
    }
    .thumb img{
        width:100%;
        height:100%;
        object-fit: cover;
        object-position: center;
    }
    .thumb .ph{
        font-size: 12px;
        letter-spacing: .9px;
    }

    /* Header row: quarter + status sit cleanly */
    .meta{
        align-items: center;
        gap: 10px;
        min-width: 0;
    }
    .quarter{
        font-size: 11px;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .status{
        margin-left: auto;
        white-space: nowrap;
    }

    /* Title + copy spacing tuned for mobile */
    .title{
        margin-top: 8px;
        font-size: 18px;
        line-height: 1.15;
        letter-spacing: .4px;
        white-space: normal;
    }
    .tagline{
        font-size: 13.5px;
        line-height: 1.65;
    }

    /* keep button full width (premium CTA feel) */
    .actions{ margin-top: 12px; }
    .btn{
        width: 100%;
        justify-content: center;
    }

    /* Prevent any weird text overflow without ugly letter breaking */
    .title, .tagline, .panelCard__sub, .about p{
        overflow-wrap: normal;
        word-break: normal;
        hyphens: auto;
    }
}

@media (max-width: 900px){
    .thumb::after{
        content:"";
        position:absolute;
        inset:0;
        pointer-events:none;
        border-radius: inherit;
        box-shadow:
                inset 0 0 0 1px rgba(255,255,255,.05),
                inset 0 0 60px rgba(0,0,0,.35);
    }
}
/* =========================================
   FIX: THUMB PLACEHOLDER CENTERING (ALL VIEW)
   ========================================= */
.thumb{
    position: relative; /* ensure .ph absolutely anchors correctly */
}

.thumb .ph{
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;          /* bulletproof centering */
    text-align: center;
    padding: 10px;
    line-height: 1.15;
    transform: none !important;   /* prevent any inherited transforms */
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* If the placeholder is a <span> or <div> inside .ph */
.thumb .ph > *{
    margin: 0;
    line-height: 1.15;
}


.rail:after{ display:none !important; }

.hero__ctaRow--products{
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ===========================
   BIG PRODUCT BUTTONS (XBTN)
=========================== */
.xbtnRow{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.xbtn{
    position:relative;
    display:block;
    text-decoration:none;
    border-radius: 20px;
    padding: 16px 16px 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.28);
    box-shadow:
            0 18px 60px rgba(0,0,0,.70),
            inset 0 0 0 1px rgba(255,255,255,.05);
    overflow:hidden;
    transform: translateY(0);
    transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}

/* glossy sweep (static, not animated) */
.xbtn::before{
    content:"";
    position:absolute;
    inset:-40% -30%;
    background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,.14),
    transparent);
    transform: rotate(12deg);
    opacity:.45;
    pointer-events:none;
}

/* bottom "press edge" */
.xbtn::after{
    content:"";
    position:absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.35);
    filter: blur(8px);
    opacity:.9;
    pointer-events:none;
}

.xbtn__cap{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .9px;
    text-transform: uppercase;
    color: rgba(241,244,255,.72);
}

.xbtn__title{
    display:block;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 1100;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--txt);
}

.xbtn__sub{
    display:block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13.2px;
    line-height: 1.5;
    text-transform: none;
}

/* EARLY: RED urgency */
.xbtn--early{
    border-color: rgba(224,86,74,.55);
    background:
            radial-gradient(320px 120px at 18% 30%,
            rgba(224,86,74,.30),
            rgba(0,0,0,.30) 60%),
            rgba(0,0,0,.28);
    box-shadow:
            0 18px 60px rgba(0,0,0,.75),
            0 0 0 6px rgba(224,86,74,.10),
            inset 0 0 0 1px rgba(224,86,74,.18);
}

/* PROD: BLUE confidence */
.xbtn--prod{
    border-color: rgba(90,124,255,.65);
    background:
            radial-gradient(320px 120px at 18% 30%,
            rgba(90,124,255,.34),
            rgba(90,124,255,.14) 45%,
            rgba(0,0,0,.30) 70%),
            rgba(0,0,0,.28);
    box-shadow:
            0 18px 60px rgba(0,0,0,.75),
            0 0 0 6px rgba(90,124,255,.14),
            inset 0 0 0 1px rgba(90,124,255,.22);
}

/* Hover/press feel: "click me" */
.xbtn:hover{
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.xbtn:active{
    transform: translateY(1px);
    filter: brightness(0.98);
}

/* Mobile: stack + big tap targets */
@media (max-width: 900px){
    .xbtnRow{
        grid-template-columns: 1fr;
    }
    .xbtn{
        padding: 16px;
    }
}
