/* ==========================================================================
   TopEduPrep GUIDE — 교육 매거진 디자인 시스템
   Display: Fraunces / Body: Newsreader / UI: Inter
   Ink #14213D · Paper #FAF6EC · Brass #B8863E
   Category colors — SAT #2F6F4E · IB #5B4B8A · AP #A6472E · ACT #1F6E8C
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #14213D;
  --ink-70: #14213Db3;
  --paper: #FAF6EC;
  --paper-alt: #F1EAD8;
  --card: #FFFDF7;
  --brass: #B8863E;
  --brass-dark: #8F6A2E;
  --rule: #DBD0B4;
  --rule-strong: #14213D22;
  --sat: #2F6F4E;
  --ib: #5B4B8A;
  --ap: #A6472E;
  --act: #1F6E8C;

  --display: 'Fraunces', serif;
  --body: 'Newsreader', serif;
  --ui: 'Inter', system-ui, sans-serif;

  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1.1em; }

/* ---------- Masthead ---------- */
.masthead-top {
  background: var(--ink);
  color: #EFE9D8;
  font-family: var(--ui);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.masthead-top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 24px; gap: 16px; flex-wrap: wrap;
}
.masthead-top .date { opacity: 0.75; }
.ticker {
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.ticker span { white-space: nowrap; }
.ticker b { color: var(--brass); font-weight: 700; }

header.site-header {
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  text-decoration: none;
  display: flex; flex-direction: column; line-height: 1;
}
.logo .sub {
  font-family: var(--ui); font-weight: 600; font-size: 10.5px;
  letter-spacing: 0.22em; color: var(--brass-dark); margin-top: 5px;
}
nav.primary-nav {
  display: flex; gap: 28px; font-family: var(--ui); font-weight: 600;
  font-size: 14.5px;
}
nav.primary-nav a { text-decoration: none; color: var(--ink); position: relative; padding: 4px 0; }
nav.primary-nav a.active,
nav.primary-nav a:hover { color: var(--brass-dark); }
nav.primary-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--brass);
}
.nav-toggle { display: none; }

@media (max-width: 860px) {
  nav.primary-nav {
    position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px;
    background: var(--paper); flex-direction: column; padding: 90px 28px 28px;
    transform: translateX(100%); transition: transform 0.28s ease;
    box-shadow: -12px 0 30px rgba(20,33,61,0.15);
  }
  nav.primary-nav.open { transform: translateX(0); }
  nav.primary-nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 60;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }
}

/* ---------- Eyebrow / category tags ---------- */
.eyebrow {
  font-family: var(--ui); font-weight: 700; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 16px; height: 2px; background: currentColor; display: inline-block; }
.tag {
  display: inline-block; font-family: var(--ui); font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px;
  color: #fff;
}
.tag-sat { background: var(--sat); } .cat-sat { color: var(--sat); }
.tag-ib  { background: var(--ib); }  .cat-ib  { color: var(--ib); }
.tag-ap  { background: var(--ap); }  .cat-ap  { color: var(--ap); }
.tag-act { background: var(--act); } .cat-act { color: var(--act); }
.tag-col { background: var(--brass-dark); } .cat-col { color: var(--brass-dark); }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 44px; border-bottom: 1px solid var(--rule-strong);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px); line-height: 1.08; max-width: 16ch;
}
.hero .lede {
  font-size: 20px; color: var(--ink-70); max-width: 58ch; margin-top: 14px;
}
.hero-meta {
  font-family: var(--ui); font-size: 13.5px; color: var(--ink-70);
  display: flex; gap: 18px; margin-top: 20px; flex-wrap: wrap;
}

/* ---------- Featured grid (index) ---------- */
.feature-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px;
  padding: 48px 0; border-bottom: 1px solid var(--rule-strong);
}
.feature-main {
  border-right: 1px solid var(--rule); padding-right: 40px;
}
.feature-main h2 { font-size: 34px; line-height: 1.14; }
.feature-side { display: flex; flex-direction: column; gap: 22px; }
.side-item { display: flex; gap: 14px; align-items: flex-start; }
.side-num {
  font-family: var(--display); font-size: 22px; color: var(--rule-strong);
  font-weight: 600; flex-shrink: 0; width: 30px;
}
.side-item h3 { font-size: 17px; line-height: 1.35; margin-bottom: 4px; }
.side-item p { font-size: 14.5px; color: var(--ink-70); margin: 0; font-family: var(--ui); }
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-main { border-right: none; padding-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 30px; }
}

/* ---------- Category section blocks (index) ---------- */
.cat-section { padding: 46px 0; border-bottom: 1px solid var(--rule-strong); }
.cat-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px;
}
.cat-head h2 { font-size: 26px; margin: 0; }
.cat-head a.more {
  font-family: var(--ui); font-weight: 600; font-size: 13.5px; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.article-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { .article-row { grid-template-columns: 1fr; } }
.article-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: 24px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,33,61,0.08); }
.article-card h3 { font-size: 18.5px; line-height: 1.35; margin: 0; }
.article-card p { font-size: 14.5px; font-family: var(--ui); color: var(--ink-70); margin: 0; }

/* ---------- Article body ---------- */
.article-body { padding: 8px 0 60px; }
.article-layout { display: grid; grid-template-columns: 1fr 240px; gap: 50px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }

.prose { max-width: 68ch; }
.prose h2 {
  font-size: 27px; margin-top: 2.2em; padding-top: 0.9em; border-top: 1px solid var(--rule);
}
.prose h2:first-of-type { margin-top: 0.6em; padding-top: 0; border-top: none; }
.prose h3 { font-size: 20.5px; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose .drop::first-letter {
  font-family: var(--display); font-size: 3.6em; float: left; line-height: 0.82;
  padding-right: 10px; padding-top: 6px; font-weight: 700; color: var(--brass-dark);
}
.callout {
  background: var(--paper-alt); border-left: 3px solid var(--brass); border-radius: 0 6px 6px 0;
  padding: 18px 22px; margin: 1.6em 0; font-size: 16.5px;
}
.callout strong { color: var(--brass-dark); }
blockquote {
  font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.5;
  border-left: 3px solid var(--ink); padding-left: 22px; margin: 1.8em 0; color: var(--ink);
}

table.data-table {
  width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 14.5px;
  margin: 1.4em 0 2em; background: var(--card);
}
table.data-table caption { text-align: left; font-family: var(--ui); font-size: 12.5px; color: var(--ink-70); margin-bottom: 8px; }
table.data-table th, table.data-table td {
  border: 1px solid var(--rule); padding: 10px 12px; text-align: left;
}
table.data-table thead th { background: var(--ink); color: #fff; font-weight: 600; }
table.data-table tbody tr:nth-child(even) { background: var(--paper-alt); }

.compare-table th.col-a { color: var(--sat); } .compare-table th.col-b { color: var(--ib); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 22px; }
.side-box {
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 20px;
}
.side-box h4 {
  font-family: var(--ui); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-70); margin-bottom: 12px;
}
.side-box ul { list-style: none; padding: 0; margin: 0; }
.side-box li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.side-box li:last-child { border-bottom: none; }
.side-box a { text-decoration: none; }
.side-box a:hover { color: var(--brass-dark); }
.cta-box {
  background: var(--ink); color: var(--paper); border-radius: 8px; padding: 24px;
}
.cta-box h4 { color: #EFE9D8; }
.cta-box p { font-size: 14.5px; color: #C9C2AC; font-family: var(--ui); }
.btn {
  display: inline-block; font-family: var(--ui); font-weight: 700; font-size: 14px;
  padding: 11px 20px; border-radius: 5px; text-decoration: none; text-align: center;
}
.btn-brass { background: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-dark); }
.btn-outline { border: 1.5px solid var(--paper); color: var(--paper); }

/* ---------- Curriculum steps ---------- */
.curriculum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 1.6em 0 2.2em; }
@media (max-width: 860px) { .curriculum-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .curriculum-grid { grid-template-columns: 1fr; } }
.curriculum-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 22px;
}
.curriculum-card .num { font-family: var(--display); color: var(--brass); font-size: 15px; font-weight: 700; }
.curriculum-card h3 { font-size: 17.5px; margin: 8px 0 6px; }
.curriculum-card p { font-size: 14.5px; font-family: var(--ui); color: var(--ink-70); margin: 0; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.6em 0 2.2em; }
@media (max-width: 860px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card {
  background: var(--paper-alt); border-radius: 8px; padding: 20px; font-size: 15px;
}
.testi-card .who { font-family: var(--ui); font-weight: 700; font-size: 13px; color: var(--brass-dark); margin-top: 10px; }

/* ---------- Campus grid ---------- */
.campus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.6em 0 2.2em; }
@media (max-width: 860px) { .campus-grid { grid-template-columns: 1fr; } }
.campus-card { border: 1px solid var(--rule); border-radius: 8px; padding: 20px; background: var(--card); }
.campus-card h3 { font-size: 17.5px; margin-bottom: 6px; }
.campus-card .loc { font-family: var(--ui); font-size: 13.5px; color: var(--brass-dark); font-weight: 600; }

/* ---------- Column / editorial page ---------- */
.byline {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 8px; font-family: var(--ui);
}
.byline .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px;
}
.byline .name { font-weight: 700; font-size: 15px; }
.byline .role { font-size: 12.5px; color: var(--ink-70); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink); color: var(--paper); padding: 56px 0; text-align: center;
}
.cta-band h2 { color: #F4EEDD; font-size: 30px; }
.cta-band p { color: #C9C2AC; font-family: var(--ui); font-size: 16px; max-width: 50ch; margin: 0 auto 24px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--paper-alt); border-top: 1px solid var(--rule-strong); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--ui); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-70); margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--brass-dark); }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 8px; }
.footer-brand-sub { font-family: var(--ui); font-size: 13.5px; color: var(--ink-70); max-width: 32ch; }
.footer-bottom {
  border-top: 1px solid var(--rule); padding-top: 18px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-family: var(--ui); font-size: 12.5px; color: var(--ink-70);
}
.footer-bottom a { text-decoration: underline; }
