/* ==========================================================================
   최상미 수학연구소 랜딩페이지
   design-source/landing.dc.html 를 정적 HTML/CSS 로 구현.
   원본은 데스크톱 인라인 스타일 프로토타입 → 여기서는 모바일 우선으로 재구성하되
   색상 / 타이포 / 간격 토큰은 원본 값을 그대로 유지한다.
   ========================================================================== */

/* ---------- Design tokens (원본 hex 그대로) ---------- */
:root {
  --cream:        #f6f4ef;
  --cream-alt:    #efeade;
  --navy:         #151e33;
  --navy-deep:    #0d1526;
  --navy-card:    #0a0f1c;
  --navy-step:    #1c2540;
  --navy-line:    #232c45;
  --navy-line-2:  #2c3450;
  --navy-dash:    #4a5170;
  --gold:         #c9a06a;
  --gold-link:    #b8895a;
  --gold-link-hv: #96693e;
  --violet:       #8b7ad1;

  --ink:          #1e2433;
  --ink-strong:   #151e33;
  --ink-body:     #4a4f5c;
  --ink-muted:    #8b8f9c;
  --ink-note:     #6a6f7c;

  --on-dark:      #f6f4ef;
  --on-dark-1:    #dfe2ea;
  --on-dark-2:    #cfd3de;
  --on-dark-3:    #aab0c2;
  --on-dark-4:    #9aa0b4;
  --on-dark-5:    #9199ad;
  --on-dark-6:    #7d859c;
  --border-ghost: #3a415a;

  --line-light:   #e6e1d6;
  --slot-bg:      #ece7dc;
  --slot-border:  #d6cfbe;

  --radius-sm: 3px;
  --radius:    4px;
  --radius-md: 6px;
  --radius-lg: 12px;

  --shell-x: 20px;          /* 모바일 좌우 여백 */
  --section-y: 64px;        /* 모바일 섹션 상하 여백 */
  --cta-h: 88px;            /* 하단 고정 CTA 확보 높이 */
  --header-h: 66px;
}

@media (min-width: 768px) {
  :root { --shell-x: 32px; --section-y: 100px; }
}

/* ---------- Base ---------- */
*, *::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;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-link); text-decoration: none; }
a:hover { color: var(--gold-link-hv); }

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

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--navy);
  padding: 12px 20px;
  font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

.page {
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: var(--cta-h);
}

/* 앵커 이동 시 sticky 헤더 + 하단바에 가리지 않도록 */
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Shared section primitives ---------- */
.shell,
.about,
.results,
.schedule,
.faq,
.curriculum__inner,
.location__inner,
.site-header__inner,
.hero__inner {
  width: 100%;
  margin-inline: auto;
}

.section-head { margin-bottom: 40px; }
.section-head--center { text-align: center; }

@media (min-width: 768px) {
  .section-head { margin-bottom: 56px; }
}

.eyebrow {
  color: var(--gold-link);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.eyebrow--gold { color: var(--gold); }

.section-title {
  font-size: clamp(25px, 5.2vw, 32px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink-strong);
  line-height: 1.35;
}
.section-title--on-dark { color: var(--on-dark); }

.section-note {
  color: var(--ink-note);
  font-size: 15px;
  margin-top: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  padding: 15px 24px;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #b98f57; color: var(--navy); }

.btn--ghost { border: 1px solid var(--border-ghost); color: var(--on-dark-1); font-weight: 600; }
.btn--ghost:hover { border-color: var(--gold); color: var(--on-dark); }

.btn--sm { padding: 10px 20px; font-size: 14px; }

/* ---------- Image slot (원본 <image-slot> 의 정적 대체) ---------- */
.img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  border: 1px dashed var(--slot-border);
  border-radius: var(--radius-md);
  background: var(--slot-bg);
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.site-header__inner {
  max-width: 1180px;
  padding: 14px var(--shell-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }

.brand__name {
  color: var(--cream);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand__accent { color: var(--gold); }

@media (min-width: 400px) { .brand__name { font-size: 20px; } }

/* --- Mobile nav toggle --- */
.nav-toggle {
  appearance: none;
  border: 1px solid #2c3450;
  background: transparent;
  border-radius: var(--radius);
  width: 42px;
  height: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--on-dark-2);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Nav: mobile panel --- */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy);
  border-top: 1px solid var(--navy-line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  padding: 8px var(--shell-x) 20px;
  flex-direction: column;
}
.site-nav.is-open { display: flex; }

.site-nav__link {
  color: var(--on-dark-2);
  font-size: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-nav__link:hover { color: var(--gold); }

.site-nav .btn { margin-top: 16px; }

/* --- Nav: desktop inline --- */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }

  .site-nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .site-nav__link { font-size: 15px; padding: 0; border-bottom: 0; }
  .site-nav .btn { margin-top: 0; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: var(--navy-deep);
  padding: 64px var(--shell-x) 72px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero { padding: 96px var(--shell-x) 110px; }
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 15% 15%, rgba(201, 160, 106, .16), transparent 60%),
    radial-gradient(ellipse 800px 600px at 90% 85%, rgba(88, 84, 150, .22), transparent 60%),
    linear-gradient(180deg, var(--navy-deep), var(--navy));
}

.hero__inner {
  position: relative;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}

.hero__mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.hero__mark img { width: 100%; height: 100%; object-fit: contain; }

.eyebrow-pill {
  display: inline-block;
  background: rgba(201, 160, 106, .15);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  letter-spacing: .02em;
}

.hero__title {
  color: var(--cream);
  font-size: clamp(30px, 7.2vw, 44px);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}

.hero__lead {
  color: var(--on-dark-3);
  font-size: clamp(16px, 2.4vw, 17px);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 460px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 768px) {
  .hero__actions { gap: 14px; }
  .hero__actions .btn { padding: 15px 28px; }
}

/* --- Stats card --- */
.stats-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
}

@media (min-width: 768px) { .stats-card { padding: 36px 40px; } }

.stat { padding: 22px 0; border-bottom: 1px solid var(--navy-line); }
.stat:last-child { border-bottom: 0; }

.stat__label { color: var(--on-dark-4); font-size: 14px; margin-bottom: 10px; }

.stat__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.stat__value {
  font-size: clamp(42px, 11vw, 52px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--gold), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__unit { color: var(--cream); font-size: clamp(19px, 4.5vw, 22px); font-weight: 700; }

/* ==========================================================================
   About
   ========================================================================== */
.about {
  max-width: 1180px;
  padding: var(--section-y) var(--shell-x);
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

@media (min-width: 900px) {
  .about { grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
}

.about__photo {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
}

@media (min-width: 900px) {
  .about__photo { max-width: none; margin-inline: 0; }
}

.about__desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-body);
  margin: 20px 0 32px;
  max-width: 560px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 520px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.facts__item { border-top: 2px solid var(--ink-strong); padding-top: 14px; }
.facts__label { font-size: 14px; color: var(--ink-muted); margin-bottom: 6px; }
.facts__value { font-size: 15px; font-weight: 600; color: var(--ink-strong); line-height: 1.5; }

/* ==========================================================================
   Curriculum
   ========================================================================== */
.curriculum { background: var(--navy); padding: var(--section-y) var(--shell-x); }
.curriculum__inner { max-width: 1180px; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px)  { .steps { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  background: var(--navy-step);
  border: 1px solid var(--navy-line-2);
  border-radius: var(--radius-md);
  padding: 28px 22px;
}

@media (min-width: 768px) { .step { padding: 32px 24px; } }

.step__num { color: var(--gold); font-size: 28px; font-weight: 800; margin-bottom: 18px; line-height: 1; }
.step__title { color: var(--cream); font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.step__desc { color: var(--on-dark-5); font-size: 14px; line-height: 1.7; }

/* ==========================================================================
   Results
   ========================================================================== */
.results { max-width: 1180px; padding: var(--section-y) var(--shell-x); }

.cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) { .cases { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.case {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.case__media { width: 100%; aspect-ratio: 4 / 3; }
.case__media .img-slot { border: 0; border-bottom: 1px solid var(--line-light); border-radius: 0; }

.case__body { padding: 20px 22px; }
.case__label { font-size: 15px; font-weight: 700; color: var(--ink-strong); margin-bottom: 6px; }
.case__meta { font-size: 13px; color: var(--ink-muted); }

/* ==========================================================================
   Schedule
   ========================================================================== */
.schedule { max-width: 1180px; padding: var(--section-y) var(--shell-x); }

.timetable {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) { .timetable { grid-template-columns: 1fr 1fr; gap: 24px; } }

.timetable__card {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

@media (min-width: 768px) { .timetable__card { padding: 36px 32px; } }

.timetable__title { font-size: 19px; font-weight: 800; color: var(--ink-strong); margin-bottom: 22px; }

.timetable__list { display: flex; flex-direction: column; gap: 14px; }

.timetable__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-body);
}
.timetable__row dd { font-weight: 600; color: var(--ink-strong); text-align: right; }

/* ==========================================================================
   Location
   ========================================================================== */
.location { background: var(--cream-alt); padding: var(--section-y) var(--shell-x); }

.location__inner {
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .location__inner { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.info-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.info-list__label { font-size: 13px; color: var(--ink-muted); margin-bottom: 4px; }
.info-list__value { font-size: 16px; font-weight: 600; color: var(--ink-strong); }
.info-list__link { color: var(--ink-strong); }
.info-list__link:hover { color: var(--gold-link-hv); }

.location__map { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 840px; padding: var(--section-y) var(--shell-x); }

.faq__list { display: flex; flex-direction: column; gap: 12px; }

.faq__item {
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.faq__heading { font-size: inherit; font-weight: inherit; }

.faq__q {
  appearance: none;
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
}

@media (min-width: 768px) { .faq__q { padding: 20px 24px; } }

.faq__q-text { font-size: 16px; font-weight: 700; color: var(--ink-strong); line-height: 1.5; }
.faq__icon { font-size: 20px; color: var(--gold-link); font-weight: 300; flex-shrink: 0; line-height: 1; }

.faq__a {
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-body);
}
.faq__a[hidden] { display: none; }

@media (min-width: 768px) { .faq__a { padding: 0 24px 22px; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  padding: 48px var(--shell-x);
  text-align: center;
}
.site-footer__name { color: var(--cream); font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.site-footer__note { color: var(--on-dark-6); font-size: 14px; }

/* ==========================================================================
   Sticky bottom CTA
   ========================================================================== */
.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--gold);
  color: var(--navy);
  text-align: center;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.cta-bar:hover { background: #b98f57; color: var(--navy); }

/* 이모지 폰트가 없는 환경에서도 항상 렌더되도록 인라인 SVG 아이콘 사용 */
.cta-bar__icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .site-header, .cta-bar, .nav-toggle { display: none !important; }
  .page { padding-bottom: 0; }
  body { background: #fff; }
}
