/* ─────────────────────────────────────────────────────────────────
   Casa de la Makana — proceso.css
   Del Hilo a la Makana: cinematic process page
   Palette: #050505 · #F3EDE2 · #C8A15A · #C45A2A · #8A1E4D · #173A4A · #143B33 · #4B2E1F
───────────────────────────────────────────────────────────────── */

/* ══ Page Base ══════════════════════════════════════════════════ */
html, body {
    background-color: #050505;
}

/* ══ CSS Custom Properties ══════════════════════════════════════ */
:root {
    --gold:      #C8A15A;
    --copper:    #C45A2A;
    --cochineal: #8A1E4D;
    --indigo:    #173A4A;
    --green-art: #143B33;
    --walnut:    #4B2E1F;
    --ivory:     #F3EDE2;
    --ivory-dim: rgba(243, 237, 226, 0.72);
    --ivory-faint: rgba(243, 237, 226, 0.38);
    --gold-dim:  rgba(200, 161, 90, 0.45);
    --overlay-deep: rgba(5, 5, 5, 0.68);
    --overlay-mid:  rgba(5, 5, 5, 0.52);
    --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ══ Page Hero Banner ════════════════════════════════════════════ */
.proceso-hero {
    position: relative;
    width: 100%;
    height: 22vh;
    min-height: 162px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: #050505;
}

.proceso-hero__bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(200, 161, 90, 0.08) 0%, transparent 70%),
        linear-gradient(to bottom, #050505 0%, #0d0a06 60%, #050505 100%);
}

.proceso-hero__line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(200, 161, 90, 0.3), transparent);
    pointer-events: none;
}

.proceso-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4.25rem 1.5rem 1.88rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.proceso-hero__eyebrow {
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.8;
}

.proceso-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: none;
    color: #f4ad67;
    line-height: 1.2;
    margin: 0;
}

.proceso-hero__subtitle {
    font-family: var(--font-primary);
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--ivory-dim);
    max-width: 52ch;
    line-height: 1.8;
}

/* ══ Side Timeline ═══════════════════════════════════════════════ */
.proceso-timeline {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.timeline-track {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: rgba(200, 161, 90, 0.18);
    transform: translateX(-50%);
}

.timeline-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(200, 161, 90, 0.22);
    border: 1px solid rgba(200, 161, 90, 0.3);
    transition: background 0.5s var(--ease-cinema), transform 0.5s var(--ease-cinema), box-shadow 0.5s var(--ease-cinema);
    pointer-events: auto;
    cursor: pointer;
    z-index: 1;
}

.timeline-dot + .timeline-dot {
    margin-top: 1.8rem;
}

.timeline-dot.active,
.timeline-dot:hover {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(200, 161, 90, 0.45);
}

.timeline-label {
    position: absolute;
    right: calc(100% + 1rem);
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-primary);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-dot.active .timeline-label,
.timeline-dot:hover .timeline-label {
    opacity: 1;
}

/* ══ Process Sections — Shared ══════════════════════════════ */
.proceso-stage {
    position: relative;
    width: 100%;
    min-height: 92vh;
    /* Grid of 2 rows: stage-bg (absolute) + stage-content */
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr;
    overflow: hidden;
    background: #050505;
}

/* Full-bleed background media layer */
.stage-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.stage-bg img,
.stage-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.06);
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: auto;
}

/* Dark overlay — always absolute, always full */
.stage-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}



/* ──────────────────────────────────────────────────────────────
   Stage Content — 12-column CSS Grid
   Text blocks are pinned to specific column ranges.
   Image zones remain clean and dominant.
────────────────────────────────────────────────────────────── */
.stage-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    /* Span the full section grid cell */
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    /* 12 equal columns with outer gutters */
    display: grid;
    grid-template-columns:
        [margin-start] clamp(4.5rem, 7vw, 9rem)
        [col1] 1fr [col2] 1fr [col3] 1fr [col4] 1fr [col5] 1fr
        [col6] 1fr [col7] 1fr [col8] 1fr [col9] 1fr [col10] 1fr
        [col11] 1fr [col12] 1fr
        [margin-end] clamp(4.5rem, 7vw, 9rem);
    grid-template-rows: 1fr;
    align-items: end;         /* default: pin to bottom */
    padding: 0 0 clamp(5.5rem, 8vh, 7.5rem) 0;   /* bottom padding for text breathing room */
}

/* ── Text column base ─────────────────────────────────────── */
.stage-text-col {
    display: flex;
    flex-direction: column;
    gap: 0;  /* controlled by children margins */
    align-items: flex-start;
    max-width: min(100%, 46rem);
}

/* Stage number tag */
.stage-number {
    font-family: var(--font-primary);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    opacity: 0.85;
}

.stage-number::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--gold-dim);
    flex-shrink: 0;
}

/* Stage title */
.stage-title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 3.05vw, 3.45rem);
    font-weight: 400;
    letter-spacing: 0.105em;
    text-transform: none;
    color: #f4ad67;
    line-height: 1.14;
    margin: 0 0 1.55rem;
    text-wrap: balance;
}

/* Stage body text */
.stage-body {
    font-family: var(--font-primary);
    font-size: clamp(1rem, 1.05vw, 1.18rem);
    font-weight: 300;
    line-height: 1.82;
    letter-spacing: 0.006em;
    color: rgba(243, 237, 226, 0.82);
    max-width: 45ch;
    text-wrap: pretty;
}

/* ══ Glass Text Panel ════════════════════════════════════════════ */
.glass-panel {
    background: rgba(5, 5, 5, 0.42);
    backdrop-filter: blur(10px) saturate(1.08);
    -webkit-backdrop-filter: blur(10px) saturate(1.08);
    border: 1px solid rgba(200, 161, 90, 0.12);
    border-radius: 2px;
    display: inline-block;
    width: fit-content;
    max-width: min(100%, 48rem);
    padding: clamp(1.85rem, 2.4vw, 2.7rem) clamp(2rem, 3vw, 3.15rem);
    margin-left: calc(clamp(2rem, 3vw, 3.15rem) * -1);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(200, 161, 90, 0.08);
}

.glass-panel .stage-body {
    max-width: 43ch;
}

/* ══ STAGE 01 — DEL HILO A LA MAKANA ════════════════════════════
   Image: hands/wool dominant on the RIGHT
   Text:  pinned BOTTOM-LEFT  (cols 1–4)
   Overlay: dark ramp left→transparent right
═══════════════════════════════════════════════════════════════ */
#stage-01 .stage-overlay {
    background:
        linear-gradient(108deg,
            rgba(5,5,5,0.92) 0%,
            rgba(5,5,5,0.75) 28%,
            rgba(5,5,5,0.35) 52%,
            rgba(5,5,5,0.05) 100%);
}

#stage-01 .stage-content {
    align-items: end;  /* pin to bottom */
}

#stage-01 .stage-text-col {
    grid-column: col1 / col6;  /* left reading zone */
    padding-bottom: clamp(5rem, 12vh, 8rem);
    position: relative;
    top: -5vh;  /* Sube la caja de texto un 5% */
}

/* ══ STAGE 02 — ANTES DEL COLOR, EL NUDO ═══════════════════════
   Image: ropes/knots dominant on the LEFT
   Text:  pinned BOTTOM-RIGHT (cols 8–12)
   Overlay: dark ramp right→transparent left
═══════════════════════════════════════════════════════════════ */
#stage-02 .stage-overlay {
    background:
        linear-gradient(252deg,
            rgba(5,5,5,0.92) 0%,
            rgba(5,5,5,0.78) 28%,
            rgba(5,5,5,0.38) 52%,
            rgba(5,5,5,0.05) 100%);
}

#stage-02 .stage-content {
    align-items: center;
}

#stage-02 .stage-text-col {
    grid-column: col8 / margin-end; /* right reading zone */
    justify-self: end;
    padding-bottom: 0;
    transform: translateY(-4vh);
}

.gold-rule {
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, var(--gold), rgba(200,161,90,0.2));
    margin-bottom: 1.2rem;
    opacity: 0.7;
}

/* ══ STAGE 03 — COLORES DE LA TIERRA ════════════════════════════
   Image: pigment bowls dominant CENTER-RIGHT
   Text:  pinned BOTTOM-LEFT (cols 1–5)
   Overlay: dark bottom band + left gradient
═══════════════════════════════════════════════════════════════ */
#stage-03 .stage-overlay {
    background:
        linear-gradient(108deg,
            rgba(5,5,5,0.9) 0%,
            rgba(5,5,5,0.72) 30%,
            rgba(5,5,5,0.3) 55%,
            rgba(5,5,5,0.05) 100%),
        linear-gradient(to top,
            rgba(5,5,5,0.72) 0%,
            rgba(5,5,5,0.0) 45%);
}

#stage-03 .stage-content {
    align-items: end;
}

#stage-03 .stage-text-col {
    grid-column: col1 / col8; /* wider left reading zone */
    padding-bottom: clamp(1rem, 3vh, 2.8rem);
}

#stage-03 .stage-body {
    max-width: 64ch;
}

/* Dye chips */
.dye-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.4rem;
}

.dye-chip {
    font-family: var(--font-primary);
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ivory-dim);
    border: 1px solid rgba(200, 161, 90, 0.18);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(200, 161, 90, 0.04);
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.dye-chip:hover {
    border-color: rgba(200, 161, 90, 0.42);
    color: var(--gold);
    background: rgba(200, 161, 90, 0.08);
}

/* ══ STAGE 04 — EL TELAR DE CINTURA (video) ══════════════════════
   Video: full-bleed cinematic
   Text:  pinned BOTTOM-LEFT (cols 1–5)
   Overlay: top + bottom dark bands, centre clean
═══════════════════════════════════════════════════════════════ */
#stage-04 {
    min-height: 100vh;
}

#stage-04 .stage-overlay {
    background:
        linear-gradient(to bottom,
            rgba(5,5,5,0.5) 0%,
            rgba(5,5,5,0.0) 28%,
            rgba(5,5,5,0.0) 55%,
            rgba(5,5,5,0.85) 100%);
}

#stage-04 .stage-content {
    align-items: end;
}

#stage-04 .stage-text-col {
    grid-column: col1 / col7; /* left reading zone */
    padding-bottom: clamp(0.75rem, 3.5vh, 3rem);
}

.stage-bg video {
    object-position: center center;
}

/* ══ STAGE 05 — EL ACABADO ════════════════════════════════════════
   Image: makana dominant CENTER-RIGHT
   Text:  pinned BOTTOM-LEFT (cols 1–4)
   Overlay: strong left darkness, right stays clean
═══════════════════════════════════════════════════════════════ */
#stage-05 .stage-overlay {
    background:
        linear-gradient(108deg,
            rgba(5,5,5,0.94) 0%,
            rgba(5,5,5,0.8) 25%,
            rgba(5,5,5,0.42) 48%,
            rgba(5,5,5,0.05) 100%),
        linear-gradient(to top,
            rgba(5,5,5,0.65) 0%,
            rgba(5,5,5,0.0) 38%);
}

#stage-05 .stage-content {
    align-items: end;
}

#stage-05 .stage-text-col {
    grid-column: col1 / col6; /* left reading zone */
    padding-bottom: clamp(1rem, 3vh, 2.8rem);
}

.closing-mark {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.6rem;
    font-family: var(--font-primary);
    font-size: 0.58rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.6;
}

.closing-mark::before {
    content: '';
    display: block;
    width: 18px;
    height: 1px;
    background: var(--gold-dim);
}

/* ══ CTA Section ══════════════════════════════════════════════════ */
.proceso-cta-section {
    position: relative;
    width: 100%;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
    overflow: hidden;
}

.proceso-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(200, 161, 90, 0.06) 0%, transparent 70%),
        linear-gradient(to bottom, rgba(5, 5, 5, 0) 0%, rgba(23, 58, 74, 0.08) 100%);
    pointer-events: none;
}

.proceso-cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 161, 90, 0.2), transparent);
}

.cta-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 5rem 2rem;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.cta-eyebrow {
    font-family: var(--font-primary);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.75;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: none;
    color: #f4ad67;
    line-height: 1.3;
    margin: 0;
}

.cta-body {
    font-family: var(--font-primary);
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--ivory-dim);
    max-width: 50ch;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.cta-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Premium ghost button */
.btn-ghost {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ivory-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    border: 1px solid rgba(243, 237, 226, 0.18);
    border-radius: 999px;
    background: rgba(243, 237, 226, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        color 0.4s var(--ease-cinema),
        border-color 0.4s var(--ease-cinema),
        background 0.4s var(--ease-cinema),
        transform 0.4s var(--ease-cinema),
        box-shadow 0.4s var(--ease-cinema);
    cursor: pointer;
}

.btn-ghost:hover {
    color: var(--gold);
    border-color: rgba(200, 161, 90, 0.45);
    background: rgba(200, 161, 90, 0.06);
    transform: translateY(-4px);
    box-shadow: 0 0 28px rgba(200, 161, 90, 0.12), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.btn-ghost:focus-visible {
    outline: 2px solid rgba(200, 161, 90, 0.6);
    outline-offset: 4px;
}

.btn-ghost--primary {
    color: var(--gold);
    border-color: rgba(200, 161, 90, 0.35);
    background: rgba(200, 161, 90, 0.07);
}

.btn-ghost--primary:hover {
    background: rgba(200, 161, 90, 0.14);
    box-shadow: 0 0 36px rgba(200, 161, 90, 0.18), 0 12px 32px rgba(0, 0, 0, 0.45);
}

.cta-main-action {
    min-width: min(100%, 24rem);
    padding: 1rem 3rem;
    color: #050505;
    border-color: rgba(200, 161, 90, 0.72);
    background:
        linear-gradient(180deg, rgba(243, 237, 226, 0.16), rgba(243, 237, 226, 0)),
        var(--gold);
    box-shadow:
        0 0 42px rgba(200, 161, 90, 0.18),
        0 16px 42px rgba(0, 0, 0, 0.42);
}

.cta-main-action:hover {
    color: #050505;
    background:
        linear-gradient(180deg, rgba(243, 237, 226, 0.24), rgba(243, 237, 226, 0.02)),
        #d7b269;
}

.cta-secondary-actions .btn-ghost {
    opacity: 0.82;
}

/* ══ Scroll Reveal Animations ════════════════════════════════════ */
.p-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s var(--ease-cinema),
        transform 0.9s var(--ease-cinema);
    will-change: transform, opacity;
}

.p-reveal.p-visible {
    opacity: 1;
    transform: translateY(0);
}

.p-reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition:
        opacity 1s var(--ease-cinema),
        transform 1s var(--ease-cinema);
    will-change: transform, opacity;
}

.p-reveal-left.p-visible {
    opacity: 1;
    transform: translateX(0);
}

.p-reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition:
        opacity 1s var(--ease-cinema),
        transform 1s var(--ease-cinema);
    will-change: transform, opacity;
}

.p-reveal-right.p-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delay helpers */
.p-d1  { transition-delay: 0.05s; }
.p-d2  { transition-delay: 0.15s; }
.p-d3  { transition-delay: 0.25s; }
.p-d4  { transition-delay: 0.38s; }
.p-d5  { transition-delay: 0.52s; }

/* ══ Reduced Motion ══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .p-reveal,
    .p-reveal-left,
    .p-reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .stage-bg img,
    .stage-bg video {
        transform: none !important;
    }
}

/* ══ Mobile Responsive ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .proceso-timeline {
        display: none;
    }

    .proceso-hero {
        height: auto;
        min-height: 140px;
        padding-top: 2.85rem;
    }

    .proceso-hero__content {
        padding: 1rem 1.5rem 1.5rem;
    }

    .proceso-stage {
        min-height: 80vh;
    }

    .stage-bg img,
    .stage-bg video {
        will-change: auto;
    }

    /* On mobile: single column, text at bottom with padding */
    .stage-content {
        display: block;    /* override grid */
        padding: 0 clamp(1.25rem, 6vw, 2rem) 3.4rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    /* All stages: strong bottom gradient to ensure text readability */
    .proceso-stage .stage-overlay {
        background:
            linear-gradient(to bottom,
                rgba(5,5,5,0.3) 0%,
                rgba(5,5,5,0.05) 35%,
                rgba(5,5,5,0.7) 70%,
                rgba(5,5,5,0.92) 100%) !important;
    }

    /* Remove column placement on mobile (irrelevant in flex) */
    .stage-text-col {
        grid-column: unset;
        max-width: 100%;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .glass-panel {
        padding: 1.45rem clamp(1.25rem, 5vw, 1.65rem);
        width: 100%;
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stage-body {
        max-width: 100%;
        font-size: 0.98rem;
        line-height: 1.78;
        text-align: center;
    }

    .dye-chips {
        justify-content: center;
    }

    .gold-rule,
    .closing-mark {
        align-self: center;
    }

    .proceso-hero__title,
    .stage-title,
    .cta-title {
        text-align: center;
        width: 100%;
    }

    .stage-title {
        font-size: clamp(1.45rem, 7.2vw, 1.95rem);
        letter-spacing: 0.1em;
        margin-bottom: 1.15rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-ghost {
        width: min(100%, 18rem);
    }

    .cta-main-action {
        width: min(100%, 22rem);
    }

    .cta-secondary-actions {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    #stage-04 .stage-content {
        padding-bottom: 2.5rem;
    }

    #stage-04 .stage-bg video {
        object-position: 70% center;
    }
}

@media (max-width: 480px) {
    .stage-number {
        font-size: 0.58rem;
    }

    .stage-title {
        letter-spacing: 0.1em;
    }

    .proceso-hero__title {
        letter-spacing: 0.1em;
    }
}
