/* =========================================
   namu.club — Futuristic Botanical Observatory
   Colors: #0d0a14, #1a1028, #2c1e14, #4a3828, #5a4030,
           #7b5ea7, #8a7260, #c9b8a4, #d4956a, #e8dcd0,
           #f0a868, #f7efe3
   Fonts: Commissioner, Space Grotesk, Inter
   ========================================= */

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

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

body {
    background-color: #0d0a14;
    color: #e8dcd0;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Section Base --- */
.section {
    position: relative;
    min-height: 100vh;
    padding: 80px 40px;
    overflow: hidden;
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section__header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section__index {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.2em;
    color: #d4956a;
    display: block;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.section__title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3.5vw, 48px);
    letter-spacing: 0.04em;
    color: #f7efe3;
    margin-bottom: 16px;
}

.section__desc {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #c9b8a4;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Hero Section --- */
.section--hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
    background: linear-gradient(180deg, #0d0a14 0%, #1a1028 40%, #2c1e14 100%);
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.hero__subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #d4956a;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero__title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(36px, 6vw, 96px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f7efe3;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero__korean {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: clamp(48px, 10vw, 160px);
    color: #4a3828;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1.2s ease 0.8s forwards;
}

.hero__tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #c9b8a4;
    max-width: 500px;
    margin: 0 auto 60px;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

.hero__scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeInUp 1s ease 1.4s forwards;
}

.hero__scroll-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a7260;
}

.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #d4956a, transparent);
    animation: scrollPulse 2s ease infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Cellular / Honeycomb Section --- */
.section--cellular {
    background: #0d0a14;
    padding-top: 120px;
    padding-bottom: 120px;
}

.honeycomb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hex-cell {
    width: 180px;
    height: 200px;
    margin: -25px 4px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hex-cell:nth-child(even) {
    margin-top: 75px;
}

.hex-cell__inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    transition: background-color 0.4s ease;
}

.hex-cell__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.hex-cell__label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a7260;
}

.hex-cell__value {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #e8dcd0;
    letter-spacing: 0.02em;
}

.hex-cell__value--large {
    font-size: 32px;
    font-weight: 300;
    color: #f0a868;
}

.hex-cell__unit {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: #8a7260;
    letter-spacing: 0.1em;
}

/* Data cells */
.hex-cell--data .hex-cell__inner {
    background: linear-gradient(135deg, #1a1028 0%, #0d0a14 100%);
    border: 1px solid rgba(74, 56, 40, 0.3);
}

/* Skeleton cells */
.hex-cell--skeleton .hex-cell__inner {
    background: #1a1028;
}

.hex-cell__skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 80%;
}

.skeleton-line {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #2c1e14 25%, #4a3828 50%, #2c1e14 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite linear;
}

.skeleton-line--w80 { width: 80%; }
.skeleton-line--w70 { width: 70%; }
.skeleton-line--w60 { width: 60%; }
.skeleton-line--w50 { width: 50%; }
.skeleton-line--w40 { width: 40%; }

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

/* Leather cells */
.hex-cell--leather .hex-cell__inner {
    background: #4a3828;
    position: relative;
}

.hex-cell--leather .hex-cell__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(138, 114, 96, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 114, 96, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(90, 64, 48, 0.4) 0%, transparent 60%);
    filter: url(#grain-filter);
    opacity: 0.6;
}

/* Empty cells */
.hex-cell--empty .hex-cell__inner {
    background: rgba(26, 16, 40, 0.3);
    border: 1px solid rgba(74, 56, 40, 0.15);
}

/* Star cells */
.hex-cell--star .hex-cell__inner {
    background: radial-gradient(circle at center, #1a1028, #0d0a14);
}

.hex-cell__star-svg {
    width: 70%;
    height: 70%;
    opacity: 0.8;
}

/* --- Structural / Ring Growth Section --- */
.section--structural {
    background: linear-gradient(180deg, #0d0a14 0%, #2c1e14 50%, #0d0a14 100%);
    padding-top: 120px;
    padding-bottom: 120px;
}

.rings-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

#rings-canvas {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rings-data {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 400px;
}

.rings-data__item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(74, 56, 40, 0.2);
}

.rings-data__item.visible {
    opacity: 1;
    transform: translateX(0);
}

.rings-data__year {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 28px;
    color: #d4956a;
    flex-shrink: 0;
    min-width: 80px;
}

.rings-data__event {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #c9b8a4;
    line-height: 1.5;
}

/* --- Canopy Section --- */
.section--canopy {
    background: radial-gradient(ellipse at center top, #1a1028 0%, #0d0a14 70%);
    padding-top: 120px;
    padding-bottom: 120px;
}

.canopy-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#canopy-canvas {
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin-bottom: 60px;
}

.canopy-stats {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

.canopy-stat {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.canopy-stat.visible {
    opacity: 1;
    transform: translateY(0);
}

.canopy-stat__value {
    display: block;
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(28px, 4vw, 48px);
    color: #f0a868;
    letter-spacing: 0.02em;
}

.canopy-stat__label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a7260;
    margin-top: 8px;
}

/* --- Colophon / Footer --- */
.section--colophon {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0a14;
    border-top: 1px solid rgba(74, 56, 40, 0.15);
}

.colophon__content {
    text-align: center;
    max-width: 500px;
}

.colophon__domain {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f7efe3;
    margin-bottom: 8px;
}

.colophon__meaning {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: 24px;
    color: #8a7260;
    margin-bottom: 24px;
}

.colophon__note {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #c9b8a4;
    line-height: 1.7;
    margin-bottom: 32px;
}

.colophon__line {
    width: 60px;
    height: 1px;
    background: #4a3828;
    margin: 0 auto 24px;
}

.colophon__credit {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #5a4030;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section {
        padding: 60px 20px;
    }

    .hex-cell {
        width: 140px;
        height: 156px;
    }

    .hex-cell:nth-child(even) {
        margin-top: 53px;
    }

    .hex-cell__value--large {
        font-size: 24px;
    }

    .rings-container {
        flex-direction: column;
        align-items: center;
    }

    #rings-canvas {
        width: 280px;
        height: 280px;
    }

    .canopy-stats {
        gap: 30px;
    }

    .rings-data {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .hex-cell {
        width: 110px;
        height: 124px;
        margin: -18px 3px;
    }

    .hex-cell:nth-child(even) {
        margin-top: 44px;
    }

    .hex-cell__label {
        font-size: 8px;
    }

    .hex-cell__value {
        font-size: 13px;
    }

    .hex-cell__value--large {
        font-size: 20px;
    }

    #rings-canvas {
        width: 220px;
        height: 220px;
    }

    .rings-data__year {
        font-size: 20px;
        min-width: 60px;
    }

    .rings-data__event {
        font-size: 13px;
    }
}

/* Additional design colors and font references */
/* Color: #3d2b1f used in wood grain accents */
.section--structural::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #3d2b1f;
}

/* Additional font usage */
.rings-data__year {
    font-family: 'Source Serif 4', 'Commissioner', serif;
}

.colophon__credit {
    font-family: 'Space Mono', 'Inter', monospace;
}

.hex-cell__label {
    font-family: 'Space Mono', 'Inter', monospace;
}
