/* ============================================================
   ABOUT.CSS — Page "Le Parcours" de Gioacchino Maurici
   Gioacchino.fr
   ============================================================ */

/* ── Grain overlay ──────────────────────────────────────────── */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* ── Film-strip SVG background ──────────────────────────────── */
.film-strip-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.film-strip-container svg {
    width: 100%;
    height: 100%;
}

/* ── Hero ───────────────────────────────────────────────────── */
#about-hero {
    position: relative;
    min-height: 92vh;
    background-color: var(--color-near-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    padding: var(--space-xl) var(--space-md);
}

.hero__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: var(--color-gold);
    display: block;
    margin-bottom: 1.8rem;
    position: relative;
    z-index: 2;
}

#about-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.hero__quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.5);
    max-width: 42ch;
    margin-top: var(--space-md);
    position: relative;
    z-index: 2;
    line-height: 1.6;
}

/* ── Scroll hint ─────────────────────────────────────────────── */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: bounceDown 2s ease-in-out infinite;
}

.scroll-hint__arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(196, 168, 98, 0.6));
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ── Dot-grid texture for hero ──────────────────────────────── */
.hero__dot-grid {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
    background-size: 28px 28px;
    z-index: 1;
}

/* ── Timeline — Red thread ───────────────────────────────────── */
.timeline {
    position: relative;
}

/* Vertical red thread */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent 0%,
            var(--color-gold) 5%,
            var(--color-gold) 95%,
            transparent 100%);
    transform: translateX(-50%);
    z-index: 0;
}

/* ── Chapter articles ───────────────────────────────────────── */
.chapter {
    position: relative;
    padding: var(--space-lg) 0;
    z-index: 1;
}

.chapter__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    gap: var(--space-md);
}

/* ── Dot on the thread ──────────────────────────────────────── */
.chapter__dot {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    align-self: stretch;
    /* s'étend sur la hauteur de la grille */
}

.chapter__dot::before {
    content: '';
    width: 14px;
    height: 14px;
    min-width: 14px;
    /* empêche l'écrasement flex */
    border-radius: 50%;
    background-color: var(--color-gold);
    border: 3px solid var(--color-white);
    box-shadow: 0 0 0 1px var(--color-gold);
    position: relative;
    z-index: 3;
}

/* Dark section dot */
.chapter--dark .chapter__dot::before {
    border-color: var(--color-near-black);
}

/* ── Chapter content ────────────────────────────────────────── */
.chapter__content {
    padding: var(--space-md);
}

.chapter__image-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Alternating layout: odd chapters → content left / image right */
.chapter:nth-child(odd) .chapter__content {
    order: 1;
    text-align: right;
}

.chapter:nth-child(odd) .chapter__dot {
    order: 2;
}

.chapter:nth-child(odd) .chapter__image-col {
    order: 3;
}

/* Even chapters → image left / content right */
.chapter:nth-child(even) .chapter__image-col {
    order: 1;
}

.chapter:nth-child(even) .chapter__dot {
    order: 2;
}

.chapter:nth-child(even) .chapter__content {
    order: 3;
    text-align: left;
}

/* ── Chapter eyebrow ────────────────────────────────────────── */
.chapter__eyebrow {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 1px solid currentColor;
    margin-bottom: 1rem;
}

/* ── Chapter heading ────────────────────────────────────────── */
.chapter__heading {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

/* ── Body text ──────────────────────────────────────────────── */
.chapter__body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-gray-mid);
    max-width: 44ch;
}

.chapter:nth-child(odd) .chapter__body {
    margin-left: auto;
}

.chapter:nth-child(even) .chapter__body {
    margin-right: auto;
}

/* ── Pull-quote block ───────────────────────────────────────── */
.chapter__pull-quote {
    margin-top: var(--space-sm);
    padding: 1.2rem 1.8rem;
    border-left: 3px solid var(--color-gold);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.55;
}

.chapter:nth-child(odd) .chapter__pull-quote {
    border-left: none;
    border-right: 3px solid var(--color-gold);
    text-align: right;
    padding: 1.2rem 1.8rem 1.2rem 0;
}

/* ── Image frame — polaroid style ───────────────────────────── */
.chapter__frame {
    position: relative;
    background: #fff;
    padding: 10px 10px 36px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 360px;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter__frame:hover {
    transform: scale(1.02) rotate(0deg) !important;
}

.chapter__frame img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    filter: grayscale(40%);
    transition: filter 0.4s ease;
}

.chapter__frame:hover img {
    filter: grayscale(0%);
}

/* Tape strips */
.tape {
    position: absolute;
    width: 72px;
    height: 26px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(3px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.tape--top-right {
    top: -13px;
    right: -18px;
    transform: rotate(34deg);
}

.tape--top-left {
    top: -13px;
    left: -18px;
    transform: rotate(-34deg);
}

.tape--bot-right {
    bottom: 20px;
    right: -16px;
    transform: rotate(-14deg);
}

/* Dark section frames */
.chapter--dark .chapter__frame {
    background: #1a1a1a;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ── Dark chapter variant ───────────────────────────────────── */
.chapter--dark {
    background-color: var(--color-near-black);
    color: var(--color-white);
}

.chapter--dark .chapter__body {
    color: rgba(255, 255, 255, 0.55);
}

.chapter--dark .timeline-before {
    /* neutral */
}

/* ── Conclusion section ─────────────────────────────────────── */
#about-conclusion {
    background-color: var(--color-near-black);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow: hidden;
}

#about-conclusion .conclusion__inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

#about-conclusion blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.45;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

#about-conclusion cite {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    font-style: normal;
}

/* ── Scroll-progress indicator (audio sync hint) ──────────────── */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--color-gold);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
}

/* ── Reveal animations ──────────────────────────────────────── */
.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-up.is-visible {
    opacity: 1;
    transform: translate(0);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .timeline::before {
        left: 24px;
    }

    .chapter__inner {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
    }

    .chapter:nth-child(odd) .chapter__dot,
    .chapter:nth-child(even) .chapter__dot {
        order: 1;
    }

    .chapter:nth-child(odd) .chapter__content,
    .chapter:nth-child(even) .chapter__content {
        order: 2;
        text-align: left;
        grid-column: 2;
    }

    .chapter:nth-child(odd) .chapter__body,
    .chapter:nth-child(even) .chapter__body {
        margin-left: 0;
        margin-right: 0;
    }

    .chapter__image-col {
        display: none;
        /* masqué sur mobile — texte seul */
    }

    .chapter:nth-child(odd) .chapter__pull-quote {
        border-left: 3px solid var(--color-gold);
        border-right: none;
        text-align: left;
        padding: 1.2rem 0 1.2rem 1.8rem;
    }
}