/* sora.day - Pixel Terrarium Honeycomb */

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

:root {
    --bg: #FFF8F0;
    --glass: rgba(255, 248, 240, 0.6);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #5A3E28;
    --text-body: #6E5A48;
    --coral: #E8A87C;
    --dusk: #D4847A;
    --gold: #F0C878;
    --sage: #8FB87A;
    --sky: #A0B8D0;
    --shell: #F0D8C8;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(180deg, var(--bg) 0%, var(--shell) 100%);
    min-height: 100vh;
    color: var(--text-body);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Shell Spiral */
.shell-spiral {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 0;
    animation: spiralRotate 120s linear infinite;
}

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

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero__title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero__title.visible {
    opacity: 1;
}

.hero__subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.9375rem;
    color: var(--coral);
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.hero__subtitle.visible {
    opacity: 1;
}

/* Honeycomb Grid */
.honeycomb {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

/* Hex Row */
.hex-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: -40px;
}

.hex-row--offset {
    margin-left: 146px;
}

/* Hex Cell */
.hex-cell {
    width: 280px;
    height: 260px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.hex-inner {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 4px 16px rgba(90, 62, 40, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    animation: hexBreathe 6s ease-in-out infinite;
}

.hex-cell:nth-child(1) .hex-inner { animation-delay: 0s; }
.hex-cell:nth-child(2) .hex-inner { animation-delay: 0.4s; }
.hex-cell:nth-child(3) .hex-inner { animation-delay: 0.8s; }

@keyframes hexBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* Hex Pulse */
.hex-cell.pulse .hex-inner {
    animation: hexPulse 0.8s ease-out;
}

@keyframes hexPulse {
    0% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 1px transparent; }
    50% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 2px #E8A87C; }
    100% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 1px transparent; }
}

.hex-cell--dusk.pulse .hex-inner {
    animation: hexPulseDusk 1.6s ease-out;
}

@keyframes hexPulseDusk {
    0% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 1px transparent; }
    50% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 2px #D4847A; }
    100% { box-shadow: inset 0 2px 8px rgba(90, 62, 40, 0.08), 0 0 0 1px transparent; }
}

/* Void Cell */
.hex-inner--void {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px dashed var(--coral);
    border-color: rgba(232, 168, 124, 0.3);
    box-shadow: none;
}

/* Typography */
.hex-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hex-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-body);
}

.hex-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.625rem;
    color: var(--coral);
    display: block;
    margin-bottom: 0.5rem;
}

/* Pixel Terrarium */
.pixel-terrarium {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}

.pixel-terrarium--small {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.pixel-img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Final Cell */
.hex-inner--final {
    flex-direction: column;
}

.hex-final-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Leaf Motifs */
.leaf-motif {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 0;
}

.leaf-motif--1 { left: 30%; margin-top: -10px; }
.leaf-motif--2 { right: 28%; margin-top: -10px; }
.leaf-motif--3 { left: 45%; margin-top: -10px; }

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 0 60px;
    position: relative;
    z-index: 1;
}

.footer-domain {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--coral);
}

/* Responsive */
@media (max-width: 900px) {
    .hex-row {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 12px;
    }

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

    .hex-cell {
        width: 240px;
        height: 220px;
    }
}

@media (max-width: 560px) {
    .hex-cell {
        width: 100%;
        max-width: 320px;
        clip-path: none;
        border-radius: 16px;
        height: auto;
        min-height: 200px;
    }

    .hex-inner {
        border-radius: 16px;
        padding: 24px 20px;
    }

    .hex-row {
        flex-direction: column;
        align-items: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.3s !important;
    }

    .hex-cell {
        opacity: 1;
        transform: none;
    }

    .hero__title,
    .hero__subtitle {
        opacity: 1;
    }
}
