/* ============================================
   TopEduPrep Insight — Apple-style design system
   ============================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root{
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Pretendard", "Apple SD Gothic Neo", "Helvetica Neue", sans-serif;

  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-faint: #86868b;
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --bg-dark-soft: #111113;
  --line: rgba(0,0,0,0.08);
  --line-dark: rgba(255,255,255,0.14);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --white: #ffffff;

  --nav-h: 44px;
  --maxw: 1040px;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%;}
body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--bg);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
ul{list-style:none;}
button{font-family:inherit; border:none; background:none; cursor:pointer;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 22px;}
.wrap-wide{max-width:1200px; margin:0 auto; padding:0 22px;}

/* ---------- Nav ---------- */
.gnb{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  height:var(--nav-h);
  background:rgba(251,251,253,0.78);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line);
}
.gnb .wrap-wide{display:flex; align-items:center; justify-content:space-between; height:100%;}
.gnb-brand{font-size:14px; font-weight:600; letter-spacing:-0.01em; display:flex; align-items:center; gap:6px;}
.gnb-brand .dot{width:6px; height:6px; border-radius:50%; background:var(--blue); display:inline-block;}
.gnb-links{display:flex; gap:26px;}
.gnb-links a{font-size:12px; color:var(--ink); opacity:0.9; white-space:nowrap;}
.gnb-links a:hover{opacity:1; color:var(--blue);}
.gnb-cta{font-size:12px; background:var(--ink); color:#fff; padding:6px 14px; border-radius:980px;}
.gnb-cta:hover{background:#000;}
.gnb-burger{display:none; width:22px; height:16px; position:relative;}
.gnb-burger span{position:absolute; left:0; right:0; height:1.5px; background:var(--ink);}
.gnb-burger span:nth-child(1){top:0;}
.gnb-burger span:nth-child(2){top:7px;}
.gnb-burger span:nth-child(3){top:14px;}

@media (max-width:860px){
  .gnb-links{display:none;}
  .gnb-burger{display:block;}
}

/* mobile drawer */
.gnb-drawer{
  position:fixed; inset:var(--nav-h) 0 0 0; z-index:999;
  background:rgba(251,251,253,0.98);
  backdrop-filter:blur(20px);
  display:none; flex-direction:column; padding:28px 22px;
  gap:2px;
}
.gnb-drawer.open{display:flex;}
.gnb-drawer a{font-size:26px; font-weight:600; padding:14px 0; border-bottom:1px solid var(--line);}

/* ---------- Hero ---------- */
.hero{
  padding:calc(var(--nav-h) + 84px) 22px 72px;
  text-align:center;
}
.hero.dark{background:var(--bg-dark); color:#fff;}
.eyebrow{
  font-size:13px; font-weight:600; color:var(--blue); letter-spacing:0.02em; margin-bottom:14px;
}
.hero.dark .eyebrow{color:#2997ff;}
h1.display{
  font-size:clamp(34px, 6vw, 68px);
  font-weight:700; letter-spacing:-0.03em; line-height:1.08;
  max-width:920px; margin:0 auto 18px;
}
.hero .lede{
  font-size:clamp(17px, 2.2vw, 22px); color:var(--ink-soft);
  max-width:640px; margin:0 auto 34px; font-weight:400; line-height:1.5;
}
.hero.dark .lede{color:#a1a1a6;}
.cta-row{display:flex; gap:16px; justify-content:center; flex-wrap:wrap;}

.btn{
  display:inline-flex; align-items:center; gap:6px;
  font-size:16px; padding:11px 22px; border-radius:980px;
  font-weight:400; transition:all .2s ease;
}
.btn-primary{background:var(--blue); color:#fff;}
.btn-primary:hover{background:var(--blue-hover);}
.btn-ghost{color:var(--blue);}
.btn-ghost:hover{color:var(--blue-hover);}
.btn-ghost .chev{transition:transform .2s;}
.btn-ghost:hover .chev{transform:translateX(3px);}
.hero.dark .btn-ghost{color:#2997ff;}

/* ---------- Sections ---------- */
section{padding:96px 0;}
.section-alt{background:var(--bg-alt);}
.section-dark{background:var(--bg-dark); color:#fff;}
.section-head{text-align:center; max-width:680px; margin:0 auto 56px;}
.section-head h2{
  font-size:clamp(28px, 4vw, 44px); font-weight:700; letter-spacing:-0.02em; line-height:1.1; margin-bottom:14px;
}
.section-head p{font-size:18px; color:var(--ink-soft); line-height:1.5;}
.section-dark .section-head p{color:#a1a1a6;}
.kicker{font-size:13px; font-weight:600; color:var(--blue); margin-bottom:10px; display:block;}

/* ---------- Cards / Grid ---------- */
.grid{display:grid; gap:14px;}
.grid-4{grid-template-columns:repeat(4,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-2{grid-template-columns:repeat(2,1fr);}
@media (max-width:860px){
  .grid-4{grid-template-columns:repeat(2,1fr);}
  .grid-3{grid-template-columns:1fr;}
  .grid-2{grid-template-columns:1fr;}
}
@media (max-width:520px){
  .grid-4{grid-template-columns:1fr;}
}

.card{
  background:#fff; border-radius:18px; padding:30px 26px;
  border:1px solid var(--line);
}
.card h3{font-size:19px; font-weight:600; margin-bottom:8px; letter-spacing:-0.01em;}
.card p{font-size:14.5px; color:var(--ink-soft); line-height:1.6;}
.card .num{font-size:13px; color:var(--ink-faint); font-weight:600; margin-bottom:14px; letter-spacing:0.02em;}

.tile-dark{
  background:var(--bg-dark-soft); color:#fff; border-radius:22px; padding:38px 30px;
  border:1px solid var(--line-dark);
}
.tile-dark h3{font-size:21px; font-weight:600; margin-bottom:10px;}
.tile-dark p{font-size:14.5px; color:#a1a1a6; line-height:1.6;}

/* ---------- Article / Magazine content ---------- */
.article-body{max-width:680px; margin:0 auto; font-size:17px; line-height:1.75; color:#1d1d1f;}
.article-body h2{font-size:28px; font-weight:700; letter-spacing:-0.02em; margin:52px 0 16px;}
.article-body h3{font-size:20px; font-weight:600; margin:34px 0 12px;}
.article-body p{margin-bottom:18px; color:#333336;}
.article-body p.lead{font-size:20px; color:var(--ink-soft); font-weight:400;}
.article-body ul, .article-body ol{margin:0 0 20px 22px; color:#333336;}
.article-body li{margin-bottom:8px;}
.article-body strong{font-weight:600; color:var(--ink);}
.pullquote{
  font-size:23px; font-weight:600; letter-spacing:-0.01em; line-height:1.4;
  border-left:3px solid var(--blue); padding-left:22px; margin:36px 0; color:var(--ink);
}
.meta-row{display:flex; gap:10px; align-items:center; justify-content:center; font-size:13px; color:var(--ink-faint); margin-bottom:18px;}
.meta-row .sep{opacity:.5;}

/* ---------- Compare table (Apple-style) ---------- */
.compare-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch;}
table.compare{width:100%; border-collapse:collapse; min-width:640px; background:#fff; border-radius:18px; overflow:hidden; border:1px solid var(--line);}
table.compare th, table.compare td{padding:16px 18px; text-align:left; font-size:14.5px; border-bottom:1px solid var(--line);}
table.compare thead th{
  font-size:15px; font-weight:700; background:var(--bg-alt); position:sticky; top:var(--nav-h);
}
table.compare tbody tr:last-child td{border-bottom:none;}
table.compare td:first-child, table.compare th:first-child{
  font-weight:600; color:var(--ink-soft); width:180px; background:var(--bg-alt);
}
.tick{color:#00a86b; font-weight:700;}
.cross{color:#d2d2d7; font-weight:700;}

/* ---------- Tabs (signature interactive element) ---------- */
.tabbar{
  display:flex; justify-content:center; gap:8px; margin-bottom:44px; flex-wrap:wrap;
}
.tabbtn{
  font-size:14px; font-weight:600; padding:9px 20px; border-radius:980px;
  border:1px solid var(--line); color:var(--ink-soft); background:#fff;
  transition:all .18s ease;
}
.tabbtn.active{background:var(--ink); color:#fff; border-color:var(--ink);}
.tabpanel{display:none;}
.tabpanel.active{display:block;}

/* ---------- Timeline (exam dates) ---------- */
.timeline{max-width:760px; margin:0 auto;}
.tl-row{
  display:grid; grid-template-columns:120px 1fr; gap:20px;
  padding:22px 0; border-bottom:1px solid var(--line);
  align-items:start;
}
.tl-row:first-child{padding-top:0;}
.tl-date{font-size:17px; font-weight:700; color:var(--ink); white-space:nowrap;}
.tl-date small{display:block; font-size:12px; font-weight:600; color:var(--ink-faint); margin-top:2px;}
.tl-body h4{font-size:16px; font-weight:600; margin-bottom:4px;}
.tl-body p{font-size:14px; color:var(--ink-soft); line-height:1.6;}
.tl-badge{
  display:inline-block; font-size:11px; font-weight:700; padding:2px 9px; border-radius:6px;
  background:rgba(0,113,227,0.1); color:var(--blue); margin-left:8px; vertical-align:middle;
}

/* ---------- Campus strip ---------- */
.campus-card{background:#fff; border-radius:18px; border:1px solid var(--line); padding:26px 24px;}
.campus-card .tag{font-size:12px; font-weight:700; color:var(--blue); margin-bottom:8px; display:block;}
.campus-card h3{font-size:18px; font-weight:600; margin-bottom:6px;}
.campus-card p{font-size:14px; color:var(--ink-soft);}

/* ---------- Testimonials ---------- */
.quote-card{background:var(--bg-alt); border-radius:18px; padding:28px 24px;}
.quote-card p.q{font-size:15px; line-height:1.7; color:var(--ink); margin-bottom:16px;}
.quote-card .who{font-size:13px; color:var(--ink-faint); font-weight:600;}

/* ---------- Footer ---------- */
footer{background:var(--bg-dark); color:#a1a1a6; padding:56px 0 26px; font-size:12.5px;}
.foot-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding-bottom:36px; border-bottom:1px solid var(--line-dark);}
.foot-grid h4{color:#fff; font-size:13px; font-weight:600; margin-bottom:14px;}
.foot-grid li{margin-bottom:9px; line-height:1.6;}
.foot-grid a:hover{color:#fff;}
.foot-bottom{padding-top:20px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;}
@media (max-width:760px){
  .foot-grid{grid-template-columns:1fr 1fr;}
}
@media (max-width:520px){
  .foot-grid{grid-template-columns:1fr;}
}

/* ---------- Fade-in on scroll ---------- */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* ---------- Utility ---------- */
.center{text-align:center;}
.mt-56{margin-top:56px;}
.small-note{font-size:12.5px; color:var(--ink-faint); text-align:center; margin-top:18px;}
.divider{height:1px; background:var(--line); margin:0;}
.footnote{font-size:12px; color:var(--ink-faint); max-width:680px; margin:14px auto 0;}
