/* hangul.day styles */
/* Palette: #f0f4f8, #ffffff, #1e293b, #2563eb, #d97706, #059669, #cbd5e1, #fef3c7 */
/* Fonts: Playfair Display (700), Lato (400), Roboto (500) */

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

html {
    scroll-behavior: smooth;
}

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

/* ===========================
   HERO ZONE (Celebrate)
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #f0f4f8;
    position: relative;
}

.hero-inner {
    text-align: center;
    max-width: 600px;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 0.5rem;
}

/* Book icon: two rectangles angled as open book */
.book-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    position: relative;
    width: 36px;
    height: 30px;
    flex-shrink: 0;
}

.book-left,
.book-right {
    display: block;
    width: 14px;
    height: 20px;
    background: #2563eb;
    border-radius: 2px 0 0 2px;
    position: absolute;
    bottom: 4px;
}

.book-left {
    left: 2px;
    transform: rotate(-12deg);
    transform-origin: bottom right;
}

.book-right {
    right: 2px;
    transform: rotate(12deg);
    transform-origin: bottom left;
    border-radius: 0 2px 2px 0;
}

.brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-date {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #2563eb;
    margin-top: 0.4rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #475569;
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
}

/* Decorative horizontal banner with geometric pattern */
.banner {
    width: 240px;
    height: 6px;
    margin: 2rem auto 0;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.banner-pattern {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #2563eb 0px,
        #2563eb 24px,
        #d97706 24px,
        #d97706 48px,
        #059669 48px,
        #059669 72px
    );
    animation: bannerShift 12s linear infinite;
}

@keyframes bannerShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-72px); }
}

/* ===========================
   LESSON CARDS (Learn)
   =========================== */
.lessons {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lesson {
    background: #ffffff;
    border-radius: 0 8px 8px 0;
    padding: 28px 28px 24px;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    position: relative;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lesson:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.1);
}

.lesson.blue {
    border-left: 4px solid #2563eb;
}

.lesson.amber {
    border-left: 4px solid #d97706;
}

.lesson.green {
    border-left: 4px solid #059669;
}

.lesson-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #1e293b;
    flex-shrink: 0;
    margin-top: 2px;
}

.lesson-content {
    flex: 1;
    min-width: 0;
}

.lesson-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.lesson-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
}

.lesson-visual {
    margin-top: 0.75rem;
}

.hangul-svg {
    width: 120px;
    height: 60px;
    display: block;
}

/* Syllable block demo */
.block-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.block-cell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 48px;
    height: 48px;
    border: 2px solid #059669;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #059669;
    text-align: center;
    line-height: 1;
}

.block-part {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.block-part.top-left {
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}

.block-part.top-right {
    border-bottom: 1px solid #cbd5e1;
}

.block-part.bottom {
    grid-column: 1 / -1;
}

.block-arrow {
    font-size: 1.2rem;
    color: #cbd5e1;
}

.block-result {
    font-size: 2rem;
    color: #059669;
    font-weight: 700;
    opacity: 0.5;
}

/* ===========================
   FACT CARDS (Know)
   =========================== */
.facts {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.facts-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    text-align: center;
    color: #1e293b;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.fact-card {
    background: #ffffff;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.fact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.08);
}

.fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-bottom: 4px;
}

.fact-icon.blue-icon {
    background: rgba(37, 99, 235, 0.08);
}

.fact-icon.amber-icon {
    background: rgba(217, 119, 6, 0.08);
}

.fact-icon.green-icon {
    background: rgba(5, 150, 105, 0.08);
}

.fact-num {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.75rem;
    color: #2563eb;
    display: block;
    line-height: 1.2;
}

.fact-cap {
    font-size: 0.7rem;
    color: #64748b;
    display: block;
    line-height: 1.4;
}

/* ===========================
   SCROLL SECTION (Honor)
   =========================== */
.scroll-section {
    max-width: 720px;
    margin: 2rem auto 0;
    position: relative;
}

.scroll-ornament {
    height: 32px;
    background: #fef3c7;
    position: relative;
}

.scroll-ornament.top {
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -2px 8px rgba(120, 53, 15, 0.06);
}

.scroll-ornament.top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d97706, transparent);
    opacity: 0.3;
}

.scroll-ornament.bottom {
    border-radius: 0 0 24px 24px;
    box-shadow: 0 2px 8px rgba(120, 53, 15, 0.06);
}

.scroll-ornament.bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d97706, transparent);
    opacity: 0.3;
}

.scroll-body {
    background: #fef3c7;
    padding: 3rem 2.5rem;
    text-align: center;
}

.scroll-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #78350f;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.scroll-divider {
    width: 60px;
    height: 2px;
    background: #d97706;
    margin: 1.5rem auto;
    opacity: 0.4;
    border-radius: 1px;
}

.scroll-quote {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.88rem;
    color: #92400e;
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.7;
    font-style: italic;
}

.scroll-attribution {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.72rem;
    color: #92400e;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.scroll-attr {
    font-size: 0.7rem;
    color: #92400e;
    display: block;
    margin-top: 2rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* ===========================
   ANIMATIONS
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger lesson card animations */
.lesson.fade-in:nth-child(1) { transition-delay: 0s; }
.lesson.fade-in:nth-child(2) { transition-delay: 0.12s; }
.lesson.fade-in:nth-child(3) { transition-delay: 0.24s; }

/* Counter animation for fact numbers */
.fact-card .fact-num {
    transition: color 0.3s ease;
}

.fact-card:hover .fact-num {
    color: #1e293b;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 600px) {
    .fact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        min-height: 80vh;
        padding: 3rem 1.5rem;
    }

    .lessons {
        padding: 1.5rem 1rem 2rem;
    }

    .lesson {
        padding: 20px 20px 18px;
        gap: 1rem;
    }

    .facts {
        padding: 1.5rem 1rem 2rem;
    }

    .scroll-body {
        padding: 2rem 1.5rem;
    }

    .brand-row {
        gap: 10px;
    }
}

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

    .block-demo {
        transform: scale(0.9);
        transform-origin: left center;
    }
}
