/* ===================================================================
   PORSCHE 911 GT3 RS — Split-screen precision.
   Different from McLaren (horizontal scroll), Ferrari (stacking),
   Bugatti (pinned reveals). This page: synced left/right panels.
   Accent: #C00000. Prefix: po-. Easing: cubic-bezier(0.65,0.05,0,1).
   =================================================================== */

:root {
    --po: #C00000;
    --po-dark: #0a0a0a;
    --po-ease: cubic-bezier(0.65, 0.05, 0, 1);
    --po-dur: 0.75s;
    --po-gap: 3rem;
}

::selection {
    background: var(--po);
    color: #fff;
}

body {
    background: var(--po-dark);
    color: #fff;
    margin: 0;
    overflow-x: hidden;
}

/* -----------------------------------------------------------------
   S1: HERO — Sticky. Ghost text. S2 slides over.
   ----------------------------------------------------------------- */
.po-hero {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 var(--pad-container);
    background: var(--po-dark);
    overflow: hidden;
}

.po-hero__ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-4deg);
    font-family: var(--ff-display);
    font-size: clamp(12rem, 28vw, 28rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    opacity: 0.025;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.po-hero__content {
    position: relative;
    z-index: 2;
}

.po-hero__eyebrow {
    font-family: var(--ff-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
    opacity: 0;
}

.po-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(7rem, 20vw, 16rem);
    font-weight: 800;
    line-height: 0.82;
    letter-spacing: -0.06em;
    color: #fff;
}

/* Clip-path masking for SplitType lines */
.po-hero__title .line {
    clip-path: polygon(0 -5%, 100% -5%, 100% 105%, 0 105%);
}

.po-hero__rule {
    width: 0;
    height: 2px;
    background: var(--po);
    margin: clamp(1.25rem, 2.5vh, 2rem) auto;
}

.po-hero__tagline {
    font-family: var(--ff-serif);
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 300;
    font-style: italic;
    color: #bbb;
    opacity: 0;
}

.po-hero__scroll {
    position: absolute;
    bottom: clamp(2rem, 4vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    z-index: 2;
}

.po-hero__scroll-text {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #666;
}

.po-hero__scroll-line {
    width: 1px;
    height: 0;
    background: linear-gradient(180deg, rgba(192, 0, 0, 0.35), transparent);
}

/* -----------------------------------------------------------------
   S2: FULL-BLEED PHOTO — Ellipse clip-path reveal. Slides over hero.
   ----------------------------------------------------------------- */
.po-photo {
    position: relative;
    z-index: 2;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.po-photo__image-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: ellipse(0% 0% at 50% 50%);
    will-change: clip-path;
}

.po-photo__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    will-change: transform;
    filter: brightness(0.85) contrast(1.05);
}

/* Radial vignette */
.po-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 80% at 50% 50%,
        transparent 30%,
        rgba(0, 0, 0, 0.55) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.po-photo__caption {
    position: absolute;
    bottom: clamp(2rem, 4vh, 3rem);
    right: var(--pad-container);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
}

.po-photo__tag {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #bbb;
}

.po-photo__sep {
    color: var(--po);
    opacity: 0.4;
    font-size: 0.55rem;
}

/* -----------------------------------------------------------------
   S3: SPLIT-SCREEN — 500vh container, sticky 100vh inner.
   Left: images cross-fade. Right: spec panels swap.
   ----------------------------------------------------------------- */
.po-split {
    position: relative;
    z-index: 2;
    height: 500vh;
    background: var(--po-dark);
}

.po-split__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.po-split__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

/* ── Left: Image stack ── */
.po-split__left {
    position: relative;
    overflow: hidden;
    background: #080808;
}

.po-split__img-stack {
    position: absolute;
    inset: 0;
}

.po-split__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.85) contrast(1.05);
    transition: opacity 0s; /* GSAP controls this */
}

/* First image visible by default */
.po-split__img--0 {
    opacity: 1;
}

/* Subtle inner shadow on left panel */
.po-split__left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 70%,
        rgba(10, 10, 10, 0.4) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Right: Spec panels ── */
.po-split__right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 6vw, 6rem);
    background: var(--po-dark);
}

.po-split__panel {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 0 clamp(3rem, 6vw, 6rem);
    opacity: 0;
    visibility: hidden;
}

/* First panel visible by default */
.po-split__panel--0 {
    opacity: 1;
    visibility: visible;
}

.po-split__label {
    font-family: var(--ff-body);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: clamp(0.75rem, 1.5vh, 1.25rem);
}

.po-split__stat-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    overflow: hidden;
}

.po-split__stat {
    font-family: var(--ff-display);
    font-size: clamp(5rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: #fff;
    display: block;
}

.po-split__unit {
    font-family: var(--ff-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--po);
}

.po-split__sub {
    font-family: var(--ff-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--po);
    margin-top: 0.75rem;
}

.po-split__rule {
    width: 40px;
    height: 1px;
    background: rgba(192, 0, 0, 0.3);
    margin: clamp(1.5rem, 3vh, 2.5rem) 0;
}

.po-split__body {
    font-family: var(--ff-serif);
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: #bbb;
    max-width: 380px;
}

/* ── Progress dots ── */
.po-split__progress {
    position: absolute;
    bottom: clamp(2rem, 4vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 5;
}

.po-split__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.4s var(--po-ease), transform 0.4s var(--po-ease);
}

.po-split__dot--active {
    background: var(--po);
    transform: scale(1.3);
}

/* -----------------------------------------------------------------
   S4: SPEED STATS — 3 counters row
   ----------------------------------------------------------------- */
.po-stats {
    position: relative;
    z-index: 2;
    background: var(--po-dark);
    padding: clamp(6rem, 12vh, 10rem) var(--pad-container);
}

.po-stats__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5vw, 5rem);
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
}

.po-stats__item {
    text-align: center;
    flex: 1;
}

.po-stats__number {
    font-family: var(--ff-display);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #fff;
    display: block;
}

.po-stats__number--accent {
    color: var(--po);
}

.po-stats__unit {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--po);
    display: block;
    margin-top: 0.5rem;
}

.po-stats__label {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #666;
    display: block;
    margin-top: 0.75rem;
}

.po-stats__divider {
    width: 1px;
    height: 60px;
    background: rgba(192, 0, 0, 0.12);
    flex-shrink: 0;
}

/* -----------------------------------------------------------------
   S5: MARQUEE — CSS-only Ryan Mulligan
   ----------------------------------------------------------------- */
.po-marquee {
    position: relative;
    z-index: 2;
    padding: clamp(1rem, 2vh, 1.5rem) 0;
    background: var(--po-dark);
    border-top: 1px solid rgba(192, 0, 0, 0.12);
    border-bottom: 1px solid rgba(192, 0, 0, 0.12);
    overflow: hidden;
}

.po-marquee__track {
    display: flex;
    gap: var(--po-gap);
}

.po-marquee__content {
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    gap: var(--po-gap);
    list-style: none;
    margin: 0;
    padding: 0;
    animation: po-marquee-scroll 28s linear infinite;
}

.po-marquee__content li {
    font-family: var(--ff-body);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 3rem;}

.po-marquee__content li::after {
    content: '·';
    color: var(--po);
    opacity: 0.3;
    font-size: 0.7rem;
}

@keyframes po-marquee-scroll {
    to { transform: translateX(calc(-100% - var(--po-gap))); }
}

@media (prefers-reduced-motion: reduce) {
    .po-marquee__content { animation: none; }
}

/* -----------------------------------------------------------------
   S6: HERITAGE — Quote. Ghost car. Breathes.
   ----------------------------------------------------------------- */
.po-heritage {
    position: relative;
    z-index: 2;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(8rem, 16vh, 14rem) var(--pad-container);
    background: var(--po-dark);
    overflow: hidden;
}

.po-heritage__ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160%;
    max-width: none;
    pointer-events: none;
}

.po-heritage__ghost-car {
    width: 100%;
    height: auto;
    opacity: 0.04;
    filter: grayscale(1) brightness(0.7);
}

.po-heritage__content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.po-heritage__quote {
    font-family: var(--ff-serif);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.35;
    color: #fff;
    margin: 0;
    padding: 0;
}

/* Words start hidden for word-by-word reveal */
.po-heritage__quote .word {
    opacity: 0;
}

.po-heritage__cite {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    font-style: normal;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #666;
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
    display: block;
    opacity: 0;
}

/* -----------------------------------------------------------------
   S7: BLUEPRINT — Engine technical drawing
   ----------------------------------------------------------------- */
.po-blueprint {
    position: relative;
    z-index: 2;
    background: var(--po-dark);
    padding: clamp(5rem, 10vh, 8rem) var(--pad-container);
}

.po-blueprint__inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.po-blueprint__label {
    font-family: var(--ff-body);
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #666;
    margin-bottom: clamp(2rem, 4vh, 3rem);
    opacity: 0;
}

.po-blueprint__wrap {
    max-width: 1000px;
    margin: 0 auto;
    opacity: 0;
}

.po-blueprint__img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.8;
}

/* -----------------------------------------------------------------
   S8: CLOSE — Minimal brand departure
   ----------------------------------------------------------------- */
.po-close {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--po-dark);
    padding: var(--pad-section) var(--pad-container);
}

.po-close__content {
    opacity: 0;
}

.po-close__brand {
    font-family: var(--ff-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #fff;
}

.po-close__origin {
    font-family: var(--ff-serif);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    font-style: italic;
    color: #666;
    margin-top: 0.6rem;
}

.po-close__year {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    letter-spacing: 0.25em;
    color: var(--po);
    opacity: 0.5;
    margin-top: 1.5rem;
}

/* -----------------------------------------------------------------
   NAV + FOOTER z-index
   ----------------------------------------------------------------- */
.nav { z-index: 100; }
.footer { position: relative; z-index: 2; }

/* -----------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------- */
@media (max-width: 1024px) {
    .po-split__stat {
        font-size: clamp(4rem, 12vw, 6rem);
    }

    .po-stats__number {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

@media (max-width: 768px) {
    .po-hero__title {
        font-size: clamp(5rem, 25vw, 10rem);
    }

    .po-hero__ghost {
        font-size: clamp(8rem, 35vw, 14rem);
    }

    /* Split-screen stacks vertically on mobile */
    .po-split__grid {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 50vh;
    }

    .po-split__panel {
        padding: 0 clamp(1.5rem, 4vw, 3rem);
    }

    .po-split__stat {
        font-size: clamp(3.5rem, 14vw, 5rem);
    }

    .po-split__body {
        max-width: 100%;
    }

    /* Stats stack on mobile */
    .po-stats__inner {
        flex-direction: column;
        gap: 2.5rem;
    }

    .po-stats__divider {
        width: 40px;
        height: 1px;
    }

    .po-stats__number {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .po-heritage__ghost {
        width: 220%;
    }

    .po-photo__caption {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .po-split__stat {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .po-split__panel {
        padding: 0 1.25rem;
    }
}
