/* namu.day — Surreal Ethereal-Blue Hexagonal Garden
   Fonts: "Albert Sans", "Source Sans 3", "Courier Prime" (Google Fonts) */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #EEF2F8;
    color: #3A4860;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   Scene
   ======================================== */

#scene {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ========================================
   Vector Art Decorations
   ======================================== */

.vector-deco {
    position: fixed;
    width: 180px;
    height: 180px;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 2.5s ease;
}

.vector-deco.visible {
    opacity: 0.12;
}

#deco-top-left {
    top: 30px;
    left: 25px;
}

#deco-top-right {
    top: 30px;
    right: 25px;
}

#deco-bottom-left {
    bottom: 30px;
    left: 25px;
}

#deco-bottom-right {
    bottom: 30px;
    right: 25px;
}

/* ========================================
   Ambient Particles
   ======================================== */

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #6080B0;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(40px);
    }
}

/* ========================================
   Hero Section
   ======================================== */

#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

#hero-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

#hero-title {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    color: #5070A0;
    letter-spacing: 0.15em;
    min-height: 1.2em;
}

#hero-cursor {
    width: 3px;
    height: clamp(2.5rem, 6vw, 5rem);
    background-color: #5070A0;
    margin-left: 4px;
    animation: cursorBlink 0.8s step-end infinite;
}

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

#hero-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: #6080B0;
    letter-spacing: 0.08em;
    text-align: center;
    min-height: 1.5em;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#hero-subtitle.visible {
    opacity: 1;
}

/* ========================================
   Wave Form Borders
   ======================================== */

.wave-border {
    width: 100%;
    padding: 10px 0;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.wave-border svg {
    width: 100%;
    height: 40px;
    display: block;
}

.wave-border-inner svg {
    height: 30px;
}

.wave-path {
    animation: waveOscillate 6s ease-in-out infinite alternate;
    transform-origin: center;
}

.wave-path-2 {
    animation: waveOscillate2 8s ease-in-out infinite alternate;
}

@keyframes waveOscillate {
    0% { transform: translateX(0); }
    100% { transform: translateX(-20px); }
}

@keyframes waveOscillate2 {
    0% { transform: translateX(0); }
    100% { transform: translateX(15px); }
}

/* ========================================
   Hex Garden Grid
   ======================================== */

#hex-garden {
    padding: 40px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hex-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: -30px;
    flex-wrap: wrap;
}

.hex-row-odd {
    margin-left: 0;
}

.hex-row-even {
    margin-left: 0;
}

.hex-cell {
    width: 260px;
    height: 280px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-color: #F4F6FA;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.4s ease;
    flex-shrink: 0;
}

.hex-cell.visible {
    opacity: 1;
    transform: scale(1);
}

.hex-cell:hover {
    background-color: #EBF0F8;
}

.hex-cell-feature {
    background-color: #E8EDF5;
}

.hex-cell-feature:hover {
    background-color: #E0E7F2;
}

.hex-inner {
    padding: 50px 28px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hex-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    opacity: 0.7;
    color: #508070;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hex-cell:hover .hex-icon {
    opacity: 1;
    transform: scale(1.1);
}

.hex-title {
    font-family: 'Albert Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: #1A2840;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.hex-text {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(0.7rem, 0.85vw, 0.82rem);
    color: #5070A0;
    line-height: 1.6;
    min-height: 3.2em;
}

/* ========================================
   Closing Section
   ======================================== */

#closing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

#closing-content {
    text-align: center;
}

#closing-text {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: #5070A0;
    letter-spacing: 0.05em;
    min-height: 1.5em;
    margin-bottom: 40px;
}

#closing-sigil {
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6) rotate(-30deg);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

#closing-sigil.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

#closing-sigil svg {
    width: 80px;
    height: 80px;
    color: #D0A070;
    animation: sigilPulse 4s ease-in-out infinite alternate;
}

@keyframes sigilPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

/* ========================================
   Typewriter cursor
   ======================================== */

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #5070A0;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s step-end infinite;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
    .hex-cell {
        width: 200px;
        height: 220px;
    }

    .hex-inner {
        padding: 40px 20px 30px;
    }

    .hex-icon {
        width: 36px;
        height: 36px;
    }

    .hex-title {
        font-size: 1rem;
    }

    .hex-text {
        font-size: 0.7rem;
    }

    .vector-deco {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 600px) {
    .hex-row {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
        gap: 4px;
    }

    .hex-cell {
        width: 260px;
        height: 280px;
    }

    .vector-deco {
        display: none;
    }

    #hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    #hero-cursor {
        height: clamp(2rem, 10vw, 3rem);
    }

    .particle {
        display: none;
    }
}
