/* ===================================================================
   bada.day - Sepia-Drenched Retro-Futurism
   Color Palette: #1A1208, #2A1F14, #3D2A18, #8B6914, #C8956A, #D4A854, #F2E4C8, #FFF5E6
   Fonts: Share Tech Mono, Orbitron, Inconsolata
   =================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #1A1208;
    color: #F2E4C8;
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.7;
    letter-spacing: 0.04em;
    overflow-x: hidden;
    position: relative;
}

/* --- Scan-Line Overlay (::before on body) --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(26, 18, 8, 0.04) 2px,
        rgba(26, 18, 8, 0.04) 3px
    );
}

/* --- Vignette Layer (::after on body) --- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    box-shadow: inset 0 0 150px 60px rgba(26, 18, 8, 0.5);
}

/* --- Gradients (as CSS custom props) --- */
:root {
    --sepia-fade: linear-gradient(180deg, #2A1F14 0%, #1A1208 100%);
    --amber-bloom: radial-gradient(circle at 50% 50%, #C8956A33 0%, transparent 70%);
    --bubble-fill: radial-gradient(circle at 30% 30%, #D4A85466 0%, #C8956A22 60%, transparent 100%);
    --deep-ground: #1A1208;
    --primary-bg: #2A1F14;
    --secondary-bg: #3D2A18;
    --mid-tone: #8B6914;
    --primary-accent: #C8956A;
    --secondary-accent: #D4A854;
    --light-surface: #F2E4C8;
    --highlight: #FFF5E6;
}

/* --- Blur-Focus Element Base --- */
.blur-focus-element {
    filter: blur(8px);
    transform: scale(1.03);
    opacity: 0.85;
    transition: filter 600ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 600ms cubic-bezier(0.23, 1, 0.32, 1),
                opacity 600ms cubic-bezier(0.23, 1, 0.32, 1);
    will-change: filter, transform, opacity;
}

.blur-focus-element.in-focus {
    filter: blur(0px);
    transform: scale(1.0);
    opacity: 1.0;
}

/* --- Angular Clip-Path Variations --- */
.angle-cut-1 { clip-path: polygon(3% 0, 100% 2%, 97% 100%, 0 96%); }
.angle-cut-2 { clip-path: polygon(0 3%, 98% 0, 100% 97%, 2% 100%); }
.angle-cut-3 { clip-path: polygon(2% 0, 100% 4%, 98% 100%, 0 95%); }
.angle-cut-4 { clip-path: polygon(0 2%, 97% 0, 100% 98%, 4% 100%); }
.angle-cut-5 { clip-path: polygon(1% 0, 100% 3%, 99% 100%, 0 97%); }
.angle-cut-6 { clip-path: polygon(0 1%, 99% 0, 100% 99%, 2% 100%); }
.angle-cut-7 { clip-path: polygon(3% 0, 100% 1%, 97% 100%, 0 98%); }
.angle-cut-8 { clip-path: polygon(0 4%, 98% 0, 100% 96%, 3% 100%); }
.angle-cut-9 { clip-path: polygon(4% 0, 100% 3%, 96% 100%, 0 97%); }
.angle-cut-10 { clip-path: polygon(0 2%, 96% 0, 100% 98%, 5% 100%); }

/* --- Bubble Column (persistent left sidebar) --- */
#bubble-column {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--bubble-fill);
    box-shadow: inset 0 -4px 8px rgba(26, 18, 8, 0.3);
    border: 1px solid rgba(200, 149, 106, 0.15);
    will-change: transform;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 245, 230, 0.4) 0%, transparent 100%);
}

/* --- Progress Bar --- */
#progress-bar {
    position: fixed;
    right: 16px;
    top: 10vh;
    height: 80vh;
    width: 2px;
    background: rgba(200, 149, 106, 0.4);
    z-index: 200;
}

#progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: #C8956A;
    transition: height 100ms linear;
}

.progress-tick {
    position: absolute;
    left: -4px;
    width: 10px;
    height: 2px;
    background: #C8956A;
    transform: rotate(15deg);
    opacity: 0.6;
}

/* --- Immersive Zone Base --- */
.immersive-zone {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 8vw, 6rem);
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-transform: uppercase;
    color: #C8956A;
    text-align: center;
    padding-top: 8vh;
    margin-bottom: 6vh;
}

/* ===================================================================
   SECTION 1: THE LENS
   =================================================================== */
#the-lens {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    position: relative;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
}

.lens-viewfinder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(70vw, 500px);
    height: min(70vw, 500px);
    border-radius: 50%;
    pointer-events: none;
}

.lens-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(200, 149, 106, 0.2);
}

.lens-ring-outer {
    inset: 0;
}

.lens-ring-inner {
    inset: 15%;
    border-color: rgba(200, 149, 106, 0.12);
}

.lens-blur-spotlight {
    position: absolute;
    inset: 5%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(200, 149, 106, 0.12) 0%, transparent 70%);
}

.hero-title {
    position: relative;
    z-index: 5;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-transform: uppercase;
    color: #FFF5E6;
    text-align: center;
}

.hero-char {
    display: inline-block;
    opacity: 0;
    filter: blur(6px);
    animation: charReveal 400ms ease-out forwards;
}

@keyframes charReveal {
    0% {
        opacity: 0;
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

.lens-subtitle {
    position: relative;
    z-index: 5;
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.02em;
    color: #C8956A;
    margin-top: 2rem;
    text-align: center;
}

/* ===================================================================
   SECTION 2: THE ARCHIVE
   =================================================================== */
#the-archive {
    min-height: 150vh;
    background: linear-gradient(180deg, #1A1208 0%, #2A1F14 30%, #2A1F14 70%, #1A1208 100%);
    position: relative;
    z-index: 9;
    padding: 0 80px 10vh 80px;
    clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
}

.archive-grid {
    display: flex;
    flex-direction: column;
    gap: 8vh;
    max-width: 900px;
    margin: 0 auto;
}

.archive-card {
    background: #3D2A18;
    padding: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.archive-card[data-drift="left"] {
    margin-right: 15%;
}

.archive-card[data-drift="right"] {
    margin-left: 15%;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #D4A854;
    margin-bottom: 1rem;
}

.card-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.7;
    color: #F2E4C8;
    letter-spacing: 0.04em;
}

.bubble-cluster {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 100px;
    height: 60px;
    pointer-events: none;
}

/* ===================================================================
   SECTION 3: THE DEPTH
   =================================================================== */
#the-depth {
    min-height: 120vh;
    background: linear-gradient(180deg, #1A1208 0%, #0f0b06 50%, #1A1208 100%);
    position: relative;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20vh;
    padding: 15vh 5vw;
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 93%);
}

.depth-atmosphere {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.depth-phrase {
    position: relative;
    z-index: 2;
    text-align: center;
}

.depth-phrase span {
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C8956A;
    display: inline-block;
}

.depth-phrase-2 span {
    color: #D4A854;
    font-size: clamp(1rem, 3vw, 2rem);
}

.depth-phrase-3 span {
    color: #FFF5E6;
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
}

/* ===================================================================
   SECTION 4: THE SIGNAL
   =================================================================== */
#the-signal {
    min-height: 130vh;
    background: linear-gradient(180deg, #1A1208 0%, #3D2A18 20%, #3D2A18 80%, #1A1208 100%);
    position: relative;
    z-index: 7;
    padding: 0 80px 10vh 80px;
    clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
}

/* Enhanced scan-line in THE SIGNAL */
#the-signal::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(26, 18, 8, 0.08) 2px,
        rgba(26, 18, 8, 0.08) 3px
    );
}

.signal-terminal {
    display: flex;
    flex-direction: column;
    gap: 6vh;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.terminal-panel {
    background: rgba(26, 18, 8, 0.6);
    border: 1px solid rgba(139, 105, 20, 0.3);
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(139, 105, 20, 0.25);
}

.terminal-label {
    font-family: 'Inconsolata', monospace;
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.02em;
    color: #D4A854;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #C8956A;
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 2;
    color: #F2E4C8;
    letter-spacing: 0.04em;
}

/* ===================================================================
   SECTION 5: THE SURFACE
   =================================================================== */
#the-surface {
    min-height: 100vh;
    background: linear-gradient(180deg, #1A1208 0%, #2A1F14 30%, #3D2A18 60%, #2A1F14 100%);
    position: relative;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10vh 5vw;
    clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
}

#surface-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.macro-bubble {
    position: relative;
    z-index: 2;
    width: clamp(100px, 20vw, 200px);
    height: clamp(100px, 20vw, 200px);
    border-radius: 50%;
    background: var(--bubble-fill);
    box-shadow: inset 0 -6px 12px rgba(26, 18, 8, 0.3);
    border: 1px solid rgba(200, 149, 106, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2vh 0;
}

.macro-bubble::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 245, 230, 0.35) 0%, transparent 100%);
}

.macro-bubble-1 {
    align-self: flex-start;
    margin-left: 15vw;
}

.macro-bubble-2 {
    align-self: flex-end;
    margin-right: 15vw;
}

.macro-bubble-3 {
    align-self: flex-start;
    margin-left: 25vw;
}

.macro-bubble-text {
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.02em;
    color: #F2E4C8;
    text-align: center;
    padding: 1rem;
    text-transform: uppercase;
}

.surface-domain {
    position: relative;
    z-index: 3;
    margin-top: 8vh;
}

.surface-domain-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #FFF5E6;
    text-shadow: 0 0 40px rgba(200, 149, 106, 0.3), 0 0 80px rgba(200, 149, 106, 0.15);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 768px) {
    #the-archive {
        padding: 0 20px 10vh 20px;
    }

    .archive-card[data-drift="left"],
    .archive-card[data-drift="right"] {
        margin-left: 0;
        margin-right: 0;
    }

    #the-signal {
        padding: 0 20px 10vh 20px;
    }

    #bubble-column {
        width: 40px;
    }

    .macro-bubble-1 {
        margin-left: 5vw;
    }

    .macro-bubble-2 {
        margin-right: 5vw;
    }

    .macro-bubble-3 {
        margin-left: 10vw;
    }
}

/* ===================================================================
   ANIMATION KEYFRAMES
   =================================================================== */
@keyframes bubbleRise {
    0% {
        transform: translateY(100vh) translateX(0px) scale(1);
        opacity: 0;
    }
    5% {
        opacity: var(--bubble-opacity, 0.3);
    }
    95% {
        opacity: var(--bubble-opacity, 0.3);
    }
    100% {
        transform: translateY(-100px) translateX(var(--drift-amount, 10px)) scale(1);
        opacity: 0;
    }
}

@keyframes bubbleDrift {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(var(--drift-amount, 15px));
    }
}

@keyframes floatMacro {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(-5px) translateX(-5px);
    }
    75% {
        transform: translateY(-15px) translateX(3px);
    }
}

.macro-bubble {
    animation: floatMacro 12s ease-in-out infinite;
}

.macro-bubble-2 {
    animation-delay: -4s;
    animation-duration: 15s;
}

.macro-bubble-3 {
    animation-delay: -8s;
    animation-duration: 18s;
}
