/* ============================================================
   hwaklyul.com - Vitality / 활력
   Color Palette:
     Carbon Black:      #1B1B1E
     Bone White:        #F7F0E8
     Arterial Red:      #E63946
     Plasma Orange:     #FF6B35
     Oxygenated Blue:   #457B9D
     Warm Ash:          #D4CFC7
     Graphite:          #3A3A3C
     Adrenaline Yellow: #FFB627
     Mid Gray:          #6B6B6E
   ============================================================ */

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

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: auto;
}

body {
    background: #1B1B1E;
    color: #F7F0E8;
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    animation: bodyBreathe 8s ease-in-out infinite;
}

@keyframes bodyBreathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.97; }
}

/* ============================================================
   PULSE COLUMN (ECG Waveform Navigation)
   ============================================================ */

#pulse-column {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 100vh;
    z-index: 1000;
    background: transparent;
    overflow: hidden;
}

#ecg-svg {
    width: 100%;
    height: 100%;
}

#ecg-path {
    stroke: #E63946;
    stroke-width: 1.5;
    fill: none;
    vector-effect: non-scaling-stroke;
}

/* ============================================================
   RADIAL BURST
   ============================================================ */

#radial-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 999;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#radial-burst .burst-line {
    position: absolute;
    width: 1px;
    height: 40px;
    background: #FFB627;
    opacity: 0;
    transform-origin: center bottom;
    top: -20px;
    left: 0;
}

/* ============================================================
   DIAPHRAGM CANVAS
   ============================================================ */

#diaphragm-canvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 998;
    pointer-events: none;
    opacity: 0.3;
}

/* ============================================================
   SCROLL CONTAINER & SECTIONS
   ============================================================ */

#scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.section {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 120ms ease-in-out;
}

.section-dark {
    background: #1B1B1E;
    color: #F7F0E8;
}

.section-light {
    background: #F7F0E8;
    color: #1B1B1E;
}

.section-inner {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem 2rem 2rem;
    margin-left: 12px;
}

/* Section pulse animation at boundaries */
.section.pulse-active {
    animation: sectionPulse 120ms ease-in-out;
}

@keyframes sectionPulse {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.003); }
}

/* ============================================================
   SECTION HEADING ZONE (top 35%)
   ============================================================ */

.section-heading-zone {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.section-heading {
    font-family: 'Anybody', sans-serif;
    font-weight: 800;
    font-stretch: 120%;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.92;
    letter-spacing: -0.03em;
    font-variation-settings: 'wdth' 80;
    transition: font-variation-settings 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-heading.in-view {
    font-variation-settings: 'wdth' 120;
}

.section-light .section-heading {
    color: #1B1B1E;
}

.section-dark .section-heading {
    color: #F7F0E8;
}

.korean-heading {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    letter-spacing: 0;
}

/* ============================================================
   SECTION CONTENT ZONE (bottom 65%, 60/40 split)
   ============================================================ */

.section-content-zone {
    flex: 1;
    display: flex;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-top: clamp(3rem, 6vh, 5rem);
    overflow: hidden;
}

.content-left {
    flex: 0 0 60%;
    overflow-y: auto;
    padding-right: 1rem;
}

.content-right {
    flex: 0 0 38%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.body-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    margin-bottom: 1.5rem;
}

.section-light .body-text {
    color: #3A3A3C;
}

.section-dark .body-text {
    color: #D4CFC7;
}

.body-text em {
    font-weight: 600;
    font-style: italic;
}

/* ============================================================
   HERO SECTION (Section 1)
   ============================================================ */

#section-1 .section-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-typography {
    text-align: center;
    position: relative;
}

.inflated-char {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 900;
    color: #F7F0E8;
    line-height: 0.9;
    opacity: 0;
    transition: opacity 800ms ease-out;
    position: relative;
    display: inline-block;
    cursor: default;
}

#hero-hwal {
    font-size: clamp(30vw, 50vw, 70vw);
    text-shadow:
        1px 1px 0 rgba(230, 57, 70, 0.25),
        2px 2px 0 rgba(230, 57, 70, 0.22),
        3px 3px 0 rgba(230, 57, 70, 0.19),
        4px 4px 0 rgba(230, 57, 70, 0.16),
        5px 5px 0 rgba(230, 57, 70, 0.13),
        6px 6px 0 rgba(230, 57, 70, 0.10),
        7px 7px 0 rgba(230, 57, 70, 0.07),
        8px 8px 0 rgba(230, 57, 70, 0.04),
        9px 9px 0 rgba(230, 57, 70, 0.02),
        10px 10px 0 rgba(230, 57, 70, 0.01);
    background: radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
}

#hero-hwal.visible {
    opacity: 1;
}

#hero-ryuk {
    font-size: clamp(18vw, 30vw, 42vw);
    margin-top: -3vw;
    text-shadow:
        1px 1px 0 rgba(230, 57, 70, 0.25),
        2px 2px 0 rgba(230, 57, 70, 0.22),
        3px 3px 0 rgba(230, 57, 70, 0.19),
        4px 4px 0 rgba(230, 57, 70, 0.16),
        5px 5px 0 rgba(230, 57, 70, 0.13),
        6px 6px 0 rgba(230, 57, 70, 0.10),
        7px 7px 0 rgba(230, 57, 70, 0.07),
        8px 8px 0 rgba(230, 57, 70, 0.04),
        9px 9px 0 rgba(230, 57, 70, 0.02),
        10px 10px 0 rgba(230, 57, 70, 0.01);
    background: radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
}

#hero-ryuk.visible {
    opacity: 1;
}

.inflated-char:hover {
    text-shadow:
        1px 1px 0 rgba(230, 57, 70, 0.30),
        2px 2px 0 rgba(230, 57, 70, 0.27),
        3px 3px 0 rgba(230, 57, 70, 0.24),
        4px 4px 0 rgba(230, 57, 70, 0.21),
        5px 5px 0 rgba(230, 57, 70, 0.18),
        6px 6px 0 rgba(230, 57, 70, 0.15),
        7px 7px 0 rgba(230, 57, 70, 0.12),
        8px 8px 0 rgba(230, 57, 70, 0.09),
        9px 9px 0 rgba(230, 57, 70, 0.06),
        10px 10px 0 rgba(230, 57, 70, 0.04),
        11px 11px 0 rgba(230, 57, 70, 0.02),
        12px 12px 0 rgba(230, 57, 70, 0.01);
    transition: text-shadow 400ms ease-out;
}

.hero-subtitle {
    font-family: 'Anybody', sans-serif;
    font-weight: 300;
    font-stretch: 150%;
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    letter-spacing: 0.2em;
    color: #E63946;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

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

/* Specular highlight overlay for inflated chars */
.specular-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at var(--spec-x, 35%) var(--spec-y, 30%), rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    mix-blend-mode: overlay;
}

/* ============================================================
   PULSE RING ANIMATIONS
   ============================================================ */

.pulse-ring-anchor {
    position: relative;
    display: inline-block;
}

.pulse-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid #E63946;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.pulse-ring.animate {
    animation: pulseRingExpand 1200ms ease-out forwards;
}

.pulse-ring.ring-delay-1 {
    animation-delay: 0ms;
}

.pulse-ring.ring-delay-2 {
    animation-delay: 300ms;
}

.pulse-ring.ring-delay-3 {
    animation-delay: 600ms;
}

@keyframes pulseRingExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* ============================================================
   SINE WAVE RIBBONS (Section 2 right column)
   ============================================================ */

.sine-wave-container {
    width: 100%;
    height: 80%;
}

.sine-ribbon {
    width: 100%;
    height: 100%;
}

.wave {
    stroke-linecap: round;
}

.wave-heart {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: waveFlow 3s linear infinite;
}

.wave-breath {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: waveFlow 6s linear infinite;
}

.wave-neural {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: waveFlow 10s linear infinite;
}

@keyframes waveFlow {
    0% { stroke-dashoffset: 800; }
    100% { stroke-dashoffset: 0; }
}

/* ============================================================
   CONCENTRIC RINGS (Section 3 right column)
   ============================================================ */

.concentric-rings {
    width: 250px;
    height: 250px;
    position: relative;
}

.ring {
    position: absolute;
    border: 1px solid #457B9D;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ringBreathe 8s ease-in-out infinite;
}

.ring-1 {
    width: 50px;
    height: 50px;
    animation-delay: 0s;
}

.ring-2 {
    width: 100px;
    height: 100px;
    animation-delay: 0.4s;
}

.ring-3 {
    width: 150px;
    height: 150px;
    animation-delay: 0.8s;
}

.ring-4 {
    width: 200px;
    height: 200px;
    animation-delay: 1.2s;
}

.ring-5 {
    width: 250px;
    height: 250px;
    animation-delay: 1.6s;
}

@keyframes ringBreathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.3;
    }
}

/* ============================================================
   STAT NUMBER (Section 4)
   ============================================================ */

.stat-number {
    font-family: 'Azeret Mono', monospace;
    font-weight: 700;
    font-size: clamp(5rem, 14vw, 12rem);
    color: #E63946;
    display: block;
    line-height: 1;
    text-shadow:
        1px 1px 0 rgba(230, 57, 70, 0.20),
        2px 2px 0 rgba(230, 57, 70, 0.17),
        3px 3px 0 rgba(230, 57, 70, 0.14),
        4px 4px 0 rgba(230, 57, 70, 0.11),
        5px 5px 0 rgba(230, 57, 70, 0.08),
        6px 6px 0 rgba(230, 57, 70, 0.05),
        7px 7px 0 rgba(230, 57, 70, 0.03),
        8px 8px 0 rgba(230, 57, 70, 0.01);
}

.inflated-number {
    display: inline;
}

/* Cell counter */
.counter-container {
    text-align: center;
}

.cell-counter {
    font-family: 'Azeret Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #FF6B35;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.counter-label {
    font-family: 'Azeret Mono', monospace;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B6B6E;
    margin-top: 1rem;
}

/* ============================================================
   BREATHE SECTION (Section 5)
   ============================================================ */

#section-5 .section-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.breathe-container {
    text-align: center;
    width: 100%;
}

.breathe-word {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(10vw, 20vw, 30vw);
    color: #F7F0E8;
    opacity: 0.8;
    line-height: 1;
    letter-spacing: -0.03em;
    animation: breatheStretch 8s ease-in-out infinite;
}

@keyframes breatheStretch {
    0%, 100% {
        font-stretch: 60%;
        font-variation-settings: 'wdth' 60;
    }
    50% {
        font-stretch: 140%;
        font-variation-settings: 'wdth' 140;
    }
}

/* Enhanced breath indicator for section 5 */
#section-5 {
    animation: section5Breathe 8s ease-in-out infinite;
}

@keyframes section5Breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

/* ============================================================
   CLOSING SECTION (Section 6)
   ============================================================ */

#section-6 .section-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.closing-container {
    text-align: center;
}

.closing-domain {
    font-family: 'Anybody', sans-serif;
    font-weight: 400;
    font-stretch: 100%;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #1B1B1E;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.closing-tagline {
    font-family: 'Azeret Mono', monospace;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B6B6E;
    margin-top: 1.5rem;
}

/* ============================================================
   RADIAL BURST LINES
   ============================================================ */

.burst-line {
    position: absolute;
    width: 1px;
    height: 40px;
    background: #FFB627;
    opacity: 0;
    transform-origin: center bottom;
}

.burst-line.animate {
    animation: burstExpand 500ms ease-out forwards;
}

@keyframes burstExpand {
    0% {
        transform: rotate(var(--rot)) scaleY(0);
        opacity: 0.4;
    }
    60% {
        transform: rotate(var(--rot)) scaleY(1);
        opacity: 0.4;
    }
    100% {
        transform: rotate(var(--rot)) scaleY(1);
        opacity: 0;
    }
}

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

@media (max-width: 768px) {
    .section-inner {
        padding: 1.5rem 1.5rem 1.5rem 1rem;
    }

    .section-content-zone {
        flex-direction: column;
    }

    .content-left {
        flex: 1;
        padding-right: 0;
    }

    .content-right {
        flex: 0 0 auto;
        min-height: 200px;
    }

    .section-heading {
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .korean-heading {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }

    .stat-number {
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .concentric-rings {
        width: 180px;
        height: 180px;
    }

    .ring-4 { width: 160px; height: 160px; }
    .ring-5 { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    .section-heading-zone {
        flex: 0 0 30%;
        padding: 0 0.5rem;
    }

    .section-heading {
        font-size: clamp(1.5rem, 5vw, 3rem);
    }

    #hero-hwal {
        font-size: clamp(40vw, 60vw, 80vw);
    }

    #hero-ryuk {
        font-size: clamp(24vw, 36vw, 48vw);
    }
}
