/* ============================================
   MUNJU.ORG — Dopamine Chrome Salon
   ============================================ */

/* --- Palette ---
   Deep Chrome-Black:  #1A1A28
   Medium Grey:        #4A4A58
   Chrome Grey:        #7A8090
   Chrome Silver:      #A0B0C0
   Pearl White:        #F4F6FA
   Chrome Highlight:   #D0D8E0
   Dopamine Coral:     #E06060
   -------------------------------------------- */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: #F4F6FA;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #4A4A58;
    background: #F4F6FA;
    overflow-x: hidden;
    position: relative;
    line-height: 1.85;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

/* --- Abstract-tech SVG background layer --- */
.tech-bg-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.10;
    pointer-events: none;
}

/* --- Module base --- */
.module {
    border: 1px solid #A0B0C0;
    background: #F4F6FA;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.module.revealed {
    opacity: 1;
    transform: translateY(0);
}

.module-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: #7A8090;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: block;
}

/* --- Chrome rule --- */
.chrome-rule {
    height: 1px;
    background: linear-gradient(90deg, #A0B0C0 0%, #D0D8E0 40%, #E06060 60%, #D0D8E0 80%, #A0B0C0 100%);
    margin: 1.2rem 0;
    background-size: 200% 100%;
    animation: chromeRuleShift 8s ease-in-out infinite alternate;
}

@keyframes chromeRuleShift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

/* === SALON ENTRANCE (first 100vh) === */
.salon-entrance {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 3vh 3vw 3vh 5vw;
}

.salon-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Module A: Identity */
.module-identity {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    padding: 3.5rem 3rem 2.5rem;
    background: #F4F6FA;
}

.salon-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: #1A1A28;
    line-height: 1.05;
    margin-top: 1rem;
    letter-spacing: -0.01em;
}

.title-dot {
    color: #E06060;
}

.title-tld {
    color: #7A8090;
    font-weight: 400;
}

.salon-tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: #4A4A58;
    max-width: 38ch;
}

/* Module B: Collage tall */
.module-collage-tall {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    min-height: 420px;
    background: #F4F6FA;
}

.collage-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.collage-gradient {
    background: linear-gradient(160deg, #D0D8E0 0%, transparent 50%, #F4F6FA 100%);
    opacity: 0.6;
}

.collage-shapes svg {
    width: 100%;
    height: 100%;
}

.collage-text-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.collage-word {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-style: italic;
    color: #A0B0C0;
    line-height: 1.1;
    position: relative;
}

.collage-word-1 {
    font-size: 3.2rem;
    opacity: 0.35;
    align-self: flex-start;
}

.collage-word-2 {
    font-size: 1.8rem;
    opacity: 0.25;
    align-self: flex-end;
    margin-top: 0.3rem;
}

.collage-word-3 {
    font-size: 2.4rem;
    opacity: 0.3;
    align-self: center;
    margin-top: 0.4rem;
    color: #E06060;
}

/* Module C: Data */
.module-data {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    padding: 1.8rem 2.2rem;
    background: #D0D8E0;
}

.data-rows {
    margin-top: 1rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px solid #A0B0C0;
}

.data-row:last-child {
    border-bottom: none;
}

.data-key {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.78rem;
    color: #4A4A58;
    letter-spacing: 0.06em;
}

.data-val {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1rem;
    color: #E06060;
}

/* Module D: Chrome accent */
.module-chrome-accent {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    padding: 1rem;
    background: linear-gradient(135deg, #F4F6FA 0%, #D0D8E0 50%, #F4F6FA 100%);
    background-size: 200% 200%;
    animation: chromeShimmerBg 6s ease-in-out infinite alternate;
    min-height: 180px;
}

@keyframes chromeShimmerBg {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.chrome-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(208, 216, 224, 0.4) 50%, transparent 100%);
    animation: shimmerSweep 5s ease-in-out infinite;
}

@keyframes shimmerSweep {
    0% { left: -60%; }
    100% { left: 100%; }
}

.accent-circuit {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

/* Module E: Collage wide */
.module-collage-wide {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    min-height: 160px;
    background: #F4F6FA;
    display: flex;
    align-items: flex-end;
}

.module-collage-wide .collage-layer {
    z-index: 0;
}

.collage-gradient-alt {
    background: linear-gradient(90deg, #D0D8E0 0%, transparent 40%, #F4F6FA 100%);
    opacity: 0.4;
}

.collage-composition svg {
    width: 100%;
    height: 100%;
}

.collage-caption {
    position: relative;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: #7A8090;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 1rem 1.5rem;
}

/* === LOWER SALON === */
.salon-lower {
    position: relative;
    z-index: 1;
    padding: 0 3vw 4vh 5vw;
}

.lower-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Module F: Manifesto */
.module-manifesto {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    padding: 3rem 3rem 2.5rem;
}

.manifesto-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #1A1A28;
    line-height: 1.2;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

.manifesto-heading em {
    color: #E06060;
    font-style: italic;
}

.manifesto-body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #4A4A58;
    max-width: 44ch;
}

/* Module G: Column */
.module-column {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    padding: 1.8rem 1.5rem;
    background: #1A1A28;
}

.module-column .module-label {
    color: #A0B0C0;
}

.column-entries {
    margin-top: 1.4rem;
}

.column-entry {
    margin-bottom: 1.2rem;
}

.entry-freq {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #D0D8E0;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.3rem;
}

.entry-bar {
    height: 3px;
    background: linear-gradient(90deg, #E06060 0%, #A0B0C0 100%);
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry-bar.animated {
    /* width set by JS via data-width attribute */
}

/* Module H: Fragment */
.module-fragment {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    padding: 2rem;
    min-height: 220px;
    background: #D0D8E0;
}

.fragment-layers {
    position: relative;
    width: 100%;
    height: 160px;
}

.fragment-rect {
    position: absolute;
}

.fragment-rect-1 {
    width: 55%;
    height: 70%;
    top: 0;
    left: 8%;
    border: 1px solid #A0B0C0;
    background: #F4F6FA;
    opacity: 0.7;
}

.fragment-rect-2 {
    width: 45%;
    height: 55%;
    top: 30%;
    left: 40%;
    border: 1px solid #E06060;
    background: transparent;
    opacity: 0.5;
}

.fragment-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #7A8090;
    top: 10%;
    right: 8%;
    opacity: 0.4;
}

.fragment-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.65rem;
    color: #7A8090;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    display: block;
    margin-top: 0.8rem;
}

/* Module I: Links */
.module-links {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    padding: 2rem 2.5rem;
}

.link-index {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
}

.draw-link {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #1A1A28;
    text-decoration: none;
    padding: 0.6rem 0;
    border-bottom: 1px solid #D0D8E0;
    position: relative;
    display: inline-block;
    background-image: linear-gradient(#E06060, #E06060);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.25s ease;
}

.draw-link:hover {
    background-size: 100% 1px;
    color: #1A1A28;
}

/* Module J: Collage large */
.module-collage-large {
    grid-column: 3 / 4;
    grid-row: 2 / 4;
    min-height: 340px;
}

.collage-gradient-deep {
    background: linear-gradient(200deg, #D0D8E0 0%, transparent 40%, #F4F6FA 70%, #D0D8E0 100%);
    opacity: 0.5;
}

.module-collage-large svg {
    width: 100%;
    height: 100%;
}

.collage-text-deep {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.deep-word {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    line-height: 1;
}

.deep-word-1 {
    font-size: 3.8rem;
    color: #A0B0C0;
    opacity: 0.25;
}

.deep-word-2 {
    font-size: 2rem;
    color: #E06060;
    opacity: 0.2;
    margin-top: 0.5rem;
}

/* Module K: Ticker */
.module-ticker {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    background: #1A1A28;
}

.ticker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7A8090;
    flex-shrink: 0;
}

.ticker-dot-active {
    background: #E06060;
    box-shadow: 0 0 6px rgba(224, 96, 96, 0.5);
    animation: tickerPulse 2s ease-in-out infinite;
}

@keyframes tickerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ticker-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    color: #A0B0C0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

/* === CLOSING SALON === */
.salon-close {
    position: relative;
    z-index: 1;
    padding: 0 3vw 6vh 5vw;
}

.close-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.module-closing {
    padding: 3.5rem 3rem;
    background: #F4F6FA;
}

.closing-mark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: #1A1A28;
}

.closing-dot {
    color: #E06060;
}

.closing-org {
    color: #7A8090;
    font-weight: 400;
}

.closing-rule {
    margin: 1.5rem 0;
}

.closing-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #4A4A58;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    margin-bottom: 1.5rem;
}

.closing-label {
    margin-top: 0.5rem;
}

.module-closing-collage {
    min-height: 240px;
    background: #D0D8E0;
}

.closing-gradient {
    background: linear-gradient(135deg, #D0D8E0 0%, #F4F6FA 50%, #D0D8E0 100%);
    opacity: 0.5;
}

.closing-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === CHROME SURFACE HIGHLIGHTS === */
.module::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(208, 216, 224, 0.15), transparent);
    pointer-events: none;
    transition: left 0.8s ease;
    z-index: 2;
}

.module:hover::before {
    left: 120%;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .salon-entrance {
        padding: 3vh 2vw;
    }

    .salon-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }

    .module-identity {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .module-chrome-accent {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }

    .module-collage-tall {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        min-height: 300px;
    }

    .module-data {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .module-collage-wide {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

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

    .module-manifesto {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .module-column {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
    }

    .module-fragment {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }

    .module-links {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    .module-collage-large {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
    }

    .module-ticker {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
    }

    .salon-lower {
        padding: 0 2vw 4vh;
    }

    .salon-close {
        padding: 0 2vw 6vh;
    }
}

@media (max-width: 640px) {
    .salon-grid,
    .lower-grid,
    .close-grid {
        grid-template-columns: 1fr;
    }

    .salon-grid > .module,
    .lower-grid > .module,
    .close-grid > .module {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .module-collage-tall {
        min-height: 260px;
    }

    .module-ticker {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .salon-entrance {
        padding: 2vh 1rem;
        align-items: flex-start;
        padding-top: 6vh;
    }

    .module-identity {
        padding: 2rem 1.5rem;
    }

    .salon-lower,
    .salon-close {
        padding: 0 1rem 4vh;
    }
}
