/* ===== 디자인 토큰 =====
   색을 바꾸고 싶으면 여기만 수정하면 됩니다.
   --ink와 --brand: TnH 기본 로고에서 가져온 남색과 에메랄드
   --accent: 밝은 배경 위 작은 글씨에 쓰는 짙은 에메랄드 */
:root {
  --ink: #21324e;
  --ink-2: #3a4d60;
  --muted: #526477;
  --paper: #f8fbfb;
  --tint: #edf5f5;
  --card: #ffffff;
  --line: #d7e6e8;
  --brand: #7eb4bb;
  --brand-hover: #93c2c8;
  --accent: #356970;
  --accent-soft: #d8ecee;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(33 50 78 / .06), 0 8px 24px rgb(33 50 78 / .06);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; margin-bottom: 32px; }
h2 b { color: var(--accent); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  font-family: inherit; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }
.btn-primary { background: var(--brand); color: var(--ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-kakao { background: #fee500; color: #191919; }
.btn-naver { background: #03c75a; color: #fff; }

/* ===== 상단 메뉴 ===== */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgb(248 251 251 / .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.logo-mark { font-weight: 900; font-size: 1.45rem; letter-spacing: -0.04em; }
.logo-mark em { font-style: normal; color: var(--accent); }
.logo-text { font-weight: 700; font-size: 1.05rem; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--ink-2); }
.nav-links a:hover { color: var(--accent); }

/* ===== 메인 배너 (모눈종이 배경) ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 88px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}
.hero::after { /* 아래쪽 자연스럽게 흐려지게 */
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(transparent, var(--paper));
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; }
.mark {
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  box-shadow: inset 0 -3px 0 transparent;
}
.hero-sub { margin-top: 22px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--ink-2); max-width: 620px; }
.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  margin: 56px 0 0; display: flex; gap: 48px; flex-wrap: wrap;
}
.hero-stats div { border-left: 3px solid var(--brand); padding-left: 14px; }
.hero-stats dt { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: .9rem; }

/* ===== 공통 섹션 / 카드 ===== */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card p { color: var(--ink-2); margin-top: 10px; font-size: .95rem; }

/* 교육철학 */
.pillar { position: relative; overflow: hidden; padding: 36px 32px; }
.pillar-letter {
  position: absolute; right: 18px; top: -18px;
  font-size: 9rem; font-weight: 900; line-height: 1; color: var(--accent-soft);
  pointer-events: none;
}
.pillar h3, .pillar p { position: relative; }
.pillar h3 { font-size: 1.3rem; }

/* 수업안내 */
.feature-no { font-weight: 800; color: var(--accent); font-size: .9rem; }
.feature h3 { margin-top: 8px; }

/* 교습비 */
.tuition-table {
  width: 100%; max-width: 760px; border: 1px solid var(--line);
  border-spacing: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--card); font-variant-numeric: tabular-nums;
}
.tuition-table th, .tuition-table td { padding: 13px 16px; text-align: center; }
.tuition-table thead { background: var(--tint); }
.tuition-table tbody :is(th, td) { border-top: 1px solid var(--line); }
.tuition-table th:first-child { width: 25%; }
.tuition-table span { display: block; color: var(--muted); font-size: .84rem; font-weight: 500; }
.tuition-table td { white-space: nowrap; }

/* 원장소개 */
.director { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.director-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); display: grid; place-items: center; position: relative;
}
.director-photo img { width: 100%; height: 100%; object-fit: cover; }
.director-initial { font-size: 5rem; font-weight: 800; color: rgba(255, 255, 255, .15); }
.director-photo img:not([hidden]) + .director-initial { display: none; }
.director h2 { margin-bottom: 12px; }
.director-quote { font-size: 1.15rem; font-weight: 600; color: var(--ink-2); margin-bottom: 32px; }
.director-lists h3 { font-size: .95rem; color: var(--accent); margin-bottom: 10px; }
.director-lists ul { margin: 0; padding: 0; list-style: none; }
.director-lists li { padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); font-size: .95rem; }

/* ===== TnH 소식 (블로그 글) ===== */
.news-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.news-head h2 { margin-bottom: 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { opacity: .55; margin-left: 4px; font-weight: 500; }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.post:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgb(33 50 78 / .12); }
.post-thumb { aspect-ratio: 16 / 9; background: var(--tint); overflow: hidden; display: grid; place-items: center; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .ph { font-weight: 900; font-size: 2rem; color: var(--line); letter-spacing: -0.04em; }
.post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { display: flex; gap: 10px; font-size: .8rem; color: var(--muted); }
.post-cat { color: var(--accent); font-weight: 700; }
.post-title { font-size: 1.02rem; font-weight: 700; line-height: 1.45; }
.post-summary {
  font-size: .88rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-more { margin-top: auto; padding-top: 8px; font-size: .85rem; font-weight: 700; color: var(--accent); }
.more { text-align: center; margin-top: 32px; }

/* ===== 상담 / 오시는 길 ===== */
.contact [hidden] { display: none; }
.contact-layout:has(.map:not([hidden])) { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact h2 { margin-bottom: 12px; }
.contact-list { list-style: none; padding: 0; margin: 28px 0; }
.contact-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list span { width: 72px; flex-shrink: 0; font-weight: 700; }
.contact-list em { font-style: normal; }
.contact-list a { text-decoration: none; font-weight: 700; }
.contact-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.map {
  min-height: 320px; border-radius: var(--radius); background: var(--tint); border: 1px dashed var(--line);
  display: grid; place-items: center; color: var(--muted); overflow: hidden;
}
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ===== 하단 ===== */
.footer { background: var(--ink); color: #fff; padding: 40px 0; }
.footer .logo-mark em { color: var(--brand); }
.footer .muted { color: rgb(255 255 255 / .76); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: end; }
.footer p { margin-top: 6px; }

/* ===== 태블릿 ===== */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .director { grid-template-columns: 220px 1fr; gap: 36px; }
}

/* ===== 모바일 ===== */
@media (max-width: 680px) {
  .nav-links { display: none; } /* TODO: 모바일 햄버거 메뉴 */
  .nav-inner .btn { margin-left: auto; }
  .hero { padding: 64px 0 56px; }
  .hero-stats { gap: 24px; }
  .br-pc { display: none; }
  .section { padding: 64px 0; }
  .tuition-table th, .tuition-table td { padding: 10px 6px; font-size: .92rem; }
  .tuition-table span { font-size: .76rem; }
  .contact-layout:has(.map:not([hidden])) { grid-template-columns: 1fr; }
  .grid-2, .grid-4, .posts { grid-template-columns: 1fr; }
  .director { grid-template-columns: 1fr; }
  .director-photo { max-width: 220px; }
  .news-head { flex-direction: column; align-items: start; }
}
