/* ============================================================
   MasqproT.com v2 — Avant-garde fashion editorial / protocol intercept
   Colors: Void Black #0a0a0a, Bone White #f2efe8, Arterial Red #c41e3a,
           Graphite Mist #2a2a2f, Tarnished Silver #8a8a92,
           Parchment Cream #e8e0d0, Bruise Violet #4a2040,
           Dark Fabric #121216
   Fonts: Anybody (variable display), Libre Baskerville (body), Azeret Mono (accent)
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background: #0a0a0a;
}

body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.72;
    color: #f2efe8;
    background: #0a0a0a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: #4a2040;
    color: #f2efe8;
}

/* --- NAVIGATION: garment-care-label strip --- */
.nav-strip {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    mix-blend-mode: difference;
}

.nav-word {
    font-family: 'Azeret Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #8a8a92;
    text-decoration: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 12px 10px;
    transition: color 0.4s ease;
    display: block;
}

.nav-word:hover {
    color: #c41e3a;
}

.nav-word.active {
    color: #c41e3a;
}

/* --- PROTOCOL ANNOTATIONS --- */
.protocol-annotations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.proto-note {
    position: absolute;
    font-family: 'Azeret Mono', monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8a92;
    opacity: 0.35;
}

.proto-note--a { top: 8%; left: 3%; }
.proto-note--b { top: 28%; right: 8%; }
.proto-note--c { top: 52%; left: 5%; }
.proto-note--d { top: 73%; right: 4%; }
.proto-note--e { top: 15%; left: 78%; }
.proto-note--f { top: 90%; left: 12%; }

/* --- SLASH MARKS --- */
.slash-group {
    position: absolute;
    pointer-events: none;
    z-index: 20;
}

.slash-group--top {
    top: -20px;
    left: 10%;
    width: 200px;
    height: 80px;
    background: repeating-linear-gradient(
        18deg,
        transparent,
        transparent 14px,
        #8a8a92 14px,
        #8a8a92 15px,
        transparent 15px,
        transparent 29px
    );
    opacity: 0.5;
}

.slash-group--bottom {
    bottom: 40px;
    right: 15%;
    width: 160px;
    height: 60px;
    background: repeating-linear-gradient(
        -22deg,
        transparent,
        transparent 12px,
        #8a8a92 12px,
        #8a8a92 13px,
        transparent 13px,
        transparent 25px
    );
    opacity: 0.4;
}

.slash-group--mid {
    top: 30%;
    right: 20%;
    width: 120px;
    height: 70px;
    background: repeating-linear-gradient(
        15deg,
        transparent,
        transparent 10px,
        #8a8a92 10px,
        #8a8a92 11px,
        transparent 11px,
        transparent 21px
    );
    opacity: 0.35;
}

.slash-group--diagonal {
    top: 15%;
    left: 60%;
    width: 180px;
    height: 90px;
    background: repeating-linear-gradient(
        -20deg,
        transparent,
        transparent 16px,
        #8a8a92 16px,
        #8a8a92 17px,
        transparent 17px,
        transparent 33px
    );
    opacity: 0.4;
}

/* --- FABRIC FOLD TEXTURE (dark sections) --- */
.opening__fabric,
.h-panel__fabric {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 25% 30%, #121216 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 75% 70%, #121216 0%, transparent 65%),
        radial-gradient(ellipse 90% 40% at 50% 85%, #121216 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 10% 55%, #0a0a0a 0%, transparent 80%);
}

/* Content sections also get subtle fabric folds */
.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 40%, #121216 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 80% 65%, #121216 0%, transparent 60%);
    opacity: 0.5;
}

.content-section.section--parchment::before {
    background:
        radial-gradient(ellipse 70% 50% at 20% 40%, #d8d0c0 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 80% 65%, #dcd4c4 0%, transparent 60%);
    opacity: 0.3;
}

/* ============================================================
   OPENING SEQUENCE
   ============================================================ */
.opening {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    overflow: hidden;
}

.opening__letterform {
    position: absolute;
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-stretch: 50%;
    font-size: 70vw;
    text-transform: uppercase;
    color: #f2efe8;
    opacity: 0.04;
    line-height: 0.85;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

.opening__line {
    width: 60%;
    height: 2px;
    position: relative;
    z-index: 10;
}

.opening__line-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawLine 2s ease-out 1.2s forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.opening__title {
    position: relative;
    z-index: 10;
    margin-top: 20px;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.opening__title .letter {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 6vw, 80px);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #f2efe8;
    display: inline-block;
    font-stretch: calc(var(--w) * 1%);
    opacity: 0;
    animation: letterFadeIn 0.5s ease forwards;
    animation-delay: calc(3.2s + var(--i) * 0.15s);
}

@keyframes letterFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.opening__protocol {
    font-family: 'Azeret Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #c41e3a;
    margin-top: 30px;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: protocolFadeIn 1s ease forwards 4.8s;
}

@keyframes protocolFadeIn {
    to { opacity: 1; }
}

.opening__chevron {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: chevronPulse 3s ease-in-out infinite 5.5s;
    opacity: 0;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* ============================================================
   CONTENT SECTIONS — broken grid, magazine-spread
   ============================================================ */
.content-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0a0a0a;
}

.content-section.section--parchment {
    background: #e8e0d0;
}

/* Cropped letterforms as masks */
.section__letterform {
    position: absolute;
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-stretch: 50%;
    font-size: clamp(40vw, 60vw, 80vw);
    text-transform: uppercase;
    color: #f2efe8;
    opacity: 0.04;
    line-height: 0.8;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.section--odd .section__letterform {
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
}

.section--even .section__letterform {
    left: -15%;
    top: 50%;
    transform: translateY(-50%);
}

.section__letterform--dark {
    color: #0a0a0a;
    opacity: 0.03;
}

/* Heading wrapper for positioning */
.section__heading-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Section headings — oversized architectural type */
.section__heading {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-stretch: 50%;
    font-size: clamp(20vw, 25vw, 35vw);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #f2efe8;
    opacity: 0.07;
    line-height: 0.85;
    position: absolute;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transition: font-stretch 0.8s ease-out;
}

.section--odd .section__heading {
    left: -5%;
    top: 50%;
    transform: translateY(-50%);
}

.section--even .section__heading {
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
}

.section__heading--dark {
    color: #0a0a0a;
    opacity: 0.05;
}

.section__heading.font-expanded {
    font-stretch: 120%;
}

/* Body text columns — narrow corridors in ocean of space */
.section__body {
    position: relative;
    z-index: 10;
    max-width: 380px;
    padding: 60px 0;
}

.section__body--left {
    margin-left: 40%;
}

.section__body--right {
    margin-left: 15%;
}

.section__body--left-deep {
    margin-left: 70%;
    margin-right: 40px;
}

.section__body--right-deep {
    margin-left: 20%;
}

/* Proto labels */
.proto-label {
    font-family: 'Azeret Mono', monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8a92;
    display: block;
    margin-bottom: 24px;
}

.proto-label--dark {
    color: #2a2a2f;
}

.proto-label--panel {
    position: absolute;
    bottom: 40px;
    left: 40px;
}

/* Section text */
.section__text {
    color: #f2efe8;
    font-size: 17px;
    line-height: 1.72;
}

.section__text--dark {
    color: #2a2a2f;
}

.section__text p {
    margin-bottom: 24px;
}

.section__text p:last-child {
    margin-bottom: 0;
}

/* --- REDACTION BARS --- */
.redaction-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
}

.redaction-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.redaction-bar--light {
    background: #2a2a2f;
}

.redaction-wrap:hover .redaction-bar {
    transform: translateX(105%);
}

/* Slide back on mouse leave */
.redaction-wrap .redaction-bar {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.redaction-wrap:not(:hover) .redaction-bar {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.redaction-bar--wide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.redaction-content {
    position: relative;
    z-index: 1;
    display: inline;
}

/* Italic pull-quote style for redacted content */
.redaction-wrap .redaction-content {
    font-weight: 700;
    font-style: italic;
}

/* Content section reveal animations */
.content-section[data-reveal] .section__body {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content-section[data-reveal="left"] .section__body {
    transform: translateX(-100px);
}

.content-section[data-reveal="right"] .section__body {
    transform: translateX(100px);
}

.content-section.revealed .section__body {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animation delays for layered-depth effect */
.content-section[data-reveal] .section__letterform {
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.content-section.revealed .section__letterform {
    opacity: 0.04;
}

.content-section.section--parchment.revealed .section__letterform {
    opacity: 0.03;
}

.content-section[data-reveal] .slash-group {
    opacity: 0;
    transition: opacity 0.5s ease 0s;
}

.content-section.revealed .slash-group {
    opacity: 1;
}

/* Heading reveal with stagger */
.content-section[data-reveal] .section__heading {
    opacity: 0;
    transition: opacity 0.6s ease 0.15s, font-stretch 0.8s ease-out;
}

.content-section.revealed .section__heading {
    opacity: 0.07;
}

.content-section.section--parchment.revealed .section__heading {
    opacity: 0.05;
}

/* ============================================================
   HORIZONTAL INTERLUDE
   ============================================================ */
.horizontal-interlude {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    background: #0a0a0a;
}

.horizontal-track {
    display: flex;
    width: 400vw;
    height: 100vh;
}

.h-panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0a0a;
}

.h-panel__content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* Panel 1: IDENTITY — variable font cycling */
.h-panel--identity {
    background: #0a0a0a;
}

.h-panel__word {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 10vw, 120px);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #f2efe8;
    font-stretch: 50%;
    animation: widthCycle 4s ease-in-out infinite;
}

@keyframes widthCycle {
    0%, 100% { font-stretch: 50%; }
    50% { font-stretch: 150%; }
}

/* Panel 2: CONCEALMENT — redaction reveals */
.h-panel--concealment {
    background: #121216;
}

.h-panel__redaction-set {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.h-redaction {
    position: relative;
    overflow: hidden;
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(48px, 10vw, 120px);
    text-transform: uppercase;
    color: #f2efe8;
    cursor: pointer;
    letter-spacing: -0.02em;
}

.h-redaction .redaction-bar--wide {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.h-redaction:hover .redaction-bar--wide {
    transform: translateX(105%);
}

/* Panel 3: PROTOCOL — waterfall notation */
.h-panel--protocol {
    background: #0a0a0a;
}

.h-panel__waterfall {
    font-family: 'Azeret Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8a92;
    width: 80vw;
    height: 70vh;
    overflow: hidden;
    line-height: 2.4;
    text-align: left;
    opacity: 0.6;
    column-count: 3;
    column-gap: 40px;
}

/* Panel 4: REVELATION — convergence */
.h-panel--revelation {
    background: #0a0a0a;
}

.h-panel__content--revelation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.revelation-composite {
    position: relative;
    width: 100%;
    height: 100%;
}

.revelation-slashes {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 80%;
    background:
        repeating-linear-gradient(
            18deg,
            transparent,
            transparent 20px,
            #8a8a92 20px,
            #8a8a92 21px,
            transparent 21px,
            transparent 41px
        );
    opacity: 0.25;
    z-index: 1;
}

.revelation-letterform {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-stretch: 120%;
    font-size: 60vw;
    text-transform: uppercase;
    color: #f2efe8;
    opacity: 0.06;
    line-height: 0.8;
    z-index: 2;
}

.revelation-fabric {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 50% at 30% 40%, #121216 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 70% 60%, #121216 0%, transparent 55%);
    z-index: 3;
    pointer-events: none;
}

.revelation-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f2efe8;
    opacity: 0;
    z-index: 50;
    pointer-events: none;
    transition: opacity 2s ease;
}

.h-panel--revelation.fade-to-bone .revelation-fade {
    opacity: 1;
}

/* ============================================================
   CLOSING SEQUENCE — inverted opening, bone white
   ============================================================ */
.closing {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f2efe8;
    overflow: hidden;
}

.closing__line {
    width: 60%;
    height: 2px;
    position: relative;
    z-index: 10;
}

.closing__line svg {
    width: 100%;
    height: 100%;
}

.closing__line-path {
    stroke: #8a8a92;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s ease-out;
}

.closing__line-path.drawn {
    stroke-dashoffset: 0;
}

.closing__line.dissolving {
    transition: opacity 3s ease;
    opacity: 0;
}

.closing__title {
    position: relative;
    z-index: 10;
    margin-top: 20px;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.closing__title .letter {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 8vw, 100px);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #0a0a0a;
    display: inline-block;
    font-stretch: 120%;
    opacity: 0;
    transition: opacity 0.6s ease, font-stretch 5s ease;
}

.closing__title .letter.visible {
    opacity: 1;
}

.closing__title.condensing .letter {
    font-stretch: 40%;
}

.closing__title.vanishing .letter {
    opacity: 0;
    transition: opacity 2s ease;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 900px) {
    .section__body--left,
    .section__body--right,
    .section__body--left-deep,
    .section__body--right-deep {
        margin-left: 10%;
        margin-right: 10%;
        max-width: none;
    }

    .section__heading {
        font-size: clamp(15vw, 20vw, 30vw);
    }

    .nav-strip {
        display: none;
    }

    .h-panel__redaction-set {
        flex-direction: column;
    }

    .opening__title .letter {
        font-size: clamp(24px, 5vw, 60px);
    }
}

@media (max-width: 600px) {
    .section__body--left,
    .section__body--right,
    .section__body--left-deep,
    .section__body--right-deep {
        margin-left: 6%;
        margin-right: 6%;
    }

    .h-panel__waterfall {
        column-count: 1;
        width: 90vw;
    }

    .opening__letterform,
    .section__letterform {
        font-size: 80vw;
    }
}
