/* ============================================
   haru.club -- Cyberpunk Night-Market Editorial
   ============================================ */

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

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

body {
    background-color: #0A0E18;
    color: #D0D4DC;
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Noise Texture Overlay (Global) --- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Rain Simulation --- */
#rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #4080C0, transparent);
    opacity: 0;
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* --- Typography --- */
.display-text {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #D0D4DC;
}

.section-headline {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #D0D4DC;
    margin-bottom: 1.5rem;
}

.meta-tag {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: #5A6478;
    text-transform: uppercase;
}

.tagline {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #5A6478;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.tagline.visible {
    opacity: 1;
}

/* --- HERO SECTION --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    background-color: #0A0E18;
    overflow: hidden;
    z-index: 1;
}

.hero-left {
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5% 0 8%;
    position: relative;
    z-index: 2;
}

#hero-title {
    min-height: 1.2em;
    position: relative;
}

#hero-title .char {
    display: inline-block;
    opacity: 0;
    color: #3080D0;
    text-shadow: 0 0 20px rgba(48, 128, 208, 0.6);
    transition: color 0.6s ease, text-shadow 0.6s ease;
}

#hero-title .char.revealed {
    opacity: 1;
}

#hero-title .char.settled {
    color: #D0D4DC;
    text-shadow: none;
}

.hero-right {
    width: 35%;
    position: relative;
    z-index: 1;
}

.neon-wall {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        170deg,
        #141C28 0%,
        #1A1030 30%,
        #0A0E18 50%,
        rgba(48, 128, 208, 0.08) 70%,
        #141C28 100%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    position: relative;
}

.neon-wall::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.08;
    mix-blend-mode: overlay;
}

.neon-wall.visible {
    opacity: 1;
}

/* --- EDITORIAL SPREADS --- */
.editorial-spread {
    position: relative;
    padding: 100px 0;
    background-color: #141C28;
    overflow: hidden;
}

.editorial-spread:nth-child(even) {
    background-color: #0A0E18;
}

.spread-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    gap: 5%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.spread-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.spread-text-left .spread-text {
    width: 60%;
    max-width: 680px;
}

.spread-text-left .spread-visual {
    width: 35%;
}

.spread-text-right .spread-text {
    width: 60%;
    max-width: 680px;
}

.spread-text-right .spread-visual {
    width: 35%;
}

.spread-text-right .spread-content {
    flex-direction: row;
}

.spread-text p {
    margin-bottom: 1.5rem;
    color: #D0D4DC;
}

.spread-text .meta-tag {
    display: block;
    margin-bottom: 1rem;
}

/* --- Gradient Compositions --- */
.gradient-composition {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 2px;
    position: relative;
}

.gradient-composition::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.08;
    mix-blend-mode: overlay;
}

.comp-1 {
    background: linear-gradient(
        135deg,
        #0A0E18 0%,
        #1A1030 40%,
        #141C28 60%,
        rgba(48, 128, 208, 0.1) 80%,
        #0A0E18 100%
    );
}

.comp-2 {
    background: linear-gradient(
        200deg,
        #141C28 0%,
        rgba(224, 64, 160, 0.06) 30%,
        #1A1030 55%,
        #0A0E18 80%,
        rgba(48, 128, 208, 0.08) 100%
    );
}

.comp-3 {
    background: linear-gradient(
        160deg,
        #1A1030 0%,
        #0A0E18 35%,
        rgba(48, 128, 208, 0.12) 50%,
        #141C28 75%,
        #1A1030 100%
    );
}

.comp-4 {
    background: linear-gradient(
        240deg,
        #0A0E18 0%,
        rgba(224, 64, 160, 0.05) 25%,
        #141C28 50%,
        #1A1030 75%,
        rgba(48, 128, 208, 0.06) 100%
    );
}

.comp-5 {
    background: linear-gradient(
        180deg,
        #141C28 0%,
        #1A1030 30%,
        rgba(48, 128, 208, 0.1) 60%,
        #0A0E18 100%
    );
}

/* --- Circuit Border SVGs --- */
.circuit-border {
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 5;
}

.circuit-border-left {
    left: 0;
}

.circuit-border-right {
    right: 0;
}

.circuit-main {
    stroke: #3060A0;
    stroke-width: 2;
    stroke-opacity: 0.3;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    fill: none;
    transition: stroke-dashoffset 0.8s ease;
}

.circuit-branch {
    stroke: #3060A0;
    stroke-width: 2;
    stroke-opacity: 0.3;
    stroke-dasharray: 8;
    stroke-dashoffset: 8;
    fill: none;
}

.circuit-border.powered .circuit-main {
    stroke-dashoffset: 0;
}

.circuit-border.powered .circuit-branch {
    stroke-dashoffset: 0;
}

/* Stagger circuit branch animations */
.circuit-border.powered .circuit-branch:nth-child(2) { transition: stroke-dashoffset 0.4s ease 0.84s; }
.circuit-border.powered .circuit-branch:nth-child(3) { transition: stroke-dashoffset 0.4s ease 0.88s; }
.circuit-border.powered .circuit-branch:nth-child(4) { transition: stroke-dashoffset 0.4s ease 0.92s; }
.circuit-border.powered .circuit-branch:nth-child(5) { transition: stroke-dashoffset 0.4s ease 0.96s; }
.circuit-border.powered .circuit-branch:nth-child(6) { transition: stroke-dashoffset 0.4s ease 1.00s; }
.circuit-border.powered .circuit-branch:nth-child(7) { transition: stroke-dashoffset 0.4s ease 1.04s; }
.circuit-border.powered .circuit-branch:nth-child(8) { transition: stroke-dashoffset 0.4s ease 1.08s; }
.circuit-border.powered .circuit-branch:nth-child(9) { transition: stroke-dashoffset 0.4s ease 1.12s; }
.circuit-border.powered .circuit-branch:nth-child(10) { transition: stroke-dashoffset 0.4s ease 1.16s; }
.circuit-border.powered .circuit-branch:nth-child(11) { transition: stroke-dashoffset 0.4s ease 1.20s; }
.circuit-border.powered .circuit-branch:nth-child(12) { transition: stroke-dashoffset 0.4s ease 1.24s; }
.circuit-border.powered .circuit-branch:nth-child(13) { transition: stroke-dashoffset 0.4s ease 1.28s; }
.circuit-border.powered .circuit-branch:nth-child(14) { transition: stroke-dashoffset 0.4s ease 1.32s; }
.circuit-border.powered .circuit-branch:nth-child(15) { transition: stroke-dashoffset 0.4s ease 1.36s; }

/* --- PULL QUOTES --- */
.pull-quote-section {
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #0A0E18;
    position: relative;
    overflow: hidden;
}

.pull-quote {
    width: 80%;
    max-width: 900px;
    text-align: center;
}

.pull-quote p {
    font-family: 'Lexend', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: #5A6478;
    transition: color 0.3s ease 0.6s;
}

.pull-quote-section.lit .pull-quote p {
    color: #D0D4DC;
}

.pull-quote-line {
    width: 0;
    height: 2px;
    background-color: #E040A0;
    margin-top: 1.5rem;
    transition: width 0.6s ease;
}

.pull-quote-section.lit .pull-quote-line {
    width: 200px;
}

/* --- FULL-BLEED VISUALS --- */
.full-bleed-visual {
    width: 100%;
    height: 50vh;
    position: relative;
    overflow: hidden;
}

.bleed-gradient {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.bleed-1 {
    background: linear-gradient(
        var(--bleed-angle, 135deg),
        #0A0E18 0%,
        #1A1030 25%,
        #141C28 50%,
        rgba(48, 128, 208, 0.1) 75%,
        #0A0E18 100%
    );
}

.bleed-2 {
    background: linear-gradient(
        var(--bleed-angle, 200deg),
        #141C28 0%,
        rgba(224, 64, 160, 0.08) 30%,
        #1A1030 60%,
        #0A0E18 100%
    );
}

.bleed-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.08;
    mix-blend-mode: overlay;
}

/* --- BASS-PULSE FOOTER --- */
#footer {
    background-color: #0A0E18;
    padding: 120px 5% 80px;
    text-align: center;
    position: relative;
}

#footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        #3060A0 30%,
        #3060A0 70%,
        transparent
    );
    opacity: 0.3;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#footer-title {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.01em;
    color: #D0D4DC;
    animation: bass-pulse 2s ease-in-out infinite;
}

@keyframes bass-pulse {
    0%, 100% {
        transform: scale(1.0);
        text-shadow: 0 0 20px rgba(48, 128, 208, 0.1);
    }
    50% {
        transform: scale(1.02);
        text-shadow: 0 0 40px rgba(48, 128, 208, 0.2);
    }
}

.footer-sub {
    margin-top: 0.5rem;
}

.footer-credits {
    margin-top: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    #hero {
        flex-direction: column;
    }

    .hero-left {
        width: 100%;
        height: 65%;
        padding: 0 8%;
    }

    .hero-right {
        width: 100%;
        height: 35%;
    }

    .spread-content {
        flex-direction: column !important;
    }

    .spread-text-left .spread-text,
    .spread-text-right .spread-text,
    .spread-text-left .spread-visual,
    .spread-text-right .spread-visual {
        width: 100%;
    }

    .spread-visual {
        order: -1;
    }

    .gradient-composition {
        min-height: 200px;
    }

    .pull-quote {
        width: 90%;
    }

    .circuit-border {
        display: none;
    }
}

@media (max-width: 600px) {
    .display-text {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section-headline {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .editorial-spread {
        padding: 60px 0;
    }

    .spread-content {
        padding: 0 6%;
    }
}
