/* hangeul.day - Typographic Focus */
/* Palette: #faf7f2, #1a1a1a, #0f172a, #b91c1c, #78716c, #1c1917, #e7e5e4, #d6d3d1 */
/* Fonts: Cormorant (display), Lato (body), Inter (labels) */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #faf7f2;
    color: #1a1a1a;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.hero-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.hero-line {
    display: block;
    width: 1px;
    height: 120px;
    background: #d6d3d1;
    flex-shrink: 0;
}

.hero-line--left {
    margin-right: 2.5rem;
}

.hero-line--right {
    margin-left: 2.5rem;
}

.hero-char {
    font-size: clamp(140px, 25vw, 280px);
    color: #0f172a;
    line-height: 1;
    font-weight: 400;
    display: block;
    opacity: 0;
    transform: scale(0.95);
    animation: heroCharReveal 1.2s ease-out 0.3s forwards;
}

@keyframes heroCharReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.8s forwards;
}

.brand-name {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #1a1a1a;
    letter-spacing: 0.02em;
}

.seal-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-5deg);
    flex-shrink: 0;
    opacity: 0;
    animation: sealAppear 0.6s ease-out 1.4s forwards;
}

@keyframes sealAppear {
    0% {
        opacity: 0;
        transform: rotate(-15deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(-5deg) scale(1);
    }
}

.hero-tagline {
    font-size: 0.9rem;
    color: #78716c;
    margin-top: 0.75rem;
    letter-spacing: 0.03em;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1.0s forwards;
}

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

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 1.8s forwards;
}

.scroll-hint-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #d6d3d1);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ================================================
   SHARED SECTION STYLES
   ================================================ */
.section-heading {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.section-intro {
    font-size: 0.85rem;
    color: #78716c;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

/* ================================================
   ANATOMY SECTION
   ================================================ */
.anatomy {
    max-width: 740px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
}

.letter-card {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 2rem 0;
}

.letter-card--reverse {
    flex-direction: row-reverse;
}

.letter-display {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-glyph {
    font-size: 5rem;
    color: #0f172a;
    line-height: 1;
}

/* Annotation lines and dots */
.annotation-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.anno-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #b91c1c;
}

.anno-line {
    position: absolute;
    background: #d6d3d1;
}

.anno-label {
    position: absolute;
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    color: #78716c;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Top annotation */
.anno-dot--top {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.anno-line--top {
    top: 0;
    left: 50%;
    width: 1px;
    height: 8px;
    transform: translateX(-50%);
}

.anno-label--top {
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
}

/* Bottom annotation */
.anno-dot--bottom {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.anno-line--bottom {
    bottom: 5px;
    left: 50%;
    width: 1px;
    height: 10px;
    transform: translateX(-50%);
}

.anno-label--bottom {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

/* Left annotation */
.anno-dot--left {
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
}

.anno-line--left {
    top: 50%;
    left: 0;
    width: 15px;
    height: 1px;
    transform: translateY(-50%);
}

.anno-label--left {
    top: 50%;
    left: -52px;
    transform: translateY(-50%);
}

/* Right annotation */
.anno-dot--right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.anno-line--right {
    top: 50%;
    right: 0;
    width: 10px;
    height: 1px;
    transform: translateY(-50%);
}

.anno-label--right {
    top: 50%;
    right: -58px;
    transform: translateY(-50%);
}

/* Center annotation */
.anno-dot--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.anno-line--center {
    top: 12px;
    left: 50%;
    width: 1px;
    height: calc(50% - 14px);
    transform: translateX(-50%);
}

.anno-label--center {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.letter-info {
    flex: 1;
    padding-top: 0.5rem;
}

.letter-name {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.letter-han {
    font-size: 0.9rem;
    color: #78716c;
}

.letter-description {
    font-size: 0.82rem;
    color: #57534e;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.letter-ipa {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #78716c;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border: 1px solid #d6d3d1;
    border-radius: 3px;
}

.brush-divider {
    height: 2px;
    background: linear-gradient(to right, #b91c1c 0%, #b91c1c 20%, #d6d3d1 50%, transparent 100%);
    margin: 0.5rem 0;
    opacity: 0.7;
}

/* ================================================
   VOWEL SECTION
   ================================================ */
.vowels {
    max-width: 740px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.vowel-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.vowel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 60px;
}

.vowel-char {
    font-size: 2.5rem;
    color: #0f172a;
    line-height: 1;
}

.vowel-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #78716c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vowel-combine {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.vowel-arrow {
    font-size: 1.5rem;
    color: #b91c1c;
}

.vowel-item--result {
    padding: 0.5rem;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    background: #fff;
}

/* ================================================
   SYLLABLE BLOCK SECTION
   ================================================ */
.syllable {
    background: #fff;
    padding: 4rem 2rem;
}

.syllable-showcase {
    max-width: 740px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.syllable-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.block-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 140px;
    height: 140px;
    border: 2px solid #0f172a;
    border-radius: 4px;
}

.block-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #0f172a;
    border: 1px solid #d6d3d1;
}

.block-initial {
    grid-column: 1;
    grid-row: 1;
}

.block-medial {
    grid-column: 2;
    grid-row: 1;
}

.block-final {
    grid-column: 1 / -1;
    grid-row: 2;
}

.block-arrow {
    font-size: 1.5rem;
    color: #b91c1c;
}

.block-result {
    font-size: 4rem;
    color: #0f172a;
    line-height: 1;
}

.syllable-explain {
    max-width: 340px;
}

.syllable-title {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.syllable-text {
    font-size: 0.82rem;
    color: #57534e;
    line-height: 1.7;
}

.syllable-text strong {
    color: #0f172a;
    font-weight: 400;
    font-size: 1.1em;
}

/* ================================================
   TIMELINE SECTION
   ================================================ */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    background: #fff;
    min-width: 110px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-node:hover {
    border-color: #b91c1c;
    box-shadow: 0 2px 12px rgba(185, 28, 28, 0.08);
}

.timeline-year {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: #0f172a;
    display: block;
}

.timeline-connector {
    width: 20px;
    height: 1px;
    background: #d6d3d1;
    display: none;
}

.timeline-event {
    font-size: 0.65rem;
    color: #78716c;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.timeline-line {
    width: 30px;
    height: 1px;
    background: #d6d3d1;
    align-self: center;
    margin-top: 1.2rem;
    flex-shrink: 0;
}

/* ================================================
   INSCRIPTION SECTION
   ================================================ */
.inscription {
    background: #1c1917;
    color: #e7e5e4;
    padding: 6rem 2rem;
    text-align: center;
}

.inscription-inner {
    max-width: 560px;
    margin: 0 auto;
}

.inscription-mark {
    font-size: 2rem;
    color: #b91c1c;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.inscription-quote {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 2;
    color: #e7e5e4;
    border: none;
    margin-bottom: 1.5rem;
    font-style: normal;
}

.inscription-korean {
    font-size: 0.85rem;
    color: #78716c;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.inscription-source {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #78716c;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-style: normal;
    display: block;
}

.inscription-line {
    width: 40px;
    height: 1px;
    background: #78716c;
    margin: 2rem auto;
    opacity: 0.5;
}

.inscription-coda {
    font-size: 0.8rem;
    color: #78716c;
    line-height: 1.8;
    max-width: 400px;
    margin: 0 auto;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    background: #1c1917;
    border-top: 1px solid #2a2725;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-domain {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #78716c;
    letter-spacing: 0.05em;
}

.footer-char {
    font-size: 0.8rem;
    color: #57534e;
}

/* ================================================
   FADE-IN ANIMATIONS
   ================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 640px) {
    .letter-card,
    .letter-card--reverse {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .letter-display {
        width: 100px;
        height: 100px;
    }

    .letter-glyph {
        font-size: 4rem;
    }

    .annotation-lines {
        display: none;
    }

    .hero-line {
        height: 80px;
    }

    .hero-line--left {
        margin-right: 1.5rem;
    }

    .hero-line--right {
        margin-left: 1.5rem;
    }

    .timeline-track {
        flex-direction: column;
        align-items: center;
    }

    .timeline-line {
        width: 1px;
        height: 20px;
        margin-top: 0;
    }

    .syllable-showcase {
        flex-direction: column;
        text-align: center;
    }

    .vowel-grid {
        gap: 0.5rem;
    }

    .vowel-char {
        font-size: 2rem;
    }
}
