:root {
    --primary-background: #FDFBF7;
    --primary-text: #2B2118;
    --secondary-background: #F5EFEB;
    --secondary-text: #6E5E52;
    --accent-color: #A05A2C;
    --accent-hover: #7D421B;
    --card-background: #FFFFFF;
    --card-border: #E8DFD8;
    --dark-section-background: #1F1712;
    --dark-section-text: #FDFBF7;
    --font-primary: 'Noto Sans KR', sans-serif;
    --font-headings: 'Gowun Batang', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--primary-text);
    background-color: var(--primary-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: keep-all;
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: inherit;
}

h1 {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

h5 {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

h6 {
    font-size: 0.95rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a,
a:hover,
a:focus {
    text-decoration: none;
}

a {
    color: var(--accent-color);
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--accent-hover);
}

button,
.btn {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

ul,
ol {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 1.65rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1.05rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    a[href^="mailto:"],
    a[href^="http"],
    .text-break-mobile {
        font-size: 0.9rem;
        word-break: break-all;
    }
}

/* ===== header_section ===== */
#site-header {
    overflow: hidden;
}

#site-header .nav-link:hover,
#site-header .nav-link:focus {
    color: var(--accent-color) !important;
}

#site-header .btn.js-cta-link:hover {
    background-color: var(--accent-hover) !important;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    overflow-y: auto;
}

.mobile-menu-overlay.is-open {
    display: block !important;
}

@media (max-width: 767.98px) {
    #site-header span {
        font-size: 0.8rem !important;
    }
}

/* ===== hero_section ===== */
#hero {
    overflow: hidden;
    background-color: var(--dark-section-background);
    min-height: 80vh
}

#hero .min-vh-75 {
    min-height: 75vh
}

#hero .hero-bg-img {
    object-fit: cover;
    object-position: center;
    z-index: 0
}

#hero .hero-overlay {
    background: linear-gradient(90deg, rgba(31, 23, 18, 0.92) 0%, rgba(31, 23, 18, 0.78) 55%, rgba(31, 23, 18, 0.45) 100%);
    z-index: 1
}

#hero .hero-badge {
    background-color: rgba(253, 251, 247, 0.1);
    border: 1px solid rgba(232, 223, 216, 0.2)
}

#hero .text-accent {
    color: var(--accent-color)
}

#hero .text-hero-badge {
    color: var(--card-border)
}

#hero .text-hero-sub {
    color: var(--card-border);
    font-size: 1.15rem;
    line-height: 1.7
}

#hero .text-hero-caption {
    color: var(--secondary-background);
    font-size: 0.85rem
}

#hero .btn-hero-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    transition: background-color 0.2s ease
}

#hero .btn-hero-primary:hover {
    background-color: var(--accent-hover);
    color: #ffffff
}

#hero .btn-hero-outline {
    background-color: transparent;
    color: var(--primary-background);
    border: 1px solid var(--card-border);
    transition: all 0.2s ease
}

#hero .btn-hero-outline:hover {
    background-color: rgba(253, 251, 247, 0.15);
    color: #ffffff;
    border-color: #ffffff
}

@media(max-width:767.98px) {
    #hero h1.hero-title {
        font-size: 1.125rem;
        line-height: 1.25;
        hyphens: auto
    }

    #hero p.hero-desc {
        font-size: 0.875rem;
        line-height: 1.4
    }

    #hero .btn-hero-primary,
    #hero .btn-hero-outline {
        width: 100%;
        text-align: center;
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
        font-size: 0.875rem
    }
}

/* ===== about_author_section ===== */
#about-author {
    width: 100%;
    overflow: hidden;
}

#about-author .author-photo-wrapper {
    max-width: 400px;
    position: relative;
}

#about-author blockquote {
    border-color: var(--card-border);
}

/* ===== main_article_section ===== */
.main-article-section {
    width: 100%;
    hyphens: auto;
    word-break: keep-all;
}

.main-article-section .article-title {
    font-size: clamp(1.5rem, 3vw + 1rem, 2.3rem);
    line-height: 1.25;
}

.main-article-section .article-img {
    height: 380px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .main-article-section .article-title {
        font-size: 1.125rem !important;
        line-height: 1.2;
    }

    .main-article-section h2 {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    .main-article-section h3 {
        font-size: 0.875rem !important;
        line-height: 1.3;
    }

    .main-article-section .article-img {
        height: 220px;
    }
}

.js-share-btn {
    border-color: var(--card-border);
    color: var(--primary-text);
    background-color: var(--card-background);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.js-share-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #FFFFFF;
}

.js-share-btn:hover i {
    color: #FFFFFF !important;
}

/* ===== brewing_methods_section ===== */
#brewing-methods {
    overflow: hidden;
    hyphens: auto;
}

#brewing-methods .js-method-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

#brewing-methods .js-method-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(43, 33, 24, 0.08) !important;
}

@media (max-width: 767.98px) {
    #brewing-methods h2 {
        font-size: 1rem !important;
        line-height: 1.25;
    }

    #brewing-methods h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }
}

/* ===== grind_matters_section ===== */
#grind-guide {
    hyphens: auto;
}

#grind-guide .card {
    transition: transform .2s ease-in-out, box-shadow .2s ease-in-out;
}

#grind-guide .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(43, 33, 24, 0.06);
}

@media(max-width:767.98px) {
    #grind-guide h2 {
        font-size: 1rem !important;
        line-height: 1.2;
    }

    #grind-guide h3 {
        font-size: 0.875rem !important;
        line-height: 1.2;
    }
}

/* ===== recipe_french_press_section ===== */
#french-press-recipe {
    width: 100%;
    position: relative;
}

#french-press-recipe .recipe-timeline::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 35px;
    width: 2px;
    background-color: var(--card-border);
    z-index: 1;
}

#french-press-recipe .recipe-step {
    z-index: 2;
}

#french-press-recipe .step-badge-wrapper {
    z-index: 3;
}

#french-press-recipe .step-content {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
}

#french-press-recipe .step-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(43, 33, 24, 0.08) !important;
}

@media (max-width: 576px) {
    #french-press-recipe .recipe-timeline::before {
        display: none;
    }

    #french-press-recipe .recipe-timeline {
        padding-left: 0 !important;
    }

    #french-press-recipe .recipe-step > .d-flex {
        flex-direction: column;
    }

    #french-press-recipe .step-badge-wrapper {
        margin: 0 0 0.75rem 0 !important;
    }

    #french-press-recipe .step-content > .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.65rem;
    }

    #french-press-recipe .step-badge-wrapper span {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
    }
}

/* ===== methods_comparison_section ===== */
#methods-comparison {
    width: 100%;
    box-sizing: border-box;
}

#methods-comparison .comparison-table th,
#methods-comparison .comparison-table td {
    vertical-align: middle;
    border-color: var(--card-border);
}

#methods-comparison .comparison-table tbody tr:hover {
    background-color: var(--secondary-background);
    transition: background-color 0.2s ease;
}

@media (max-width: 767.98px) {
    #methods-comparison h2 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        hyphens: auto;
    }

    #methods-comparison p {
        font-size: 0.875rem !important;
    }

    #methods-comparison .table-responsive {
        border-radius: 0.75rem;
    }
}

/* ===== flavor_factors_section ===== */
.flavor-factors-section {
    width: 100%;
    position: relative;
}

.flavor-factors-section .factor-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.flavor-factors-section .factor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(43, 33, 24, 0.08);
}

@media (max-width: 767.98px) {
    .flavor-factors-section h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    .flavor-factors-section h3 {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
    }

    .flavor-factors-section .lead {
        font-size: 0.8125rem !important;
        line-height: 1.4 !important;
    }

    .flavor-factors-section .factor-hero-img-wrap img {
        height: 200px !important;
    }
}

/* ===== newsletter_section ===== */
#newsletter {
    background-color: var(--secondary-background);
}

.newsletter-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-btn {
    transition: background-color 0.25s ease, transform 0.15s ease;
    border-radius: 0.375rem;
}

.newsletter-btn:hover {
    background-color: var(--accent-hover) !important;
    color: #FFFFFF !important;
}

.newsletter-btn:active {
    transform: scale(0.98);
}

#newsletter input.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(160, 90, 44, 0.15);
    outline: none;
}

#newsletter input::placeholder {
    color: #A89F91;
}

@media (max-width: 767.98px) {
    #newsletter h2 {
        font-size: 1rem !important;
        line-height: 1.25 !important;
        hyphens: auto;
    }

    #newsletter p {
        font-size: 0.875rem !important;
    }
}

/* ===== footer_section ===== */
.footer-block {
    width: 100%;
    position: relative;
    hyphens: auto;
}

.footer-block a {
    transition: color 0.2s ease-in-out;
}

.footer-block a:hover {
    color: var(--accent-color) !important;
}

.footer-block .js-back-to-top {
    transition: background-color 0.2s ease-in-out, transform 0.2s ease;
}

.footer-block .js-back-to-top:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-2px);
}

@media (max-width: 767.98px) {
    .footer-block h3 {
        font-size: 1rem !important;
        line-height: 1.2;
    }

    .footer-block .nav-link,
    .footer-block p,
    .footer-block a,
    .footer-block button {
        font-size: 0.8rem !important;
    }
}
