/* ============================================
   hangul.dev Styles
   Deep-Sea Calligraphy Garden
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #060D1A;
    color: #E8ECF1;
    line-height: 1.85;
    overflow-x: hidden;
    font-weight: 300;
}

.scroll-container {
    width: 100%;
    overflow: hidden;
}

/* ============================================
   Sections - Core Structure
   ============================================ */

.section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Section 1: The Surface */
.surface {
    background: linear-gradient(135deg, #0A1628 0%, #0F2847 50%, #060D1A 100%);
    position: relative;
    border-top: 2px solid #1B3A5C;
}

.surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #E8ECF1;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #90B4CE;
    font-style: normal;
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.hero-decoration {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.hero-decoration .glyph-main {
    width: 200px;
    height: 200px;
    animation: float 4s ease-in-out infinite;
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.3));
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #90B4CE;
    font-size: 0.875rem;
    animation: bounce 2s ease-in-out infinite;
}

.arrow-down {
    width: 24px;
    height: 24px;
    color: #00B4D8;
}

/* Deep Coral accent element */
.glyph-card:first-child .glyph {
    color: #FF6B6B;
}

/* Section 2: Twilight Zone */
.twilight {
    background: linear-gradient(135deg, #0A1628 0%, #0F2847 100%);
}

/* Section 3: Midnight Zone */
.midnight {
    background: linear-gradient(135deg, #060D1A 0%, #0A1628 100%);
}

/* Section 4: Abyssal Zone */
.abyssal {
    background: linear-gradient(to bottom, #060D1A 0%, #040810 100%);
}

/* Section 5: Return */
.return {
    background: linear-gradient(135deg, #0A1628 0%, #0F2847 50%, #090E1A 100%);
}

.section-content {
    max-width: 900px;
    width: 100%;
    z-index: 10;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #E8ECF1;
    margin-bottom: 1.5rem;
    text-transform: capitalize;
    animation: fadeInUp 0.8s ease-out;
}

.section-text {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: #C9A96E;
    line-height: 1.85;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ============================================
   Glyphs and Cards
   ============================================ */

.glyphs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.glyph-card {
    background: rgba(27, 58, 92, 0.3);
    border: 1px solid rgba(27, 58, 92, 0.5);
    border-radius: 24px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
    backdrop-filter: blur(20px);
}

.glyph-card:nth-child(1) { animation-delay: 0.3s; }
.glyph-card:nth-child(2) { animation-delay: 0.4s; }
.glyph-card:nth-child(3) { animation-delay: 0.5s; }
.glyph-card:nth-child(4) { animation-delay: 0.6s; }

.glyph-card:hover {
    background: rgba(27, 58, 92, 0.5);
    border-color: #00B4D8;
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 180, 216, 0.15);
}

.glyph-card .glyph {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    display: block;
}

.glyph-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.875rem;
    color: #90B4CE;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ============================================
   Syllable Showcase
   ============================================ */

.syllable-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.syllable-group {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(27, 58, 92, 0.3);
    border-left: 3px solid #1B3A5C;
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.syllable-group:nth-child(1) { animation-delay: 0.3s; }
.syllable-group:nth-child(2) { animation-delay: 0.4s; }
.syllable-group:nth-child(3) { animation-delay: 0.5s; }

.syllable-group:hover {
    background: rgba(27, 58, 92, 0.5);
    border-left-color: #00B4D8;
    transform: translateX(4px);
}

.syllable-display {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #00B4D8;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.syllable-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #C9A96E;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ============================================
   Philosophy Block
   ============================================ */

.philosophy-block {
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-left: 4px solid #C9A96E;
    padding: 3rem;
    border-radius: 8px;
    margin: 2rem 0;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.philosophy-quote {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: #E8ECF1;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-style: normal;
    letter-spacing: 0.01em;
}

.philosophy-attribution {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    color: #C9A96E;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

.final-message {
    background: rgba(27, 58, 92, 0.3);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    border: 1px solid rgba(27, 58, 92, 0.4);
}

.final-message p {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    color: #E8ECF1;
    line-height: 1.85;
    font-weight: 300;
}

/* ============================================
   Return Section
   ============================================ */

.return-content {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

.return-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #E8ECF1;
    margin-bottom: 1rem;
}

.return-content p {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #90B4CE;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-style: normal;
    letter-spacing: 0.01em;
}

.return-accent {
    display: inline-flex;
    margin-top: 2rem;
}

.return-accent svg {
    width: 150px;
    height: 150px;
    animation: rotate 8s linear infinite;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@media (max-width: 768px) {
    .section {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .hero-title {
        margin-bottom: 0.5rem;
    }

    .glyphs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .syllable-showcase {
        grid-template-columns: 1fr;
    }

    .philosophy-block {
        padding: 2rem 1.5rem;
    }

    .scroll-indicator {
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .glyphs-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-block {
        padding: 1.5rem 1rem;
    }

    .philosophy-quote {
        font-size: 1.1rem;
    }
}
