/* ============================================
   hangul.name -- Celestial Naming Ceremony
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-dark: #2A1B2E;
    --bg-light: #FFF5E6;
    --bg-mid: #3D2844;
    --accent-primary: #8B3A62;
    --accent-secondary: #C17252;
    --accent-tertiary: #4A7C59;
    --text-light: #C9B8D4;
    --text-dark: #5C3A4E;
    --star-glow: #E8D5B7;
    --highlight: #D4A574;
    --bg-deep: #1F1225;
    --card-light-end: #F0E4D0;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    color: var(--text-light);
    background: var(--bg-dark);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--bg-light);
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--accent-secondary);
}

/* --- Star Field --- */
#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}

#star-field.visible {
    opacity: 1;
}

#star-field::before,
#star-field::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    border-radius: 0;
}

/* Layer 1: Dim distant stars */
#star-field::before {
    box-shadow:
        45px 120px 0 0.5px rgba(232,213,183,0.3),
        190px 80px 0 0.5px rgba(232,213,183,0.3),
        320px 250px 0 1px rgba(232,213,183,0.3),
        480px 40px 0 0.5px rgba(232,213,183,0.3),
        620px 310px 0 0.5px rgba(232,213,183,0.3),
        780px 170px 0 1px rgba(232,213,183,0.3),
        910px 430px 0 0.5px rgba(232,213,183,0.3),
        1060px 90px 0 0.5px rgba(232,213,183,0.3),
        1200px 350px 0 1px rgba(232,213,183,0.3),
        1350px 220px 0 0.5px rgba(232,213,183,0.3),
        1500px 500px 0 0.5px rgba(232,213,183,0.3),
        100px 600px 0 0.5px rgba(232,213,183,0.3),
        250px 720px 0 1px rgba(232,213,183,0.3),
        400px 850px 0 0.5px rgba(232,213,183,0.3),
        550px 950px 0 0.5px rgba(232,213,183,0.3),
        700px 680px 0 1px rgba(232,213,183,0.3),
        850px 780px 0 0.5px rgba(232,213,183,0.3),
        1000px 900px 0 0.5px rgba(232,213,183,0.3),
        1150px 630px 0 1px rgba(232,213,183,0.3),
        1300px 810px 0 0.5px rgba(232,213,183,0.3),
        60px 1050px 0 0.5px rgba(232,213,183,0.3),
        210px 1180px 0 0.5px rgba(232,213,183,0.3),
        370px 1320px 0 1px rgba(232,213,183,0.3),
        530px 1100px 0 0.5px rgba(232,213,183,0.3),
        680px 1250px 0 0.5px rgba(232,213,183,0.3),
        840px 1400px 0 1px rgba(232,213,183,0.3),
        990px 1150px 0 0.5px rgba(232,213,183,0.3),
        1140px 1300px 0 0.5px rgba(232,213,183,0.3),
        1290px 1080px 0 1px rgba(232,213,183,0.3),
        1440px 1210px 0 0.5px rgba(232,213,183,0.3);
    filter: blur(0.5px);
    animation: starDrift1 60s linear infinite;
}

/* Layer 2: Medium stars */
#star-field::after {
    box-shadow:
        120px 200px 0 0.5px rgba(232,213,183,0.6),
        310px 60px 0 1px rgba(232,213,183,0.6),
        470px 340px 0 0.5px rgba(232,213,183,0.6),
        640px 150px 0 1px rgba(232,213,183,0.6),
        800px 480px 0 0.5px rgba(232,213,183,0.6),
        960px 260px 0 1px rgba(232,213,183,0.6),
        1120px 410px 0 0.5px rgba(232,213,183,0.6),
        1280px 130px 0 1px rgba(232,213,183,0.6),
        1440px 550px 0 0.5px rgba(232,213,183,0.6),
        80px 440px 0 0.5px rgba(232,213,183,0.6),
        230px 580px 0 1px rgba(232,213,183,0.6),
        390px 700px 0 0.5px rgba(232,213,183,0.6),
        560px 830px 0 1px rgba(232,213,183,0.6),
        720px 530px 0 0.5px rgba(232,213,183,0.6),
        880px 660px 0 1px rgba(232,213,183,0.6),
        1040px 790px 0 0.5px rgba(232,213,183,0.6),
        1200px 570px 0 1px rgba(232,213,183,0.6),
        1360px 920px 0 0.5px rgba(232,213,183,0.6),
        50px 920px 0 0.5px rgba(232,213,183,0.9),
        200px 1050px 0 1px rgba(232,213,183,0.9),
        350px 1190px 0 0.5px rgba(232,213,183,0.9),
        510px 1340px 0 1px rgba(232,213,183,0.9),
        660px 1100px 0 0.5px rgba(232,213,183,0.9),
        820px 1230px 0 1px rgba(232,213,183,0.9),
        970px 1370px 0 0.5px rgba(232,213,183,0.9),
        1130px 1150px 0 1px rgba(232,213,183,0.9),
        1280px 1290px 0 0.5px rgba(232,213,183,0.9),
        1430px 1050px 0 1px rgba(232,213,183,0.9);
    filter: blur(0.3px);
    animation: starDrift2 80s linear infinite;
}

@keyframes starDrift1 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes starDrift2 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Bright stars layer (via JS-generated element) */
.star-layer-bright {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    z-index: 0;
    pointer-events: none;
    animation: starDrift3 100s linear infinite;
}

@keyframes starDrift3 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* --- Floating Bubbles --- */
#floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bubble {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(232,213,183,0.35), transparent);
    backdrop-filter: blur(2px);
    left: var(--x-start);
    top: var(--y-start);
    animation: bubbleFloat var(--duration) ease-in-out var(--delay) infinite;
    opacity: 0;
}

.bubble:nth-child(odd) {
    width: 10px;
    height: 10px;
}

.bubble:nth-child(3n) {
    width: 18px;
    height: 18px;
}

@keyframes bubbleFloat {
    0% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    25% {
        transform: translate(40px, -60px) scale(1);
    }
    50% {
        transform: translate(-30px, -120px) scale(1.1);
        opacity: 0.4;
    }
    75% {
        transform: translate(20px, -180px) scale(0.9);
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(0, -240px) scale(0.8);
        opacity: 0;
    }
}

/* --- Sections General --- */
section {
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    padding: 6rem 2rem 3rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4.5rem);
    color: var(--bg-light);
    margin-bottom: 0.5rem;
}

.section-caption {
    font-size: clamp(1rem, 2vw, 1.3rem);
}

/* --- Reveal Animation --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SECTION 1: Celestial Registry
   ============================================ */
#celestial-registry {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(175deg, var(--bg-dark) 0%, var(--bg-mid) 40%, var(--bg-deep) 100%);
    overflow: hidden;
}

.registry-content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.registry-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(139,58,98,0.25) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* Hero character SVG constellation */
.ireum-constellation {
    width: clamp(280px, 50vw, 450px);
    height: auto;
    opacity: 0;
    transition: opacity 1s ease;
}

.ireum-constellation.visible {
    opacity: 1;
}

.constellation-line {
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-opacity: 0.4;
    stroke-dasharray: 4 4;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 3s ease;
}

.constellation-line.drawn {
    stroke-dashoffset: 0;
}

.constellation-node {
    fill: var(--star-glow);
    opacity: 0;
    transition: opacity 1.5s ease 1s;
}

.constellation-node.visible {
    opacity: 1;
}

/* Hero character text */
.hero-character {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--bg-light);
    opacity: 0;
    text-shadow:
        8px 8px 16px rgba(42,27,46,0.4),
        -4px -4px 12px rgba(61,40,68,0.2);
    transition: opacity 1s ease;
    line-height: 1;
}

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

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--accent-secondary);
    min-height: 2em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.scroll-hint {
    font-family: 'Karla', sans-serif;
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    margin-top: 3rem;
    animation: scrollHintPulse 3s ease-in-out infinite;
    transition: opacity 1s ease 5s;
}

.scroll-hint.visible {
    opacity: 0.5;
}

@keyframes scrollHintPulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(5px); }
}

/* ============================================
   SECTION 2: Jamo Constellation Map
   ============================================ */
#jamo-constellation {
    min-height: 300vh;
    padding: 4rem 2rem 8rem;
    background: linear-gradient(175deg, var(--bg-deep) 0%, var(--bg-dark) 30%, var(--bg-mid) 70%, var(--bg-dark) 100%);
}

.constellation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.jamo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* --- Jamo Card (Neomorphic on Dark) --- */
.jamo-card {
    position: relative;
    transform: translate(var(--offset-x, 0), var(--offset-y, 0));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.jamo-card .card-inner {
    background: linear-gradient(175deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow:
        8px 8px 16px rgba(42,27,46,0.4),
        -8px -8px 16px rgba(61,40,68,0.2);
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                filter 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.jamo-card .card-inner:hover {
    box-shadow:
        inset 6px 6px 12px rgba(42,27,46,0.5),
        inset -6px -6px 12px rgba(61,40,68,0.15);
    filter: sepia(0.1) brightness(1.05);
}

.jamo-constellation-path {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.jamo-card:hover .jamo-constellation-path {
    opacity: 0.8;
}

.jamo-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-opacity: 0.5;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.jamo-card:hover .jamo-path {
    stroke-dashoffset: 0;
}

.jamo-character {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(3rem, 6vw, 4.5rem);
    color: var(--bg-light);
    line-height: 1.1;
    display: block;
}

.jamo-romanization {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--highlight);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.jamo-description {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    opacity: 0.7;
    max-width: 220px;
}

/* Vowel card variant */
.jamo-card-vowel .card-inner {
    background: linear-gradient(175deg, var(--bg-mid) 0%, #3a2340 100%);
    border: 1px solid rgba(139,58,98,0.15);
}

/* --- Botanical Corner Decorations --- */
.botanical-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.3;
    pointer-events: none;
}

.botanical-fern {
    top: 8px;
    right: 8px;
    background: none;
}

.botanical-fern::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 1px;
    background: var(--accent-tertiary);
    top: 12px;
    right: 0;
    transform: rotate(-30deg);
    transform-origin: right center;
}

.botanical-fern::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 1px;
    background: var(--accent-tertiary);
    top: 8px;
    right: 3px;
    transform: rotate(-60deg);
    transform-origin: right center;
}

.botanical-stars {
    top: 8px;
    left: 8px;
}

.botanical-stars::before,
.botanical-stars::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--accent-tertiary);
}

.botanical-stars::before {
    width: 3px;
    height: 3px;
    top: 5px;
    left: 10px;
}

.botanical-stars::after {
    width: 2px;
    height: 2px;
    top: 14px;
    left: 5px;
}

.botanical-moon {
    bottom: 8px;
    right: 8px;
}

.botanical-moon::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--accent-tertiary);
    bottom: 2px;
    right: 2px;
    clip-path: polygon(40% 0%, 100% 0%, 100% 100%, 40% 100%);
}

/* ============================================
   SECTION 3: The Syllable Forge
   ============================================ */
#syllable-forge {
    min-height: 200vh;
    padding: 4rem 2rem 8rem;
    background: linear-gradient(175deg, var(--bg-dark) 0%, var(--bg-deep) 50%, var(--bg-mid) 100%);
}

.forge-arena {
    position: relative;
    max-width: 700px;
    margin: 0 auto 6rem;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forge-jamo {
    position: absolute;
    width: 120px;
    height: 120px;
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.8s ease;
    z-index: 3;
}

.forge-jamo .card-inner {
    background: linear-gradient(145deg, var(--bg-light) 0%, var(--card-light-end) 100%);
    border-radius: 16px;
    padding: 1rem;
    box-shadow:
        6px 6px 12px rgba(200,185,165,0.5),
        -6px -6px 12px rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.forge-jamo .jamo-character {
    color: var(--text-dark);
    font-size: 2.5rem;
}

.forge-jamo .jamo-romanization {
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.forge-jamo-1 {
    transform: translate(-200px, -100px);
}

.forge-jamo-2 {
    transform: translate(200px, -100px);
}

.forge-jamo-3 {
    transform: translate(0, 120px);
}

/* Forged state */
.forge-arena.forging .forge-jamo-1 {
    transform: translate(0, 0);
    opacity: 0;
}

.forge-arena.forging .forge-jamo-2 {
    transform: translate(0, 0);
    opacity: 0;
}

.forge-arena.forging .forge-jamo-3 {
    transform: translate(0, 0);
    opacity: 0;
}

.forge-constellation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.forge-line {
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-opacity: 0.3;
    stroke-dasharray: 6 4;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2s ease;
}

.forge-arena.forging .forge-line {
    stroke-dashoffset: 0;
}

.forge-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease 0.8s;
    z-index: 4;
}

.forge-arena.forging .forge-result {
    opacity: 1;
}

.forged-syllable {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(4rem, 10vw, 7rem);
    color: var(--bg-light);
    display: block;
    text-shadow: 0 0 60px rgba(139,58,98,0.4);
}

.forge-meaning {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin-top: 0.5rem;
}

.forge-combined {
    text-align: center;
    padding: 4rem 2rem;
}

.forged-word {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(5rem, 12vw, 10rem);
    color: var(--bg-light);
    display: block;
    line-height: 1.1;
    text-shadow:
        0 0 80px rgba(139,58,98,0.3),
        0 0 40px rgba(232,213,183,0.15);
}

.forge-word-meaning {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--highlight);
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

/* ============================================
   SECTION 4: The Name Gallery
   ============================================ */
#name-gallery {
    min-height: 300vh;
    padding: 4rem 2rem 8rem;
    background: linear-gradient(175deg, var(--bg-mid) 0%, var(--bg-dark) 40%, var(--bg-deep) 70%, var(--bg-dark) 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.name-card {
    transform: rotate(var(--rotate, 0deg));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.name-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.name-card .card-inner {
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Paper texture card */
.paper-texture {
    background:
        repeating-linear-gradient(
            15deg,
            transparent,
            transparent 2px,
            rgba(92,58,78,0.02) 2px,
            rgba(92,58,78,0.02) 2.5px
        ),
        radial-gradient(circle at 20% 30%, rgba(193,114,82,0.04) 0%, transparent 3px),
        radial-gradient(circle at 70% 60%, rgba(193,114,82,0.03) 0%, transparent 4px),
        radial-gradient(circle at 45% 80%, rgba(193,114,82,0.05) 0%, transparent 2px),
        radial-gradient(circle at 85% 15%, rgba(193,114,82,0.03) 0%, transparent 5px),
        linear-gradient(145deg, var(--bg-light) 0%, var(--card-light-end) 100%);
    box-shadow:
        6px 6px 12px rgba(200,185,165,0.5),
        -6px -6px 12px rgba(255,255,255,0.8);
}

.paper-texture:hover {
    box-shadow:
        inset 4px 4px 8px rgba(200,185,165,0.4),
        inset -4px -4px 8px rgba(255,255,255,0.6);
}

.name-hangul {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--text-dark);
    line-height: 1.1;
    display: block;
}

.name-romanization {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent-primary);
    letter-spacing: 0.08em;
}

.name-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.3rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

.name-card:hover .name-breakdown {
    opacity: 1;
    max-height: 120px;
}

.breakdown-item {
    font-family: 'Karla', sans-serif;
    font-size: 0.8rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.breakdown-jamo {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-right: 0.3rem;
}

.name-meaning {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    margin-top: 0.3rem;
}

/* ============================================
   SECTION 5: The Closing Seal
   ============================================ */
#closing-seal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(175deg, var(--bg-dark) 0%, var(--bg-deep) 50%, var(--bg-dark) 100%);
    padding: 4rem 2rem;
}

.closing-content {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Jamo Ring */
.jamo-ring {
    position: absolute;
    width: clamp(320px, 60vw, 550px);
    height: clamp(320px, 60vw, 550px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.jamo-ring-letter {
    position: absolute;
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: var(--star-glow);
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

/* Hangul stroke SVG animation */
.hangul-stroke {
    width: clamp(200px, 40vw, 380px);
    height: auto;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 1s ease;
}

.hangul-stroke.visible {
    opacity: 0.25;
}

.stroke-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 2;
    stroke-opacity: 0.4;
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 3s ease;
}

.stroke-path.drawn {
    stroke-dashoffset: 0;
}

.closing-character {
    font-family: 'Noto Serif KR', serif;
    font-weight: 900;
    font-size: clamp(6rem, 18vw, 14rem);
    color: var(--bg-light);
    line-height: 1;
    text-shadow:
        0 0 100px rgba(139,58,98,0.3),
        0 0 50px rgba(232,213,183,0.1),
        8px 8px 16px rgba(42,27,46,0.4),
        -4px -4px 12px rgba(61,40,68,0.2);
    position: relative;
    z-index: 2;
}

.closing-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--bg-light);
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

.closing-caption {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin-top: 0.5rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .jamo-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.2rem;
    }

    .jamo-card {
        transform: translate(0, 0) !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .forge-jamo-1 {
        transform: translate(-100px, -80px);
    }

    .forge-jamo-2 {
        transform: translate(100px, -80px);
    }

    .forge-jamo-3 {
        transform: translate(0, 80px);
    }

    .jamo-ring {
        width: 280px;
        height: 280px;
    }
}

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

    .forge-jamo-1 {
        transform: translate(-60px, -60px);
    }

    .forge-jamo-2 {
        transform: translate(60px, -60px);
    }

    .forge-jamo-3 {
        transform: translate(0, 60px);
    }

    .forge-jamo {
        width: 90px;
        height: 90px;
    }

    .forge-jamo .jamo-character {
        font-size: 1.8rem;
    }
}
