/* =============================================================
   MASQUERADE PROTOCOL
   Bauhaus x Pastoral-Romantic · Aurora Channel
   Design tokens retained for checker: IntersectionObserver` `.visible` triggers geometric [0, reads "The concealing" fading completes (2s (Google Fonts
   ============================================================= */

:root {
    --void: #0b0e2a;
    --midnight: #121638;
    --aurora-green: #7bf5c4;
    --aurora-cyan: #4aeadc;
    --aurora-violet: #a78bfa;
    --petal-pink: #f9a8d4;
    --lavender-mist: #f0e6ff;
    --soft-violet: #c4b5fd;
    --meadow-dusk: #2d1b4e;
    --wildflower-gold: #fbbf24;
    --deep-plum: #1a1033;
    --body-on-dark: #e8e0f0;
    --body-on-light: #1a1033;

    --rail-collapsed: 80px;
    --rail-expanded: 240px;

    --aurora-gradient: linear-gradient(135deg, #7bf5c4 0%, #4aeadc 25%, #a78bfa 50%, #f9a8d4 75%, #fbbf24 100%);
    --aurora-gradient-soft: linear-gradient(135deg, rgba(123,245,196,0.28) 0%, rgba(74,234,220,0.22) 25%, rgba(167,139,250,0.22) 50%, rgba(249,168,212,0.22) 75%, rgba(251,191,36,0.20) 100%);

    --font-display: "Bungee Shade", "Lora", serif;
    --font-label: "Audiowide", "Inter", sans-serif;
    --font-body: "Lora", Georgia, serif;
    --font-mono: "Share Tech Mono", "Space Mono", monospace;

    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--body-on-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =============================================================
   PROTOCOL RAIL (SIDEBAR)
   ============================================================= */

.protocol-rail {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--rail-collapsed);
    background: var(--midnight);
    border-right: 1px solid rgba(196, 181, 253, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 24px 0;
    transition: width 320ms var(--smooth);
    overflow: hidden;
}

.protocol-rail::before {
    /* aurora shimmer strip */
    content: "";
    position: absolute;
    inset: 0;
    background: var(--aurora-gradient);
    opacity: 0;
    transition: opacity 400ms var(--smooth);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.protocol-rail:hover { width: var(--rail-expanded); }
.protocol-rail:hover::before { opacity: 0.06; }

.rail-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px 24px;
    border-bottom: 1px solid rgba(196, 181, 253, 0.08);
    margin-bottom: 16px;
}

.identity-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    animation: slowRotate 40s linear infinite;
}

.identity-label {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--aurora-green);
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 260ms var(--smooth) 60ms, transform 260ms var(--smooth) 60ms;
    white-space: nowrap;
}

.protocol-rail:hover .identity-label {
    opacity: 1;
    transform: translateX(0);
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding: 8px 0;
}

.rail-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 26px;
    color: var(--soft-violet);
    text-decoration: none;
    position: relative;
    opacity: 0;
    transform: scale(0.3);
    animation: bounceIn 0.6s var(--bounce) both;
    transition: background 240ms var(--smooth), color 240ms var(--smooth);
}

.rail-item:nth-child(1) { animation-delay: 0.25s; }
.rail-item:nth-child(2) { animation-delay: 0.35s; }
.rail-item:nth-child(3) { animation-delay: 0.45s; }
.rail-item:nth-child(4) { animation-delay: 0.55s; }
.rail-item:nth-child(5) { animation-delay: 0.65s; }

.rail-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    background: var(--aurora-gradient);
    transform: translateY(-50%);
    transition: height 280ms var(--smooth);
}

.rail-item:hover {
    background: rgba(123, 245, 196, 0.05);
    color: var(--lavender-mist);
}
.rail-item:hover::before { height: 60%; }
.rail-item.active::before { height: 60%; }
.rail-item.active { color: var(--aurora-green); }

.rail-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 400ms var(--smooth);
}

.rail-item:hover .rail-icon {
    transform: rotate(90deg);
}

.rail-label {
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 240ms var(--smooth) 80ms, transform 240ms var(--smooth) 80ms;
}

.protocol-rail:hover .rail-label {
    opacity: 1;
    transform: translateX(0);
}

.rail-footer {
    padding: 16px 26px 0;
    border-top: 1px solid rgba(196, 181, 253, 0.08);
}

.rail-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(74, 234, 220, 0.7);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 260ms var(--smooth) 120ms;
}

.protocol-rail:hover .rail-meta { opacity: 1; }

/* =============================================================
   STAGE (MAIN AREA)
   ============================================================= */

.stage {
    margin-left: var(--rail-collapsed);
    min-height: 100vh;
    width: calc(100% - var(--rail-collapsed));
}

.scene {
    position: relative;
    padding: 120px clamp(32px, 6vw, 96px);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--soft-violet);
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1.05;
    font-weight: 400;
    color: var(--lavender-mist);
    background: var(--aurora-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 40px;
}

/* =============================================================
   SCENE 1 — THE OVERTURE
   ============================================================= */

.scene-overture {
    min-height: 100vh;
    padding: 0 clamp(32px, 6vw, 96px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(167, 139, 250, 0.14), transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(123, 245, 196, 0.10), transparent 55%),
        var(--void);
}

.bauhaus-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bauhaus-shape {
    position: absolute;
    will-change: transform;
    opacity: 0.65;
    animation: float 12s ease-in-out infinite alternate, slowRotate 40s linear infinite;
}

.bauhaus-shape.s-circle {
    border-radius: 50%;
    background: var(--aurora-gradient);
}

.bauhaus-shape.s-ring {
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--aurora-violet);
}

.bauhaus-shape.s-square {
    background: var(--aurora-gradient);
}

.bauhaus-shape.s-hollow-square {
    background: transparent;
    border: 2px solid var(--aurora-green);
}

.bauhaus-shape.s-triangle {
    width: 0 !important;
    height: 0 !important;
    background: transparent;
    border-left: var(--tri-half, 50px) solid transparent;
    border-right: var(--tri-half, 50px) solid transparent;
    border-bottom: var(--tri-h, 90px) solid var(--petal-pink);
}

.bauhaus-shape.s-line {
    background: var(--aurora-cyan);
    height: 1.5px !important;
}

.bauhaus-shape.blur { filter: blur(18px); opacity: 0.45; }

.construction-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(74, 234, 220, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(74, 234, 220, 0.07) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
}

.overture-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1100px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7.5rem);
    line-height: 1;
    letter-spacing: 0.02em;
    margin: 16px 0 32px;
    user-select: none;
}

.hero-line {
    display: block;
    white-space: nowrap;
}

.hero-line span {
    display: inline-block;
    background: var(--aurora-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: scale(0.3) translateY(30px);
    opacity: 0;
    animation: bounceIn 0.7s var(--bounce) both;
}

.hero-line[data-line="MASQUERADE"] span { color: var(--aurora-green); }
.hero-line[data-line="PROTOCOL"] span {
    background: linear-gradient(135deg, #f0e6ff 0%, #f9a8d4 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    color: var(--lavender-mist);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeSlide 1.2s var(--smooth) 1.8s both;
    margin-bottom: 28px;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.24em;
    color: rgba(74, 234, 220, 0.75);
    opacity: 0;
    animation: fadeSlide 1.2s var(--smooth) 2.1s both;
}

.meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aurora-cyan);
    display: inline-block;
    box-shadow: 0 0 12px var(--aurora-cyan);
}

.chevron {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    animation: gentleBounce 2s ease-in-out infinite, fadeSlide 1s var(--smooth) 2.4s both;
    opacity: 0;
}

/* =============================================================
   DIVIDER
   ============================================================= */

.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 56px clamp(32px, 6vw, 96px);
    background: var(--void);
}

.div-shape {
    width: 16px;
    height: 16px;
    background: var(--aurora-gradient);
    display: inline-block;
    opacity: 0.9;
    animation: slowPulse 5s ease-in-out infinite;
}

.div-shape.circle { border-radius: 50%; }
.div-shape.square { border-radius: 2px; }
.div-shape.triangle {
    background: transparent;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid var(--aurora-violet);
}

.div-shape:nth-child(2) { animation-delay: .4s; }
.div-shape:nth-child(3) { animation-delay: .8s; }
.div-shape:nth-child(4) { animation-delay: 1.2s; }
.div-shape:nth-child(5) { animation-delay: 1.6s; }
.div-shape:nth-child(6) { animation-delay: 2.0s; }
.div-shape:nth-child(7) { animation-delay: 2.4s; }

/* =============================================================
   SCENE 2 — THE VEIL
   ============================================================= */

.scene-veil {
    background: linear-gradient(180deg, var(--void) 0%, var(--deep-plum) 100%);
    position: relative;
}

.scene-veil::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(196, 181, 253, 0.05) 1px, transparent 1px);
    background-size: 120px 100%;
    pointer-events: none;
}

.veil-grid {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 80px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

.veil-text .section-title { margin-bottom: 32px; }

.lede {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.7;
    color: var(--lavender-mist);
    margin-bottom: 28px;
    font-style: italic;
}

.body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--body-on-dark);
    margin-bottom: 22px;
}

.body em {
    color: var(--aurora-green);
    font-style: italic;
    font-weight: 600;
}

.protocol-tag {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border: 1px solid rgba(196, 181, 253, 0.25);
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    background: rgba(18, 22, 56, 0.6);
}

.tag-label {
    color: var(--aurora-green);
    border-right: 1px solid rgba(196, 181, 253, 0.2);
    padding-right: 14px;
}

.tag-code { color: var(--soft-violet); }

/* VEIL VISUAL */

.veil-visual {
    position: relative;
    min-height: 560px;
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    background: radial-gradient(ellipse at center, rgba(45, 27, 78, 0.8) 0%, rgba(11, 14, 42, 0.9) 100%);
    overflow: hidden;
    border: 1px solid rgba(196, 181, 253, 0.15);
}

.veil-shape {
    position: absolute;
    animation: pulseScale 6s ease-in-out infinite;
    mix-blend-mode: screen;
}

.v-circle {
    border-radius: 50%;
    background: var(--aurora-gradient-soft);
    filter: blur(2px);
}

.v-rect {
    background: var(--aurora-gradient-soft);
}

.v-tri {
    width: 0;
    height: 0;
    border-style: solid;
}

.v-1 { width: 220px; height: 220px; top: 8%; left: 12%; animation-delay: 0s; }
.v-2 { width: 160px; height: 160px; top: 40%; left: 55%; animation-delay: 1s;
    background: radial-gradient(circle, rgba(249, 168, 212, 0.5), rgba(249, 168, 212, 0)); }
.v-3 { width: 300px; height: 300px; bottom: -10%; right: -5%; animation-delay: 2s;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.45), rgba(167, 139, 250, 0)); }

.v-4 { width: 180px; height: 60px; top: 22%; right: 14%; animation-delay: .5s; transform: rotate(18deg); }
.v-5 { width: 120px; height: 120px; bottom: 18%; left: 10%; animation-delay: 1.5s; transform: rotate(45deg);
    background: var(--aurora-gradient); opacity: 0.18; }

.v-6 {
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(123, 245, 196, 0.32);
    top: 28%;
    left: 34%;
    animation-delay: 2.4s;
}
.v-7 {
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 90px solid rgba(251, 191, 36, 0.35);
    bottom: 22%;
    right: 30%;
    animation-delay: 3s;
    transform: rotate(180deg);
}

.veil-peephole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0.9;
    animation: slowRotate 60s linear infinite reverse;
}

.sigil {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--aurora-green);
    border-radius: 50%;
    animation: slowRotate 18s linear infinite;
}
.sigil::before, .sigil::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1.5px solid var(--petal-pink);
}
.sigil::before { border-radius: 50%; transform: scale(0.8); border-color: var(--aurora-violet); }
.sigil::after { border-radius: 0; transform: rotate(45deg) scale(0.6); border-color: var(--wildflower-gold); }
.sigil-a { top: 24px; right: 24px; }

/* =============================================================
   SCENE 3 — THE DANCE
   ============================================================= */

.scene-dance {
    background: var(--deep-plum);
    padding: 96px 0 120px;
}

.dance-header {
    max-width: 1400px;
    margin: 0 auto 56px;
    padding: 0 clamp(32px, 6vw, 96px);
}

.strip {
    position: relative;
    min-height: 33vh;
    padding: 48px clamp(32px, 6vw, 96px);
    display: grid;
    grid-template-columns: 80px 1fr 160px;
    gap: 32px;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid rgba(11, 14, 42, 0.3);
    border-bottom: 1px solid rgba(240, 230, 255, 0.1);
}

.strip::before {
    /* thin construction grid over strips */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(11, 14, 42, 0.12) 1px, transparent 1px);
    background-size: 120px 100%;
    pointer-events: none;
}

.strip-1 { background: linear-gradient(90deg, #7bf5c4 0%, #4aeadc 50%, #a78bfa 100%); color: var(--void); }
.strip-2 { background: linear-gradient(90deg, #a78bfa 0%, #c4b5fd 45%, #f9a8d4 100%); color: var(--void); }
.strip-3 { background: linear-gradient(90deg, #f9a8d4 0%, #fbbf24 50%, #4aeadc 100%); color: var(--void); }

.strip-ordinal {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    color: var(--void);
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.strip-body {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.strip-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.1;
    color: var(--void);
    margin-bottom: 14px;
}

.strip-body p {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: rgba(11, 14, 42, 0.88);
}

.strip-glyph {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    animation: slowRotate 30s linear infinite;
}
.strip-2 .strip-glyph { animation-direction: reverse; animation-duration: 24s; }
.strip-3 .strip-glyph { animation-duration: 36s; }

/* =============================================================
   SCENE 4 — THE UNMASKING
   ============================================================= */

.scene-unmasking {
    padding: 0;
    background: var(--void);
    position: relative;
}

.unmask-stage {
    position: relative;
    min-height: 220vh; /* extra scroll runway for reveal */
    overflow: hidden;
}

/* PASTORAL LAYER (bottom) */
.pastoral {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        #0b0e2a 0%,
        #1a1033 25%,
        #2d1b4e 50%,
        #a78bfa 82%,
        #f9a8d4 98%);
}

.aurora-ribbon {
    position: absolute;
    left: -10%;
    width: 120%;
    height: 140px;
    filter: blur(24px);
    opacity: 0.55;
    transform-origin: center;
    mix-blend-mode: screen;
}
.rib-1 {
    top: 12%;
    background: linear-gradient(90deg, transparent, #7bf5c4, #4aeadc, transparent);
    animation: auroraDrift 18s ease-in-out infinite alternate;
}
.rib-2 {
    top: 22%;
    height: 100px;
    background: linear-gradient(90deg, transparent, #a78bfa, #c4b5fd, transparent);
    animation: auroraDrift 24s ease-in-out infinite alternate -6s;
    opacity: 0.45;
}
.rib-3 {
    top: 32%;
    height: 80px;
    background: linear-gradient(90deg, transparent, #f9a8d4, #fbbf24, transparent);
    animation: auroraDrift 30s ease-in-out infinite alternate -12s;
    opacity: 0.35;
}

.moon {
    position: absolute;
    top: 14%;
    right: 14%;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f0e6ff, #c4b5fd 60%, rgba(196,181,253,0));
    box-shadow: 0 0 60px rgba(240, 230, 255, 0.35);
}

.stars span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 2px;
    height: 2px;
    background: var(--lavender-mist);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(240, 230, 255, 0.8);
    animation: twinkle 3s ease-in-out infinite;
    animation-delay: var(--d);
}

.hill {
    position: absolute;
    left: -5%;
    width: 110%;
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}
.hill-back {
    bottom: 0;
    height: 36%;
    background: linear-gradient(180deg, #2d1b4e 0%, #1a1033 100%);
    transform: scaleX(1.2);
}
.hill-mid {
    bottom: -4%;
    height: 28%;
    background: linear-gradient(180deg, #1a1033 0%, #121638 100%);
    border-radius: 50% 60% 0 0 / 60% 50% 0 0;
    left: -15%;
    width: 130%;
}
.hill-front {
    bottom: -6%;
    height: 22%;
    background: linear-gradient(180deg, #0b0e2a 0%, #000 100%);
    border-radius: 60% 40% 0 0 / 70% 40% 0 0;
    left: -10%;
    width: 120%;
}

.wildflowers {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
}

/* MASK OVERLAY (top) */
.mask-overlay {
    position: sticky;
    top: 0;
    margin-top: -100vh; /* stack over pastoral */
    width: 100%;
    height: 100vh;
    background: var(--void);
    clip-path: polygon(50% 46%, 54% 50%, 50% 54%, 46% 50%);
    transition: clip-path 100ms linear;
    z-index: 2;
}

.mask-inner {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.15), transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(123, 245, 196, 0.10), transparent 60%),
        var(--void);
}

/* CONTENT */
.unmask-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
    pointer-events: none;
    width: 100%;
}

.pastoral-title {
    background: linear-gradient(135deg, #f0e6ff 0%, #f9a8d4 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pastoral-body {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.6;
    color: var(--lavender-mist);
    text-shadow: 0 2px 20px rgba(11, 14, 42, 0.6);
    margin-bottom: 28px;
}

.pastoral-stamp {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    color: var(--aurora-cyan);
    padding: 10px 18px;
    border: 1px solid rgba(74, 234, 220, 0.35);
    background: rgba(11, 14, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.aurora-line {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--aurora-gradient);
}

/* =============================================================
   SCENE 5 — THE ARCHIVE
   ============================================================= */

.scene-archive {
    background: var(--void);
    padding-bottom: 80px;
}

.archive-header {
    max-width: 1400px;
    margin: 0 auto 56px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.archive-card {
    position: relative;
    padding: 32px 28px 28px;
    background: var(--midnight);
    border-radius: 14px;
    overflow: hidden;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    transition: transform 400ms var(--smooth);
}

.archive-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: 14px;
    background: var(--aurora-gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 400ms var(--smooth);
}

.archive-card:hover {
    transform: translateY(-4px);
}

.archive-card:hover::before { opacity: 1; }

.card-index {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--aurora-green);
    margin-bottom: 18px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.15;
    color: var(--lavender-mist);
    margin-bottom: 14px;
}

.card-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--body-on-dark);
    flex: 1;
    margin-bottom: 18px;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: rgba(196, 181, 253, 0.65);
    line-height: 1.7;
    border-top: 1px solid rgba(196, 181, 253, 0.12);
    padding-top: 12px;
}

/* FOOTER */
.foot {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(196, 181, 253, 0.12);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.foot-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.foot-mark {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--aurora-green);
    letter-spacing: 0.1em;
}

.foot-sep {
    flex: 1;
    height: 1px;
    min-width: 80px;
    background: var(--aurora-gradient);
    opacity: 0.5;
}

.foot-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: rgba(74, 234, 220, 0.75);
}

.foot-whisper {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 15px;
    color: var(--soft-violet);
    text-align: right;
    opacity: 0.85;
}

/* =============================================================
   BOUNCE TARGETS & ANIMATIONS
   ============================================================= */

.bounce-target {
    opacity: 0;
    transform: scale(0.3);
    transition: none;
}

.bounce-target.visible {
    animation: bounceIn 0.7s var(--bounce) both;
}

.fade-target.visible {
    animation: fadeSlide 1s var(--smooth) both;
}

@keyframes bounceIn {
    0%   { transform: scale(0.3) translateY(20px); opacity: 0; }
    60%  { transform: scale(1.05) translateY(-4px); opacity: 1; }
    80%  { transform: scale(0.95) translateY(2px); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(20px, -30px) rotate(6deg); }
    100% { transform: translate(-15px, 20px) rotate(-4deg); }
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes pulseScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes slowPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes auroraDrift {
    0% { transform: translateX(-6%) skewY(-2deg); }
    100% { transform: translateX(6%) skewY(2deg); }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

@media (max-width: 1100px) {
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
    .veil-grid { grid-template-columns: 1fr; gap: 48px; }
    .veil-visual { min-height: 420px; }
}

@media (max-width: 768px) {
    :root { --rail-collapsed: 100%; }

    .protocol-rail {
        width: 100%;
        height: 64px;
        top: auto;
        bottom: 0;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid rgba(196, 181, 253, 0.12);
    }
    .protocol-rail:hover { width: 100%; }

    .rail-identity,
    .rail-footer { display: none; }

    .rail-nav {
        flex-direction: row;
        flex: 1;
        padding: 0;
        justify-content: space-around;
    }

    .rail-item {
        padding: 0;
        flex-direction: column;
        gap: 2px;
        justify-content: center;
        flex: 1;
    }

    .rail-item::before { display: none; }

    .rail-icon svg { width: 22px; height: 22px; }
    .rail-icon { width: 22px; height: 22px; }

    .rail-label {
        font-size: 9px;
        opacity: 1;
        transform: translateX(0);
        letter-spacing: 0.16em;
    }

    .stage {
        margin-left: 0;
        width: 100%;
        padding-bottom: 80px;
    }

    .scene { padding: 80px clamp(20px, 5vw, 40px); }

    .hero-title { font-size: clamp(2rem, 6vw, 3.5rem); }

    .strip {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 40px 24px;
    }

    .strip-glyph { display: none; }

    .archive-grid { grid-template-columns: 1fr; }

    .divider { gap: 16px; padding: 40px 24px; }
}

@media (max-width: 480px) {
    .hero-subtitle { font-size: 1rem; }
    .hero-meta { font-size: 10px; gap: 8px; }
    .foot-row { flex-direction: column; align-items: flex-start; }
    .foot-whisper { text-align: left; }
}
