/* ============================================
   a6c.xyz -- Cyberpunk Sanctuary
   Translucent Frost Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Core Palette */
    --void-obsidian: #0a0e17;
    --midnight-slate: #141b2d;
    --glacial-whisper: #e8eff6;
    --neon-celadon: #4dffd2;
    --phantom-violet: #9b72ff;
    --frozen-rose: #ff6b9d;
    --frost-white: #dfe6ed;
    --mist-grey: #7a8ba3;
    --deep-bg: #0f1623;

    /* Frost panel */
    --frost-bg-start: rgba(232, 239, 246, 0.14);
    --frost-bg-end: rgba(232, 239, 246, 0.06);
    --frost-blur: 20px;
    --frost-opacity: 1;

    /* Atmospheric */
    --glow-cyan-opacity: 0.08;
    --glow-violet-opacity: 0.06;
    --atmosphere-shift: 0;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--void-obsidian);
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    color: var(--frost-white);
    background-color: var(--void-obsidian);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* --- Zone Navigation --- */
.zone-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.zone-nav:hover,
.zone-nav.visible {
    opacity: 1;
}

.zone-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(223, 230, 237, 0.3);
    background: rgba(223, 230, 237, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
    outline: none;
}

.zone-dot:hover {
    background: rgba(77, 255, 210, 0.3);
    border-color: var(--neon-celadon);
}

.zone-dot.active {
    background: var(--neon-celadon);
    border-color: var(--neon-celadon);
    box-shadow:
        0 0 6px rgba(77, 255, 210, 0.6),
        0 0 16px rgba(77, 255, 210, 0.3);
    animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(77, 255, 210, 0.6), 0 0 16px rgba(77, 255, 210, 0.3); }
    50% { box-shadow: 0 0 10px rgba(77, 255, 210, 0.8), 0 0 24px rgba(77, 255, 210, 0.4); }
}

/* --- Zone Base --- */
.zone {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Atmosphere Glow --- */
.atmosphere-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.1s linear;
}

/* --- Enso Circles (background watermarks) --- */
.enso {
    position: absolute;
    width: 50vw;
    max-width: 500px;
    height: auto;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

/* --- Frost Panel --- */
.frost-panel {
    background: linear-gradient(135deg, var(--frost-bg-start), var(--frost-bg-end));
    backdrop-filter: blur(var(--frost-blur)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--frost-blur)) saturate(1.4);
    border: 1px solid rgba(232, 239, 246, 0.08);
    border-radius: 16px;
    padding: 40px 44px;
    max-width: 680px;
    width: 100%;
    position: relative;
    z-index: 5;
    transition: backdrop-filter 0.4s ease, background 0.4s ease;
}

.frost-panel:hover {
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    background: linear-gradient(135deg, rgba(232, 239, 246, 0.16), rgba(232, 239, 246, 0.08));
}

/* --- Fade Reveal --- */
.fade-reveal {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
}

/* --- Typography --- */
.body-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--frost-white);
    margin-bottom: 1.2em;
}

.body-text:last-child {
    margin-bottom: 0;
}

.text-accent {
    color: var(--neon-celadon);
    font-weight: 600;
}

.panel-label {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--mist-grey);
    opacity: 0.5;
    text-shadow: 0 0 8px rgba(77, 255, 210, 0.3);
    margin-bottom: 12px;
}

.panel-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    letter-spacing: -0.02em;
    color: var(--frost-white);
    margin-bottom: 16px;
}

/* --- Glow Line SVGs --- */
.glow-line-svg {
    filter: drop-shadow(0 0 4px rgba(77, 255, 210, 0.6)) drop-shadow(0 0 12px rgba(77, 255, 210, 0.2));
}

/* ============================================
   ZONE 1: THE ROOFTOP (100vh)
   ============================================ */
.zone-rooftop {
    height: 100vh;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0e17 0%, #141b2d 40%, #0f1623 70%, #0a0e17 100%);
}

.rooftop-glow {
    width: 50vw;
    height: 50vw;
    max-width: 700px;
    max-height: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(77, 255, 210, 0.08) 0%, transparent 70%);
}

.taegeuk {
    position: absolute;
    width: 40vw;
    max-width: 400px;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.06;
    z-index: 1;
    animation: taegeuk-rotate 60s linear infinite;
}

.taegeuk-arc {
    filter: drop-shadow(0 0 4px rgba(77, 255, 210, 0.4)) drop-shadow(0 0 12px rgba(77, 255, 210, 0.15));
}

.taegeuk-violet {
    filter: drop-shadow(0 0 4px rgba(155, 114, 255, 0.4)) drop-shadow(0 0 12px rgba(155, 114, 255, 0.15));
}

@keyframes taegeuk-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.rooftop-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.rooftop-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(4rem, 8vw, 7rem);
    color: var(--frost-white);
    opacity: 0.7;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.rooftop-tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    color: var(--mist-grey);
    letter-spacing: 0.08em;
}

.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--mist-grey);
    opacity: 0.5;
    z-index: 5;
    animation: chevron-pulse 2.5s ease-in-out infinite;
}

@keyframes chevron-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

/* ============================================
   ZONE 2: THE SIGNAL (120vh)
   ============================================ */
.zone-signal {
    min-height: 120vh;
    background: linear-gradient(180deg, #0a0e17 0%, #141b2d 40%, #0f1623 70%, #0a0e17 100%);
    padding: 15vh 24px;
}

.signal-glow {
    width: 60vw;
    height: 40vw;
    max-width: 800px;
    max-height: 500px;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(77, 255, 210, 0.06) 0%, transparent 70%);
}

.enso-30 {
    top: 10%;
    right: 5%;
}

.zone-signal .zone-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 960px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.signal-panel {
    flex: 1;
    max-width: 680px;
}

.signal-illustration {
    flex-shrink: 0;
    width: 160px;
}

.signal-illustration .glow-line-svg {
    width: 100%;
    height: auto;
}

/* ============================================
   ZONE 3: THE ARCHIVE (140vh)
   ============================================ */
.zone-archive {
    min-height: 140vh;
    background: linear-gradient(180deg, #0a0e17 0%, #0f1623 30%, #141b2d 60%, #0a0e17 100%);
    padding: 15vh 24px;
}

.archive-glow {
    width: 50vw;
    height: 50vw;
    max-width: 700px;
    max-height: 700px;
    top: 40%;
    left: 40%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(155, 114, 255, 0.06) 0%, transparent 70%);
}

.enso-60 {
    top: 15%;
    left: 8%;
}

.archive-content {
    display: flex;
    flex-direction: column;
    gap: 14vh;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.archive-panel {
    max-width: 580px;
}

.archive-panel.panel-left {
    align-self: flex-start;
    margin-left: 0;
}

.archive-panel.panel-right {
    align-self: flex-end;
    margin-right: 0;
}

/* Dancheong micro-pattern inside archive panels */
.archive-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(155, 114, 255, 0.03) 10px,
            rgba(155, 114, 255, 0.03) 11px
        );
    pointer-events: none;
    z-index: 0;
}

.archive-panel > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   ZONE 4: THE GARDEN (120vh)
   ============================================ */
.zone-garden {
    min-height: 120vh;
    background: linear-gradient(180deg, #0a0e17 0%, #141b2d 40%, #0f1623 70%, #0a0e17 100%);
    padding: 15vh 24px;
}

.hanok-curve {
    position: absolute;
    top: 5vh;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 2;
    pointer-events: none;
}

.garden-glow {
    width: 55vw;
    height: 45vw;
    max-width: 750px;
    max-height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(77, 255, 210, 0.07) 0%, rgba(155, 114, 255, 0.04) 40%, transparent 70%);
}

.enso-85 {
    bottom: 10%;
    right: 10%;
    top: auto;
}

.garden-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 5;
}

.garden-illustration-left,
.garden-illustration-right {
    flex-shrink: 0;
    width: 100px;
}

.garden-illustration-left .glow-line-svg,
.garden-illustration-right .glow-line-svg {
    width: 100%;
    height: auto;
}

.garden-panel {
    flex: 1;
    max-width: 680px;
}

.garden-heading {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ============================================
   ZONE 5: THE THRESHOLD (100vh)
   ============================================ */
.zone-threshold {
    height: 100vh;
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0e17 0%, #141b2d 50%, #0a0e17 100%);
}

.threshold-glow {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 107, 157, 0.03) 0%, transparent 70%);
}

.enso-95 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.threshold-content {
    text-align: center;
    position: relative;
    z-index: 5;
    max-width: 700px;
}

.threshold-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--frost-white);
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin-bottom: 30px;
}

.threshold-subtext {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    color: var(--mist-grey);
    line-height: 1.8;
}

/* ============================================
   ZONE 6: THE SEAL (80vh)
   ============================================ */
.zone-seal {
    height: 80vh;
    min-height: 80vh;
    background: var(--void-obsidian);
}

.seal-glow {
    width: 30vw;
    height: 30vw;
    max-width: 400px;
    max-height: 400px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(77, 255, 210, 0.05) 0%, transparent 70%);
}

.enso-100 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.04;
}

.seal-content {
    text-align: center;
    position: relative;
    z-index: 5;
}

.seal-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    color: var(--frost-white);
    text-shadow:
        0 0 10px rgba(77, 255, 210, 0.5),
        0 0 30px rgba(77, 255, 210, 0.3),
        0 0 60px rgba(77, 255, 210, 0.15);
    margin-bottom: 40px;
}

.seal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 50px;
}

.holo-readout {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--mist-grey);
    opacity: 0.5;
    text-shadow: 0 0 8px rgba(77, 255, 210, 0.3);
}

.readout-value {
    color: var(--neon-celadon);
    opacity: 0.7;
}

.seal-footer {
    margin-top: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .zone-nav {
        right: 12px;
        gap: 12px;
    }

    .zone-dot {
        width: 8px;
        height: 8px;
    }

    .zone-signal .zone-content {
        flex-direction: column;
        gap: 40px;
    }

    .signal-illustration {
        width: 120px;
        order: -1;
    }

    .frost-panel {
        padding: 28px 24px;
    }

    .garden-content {
        flex-direction: column;
        gap: 30px;
    }

    .garden-illustration-left,
    .garden-illustration-right {
        width: 80px;
    }

    .archive-panel.panel-left,
    .archive-panel.panel-right {
        align-self: center;
    }

    .seal-links {
        gap: 10px;
    }

    .rooftop-title {
        font-size: clamp(2.8rem, 10vw, 5rem);
    }
}

@media (max-width: 480px) {
    .frost-panel {
        padding: 24px 20px;
    }

    .garden-illustration-left,
    .garden-illustration-right {
        display: none;
    }

    .taegeuk {
        width: 60vw;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .fade-reveal {
        opacity: 1;
        transition: none;
    }

    .taegeuk {
        animation: none;
    }

    .scroll-chevron {
        animation: none;
        opacity: 0.5;
    }

    .zone-dot.active {
        animation: none;
    }

    .atmosphere-glow {
        transition: none;
    }
}
