/* gamelicense.info - Frost Cabinet Design */

/* CSS Custom Properties */
:root {
    --peat-black: #0c1210;
    --glacier-whisper: #d4e4e8;
    --frozen-lichen: #1a2e2a;
    --tallow-amber: #d4a24e;
    --spore-green: #4a7c5e;
    --submerged-pearl: #a7d3de;
    --wick-red: #8b3a2a;
    --crystalline-edge: #e8f4f7;
    --candle-glow: #e8c56d;
    --wax-brown: #3a2a1a;
    --bounce-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--peat-black);
    color: var(--glacier-whisper);
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ==================== FROST OVERLAY ==================== */
#frost-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.frost-crystal {
    position: absolute;
    background: rgba(232, 244, 247, 0.06);
    clip-path: polygon(50% 0%, 80% 20%, 100% 50%, 80% 80%, 50% 100%, 20% 80%, 0% 50%, 20% 20%);
}

.frost-tl-1 {
    top: -40px;
    left: -30px;
    width: 200px;
    height: 180px;
    transform: rotate(15deg);
}

.frost-tl-2 {
    top: 20px;
    left: 60px;
    width: 120px;
    height: 100px;
    transform: rotate(-25deg);
    background: rgba(232, 244, 247, 0.04);
}

.frost-tr-1 {
    top: -20px;
    right: -40px;
    width: 250px;
    height: 200px;
    transform: rotate(-10deg);
}

.frost-tr-2 {
    top: 40px;
    right: 80px;
    width: 100px;
    height: 90px;
    transform: rotate(30deg);
    background: rgba(232, 244, 247, 0.03);
}

.frost-bl-1 {
    bottom: -30px;
    left: -20px;
    width: 160px;
    height: 140px;
    transform: rotate(45deg);
    background: rgba(232, 244, 247, 0.04);
}

.frost-br-1 {
    bottom: -20px;
    right: -30px;
    width: 180px;
    height: 160px;
    transform: rotate(-20deg);
    background: rgba(232, 244, 247, 0.05);
}

/* ==================== BUBBLES ==================== */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(232, 244, 247, 0.4) 0%, rgba(167, 211, 222, 0.1) 60%, transparent 100%);
    backdrop-filter: blur(2px);
    will-change: transform;
    animation: bubble-rise linear forwards;
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--wobble, 30px));
        opacity: 0;
    }
}

/* ==================== ZONE 1: THE THAW ==================== */
#zone-thaw {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--peat-black);
    overflow: hidden;
}

.thaw-frost-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(232, 244, 247, 0.15) 0%, rgba(26, 46, 42, 0.3) 40%, transparent 70%);
    opacity: 0.9;
    z-index: 10;
    animation: frost-melt 1200ms ease-out forwards;
    pointer-events: none;
}

@keyframes frost-melt {
    0% { opacity: 0.9; }
    100% { opacity: 0.15; }
}

.thaw-title {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: -0.03em;
    color: var(--glacier-whisper);
    text-shadow: 0 0 40px rgba(167, 211, 222, 0.3);
    z-index: 20;
    animation: bounce-enter-title 800ms var(--bounce-easing) forwards;
    transform: scale(1.15);
    opacity: 0;
    text-align: center;
    padding: 0 2rem;
}

@keyframes bounce-enter-title {
    0% {
        transform: scale(1.15);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.thaw-tagline {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--submerged-pearl);
    z-index: 20;
    opacity: 0;
    animation: fade-in-tagline 800ms ease-out 1500ms forwards;
    margin-top: 1.5rem;
    text-align: center;
}

@keyframes fade-in-tagline {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0.8; transform: translateY(0); }
}

.ice-crack {
    position: absolute;
    top: 50%;
    left: 5%;
    width: 90%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(232, 244, 247, 0.2) 20%, rgba(167, 211, 222, 0.15) 50%, rgba(232, 244, 247, 0.2) 80%, transparent 100%);
    z-index: 5;
    transform: translateY(-50px);
}

/* Candle Styles */
.candle {
    position: absolute;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.candle-left {
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
}

.candle-right {
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
}

.candle-wax {
    width: 16px;
    height: 60px;
    background: linear-gradient(180deg, var(--wax-brown) 0%, #2a1c12 100%);
    border-radius: 3px 3px 4px 4px;
}

.candle-wax-large {
    width: 24px;
    height: 100px;
}

.candle-flame {
    position: relative;
    width: 20px;
    height: 40px;
    margin-bottom: -4px;
}

.candle-flame-large {
    width: 40px;
    height: 80px;
}

.flame-outer {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 36px;
    background: radial-gradient(ellipse at 50% 80%, var(--tallow-amber) 0%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flame-flicker 3s ease-in-out infinite;
}

.flame-outer-large {
    width: 40px;
    height: 72px;
}

.flame-mid {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 26px;
    background: radial-gradient(ellipse at 50% 80%, var(--candle-glow) 0%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flame-flicker 2.5s ease-in-out infinite 0.3s;
}

.flame-mid-large {
    width: 24px;
    height: 52px;
}

.flame-core {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 16px;
    background: radial-gradient(ellipse at 50% 80%, var(--crystalline-edge) 0%, rgba(232, 244, 247, 0.5) 50%, transparent 80%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flame-flicker 2s ease-in-out infinite 0.6s;
}

.flame-core-large {
    width: 12px;
    height: 32px;
}

@keyframes flame-flicker {
    0%, 100% {
        transform: translateX(-50%) scaleX(1) scaleY(1) skewX(0deg);
    }
    25% {
        transform: translateX(-50%) scaleX(0.9) scaleY(1.05) skewX(2deg);
    }
    50% {
        transform: translateX(-50%) scaleX(1.05) scaleY(0.95) skewX(-1deg);
    }
    75% {
        transform: translateX(-50%) scaleX(0.95) scaleY(1.02) skewX(1.5deg);
    }
}

/* ==================== ZONE 2: SPECIMEN DRAWERS ==================== */
#zone-specimens {
    position: relative;
    padding: 15vh 0;
    min-height: 200vh;
    display: flex;
    flex-direction: column;
    gap: 15vh;
    background: linear-gradient(180deg, var(--peat-black) 0%, var(--frozen-lichen) 30%, var(--frozen-lichen) 70%, var(--peat-black) 100%);
}

.specimen-drawer {
    position: relative;
    background: rgba(26, 46, 42, 0.7);
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(232, 244, 247, 0.15);
    border-radius: 8px;
    padding: 3rem 3rem 2rem;
    margin-left: 8vw;
    overflow: hidden;
    opacity: 0;
    transform: translateY(60px);
    transition: none;
}

.specimen-drawer.animated {
    animation: bounce-enter 800ms var(--bounce-easing) forwards;
}

.drawer-1 {
    width: 55%;
    max-width: 700px;
}

.drawer-2 {
    width: 62%;
    max-width: 780px;
}

.drawer-3 {
    width: 70%;
    max-width: 860px;
}

@keyframes bounce-enter {
    0% {
        transform: translateY(60px);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.specimen-label {
    position: absolute;
    top: -1px;
    left: 16px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7fb5a3;
    background: rgba(26, 46, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--crystalline-edge);
    border-top: none;
    padding: 0.3rem 0.8rem;
    border-radius: 0 0 4px 4px;
    transform: rotate(-2deg);
    transform-origin: top left;
}

.candle-aura {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(212, 162, 78, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.drawer-title {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.03em;
    color: var(--glacier-whisper);
    text-shadow: 0 0 30px rgba(167, 211, 222, 0.2);
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.drawer-body {
    color: #b8cfd6;
    font-weight: 300;
    line-height: 1.75;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.specimen-code {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tallow-amber);
    opacity: 0.7;
}

/* ==================== ZONE 3: ROOT NETWORK ==================== */
#zone-network {
    position: relative;
    padding: 15vh 8vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--peat-black);
}

.network-container {
    width: 100%;
    max-width: 1200px;
    opacity: 0;
    transform: translateY(60px);
}

.network-container.animated {
    animation: bounce-enter 800ms var(--bounce-easing) forwards;
}

#mycelium-svg {
    width: 100%;
    height: auto;
    animation: network-breathe 6s ease-in-out infinite;
}

@keyframes network-breathe {
    0%, 100% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
}

.mycelium-path {
    stroke: var(--spore-green);
    stroke-width: 1.5;
    fill: none;
    stroke-opacity: 0.5;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease-out;
    animation: mycelium-pulse 5s ease-in-out infinite;
}

.mycelium-path.drawn {
    stroke-dashoffset: 0;
}

@keyframes mycelium-pulse {
    0%, 100% { stroke-opacity: 0.4; }
    50% { stroke-opacity: 0.8; }
}

.spore {
    fill: var(--tallow-amber);
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.spore.visible {
    opacity: 1;
    animation: spore-pulse 3s ease-in-out infinite;
}

@keyframes spore-pulse {
    0%, 100% { opacity: 0.6; r: 3; }
    50% { opacity: 1; r: 5; }
}

.node-bg {
    fill: rgba(26, 46, 42, 0.7);
    stroke: rgba(232, 244, 247, 0.2);
    stroke-width: 1;
}

.node-text {
    font-family: 'Dela Gothic One', cursive;
    font-size: 16px;
    fill: var(--glacier-whisper);
}

.node-text-sm {
    font-size: 13px;
}

.node-text-sub {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    fill: var(--submerged-pearl);
    opacity: 0.7;
}

/* ==================== ZONE 4: DEEP FREEZE ==================== */
#zone-freeze {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--peat-black);
    padding: 10vh 8vw 20vh;
}

.freeze-candle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.freeze-text {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--glacier-whisper);
    text-shadow: 0 0 30px rgba(212, 162, 78, 0.3);
    text-align: center;
    opacity: 0;
    transform: translateY(60px);
}

.freeze-text.animated {
    animation: bounce-enter 800ms var(--bounce-easing) forwards;
}

.deep-darkness {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    background: linear-gradient(180deg, transparent 0%, var(--peat-black) 100%);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .candle-left,
    .candle-right {
        display: none;
    }

    .specimen-drawer {
        margin-left: 5vw;
        margin-right: 5vw;
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .drawer-1,
    .drawer-2,
    .drawer-3 {
        width: auto;
        max-width: none;
    }

    .specimen-label {
        font-size: 0.6rem;
        position: relative;
        top: auto;
        left: auto;
        display: inline-block;
        margin-bottom: 1rem;
        transform: rotate(-1deg);
    }

    #zone-network {
        padding: 10vh 4vw;
    }

    .node-text {
        font-size: 12px;
    }

    .node-text-sm {
        font-size: 10px;
    }

    .node-text-sub {
        font-size: 9px;
    }
}
