/* ==========================================================================
   Live hero stage — Office 168/52 homepage
   --------------------------------------------------------------------------
   Turns the four desktop posters into layered scenes: photographic plates of
   the founder stay in the frame; headline, beats, quote, and CTA are live
   HTML. Loaded after marketing.css (and after the remediation sheet) so these
   rules win. Only matches .hero--stage.
   ========================================================================== */

.hero.hero--stage {
    --stage-void: #070712;
    --stage-ink: #f7f4ea;
    --stage-muted: rgba(247, 244, 234, 0.78);
    --stage-accent: linear-gradient(90deg, #7dd3fc 0%, #c4b5fd 42%, #fb923c 100%);
    isolation: isolate;
    background: var(--stage-void);
    scroll-margin-top: 0;
}

.hero.hero--stage::before,
.hero.hero--stage::after {
    display: none;
}

.hero.hero--stage .hero-slider-viewport {
    margin-top: var(--hero-nav-offset);
}

/* ---- Emanate field (behind slides, GPU-cheap) ---- */
.hero-stage__emanate {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-stage__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    will-change: transform;
}

.hero-stage__orb--a {
    width: min(52vw, 420px);
    height: min(52vw, 420px);
    right: -8%;
    top: 12%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.55) 0%, rgba(124, 58, 237, 0) 70%);
    animation: hero-orb-drift 18s ease-in-out infinite;
}

.hero-stage__orb--b {
    width: min(44vw, 340px);
    height: min(44vw, 340px);
    left: 8%;
    bottom: 6%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.4) 0%, rgba(14, 165, 233, 0.2) 40%, transparent 70%);
    animation: hero-orb-drift 22s ease-in-out infinite reverse;
}

.hero-stage__ribbon {
    position: absolute;
    inset: -20%;
    background:
        conic-gradient(from 180deg at 70% 40%,
            transparent 0deg,
            rgba(56, 189, 248, 0.12) 40deg,
            transparent 80deg,
            rgba(192, 38, 211, 0.14) 140deg,
            transparent 190deg,
            rgba(249, 115, 22, 0.1) 250deg,
            transparent 300deg);
    animation: hero-ribbon-spin 48s linear infinite;
    mix-blend-mode: screen;
}

@keyframes hero-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-4%, 6%) scale(1.08); }
}

@keyframes hero-ribbon-spin {
    to { transform: rotate(360deg); }
}

/* ---- Slide as a two-column stage ----
   Posters are 16:9 composites with baked type. Full-bleed cover + a glass
   card stacked a second headline on top of the first. Desktop weaves instead:
   the plate occupies the person/environment side; live copy sits in the dark
   column. Per-slide --plate-pos / --plate-scale crop leftover poster type. */
.hero--stage .hero-slider-track {
    position: relative;
    z-index: 1;
}

.hero--stage .hero-slide {
    --plate-span: 62%;
    --voice-span: min(38rem, 44%);
    --plate-scale: 1.16;
    min-height: min(86dvh, 840px);
    overflow: hidden;
}

.hero--stage .hero-slide-plate {
    position: absolute;
    top: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero--stage .hero-slide-plate::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero--stage .hero-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--plate-pos, 82% 28%);
    pointer-events: none;
    transform: scale(var(--plate-scale));
    transform-origin: var(--plate-pos, 82% 28%);
}

/* Person + devices on the right (slides 1 + 3): plate on the right, voice left */
.hero--stage [data-slide-id="built-by-operator"],
.hero--stage [data-slide-id="bob-works"] {
    --copy-side: left;
}

.hero--stage [data-slide-id="built-by-operator"] .hero-slide-plate,
.hero--stage [data-slide-id="bob-works"] .hero-slide-plate {
    left: calc(100% - var(--plate-span));
    right: 0;
}

.hero--stage [data-slide-id="built-by-operator"] .hero-slide-plate::after,
.hero--stage [data-slide-id="bob-works"] .hero-slide-plate::after {
    background: linear-gradient(90deg, var(--stage-void) 0%, rgba(7, 7, 18, 0.72) 18%, rgba(7, 7, 18, 0.28) 42%, transparent 70%);
}

.hero--stage [data-slide-id="built-by-operator"] { --plate-pos: 78% 26%; --plate-scale: 1.08; --plate-span: 72%; }
.hero--stage [data-slide-id="bob-works"] { --plate-pos: 88% 32%; --plate-scale: 1.1; --plate-span: 70%; }

/* Person + van/scan on the left (slides 2 + 4): plate on the left, voice right */
.hero--stage [data-slide-id="catches-customer"],
.hero--stage [data-slide-id="smart-scan"] {
    --copy-side: right;
}

.hero--stage [data-slide-id="catches-customer"] .hero-slide-plate,
.hero--stage [data-slide-id="smart-scan"] .hero-slide-plate {
    left: 0;
    right: calc(100% - var(--plate-span));
}

.hero--stage [data-slide-id="catches-customer"] .hero-slide-plate::after,
.hero--stage [data-slide-id="smart-scan"] .hero-slide-plate::after {
    background:
        linear-gradient(270deg, var(--stage-void) 0%, rgba(7, 7, 18, 0.72) 18%, rgba(7, 7, 18, 0.28) 42%, transparent 70%),
        linear-gradient(0deg, var(--stage-void) 0%, transparent 22%);
}

.hero--stage [data-slide-id="catches-customer"] { --plate-pos: 2% 36%; --plate-scale: 1.52; --plate-span: 68%; }
.hero--stage [data-slide-id="smart-scan"] { --plate-pos: 4% 16%; --plate-scale: 1.38; --plate-span: 68%; }

.hero--stage .hero-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(7, 7, 18, 0.88) 0%,
            rgba(7, 7, 18, 0.62) 34%,
            rgba(7, 7, 18, 0.12) 52%,
            transparent 68%
        );
}

.hero--stage .hero-slide-copy {
    position: relative;
    width: auto;
    height: auto;
    max-width: var(--voice-span);
    margin: 0;
    padding: clamp(1.1rem, 2.4vw, 2rem) clamp(1.25rem, 4.5vw, 3.75rem) 0.35rem;
    overflow: visible;
    clip: unset;
    clip-path: none;
    white-space: normal;
    border: 0;
    pointer-events: auto;
    color: var(--stage-ink);
    text-align: left;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
}

.hero--stage [data-slide-id="catches-customer"] .hero-slide-overlay,
.hero--stage [data-slide-id="smart-scan"] .hero-slide-overlay {
    align-items: flex-end;
    background:
        linear-gradient(
            270deg,
            rgba(7, 7, 18, 0.88) 0%,
            rgba(7, 7, 18, 0.62) 34%,
            rgba(7, 7, 18, 0.12) 52%,
            transparent 68%
        );
}

.hero--stage [data-slide-id="catches-customer"] .hero-slide-copy,
.hero--stage [data-slide-id="catches-customer"] .hero-slide-cta,
.hero--stage [data-slide-id="smart-scan"] .hero-slide-copy,
.hero--stage [data-slide-id="smart-scan"] .hero-slide-cta {
    margin-left: auto;
}

.hero--stage .hero-slide-copy h1 {
    font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3.15rem);
    line-height: 1.12;
    margin: 0 0 0.75rem;
    color: var(--stage-ink);
    animation: none;
}

.hero--stage .hero-heading-accent {
    background: var(--stage-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero--stage .hero-slide-copy .subtitle {
    font-size: clamp(0.95rem, 0.85rem + 0.45vw, 1.15rem);
    line-height: 1.5;
    margin: 0 0 1.1rem;
    max-width: 34rem;
    color: var(--stage-muted);
    animation: none;
}

.hero--stage .hero-beats {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.hero--stage .hero-beats li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(247, 244, 234, 0.92);
}

.hero--stage .hero-beats li::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.55);
}

.hero--stage .hero-quote {
    margin: 0 0 1.15rem;
    padding: 0;
    border: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(247, 244, 234, 0.82);
    max-width: 32rem;
}

.hero--stage .hero-quote p {
    margin: 0 0 0.35rem;
}

.hero--stage .hero-quote footer {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fb923c;
}

.hero--stage .hero-vs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 0 0 1.1rem;
    max-width: 34rem;
}

.hero--stage .hero-vs__col {
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.hero--stage .hero-vs__col--no {
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.hero--stage .hero-vs__col--yes {
    background: rgba(76, 29, 149, 0.35);
    border: 1px solid rgba(192, 132, 252, 0.4);
}

.hero--stage .hero-vs__col h3 {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero--stage .hero-vs__col ul {
    margin: 0;
    padding-left: 1.05rem;
}

.hero--stage .hero-steps {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    max-width: 32rem;
    counter-reset: hero-step;
}

.hero--stage .hero-steps li {
    counter-increment: hero-step;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero--stage .hero-steps li::before {
    content: counter(hero-step);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #ff7a18, #7c3aed);
    flex-shrink: 0;
}

.hero--stage .hero-slide-cta {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
    max-width: var(--voice-span);
    margin: 0;
    padding: 0.85rem clamp(1.25rem, 4.5vw, 3.75rem) clamp(1.4rem, 3.5vw, 2.4rem);
    pointer-events: auto;
    justify-content: flex-start;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
}

.hero--stage .hero-waitlist-pill {
    width: auto;
    max-width: 22rem;
    min-height: 56px;
    font-size: 1.05rem;
    padding: 0.45rem 0.45rem 0.45rem 1.35rem;
}

.hero--stage .hero-slide-hours {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--stage-muted);
}

.hero--stage .hero-slider-ui {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 0.35rem 0 1rem;
}

/* Enter motion — only the active slide, transform/opacity only */
.hero--stage .hero-slide.is-active .hero-slide-copy,
.hero--stage .hero-slide.is-active .hero-slide-cta {
    animation: hero-voice-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero--stage .hero-slide.is-active .hero-slide-cta {
    animation-delay: 0.08s;
}

@keyframes hero-voice-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1440px) {
    .hero--stage .hero-slide {
        --voice-span: min(40rem, 40%);
    }
}

@media (min-width: 1680px) {
    .hero--stage .hero-slide {
        --voice-span: min(42rem, 38%);
    }
}

/* ---- Tablet: more photo, tighter voice column ---- */
@media (max-width: 1100px) {
    .hero--stage .hero-slide {
        --voice-span: min(32rem, 50%);
        min-height: min(78dvh, 720px);
    }

    .hero--stage [data-slide-id="built-by-operator"] { --plate-pos: 84% 20%; --plate-scale: 1.16; --plate-span: 66%; }
    .hero--stage [data-slide-id="catches-customer"] { --plate-pos: 2% 32%; --plate-scale: 1.58; --plate-span: 62%; }
    .hero--stage [data-slide-id="bob-works"] { --plate-pos: 92% 28%; --plate-scale: 1.18; --plate-span: 64%; }
    .hero--stage [data-slide-id="smart-scan"] { --plate-pos: 2% 14%; --plate-scale: 1.48; --plate-span: 62%; }
}

/* ---- Phone: photo on top (the person), voice below. Never a squeezed poster. ---- */
@media (max-width: 767px) {
    .hero--stage .hero-slide {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .hero--stage .hero-slide-plate {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        width: 100%;
        height: min(46vh, 360px);
        flex-shrink: 0;
        overflow: hidden;
    }

    .hero--stage .hero-slide-plate::after {
        background: linear-gradient(180deg, transparent 40%, var(--stage-void) 100%);
    }

    .hero--stage .hero-slide-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        transform: scale(var(--plate-scale));
        transform-origin: var(--plate-pos);
    }

    .hero--stage [data-slide-id="built-by-operator"] { --plate-pos: 96% 12%; --plate-scale: 1.62; }
    .hero--stage [data-slide-id="catches-customer"] { --plate-pos: 6% 14%; --plate-scale: 1.85; }
    .hero--stage [data-slide-id="bob-works"] { --plate-pos: 100% 16%; --plate-scale: 1.7; }
    .hero--stage [data-slide-id="smart-scan"] { --plate-pos: 4% 10%; --plate-scale: 1.9; }

    .hero--stage .hero-slide-overlay,
    .hero--stage [data-slide-id="catches-customer"] .hero-slide-overlay,
    .hero--stage [data-slide-id="smart-scan"] .hero-slide-overlay {
        position: relative;
        inset: auto;
        flex: 1;
        align-items: stretch;
        background:
            linear-gradient(180deg, rgba(7, 7, 18, 0) 0%, var(--stage-void) 18%);
        margin-top: -3.5rem;
        padding-top: 2.5rem;
        justify-content: flex-start;
        z-index: 2;
    }

    .hero--stage .hero-slide-copy,
    .hero--stage .hero-slide-cta {
        max-width: none;
        margin-left: 0;
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .hero--stage .hero-slide-copy {
        padding-top: 0;
    }

    .hero--stage .hero-slide-cta {
        padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
        width: 100%;
    }

    .hero--stage .hero-slide-hours {
        padding-left: 0;
        border-left: none;
        width: 100%;
    }

    .hero--stage .hero-vs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .hero--stage .hero-slide-plate {
        height: min(36vh, 260px);
    }

    .hero--stage .hero-slide-copy h1 {
        font-size: 1.65rem;
    }
}

/* ---- Motion / data / print ---- */
@media (prefers-reduced-motion: reduce) {
    .hero-stage__orb,
    .hero-stage__ribbon,
    .hero--stage .hero-slide.is-active .hero-slide-copy,
    .hero--stage .hero-slide.is-active .hero-slide-cta {
        animation: none;
    }

    .hero--stage .hero-slide-bg {
        transform: none;
    }
}

@media (prefers-reduced-data: reduce) {
    .hero-stage__emanate {
        display: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .hero--stage .hero-slide-overlay {
        background: rgba(7, 7, 18, 0.55);
    }
}
