/* =========================================================================
   DMZ Korea Guide — main stylesheet
   Korean-inspired editorial palette: deep midnight blue, ivory, accent red.
   Mobile-first, system font stack with Inter override and Noto Serif KR
   for branding flourishes. Lightweight, no framework.
   ========================================================================= */

/* -------- Reset / base ------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img,svg,video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

:root {
    --brand:        #0b2a4a;     /* midnight blue */
    --brand-2:      #142d51;
    --accent:       #c1272d;     /* Korean flag red */
    --accent-soft:  #e26b6f;
    --ink:          #1a2230;
    --muted:        #5a6473;
    --line:         #e6e8ed;
    --line-strong:  #c8ccd4;
    --bg:           #fbfaf6;     /* ivory */
    --bg-alt:       #ffffff;
    --bg-soft:      #f3f5fa;
    --shadow:       0 1px 3px rgba(11,42,74,.05), 0 8px 24px rgba(11,42,74,.06);
    --shadow-strong:0 6px 30px rgba(11,42,74,.18);
    --radius:       10px;
    --radius-lg:    18px;
    --max-w:        1180px;
}

.container { width: min(100% - 2rem, var(--max-w)); margin-inline: auto; }

/* -------- Typography --------------------------------------------------- */
h1,h2,h3,h4,h5 { font-family: 'Inter', sans-serif; color: var(--brand); line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; margin-top: 2.4em; margin-bottom: .6em; letter-spacing: -.01em; }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); font-weight: 700; margin-top: 1.8em; margin-bottom: .5em; }
h4 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
strong { font-weight: 700; color: #142235; }

/* Pull-quote-like first paragraph in articles */
.entry-content > p:first-of-type {
    font-size: 1.15rem;
    color: #28344a;
}

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; padding: 8px 16px; background: var(--brand); color: #fff; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

/* -------- Header / nav ------------------------------------------------- */
.topbar { background: var(--brand); color: #f1f3f8; font-size: .82rem; }
.topbar__inner { display:flex; justify-content: space-between; align-items: center; padding: .35rem 0; }
.topbar__lang { list-style: none; margin: 0; padding: 0; display: flex; gap: .65rem; }
.topbar__lang a { color: #c4d0e0; padding: .2rem .5rem; border-radius: 4px; }
.topbar__lang a.is-active { background: rgba(255,255,255,.12); color: #fff; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.site-header__inner { display:flex; align-items: center; gap: 1.5rem; padding: 1rem 0; }
.site-branding { margin-right: auto; }
.site-logo { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; color: var(--brand); }
.site-logo:hover { text-decoration: none; }
.site-logo__mark {
    background: var(--brand); color: #fff;
    font-family: 'Noto Serif KR', serif; font-weight: 700;
    padding: .35rem .55rem; border-radius: 6px; letter-spacing: .04em;
}
.site-logo__text { font-size: 1.05rem; letter-spacing: -.005em; }

.nav-toggle { display:none; background: none; border: 0; padding: .5rem; }
.nav-toggle__bar { display:block; width: 24px; height: 2px; background: var(--brand); margin: 5px 0; transition: transform .2s; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.site-nav__list a { color: var(--ink); font-weight: 500; padding: .5rem 0; }
.site-nav__list a:hover { color: var(--brand); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a { color: var(--brand); border-bottom: 2px solid var(--accent); }

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; flex-direction: column; }
    .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); transform: translateY(-110%); transition: transform .25s ease; padding: 1rem; }
    .site-nav.is-open { transform: translateY(0); box-shadow: var(--shadow); }
    .site-nav__list { flex-direction: column; gap: .25rem; }
    .site-nav__list a { padding: .8rem .5rem; border-bottom: 1px solid var(--line); display: block; }
}

/* -------- Hero --------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1000px 700px at 0% -10%, rgba(193,39,45,.35), transparent 60%),
        radial-gradient(1100px 700px at 100% 110%, rgba(255,255,255,.18), transparent 60%),
        linear-gradient(140deg, #0b2a4a 0%, #142d51 60%, #1f3a6a 100%);
    padding: clamp(3rem, 8vw, 6rem) 0;
}
.hero__overlay { position:absolute; inset:0;
    background-image:
        repeating-linear-gradient( 45deg, rgba(255,255,255,.04) 0 1px, transparent 1px 20px ),
        repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 1px, transparent 1px 20px );
    pointer-events: none;
}
.hero__inner { position: relative; max-width: 820px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; color: #ff9da0; font-weight: 600; }
.hero__title { color: #fff; margin: .8rem 0 1rem; font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.hero__title em { color: #ffc56b; font-style: normal; }
.hero__lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: #d2dbe8; max-width: 60ch; }
.hero__ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.hero__trust { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; gap: 1.6rem; flex-wrap: wrap; color: #c4d0e0; font-size: .95rem; }

/* -------- Buttons ------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center;
    padding: .8rem 1.3rem; border-radius: 999px; font-weight: 600; line-height: 1.1;
    border: 2px solid transparent; transition: transform .12s, background .2s, color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #a91f24; color: #fff; }
.btn--ghost { background: transparent; color: var(--brand); border-color: currentColor; }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--large { padding: 1rem 1.6rem; font-size: 1.05rem; }
.dmzkg-lang-en .hero .btn--ghost,
.dmzkg-lang-fr .hero .btn--ghost { color: #fff; border-color: #fff; }
.dmzkg-lang-en .hero .btn--ghost:hover,
.dmzkg-lang-fr .hero .btn--ghost:hover { background: #fff; color: var(--brand); }

/* -------- Sections / front -------------------------------------------- */
.front-section { margin: 4rem auto; }
.section-title { text-align: left; margin: 0 0 1.5rem; }

/* -------- Card grid ---------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card-grid--small { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); }
.card__link { color: inherit; display: block; }
.card__link:hover { text-decoration: none; }
.card__placeholder {
    display: grid; place-items:center; aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--brand) 0%, #1f3a6a 100%); color: rgba(255,255,255,.85);
    font-family: 'Noto Serif KR', serif; font-size: 1.6rem; letter-spacing: .15em;
}
.card__body { padding: 1.2rem 1.3rem 1.5rem; }
.card__cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.card__title { font-size: 1.15rem; margin: .35rem 0 .55rem; color: var(--brand); }
.card__excerpt { color: var(--muted); font-size: .95rem; margin: 0 0 .75rem; }
.card__more { color: var(--brand); font-weight: 600; font-size: .95rem; }
.card--small .card__title { font-size: 1.05rem; }

/* -------- Article shell ------------------------------------------------ */
.article-shell { padding: 1.5rem 0 5rem; }
.article__header { padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.article__cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.article__title { margin: .4rem 0 .75rem; }
.article__meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.article__meta time { font-weight: 500; }

.article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
@media (max-width: 980px) {
    .article__layout { grid-template-columns: 1fr; }
}

.article__sidebar { position: sticky; top: 90px; align-self: start; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; margin-bottom: 1.5rem; }
.widget--cta { background: linear-gradient(160deg, #fff 0%, #f1edd9 100%); border-color: #f1e6a4; }
.widget-title { margin: 0 0 .75rem; font-size: 1.05rem; }

/* Crumbs */
.crumbs { font-size: .85rem; color: var(--muted); margin: 1.2rem 0; }
.crumbs a { color: var(--muted); }
.crumbs__sep { margin: 0 .35rem; color: #b6bbc6; }

/* TOC */
.toc { background: #fff; border-left: 4px solid var(--accent); padding: 1.1rem 1.4rem; margin: 1.5rem 0 2rem; border-radius: 6px; box-shadow: var(--shadow); }
.toc__title { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: .5rem; }
.toc__list { margin: 0; padding-left: 1.2rem; counter-reset: tocnum; }
.toc__list li { margin: .25rem 0; counter-increment: tocnum; list-style: none; position: relative; }
.toc__list li::before { content: counter(tocnum, decimal-leading-zero); color: var(--accent); font-weight: 700; font-size: .75rem; margin-right: .5rem; }

/* -------- Entry content ------------------------------------------------ */
.entry-content { font-size: 1.06rem; }
.entry-content h2 { padding-bottom: .35rem; border-bottom: 2px solid var(--line); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    padding: .75rem 1.2rem; margin: 1.5rem 0;
    background: var(--bg-soft); color: #2d3a52; font-style: italic;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--brand); color: #fff; font-weight: 600; }
.entry-content tr:nth-child(even) td { background: var(--bg-soft); }

/* CTA card */
.cta-card { background: linear-gradient(135deg, #ffffff 0%, #f3eed3 100%); border: 1px solid #efe5b1; border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin: 2rem 0; box-shadow: var(--shadow); }
.cta-card__title { margin: 0 0 .35rem; }
.cta-card__text { margin: 0 0 1rem; color: #3c4860; }
.cta-card__buttons { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Snippet box */
.snippet { background: #fffaeb; border-left: 5px solid #f0b34c; padding: 1rem 1.2rem; margin: 1.5rem 0; border-radius: 6px; }
.snippet__label { display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: #b1620e; font-weight: 700; margin-bottom: .35rem; }

/* Pros / cons */
.pros, .cons { list-style: none; padding: 1rem 1.2rem; border-radius: var(--radius); margin: 1rem 0; }
.pros { background: #ecfdf3; border: 1px solid #b7e8c9; }
.cons { background: #fff1f1; border: 1px solid #f5c2c2; }
.pros li, .cons li { padding-left: 1.4rem; position: relative; }
.pros li::before, .cons li::before { position: absolute; left: 0; }
.pros li::before { content: '✔'; color: #1a8a4d; }
.cons li::before { content: '✘'; color: #b3261e; }
.pros__title, .cons__title { font-weight: 700; padding-left: 0; margin-bottom: .35rem; }
.pros__title::before, .cons__title::before { content: ''; }

/* Compare table */
.compare { overflow-x: auto; }
.compare__table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; min-width: 540px; }
.compare__table th, .compare__table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.compare__table thead th { background: var(--brand); color: #fff; }

/* Steps list */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; }
.steps__item { counter-increment: step; padding: 1rem 1.2rem 1rem 3.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: .6rem 0; position: relative; }
.steps__item::before { content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.steps__title { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--brand); }

/* Callouts */
.callout { padding: 1rem 1.2rem; border-radius: var(--radius); margin: 1.4rem 0; border-left: 5px solid var(--brand); background: #fff; box-shadow: var(--shadow); }
.callout--tip { border-color: #1f6feb; background: #eef5ff; }
.callout--warning { border-color: #c1272d; background: #fff0f0; }
.callout--insider { border-color: #5a3afe; background: #f0edff; }
.callout__title { display: block; margin-bottom: .25rem; color: var(--brand); }
.callout--tip .callout__title { color: #114a9c; }
.callout--warning .callout__title { color: #8e1c1f; }
.callout--insider .callout__title { color: #3527ae; }

/* FAQ */
.faq { margin: 2rem 0; }
.faq__title { margin-bottom: 1rem; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1.2rem; margin-bottom: .6rem; transition: border-color .2s; }
.faq__item[open] { border-color: var(--accent); }
.faq__q { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; position: relative; padding-right: 2rem; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: '+'; position: absolute; right: .25rem; top: -.05rem; font-size: 1.4rem; color: var(--accent); transition: transform .2s; }
.faq__item[open] .faq__q::after { content: '−'; }
.faq__a { padding-top: .65rem; color: #2c374b; font-size: .98rem; }

/* Sticky CTA */
.sticky-cta {
    position: fixed; left: 0; right: 0; bottom: -120px;
    background: var(--brand); color: #fff;
    z-index: 80;
    transition: bottom .35s ease;
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}
.sticky-cta.is-visible { bottom: 0; }
.sticky-cta__inner { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; }
.sticky-cta__title { font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; color: #ffd2c1; }
.sticky-cta__text { color: #d6dde9; flex: 1; font-size: .92rem; }
.sticky-cta .btn--primary { padding: .7rem 1.1rem; }
.sticky-cta__close { background: transparent; border: 0; color: #fff; font-size: 1.4rem; opacity: .7; }
.sticky-cta__close:hover { opacity: 1; }
@media (max-width: 720px) {
    .sticky-cta__text { display: none; }
}

/* Related */
.related { margin-top: 4rem; }

/* Pagination */
.pagination { margin: 3rem 0 1rem; }
.pagination .nav-links { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 6px; color: var(--brand); }
.pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Footer */
.site-footer { background: #0b1d33; color: #c4d0e0; margin-top: 5rem; padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.site-footer .widget { background: transparent; border: 0; padding: 0; }
.site-footer .widget-title { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin: .25rem 0; }
.site-footer__bottom { border-top: 1px solid #1a3056; margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #8d9bb4; }
.site-footer__disclosure { max-width: 70ch; margin: 0; }

/* Search form */
.search-form { display: flex; gap: .5rem; margin: 1rem 0; }
.search-form__input { flex: 1; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }

/* 404 */
.error-shell { padding: 4rem 0; text-align: center; }
.error-code { font-size: 6rem; color: var(--accent); margin: 0; }
.error-text { font-size: 1.1rem; color: var(--muted); max-width: 50ch; margin: 0 auto 2rem; }

/* Affiliate disclosure paragraph at the bottom of articles */
.entry-content em { color: #5a6473; }

/* Small utilities */
.is-hidden { display: none !important; }
