/* ==========================================================================
   KidsDoctor - Common Design Tokens & Base Component Styles (common.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
    --navy: #0b2e5b;
    --navy-deep: #08264d;
    --ink: #152d4e;
    --red: #c8102e;
    --gold: #b38e49;
    --gold-text: #b99a5a;
    --gold-light: #d4af7a;
    --cream: #fcf9f1;
    --muted: #737373;
    --line: #e7d4b4;
    --site-content-width: 1400px;
    --site-gutter: 40px;
}

/* --------------------------------------------------------------------------
   2. Base Body Styles
   -------------------------------------------------------------------------- */
body {
    font-family: Pretendard, "Malgun Gothic", sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink);
    background: #fff;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   3. Layout Containers
   -------------------------------------------------------------------------- */
.container {
    width: min(var(--site-content-width), calc(100% - var(--site-gutter) * 2));
    margin-inline: auto;
}

.section {
    padding: 100px 0 70px;
}

/* --------------------------------------------------------------------------
   4. Section Typography & Headings
   -------------------------------------------------------------------------- */
.section-heading {
    text-align: center;
    margin-bottom: 70px;
}

.section-heading h2 {
    margin-top: 20px;
}

.section-description {
    margin-top: 24px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
    letter-spacing: -0.04em;
}

.eyebrow {
    display: inline-block;
    border: 1px solid var(--line);
    padding: 3px 16px;
    border-radius: 30px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1.4px;
}

h1,
h2,
h3 {
    line-height: 1.3;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 48px;
    font-weight: 800;
}

h3 {
    font-size: 24px;
}

em {
    color: var(--red);
}

.gold {
    color: var(--gold-light);
}

/* --------------------------------------------------------------------------
   5. Buttons & Action Links
   -------------------------------------------------------------------------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 50px;
    padding: 13px 28px;
    border: 1px solid var(--ink);
    border-radius: 50px;
    background: var(--ink);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition:
        background 0.2s,
        transform 0.2s;
}

.button:hover {
    background: #244976;
    transform: translateY(-2px);
}

.button-outline {
    background: transparent;
    color: var(--ink);
}

.button-outline:hover {
    background: #fff;
}

.button-gold {
    color: #fff;
    border-color: var(--gold);
    background: linear-gradient(110deg, #c6a568, #b38e49);
    box-shadow: 0 4px 9px #0002;
}

.button-gold:hover {
    background: #a9803e;
}

.button-gold-outline {
    color: var(--gold-light);
    background: transparent;
    border-color: var(--gold);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.section-action {
    margin-top: 50px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   6. Utilities & Accessibility
   -------------------------------------------------------------------------- */
.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;
    z-index: 100;
    padding: 14px 24px;
    color: #fff;
    background: var(--navy);
}

.skip-link:focus {
    top: 10px;
}

.back-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 15;
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 4px 20px #0001;
    font-size: 24px;
}

.reveal-ready {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.reveal-ready.is-visible {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   7. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    :root {
        --site-gutter: 32px;
    }

    body {
        font-size: 16px;
    }

    h2 {
        font-size: 38px;
    }

    h3 {
        font-size: 22px;
    }

    .section {
        padding: 76px 0;
    }

    .section-heading {
        margin-bottom: 45px;
    }
}

@media (max-width: 700px) {
    :root {
        --site-gutter: 22px;
    }

    h2 {
        font-size: 30px;
    }

    h3 {
        font-size: 21px;
    }

    .section {
        padding: 60px 0;
    }

    .section-heading {
        margin-bottom: 36px;
    }

    .section-description {
        font-size: 16px;
    }

    .section-description br {
        display: none;
    }

    .button {
        padding: 12px 22px;
        font-size: 14px;
        min-height: 46px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .section-action {
        margin-top: 32px;
    }
}
