/* sora.garden - Design System Styles */
/* Colors: #0a1023 (Abyssal Ink), #00f5d4 (Bioluminescent Aqua), #0d1b2a (Deep Current) */
/* #e8a0bf (Abalone Pink), #7b5ea7 (Jellyfish Violet), #e8f4f0 (Shell Nacre) */
/* #5a7d7c (Sea Foam Gray), #ff6b6b (Coral Flash), #1a3a4a (mid-tone reef) */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: #e8f4f0;
    background-color: #0a1023;
    overflow-x: hidden;
}

/* ===== PROGRESS INDICATOR ===== */

#progress-nav {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    height: 300px;
}

#progress-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0%;
    background: #00f5d4;
    transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px rgba(0, 245, 212, 0.4);
    z-index: 1;
}

#progress-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: rgba(0, 245, 212, 0.15);
}

.progress-node {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 245, 212, 0.3);
    background: #0a1023;
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-node:first-of-type {
    margin-top: 0;
}

.progress-node:not(:first-of-type) {
    margin-top: 60px;
}

.progress-node.active {
    border-color: #00f5d4;
    background: #00f5d4;
    box-shadow: 0 0 12px rgba(0, 245, 212, 0.6);
}

.progress-node.passed {
    border-color: #00f5d4;
    background: rgba(0, 245, 212, 0.3);
}

.node-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Azeret Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(0, 245, 212, 0.5);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.progress-node:hover .node-label,
.progress-node.active .node-label {
    opacity: 1;
}

/* ===== PANELS (General) ===== */

.panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    overflow: hidden;
    transition: background-color 1.2s ease-in-out;
}

.panel-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 5;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 2rem;
    color: #0d1b2a;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.light {
    color: #e8f4f0;
}

.section-title.glow {
    color: #00f5d4;
    text-shadow: 0 0 30px rgba(0, 245, 212, 0.3);
}

.section-body {
    color: #0d1b2a;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s,
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.section-body.light {
    color: rgba(232, 244, 240, 0.85);
}

.section-body.glow {
    color: rgba(0, 245, 212, 0.8);
}

.panel.visible .section-title,
.panel.visible .section-body {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PANEL 1: HERO ===== */

.panel-hero {
    background-color: #0a1023;
}

.aurora-band {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 33vh;
    pointer-events: none;
    z-index: 1;
}

.aurora-band-1 {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 245, 212, 0.06) 20%,
        rgba(123, 94, 167, 0.08) 40%,
        rgba(0, 245, 212, 0.04) 60%,
        transparent 80%
    );
    animation: auroraDrift1 20s ease-in-out infinite;
}

.aurora-band-2 {
    background: linear-gradient(
        90deg,
        transparent 10%,
        rgba(123, 94, 167, 0.06) 30%,
        rgba(0, 245, 212, 0.1) 50%,
        rgba(123, 94, 167, 0.04) 70%,
        transparent 90%
    );
    animation: auroraDrift2 25s ease-in-out infinite;
    animation-delay: -5s;
}

.aurora-band-3 {
    background: linear-gradient(
        90deg,
        transparent 5%,
        rgba(0, 245, 212, 0.04) 25%,
        rgba(232, 160, 191, 0.05) 45%,
        rgba(0, 245, 212, 0.06) 65%,
        transparent 85%
    );
    animation: auroraDrift3 18s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes auroraDrift1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15%); }
}

@keyframes auroraDrift2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-12%); }
}

@keyframes auroraDrift3 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10%); }
}

.hero-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#conch-shell {
    opacity: 0;
}

#conch-shell.animate .shell-path {
    animation: drawShell 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#conch-shell.animate {
    opacity: 1;
}

.shell-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

@keyframes drawShell {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-title.visible {
    opacity: 1;
}

.title-kanji {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #00f5d4;
    letter-spacing: 0.1em;
    text-shadow: 0 0 40px rgba(0, 245, 212, 0.3);
}

.title-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: rgba(0, 245, 212, 0.7);
    letter-spacing: 0.3em;
    text-transform: lowercase;
}

.scroll-chevron {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: pulseChevron 2.5s ease-in-out infinite;
    cursor: pointer;
}

@keyframes pulseChevron {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* ===== PANEL 2: SURFACE ===== */

.panel-surface {
    background-color: #e8f4f0;
}

.panel-surface .jellyfish-1 {
    position: absolute;
    right: 10%;
    top: 20%;
    opacity: 0.3;
    animation: floatJellyfish 30s linear infinite;
}

/* ===== PANEL 3: REEF ===== */

.panel-reef {
    background-color: #1a3a4a;
}

.coral-divider {
    position: absolute;
    top: 2rem;
    left: 0;
    right: 0;
    z-index: 2;
}

/* ===== PANEL 4: DEEP ===== */

.panel-deep {
    background-color: #0a1023;
}

.contour-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 2s ease;
    background-image:
        repeating-radial-gradient(
            ellipse at 30% 50%,
            transparent 0px,
            transparent 40px,
            rgba(0, 245, 212, 0.04) 41px,
            transparent 42px
        ),
        repeating-radial-gradient(
            ellipse at 70% 40%,
            transparent 0px,
            transparent 55px,
            rgba(0, 245, 212, 0.03) 56px,
            transparent 57px
        ),
        repeating-radial-gradient(
            ellipse at 50% 70%,
            transparent 0px,
            transparent 35px,
            rgba(0, 245, 212, 0.035) 36px,
            transparent 37px
        );
}

.panel-deep.visible .contour-bg {
    opacity: 1;
}

.jellyfish {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.jellyfish-deep-1 {
    left: 8%;
    bottom: -10%;
    opacity: 0.4;
    animation: floatJellyfish 35s linear infinite;
    animation-delay: -5s;
}

.jellyfish-deep-2 {
    right: 12%;
    bottom: -15%;
    opacity: 0.3;
    animation: floatJellyfish 28s linear infinite;
    animation-delay: -12s;
}

.jellyfish-deep-3 {
    left: 25%;
    bottom: -8%;
    opacity: 0.25;
    animation: floatJellyfish 40s linear infinite;
    animation-delay: -20s;
}

@keyframes floatJellyfish {
    from {
        transform: translateY(10vh) rotate(2deg);
    }
    to {
        transform: translateY(-110vh) rotate(-2deg);
    }
}

/* ===== PANEL 5: FLOOR ===== */

.panel-floor {
    background-color: #0a1023;
}

.floor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 5;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel-floor.visible .floor-content {
    opacity: 1;
}

.floor-shell {
    opacity: 0.6;
}

.floor-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: rgba(0, 245, 212, 0.8);
    text-align: center;
    line-height: 1.4;
    max-width: 480px;
    padding: 0 2rem;
}

.floor-text-korean {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgba(0, 245, 212, 0.4);
    text-align: center;
    letter-spacing: 0.05em;
}

.scroll-top-chevron {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    animation: pulseChevronUp 2.5s ease-in-out infinite;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.scroll-top-chevron:hover {
    opacity: 1;
}

@keyframes pulseChevronUp {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ===== HOVER STATES ===== */

a:hover,
.progress-node:hover {
    color: #e8a0bf;
}

.progress-node:hover {
    border-color: #e8a0bf;
    box-shadow: 0 0 12px rgba(232, 160, 191, 0.4);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    #progress-nav {
        left: 12px;
        height: 240px;
    }

    .progress-node:not(:first-of-type) {
        margin-top: 45px;
    }

    .node-label {
        display: none;
    }

    .panel-content {
        padding: 3rem 1.5rem;
    }

    .jellyfish-1 {
        right: 5%;
        opacity: 0.2;
    }

    .panel-surface .jellyfish-1 svg {
        width: 50px;
        height: 75px;
    }
}

@media (max-width: 480px) {
    #progress-nav {
        left: 8px;
        height: 200px;
    }

    .progress-node {
        width: 8px;
        height: 8px;
    }

    .progress-node:not(:first-of-type) {
        margin-top: 40px;
    }

    .panel-content {
        padding: 2rem 1rem;
    }

    .hero-center svg {
        width: 120px;
        height: 120px;
    }
}
