/* ===================================================================
   PAGANI HUAYRA — Editorial Magazine Layout.
   Text overlaps images, asymmetric, Wallpaper* magazine feel.
   DIFFERENT from Ferrari stacking panels, McLaren gallery, Bugatti
   cinematic, Porsche split-screen.
   =================================================================== */

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

::selection {
    background: var(--pa);
    color: var(--pa-dark);
}

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

/* ─────────────────────────────────────────────────
   S1: HERO — Sticky. Ghost "PAGANI" at 2.5%.
   "Huayra" massive. Gold rule. "Wind made visible."
   ───────────────────────────────────────────────── */
.pa-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(--pa-dark);
    overflow: hidden;
}

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

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

.pa-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;
}

.pa-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(5rem, 16vw, 14rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: #fff;
}

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

.pa-hero__rule {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pa), #A08850);
    margin: clamp(1.25rem, 2.5vh, 2rem) auto;
}

.pa-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;
}

.pa-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;
}

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

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

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

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

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

.pa-photo__vignette {
    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;
}

.pa-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;
}

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

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

/* ─────────────────────────────────────────────────
   S3 + S4: EDITORIAL SECTIONS — Magazine overlap.
   Image takes ~60%, text block overlaps by ~8%.
   Solid bg behind text for readability.
   ───────────────────────────────────────────────── */
.pa-editorial {
    position: relative;
    z-index: 3;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    background: var(--pa-dark);
    overflow: hidden;
}

.pa-editorial--one {
    grid-template-columns: 60% 1fr;
}

.pa-editorial--two {
    grid-template-columns: 1fr 60%;
}

/* Image column */
.pa-editorial__image-col {
    position: relative;
    height: 100%;
    min-height: 70vh;
    overflow: hidden;
}

.pa-editorial__image-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pa-editorial__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.82) contrast(1.06);
    will-change: transform;
}

/* Text column — overlaps image edge */
.pa-editorial__text-col {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: clamp(3rem, 6vh, 5rem) clamp(2rem, 4vw, 4rem);
}

/* Right overlap: text slides LEFT over the image's right edge */
.pa-editorial__text-col--overlap-right {
    margin-left: -8%;
}

/* Left overlap: text slides RIGHT over the image's left edge */
.pa-editorial__text-col--overlap-left {
    margin-right: -8%;
}

.pa-editorial__text-block {
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: clamp(2rem, 4vh, 3.5rem) clamp(2rem, 3vw, 3rem);
    border: 1px solid rgba(197, 165, 114, 0.08);
    max-width: 480px;
}

.pa-editorial__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.5rem, 1vh, 0.75rem);
}

.pa-editorial__display {
    font-family: var(--ff-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #fff;
    margin: 0;
}

.pa-editorial__display--serif {
    font-family: var(--ff-serif);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1;
}

.pa-editorial__sub {
    font-family: var(--ff-body);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pa);
    margin-top: clamp(0.4rem, 0.8vh, 0.6rem);
}

.pa-editorial__rule {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--pa), #A08850);
    margin: clamp(1rem, 2vh, 1.5rem) 0;
}

.pa-editorial__body {
    font-family: var(--ff-serif);
    font-size: clamp(0.92rem, 1.15vw, 1.08rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: #bbb;
    max-width: 400px;
}

.pa-editorial__stat-row {
    display: flex;
    gap: clamp(2rem, 4vw, 3.5rem);
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
    padding-top: clamp(1.5rem, 3vh, 2.5rem);
    border-top: 1px solid rgba(197, 165, 114, 0.1);
}

.pa-editorial__stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pa-editorial__stat-value {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1;
}

.pa-editorial__stat-unit {
    font-family: var(--ff-body);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--pa);
}

/* ─────────────────────────────────────────────────
   S5: SPEED — Three stats centered, gold units.
   ───────────────────────────────────────────────── */
.pa-speed {
    position: relative;
    z-index: 4;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pa-dark);
    padding: var(--pad-section) var(--pad-container);
}

.pa-speed__inner {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    text-align: center;
}

.pa-speed__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.pa-speed__number {
    font-family: var(--ff-display);
    font-size: clamp(5rem, 14vw, 12rem);
    font-weight: 800;
    line-height: 0.82;
    letter-spacing: -0.06em;
    color: #fff;
    display: block;
}

.pa-speed__value {
    font-family: var(--ff-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1;
}

.pa-speed__unit {
    font-family: var(--ff-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--pa);
    margin-top: 0.25rem;
}

.pa-speed__divider {
    width: 1px;
    height: clamp(3rem, 6vh, 5rem);
    background: rgba(197, 165, 114, 0.15);
}

/* ─────────────────────────────────────────────────
   S6: MARQUEE — Ryan Mulligan CSS-only.
   ───────────────────────────────────────────────── */
.pa-marquee {
    position: relative;
    z-index: 5;
    padding: clamp(1rem, 2vh, 1.5rem) 0;
    background: var(--pa-dark);
    border-top: 1px solid rgba(197, 165, 114, 0.1);
    border-bottom: 1px solid rgba(197, 165, 114, 0.1);
    overflow: hidden;
}

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

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

.pa-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;}

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

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

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

/* ─────────────────────────────────────────────────
   S7: HERITAGE — Horacio Pagani quote.
   Word-by-word reveal.
   ───────────────────────────────────────────────── */
.pa-heritage {
    position: relative;
    z-index: 6;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(8rem, 16vh, 14rem) var(--pad-container);
    background: var(--pa-dark);
    overflow: hidden;
}

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

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

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

.pa-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;
}

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

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

.pa-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;
}

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

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

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

.pa-close__content {
    opacity: 0;
}

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

.pa-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;
}

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

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

/* ─────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pa-editorial--one,
    .pa-editorial--two {
        grid-template-columns: 55% 1fr;
    }

    .pa-editorial--two {
        grid-template-columns: 1fr 55%;
    }

    .pa-speed__number {
        font-size: clamp(4rem, 12vw, 8rem);
    }

    .pa-speed__value {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
}

@media (max-width: 768px) {
    .pa-hero__title {
        font-size: clamp(4rem, 20vw, 8rem);
    }

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

    /* Editorial stacks vertically, no overlap */
    .pa-editorial--one,
    .pa-editorial--two {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    /* Reverse the visual order for editorial 2 on mobile */
    .pa-editorial--two .pa-editorial__text-col {
        order: 2;
    }

    .pa-editorial--two .pa-editorial__image-col {
        order: 1;
    }

    .pa-editorial__image-col {
        min-height: 50vh;
    }

    .pa-editorial__text-col--overlap-right,
    .pa-editorial__text-col--overlap-left {
        margin-left: 0;
        margin-right: 0;
    }

    .pa-editorial__text-block {
        max-width: 100%;
    }

    /* Speed section stacks */
    .pa-speed__inner {
        flex-direction: column;
        gap: clamp(2rem, 4vh, 3rem);
    }

    .pa-speed__divider {
        width: clamp(3rem, 20vw, 5rem);
        height: 1px;
    }

    .pa-speed__number {
        font-size: clamp(4rem, 18vw, 7rem);
    }

    .pa-speed__value {
        font-size: clamp(2rem, 10vw, 3rem);
    }

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

@media (max-width: 480px) {
    .pa-speed__number {
        font-size: clamp(3rem, 22vw, 5rem);
    }

    .pa-speed__value {
        font-size: clamp(1.8rem, 12vw, 2.5rem);
    }

    .pa-editorial__display {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .pa-editorial__display--serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .pa-editorial__stat-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}
