/*
Theme Name: NetgiftInfo
Theme URI: https://netgiftinfo.stofarm.com
Description: 넷기프트인포 — 인터넷 가입 사은품 비교 정보 플랫폼 전용 테마. 프리미엄 디자인 시스템(8pt 스케일·브랜드 토큰·프리텐다드+세리프 타이포).
Version: 1.0.0
Author: NetgiftInfo
Text Domain: netgiftinfo
*/

:root {
    --brand-navy: #0F2350;
    --brand-blue: #1B57D6;
    --brand-blue-dark: #123A8A;
    --brand-mint: #00C2A8;
    --brand-mint-dark: #00A88F;
    --brand-yellow: #FFC542;
    --ink: #101828;
    --slate-700: #344054;
    --slate-600: #475467;
    --slate-400: #98A2B3;
    --bg: #FFFFFF;
    --bg-soft: #F4F6FB;
    --bg-ivory: #FBFAF7;
    --line: #E4E7EC;
    --line-strong: #D0D5DD;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
    --shadow-md: 0 4px 12px rgba(15,35,80,.08), 0 2px 4px rgba(15,35,80,.05);
    --shadow-lg: 0 16px 40px rgba(15,35,80,.14);
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
    --space-6: 24px; --space-7: 32px; --space-8: 40px; --space-9: 48px; --space-10: 64px;
    --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Noto Serif KR', 'Pretendard Variable', serif;
    --content-max: 760px;
    --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-navy); }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.35; color: var(--brand-navy); letter-spacing: -.01em; }
p { margin: 0 0 1.2em; }
ul, ol { margin: 0 0 1.4em; padding-left: 1.4em; }
li { margin-bottom: .45em; }

/* ===== 레이아웃 ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--brand-navy); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue)); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { font-size: 15px; font-weight: 600; color: var(--slate-700); padding: 8px 14px; border-radius: 999px; }
.main-nav a:hover { color: var(--brand-blue); background: var(--bg-soft); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-sans); font-size: 15px; font-weight: 700;
    padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: all .2s ease; line-height: 1.2;
    min-height: 44px;
}
.btn-primary { background: var(--brand-blue); color: #fff; box-shadow: 0 4px 14px rgba(27,87,214,.35); }
.btn-primary:hover { background: var(--brand-blue-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--brand-navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.btn-mint { background: var(--brand-mint); color: #062B24; }
.btn-mint:hover { background: var(--brand-mint-dark); color: #fff; }

/* ===== 히어로 ===== */
.hero { background: radial-gradient(1200px 480px at 78% -10%, rgba(27,87,214,.10), transparent 60%), linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 88px 0 84px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--brand-blue); background: #EAF0FF; border: 1px solid #D6E2FF; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.22; margin: 0 0 22px; font-weight: 700; }
.hero-sub { font-size: 18px; line-height: 1.8; color: var(--slate-600); max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: 13px; color: var(--slate-400); }
.hero-visual { position: relative; }
.hero-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); padding: 26px; position: relative;
}
.hero-card-title { font-size: 15px; font-weight: 800; color: var(--brand-navy); margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.hero-card-badge { font-size: 12px; font-weight: 700; color: var(--brand-blue); background: #EAF0FF; padding: 4px 10px; border-radius: 999px; }
.compare-row { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.compare-row:last-child { border-bottom: 0; }
.compare-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.compare-label { font-size: 14px; font-weight: 600; color: var(--slate-700); }
.compare-val { font-size: 13.5px; font-weight: 700; color: var(--brand-navy); }
.compare-bar { height: 8px; border-radius: 99px; background: #EEF2F9; overflow: hidden; }
.compare-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint)); }
.hero-float {
    position: absolute; right: -14px; bottom: -18px; background: var(--brand-navy); color: #fff;
    padding: 12px 18px; border-radius: var(--radius-md); font-size: 13px; font-weight: 700;
    box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
}
.hero-float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-mint); }

/* ===== 섹션 공통 ===== */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-ivory { background: var(--bg-ivory); }
.section-navy { background: linear-gradient(160deg, var(--brand-navy) 0%, #14295C 100%); color: #fff; }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-eyebrow { font-size: 13.5px; font-weight: 800; letter-spacing: .08em; color: var(--brand-blue); text-transform: uppercase; margin-bottom: 12px; }
.section-navy .section-eyebrow { color: var(--brand-mint); }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 16px; }
.section-head p { color: var(--slate-600); font-size: 16.5px; margin: 0; }
.section-navy .section-head p { color: #B9C4DE; }

/* ===== 카드 ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-blue), var(--brand-mint)); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 18px; }
.step-card h3 { font-size: 19px; margin: 0 0 10px; }
.step-card p { font-size: 15px; color: var(--slate-600); margin: 0; line-height: 1.7; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: #EAF0FF; color: var(--brand-blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }

/* ===== 최신 글 ===== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #EEF2F9; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: 12.5px; font-weight: 800; color: var(--brand-blue); margin-bottom: 8px; letter-spacing: .02em; }
.post-body h3 { font-size: 18px; line-height: 1.5; margin: 0 0 10px; }
.post-body h3 a { color: var(--brand-navy); }
.post-body h3 a:hover { color: var(--brand-blue); }
.post-excerpt { font-size: 14.5px; color: var(--slate-600); line-height: 1.65; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin-top: auto; font-size: 13px; color: var(--slate-400); display: flex; align-items: center; gap: 8px; }
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* ===== 캐러셀 ===== */
.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.carousel-item { scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.carousel-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.carousel-item-body { padding: 20px 22px 24px; }
.carousel-item-body h3 { font-size: 17px; margin: 0 0 8px; }
.carousel-item-body p { font-size: 14px; color: var(--slate-600); margin: 0; }

/* ===== 스플릿 섹션 ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media img { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; color: var(--slate-700); }
.check-list li:last-child { border-bottom: 0; }
.check-ic { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--brand-mint); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-top: 3px; font-size: 12px; font-weight: 800; }

/* ===== 상황별 ===== */
.scenario-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.scenario-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-lg); padding: 28px; transition: background .25s ease, transform .25s ease; }
.scenario-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }
.scenario-card h3 { color: #fff; font-size: 18px; margin: 0 0 10px; }
.scenario-card p { color: #B9C4DE; font-size: 14.5px; margin: 0 0 16px; line-height: 1.7; }
.scenario-card a { color: var(--brand-mint); font-size: 14px; font-weight: 700; }

/* ===== 푸터 ===== */
.site-footer { background: #0B1733; color: #8FA0C2; padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-desc { font-size: 14px; line-height: 1.75; color: #8FA0C2; max-width: 340px; }
.footer-col h4 { color: #fff; font-size: 15px; font-family: var(--font-sans); margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #8FA0C2; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.legal-notice { font-size: .8em; line-height: 1.7; color: #7A8BB0; background: rgba(255,255,255,.04); border-left: 3px solid rgba(255,255,255,.2); padding: 14px 18px; border-radius: 0 10px 10px 0; margin-bottom: 28px; }
.legal-notice p { margin: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #66779C; }

/* ===== 단일 글 ===== */
.article-wrap { max-width: var(--content-max); margin: 0 auto; padding: 64px 24px 96px; }
.article-head { text-align: center; margin-bottom: 44px; }
.article-cat { display: inline-block; font-size: 13px; font-weight: 800; color: var(--brand-blue); background: #EAF0FF; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.article-head h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.35; margin: 0 0 18px; }
.article-meta { font-size: 14px; color: var(--slate-400); display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.article-hero { margin-bottom: 40px; }
.article-hero img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { font-size: 17px; }
.article-body h2 { font-size: 26px; margin: 56px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--line); scroll-margin-top: 90px; }
.article-body h3 { font-size: 20px; margin: 40px 0 14px; scroll-margin-top: 90px; }
.article-body img { border-radius: var(--radius-md); margin: 8px 0 24px; width: 100%; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0 32px; font-size: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.article-body table th { background: var(--brand-navy); color: #fff; text-align: left; padding: 12px 16px; font-weight: 700; font-size: 14.5px; }
.article-body table td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--slate-700); vertical-align: top; }
.article-body table tr:nth-child(even) td { background: #F8FAFF; }
.article-body blockquote { margin: 28px 0; padding: 18px 22px; border-left: 4px solid var(--brand-blue); background: #F4F7FF; border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--slate-700); }
.article-body blockquote p { margin: 0; }
.article-body .callout { background: #F0FBF8; border: 1px solid #B7E8DE; border-left: 4px solid var(--brand-mint); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 18px 22px; margin: 28px 0; font-size: 15.5px; color: #0B3A33; }
.article-body .toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px 26px; margin: 8px 0 32px; }
.article-body .toc strong { color: var(--brand-navy); font-size: 15.5px; display: block; margin-bottom: 10px; }
.article-body .toc ol { margin: 0; padding-left: 1.3em; }
.article-body .toc a { font-size: 14.5px; }
.ai-notice, .legal-notice-post { font-size: .85em; color: #98A2B3; margin-top: 2em; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.article-nav a { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px; font-size: 14px; color: var(--slate-700); transition: all .2s ease; }
.article-nav a:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.article-nav .dir { font-size: 12px; font-weight: 800; color: var(--slate-400); display: block; margin-bottom: 4px; }
.related { max-width: var(--content-max); margin: 0 auto; padding: 0 24px 96px; }
.related h2 { font-size: 24px; margin: 0 0 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; transition: all .25s ease; }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.related-card h3 { font-size: 14.5px; line-height: 1.55; margin: 0; padding: 14px 16px 16px; font-family: var(--font-sans); font-weight: 700; }
.related-card h3 a { color: var(--brand-navy); }

/* ===== 페이지 ===== */
.page-wrap { max-width: var(--content-max); margin: 0 auto; padding: 72px 24px 96px; }
.page-wrap h1 { font-size: 36px; margin: 0 0 32px; }
.page-wrap h2 { font-size: 24px; margin: 44px 0 14px; }
.page-wrap h3 { font-size: 19px; margin: 32px 0 12px; }

/* ===== 목록(아카이브) ===== */
.archive-head { background: linear-gradient(180deg, #F8FAFF, #fff); border-bottom: 1px solid var(--line); padding: 64px 0 56px; text-align: center; }
.archive-head h1 { font-size: 34px; margin: 0 0 10px; }
.archive-head p { color: var(--slate-600); margin: 0; }
.archive-grid { max-width: var(--container); margin: 0 auto; padding: 64px 24px 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 14px; background: #fff; }
.faq-item h3 { font-size: 16.5px; font-family: var(--font-sans); margin: 0 0 8px; color: var(--ink); font-weight: 700; }
.faq-item p { font-size: 15px; color: var(--slate-600); margin: 0; }

/* ===== 차트 ===== */
.chart { margin: 24px 0 32px; background: #F8FAFF; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px 24px; }
.chart-title { font-size: 14px; font-weight: 800; color: var(--brand-navy); margin-bottom: 16px; }
.chart-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 12px; align-items: center; margin-bottom: 12px; font-size: 13.5px; }
.chart-row .lbl { color: var(--slate-700); font-weight: 600; }
.chart-row .bar { height: 10px; background: #E4E7EC; border-radius: 99px; overflow: hidden; }
.chart-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-mint)); }
.chart-row .val { color: var(--brand-navy); font-weight: 800; text-align: right; }
.timeline { list-style: none; padding: 0; margin: 24px 0 32px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 22px 44px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand-blue); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand-blue); }
.timeline li b { color: var(--brand-navy); }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 0 72px; }
    .hero-visual { max-width: 560px; }
    .card-grid, .post-grid, .scenario-grid { grid-template-columns: repeat(2, 1fr); }
    .carousel-track { grid-auto-columns: calc((100% - 24px) / 2); }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .header-inner { height: 60px; }
    .main-nav { display: none; }
    .hero-inner { padding: 52px 0 60px; }
    .hero h1 { font-size: 32px; }
    .section { padding: 64px 0; }
    .card-grid, .post-grid, .scenario-grid { grid-template-columns: 1fr; }
    .carousel-track { grid-auto-columns: 86%; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .related-grid { grid-template-columns: 1fr; }
    .archive-grid { grid-template-columns: 1fr; }
    .article-body table { display: block; overflow-x: auto; white-space: nowrap; }
    .chart-row { grid-template-columns: 88px 1fr 56px; font-size: 12.5px; }
    .hero-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
    .reveal.in { opacity: 1; transform: none; }
}
