:root {
  --bg: #0b1120;
  --bg-alt: #0e1526;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --line: #1e293b;
  --gold-1: #f6e2a8;
  --gold-2: #d9b568;
  --gold-3: #c9a24b;
  --radius: 14px;
  --max: 1120px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 20px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.gold-text {
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2), var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 17px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
  color: #241a05;
  box-shadow: 0 8px 24px rgba(201,162,75,.25);
}
.btn-gold:hover { box-shadow: 0 10px 28px rgba(201,162,75,.4); }
.btn-outline {
  border: 1px solid #334155;
  color: #cbd5e1;
}
.btn-outline:hover { border-color: var(--gold-3); color: var(--gold-1); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,17,32,0);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.nav.scrolled {
  background: rgba(11,17,32,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-size: 19px;
  font-weight: 800;
  margin-right: auto;
}
.brand-accent { color: var(--gold-2); }
/* Nav links live in a dropdown panel triggered by the hamburger — at every
   viewport width, not just mobile — to keep the top bar minimal (logo + toggle only). */
.nav-links {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  gap: 0;
  background: rgba(11,17,32,.98);
  border-bottom: 1px solid var(--line);
  padding: 8px 24px 16px;
  font-size: 17px;
  color: var(--text-dim);
}
.nav-links a { padding: 12px 0; border-top: 1px solid var(--line); }
.nav-links a:first-child { border-top: none; }
.nav-links a:hover { color: var(--text); }
.nav-inner { position: relative; }
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text);
}

/* ---------- Side scroll dot navigation ---------- */
.dot-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dot-link {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #334155;
  transition: background .2s ease, transform .2s ease;
}
.dot-link:hover { background: #64748b; }
.dot-link.active { background: var(--gold-3); transform: scale(1.5); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 216px 24px 140px;
  overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(circle, rgba(201,162,75,.18), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 1040px; margin: 0 auto; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  text-align: left;
}
.hero-copy { max-width: 560px; }

/* Brand mark */
.hero-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 360px;
}
.mark-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 300px;
}
.mark-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,.35);
}
.mark-ring::before {
  content: '';
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,.18);
}
.mark-logo {
  position: relative;
  z-index: 1;
  width: 76%;
  max-width: 240px;
  filter: drop-shadow(0 8px 22px rgba(201,162,75,.4));
}
.mark-shine {
  position: absolute;
  z-index: 2;
  inset: 12%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.9) 50%, transparent 65%);
  background-size: 300% 300%;
  background-position: -150% -150%;
  -webkit-mask-image: url('assets/logo-gold.png');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url('assets/logo-gold.png');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}
@media (prefers-reduced-motion: no-preference) {
  .mark-shine { animation: mark-shine-sweep 4.5s ease-in-out infinite; }
}
@keyframes mark-shine-sweep {
  0% { background-position: -150% -150%; }
  10% { background-position: 150% 150%; }
  100% { background-position: 150% 150%; }
}
.mark-caption {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-dim);
}
.badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--gold-2);
  border: 1px solid rgba(201,162,75,.35);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 36px;
}
.hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 20px;
  color: var(--text-dim);
  margin: 0 0 36px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.kakao-buttons-note {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding: 110px 24px; }
.section-alt {
  background: var(--bg-alt);
  clip-path: polygon(0 44px, 100% 0, 100% calc(100% - 44px), 0 100%);
}
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold-2);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; font-weight: 800; }
.section-sub { color: var(--text-dim); margin: 0; font-size: 19px; }

/* ---------- Philosophy: editorial index list ---------- */
.editorial-list { max-width: 880px; margin: 0 auto; }
.eitem {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.eitem:first-child { border-top: none; }
.eitem-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.eitem-body h3 { margin: 0 0 10px; font-size: 22px; }
.eitem-body p { margin: 0; color: var(--text-dim); font-size: 18px; max-width: 560px; }

/* ---------- Other card grids (teachers/branches keep box style) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Director ---------- */
.director-card {
  display: flex;
  align-items: center;
  gap: 56px;
}
.director-photo-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 54%;
  max-width: 560px;
  cursor: pointer;
  transition: transform .25s ease;
}
.director-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle at 50% 40%, rgba(201,162,75,.22), transparent 70%);
  filter: blur(24px);
  z-index: 0;
}
.director-photo-wrap:hover { transform: translateY(-6px); }
.director-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 2079 / 2350;
  object-fit: cover;
  filter: brightness(1.14) contrast(1.02) saturate(1.04);
  -webkit-mask-image: radial-gradient(ellipse 82% 86% at 50% 46%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 86% at 50% 46%, #000 60%, transparent 100%);
}
.director-body { flex: 1 1 auto; min-width: 0; }
.director-body h3 { font-size: 19px; font-weight: 600; color: var(--text-dim); margin: 0 0 4px; }
.director-role { color: var(--text-dim); font-size: 13px; margin: 0 0 26px; font-weight: 400; }
.director-quote {
  color: var(--gold-1);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 22px;
}
.director-bio {
  color: var(--text);
  font-size: 20px;
  line-height: 1.7;
  margin: 0 0 28px;
  padding-left: 20px;
  border-left: 2px solid var(--gold-3);
}
.director-facts-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.director-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 20px;
}
.director-facts li {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Avatars ---------- */
.avatar-wrap { flex-shrink: 0; cursor: pointer; transition: transform .2s ease; }
.avatar-wrap:hover { transform: translateY(-6px); }
.avatar {
  width: 112px; height: 112px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  color: #241a05;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-lg { width: 176px; height: 176px; font-size: 52px; }
.avatar-xl { width: 200px; height: 200px; font-size: 60px; margin: 0 auto 20px; }
.avatar-photo {
  width: 112px; height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(201,162,75,.3);
}

/* ---------- Carousel (facility + teachers) ---------- */
.carousel { position: relative; max-width: var(--max); margin: 0 auto; }
.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 8px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 auto; scroll-snap-align: start; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(11,17,32,.85);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  z-index: 5;
  transition: border-color .2s ease, color .2s ease;
}
.carousel-btn:hover { border-color: rgba(201,162,75,.5); color: var(--gold-2); }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }
.carousel-dots { display: flex; gap: 7px; justify-content: center; margin-top: 16px; }
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #334155;
  border: none;
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active { background: var(--gold-3); }

/* ---------- Teachers ---------- */
.carousel-teachers .carousel-slide.tcard { width: 208px; }
.tcard {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 20px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.tcard:hover { transform: translateY(-6px); border-color: rgba(201,162,75,.4); }
.tcard-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius) - 8px);
  overflow: hidden;
  margin: 0 0 14px;
  border: 1px solid rgba(201,162,75,.3);
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
}
.tcard-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(201,162,75,.16), rgba(11,17,32,.95));
}
.tcard-initial {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tcard h3 { margin: 0 0 4px; font-size: 16px; }
.tcard-role { color: var(--text-dim); font-size: 13px; margin: 0; }
.tag-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  color: var(--gold-2);
  border: 1px solid rgba(201,162,75,.3);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ---------- Level test ---------- */
.leveltest-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
.ltcard {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.ltcard h3 { margin: 0 0 16px; font-size: 20px; color: var(--gold-2); }
.ltcard p { margin: 0 0 16px; color: var(--text-dim); font-size: 16px; line-height: 1.7; }
.ltcard-info { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.ltcard-info li { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ltcard-info li:last-child { margin-bottom: 0; }
.lt-icon { width: 18px; height: 18px; flex-shrink: 0; }
.lt-icon-inline { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* ---------- Why cards ---------- */
.why-grid { grid-template-columns: repeat(3, 1fr); }
.wcard {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.wcard:hover { transform: translateY(-4px); border-color: rgba(201,162,75,.4); }
.wcard-icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(201,162,75,.1);
  border: 1px solid rgba(201,162,75,.25);
  display: flex; align-items: center; justify-content: center;
}
.wcard-icon svg { width: 26px; height: 26px; }
.wcard h3 { margin: 0 0 10px; font-size: 19px; }
.wcard p { margin: 0; color: var(--text-dim); font-size: 17px; }
.is-result-card { cursor: pointer; }
.is-result-card:hover { transform: translateY(-6px); border-color: rgba(201,162,75,.5); }
.wcard-cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-2);
}

/* ---------- Results modal ---------- */
.results-content { max-width: 440px; text-align: left; }
.results-content h3 { margin: 0 0 6px; text-align: center; }
.results-sub { color: var(--text-dim); font-size: 15px; margin: 0 0 20px; text-align: center; }
.results-list li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.results-list li:first-child { border-top: none; }
.results-list a {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}
.results-list a:hover { color: var(--gold-2); }

.branch-picker-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.branch-picker-btn { width: 100%; }

/* ---------- Director mission block ---------- */
.mission-block {
  max-width: 640px;
  margin: 56px auto 0;
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.mission-title { font-size: 23px; margin: 0 0 24px; }
.mission-quote {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 28px;
}
.mission-body {
  color: var(--text-dim);
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.8;
}
.mission-signature {
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--gold-2);
  font-weight: 600;
}

/* ---------- Teacher tagline ---------- */
.teacher-tagline {
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 700;
}

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  padding: 22px 4px;
  cursor: pointer;
  text-align: left;
}
.faq-plus { color: var(--gold-2); font-size: 22px; transition: transform .2s ease; }
.faq-item.open .faq-plus { transform: rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .25s ease;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a p { min-height: 0; overflow: hidden; margin: 0 4px 20px; color: var(--text-dim); font-size: 17px; }

/* ---------- Facility gallery (per-branch carousels) ---------- */
.facility-branch { margin-bottom: 48px; }
.facility-branch:last-child { margin-bottom: 0; }
.facility-branch-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--gold-2);
}
.facility-photo {
  width: 320px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 14px;
}
.facility-photo img { width: 100%; height: 100%; object-fit: cover; }
.facility-photo:empty,
.facility-photo:not(:has(img)) {
  background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 10px, var(--bg) 10px, var(--bg) 20px);
}

/* ---------- Map / location ---------- */
.map-grid { grid-template-columns: repeat(3, 1fr); }
.map-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}
.map-card:hover { transform: translateY(-4px); border-color: rgba(201,162,75,.4); }
.map-icon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, rgba(201,162,75,.18), transparent 68%), var(--bg-alt);
  transition: background .25s ease;
}
.map-icon-card:hover { background: radial-gradient(ellipse at 50% 42%, rgba(201,162,75,.28), transparent 68%), var(--bg-alt); }
.map-icon-ring {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -66%);
}
.map-icon-ring::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,.16);
}
.map-icon-pin {
  position: relative;
  width: 34px;
  height: 34px;
  margin-top: -12px;
  filter: drop-shadow(0 8px 16px rgba(201,162,75,.35));
}
.map-icon-label { position: relative; font-size: 15px; font-weight: 700; color: var(--gold-1); letter-spacing: .3px; }
.map-icon-sub { position: relative; font-size: 12px; color: var(--text-dim); }
.map-card-label { padding: 14px 14px 4px; font-size: 16px; font-weight: 600; text-align: center; background: var(--bg); }
.map-card-label span { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--text-dim); }
.map-card-transit {
  padding: 12px 16px 18px;
  background: var(--bg);
}
.map-card-transit li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 4px 0;
}
.transit-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Kakao banner ---------- */
.kakao-banner {
  padding: 44px 24px;
  background: radial-gradient(ellipse at 20% 50%, rgba(201,162,75,.16), transparent 62%), var(--bg-alt);
  border-top: 1px solid rgba(201,162,75,.3);
  border-bottom: 1px solid rgba(201,162,75,.3);
}
.kakao-banner-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.kakao-banner-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(201,162,75,.4);
  background: rgba(201,162,75,.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kakao-banner-icon svg { width: 24px; height: 24px; }
.kakao-banner-text { flex: 1 1 auto; min-width: 200px; }
.kakao-banner-text strong { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--gold-1); margin-bottom: 6px; }
.kakao-banner-text span { color: var(--text-dim); font-size: 16px; }
.kakao-banner-new {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #241a05;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  padding: 3px 9px;
  border-radius: 100px;
  animation: kakao-banner-pulse 2s ease-in-out infinite;
}
@keyframes kakao-banner-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.kakao-banner-btn { flex-shrink: 0; font-size: 15px; padding: 14px 26px; }

/* ---------- Branches ---------- */
.branch-grid { grid-template-columns: repeat(3, 1fr); }
.bcard {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.bcard-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #241a05;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.bcard h3 { margin: 0 0 8px; font-size: 21px; }
.bcard-sub { color: var(--text-dim); font-weight: 400; font-size: 16px; }
.bcard-desc { color: var(--text-dim); font-size: 17px; margin: 0 0 18px; }
.school-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-2);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.school-icon { width: 16px; height: 16px; flex-shrink: 0; }
.school-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.school-tag {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-1);
  background: rgba(201,162,75,.12);
  border: 1px solid rgba(201,162,75,.35);
  padding: 6px 12px;
  border-radius: 6px;
}

/* ---------- Kakao branch buttons ---------- */
.kakao-buttons { margin-top: 40px; text-align: center; }
.kakao-buttons-label { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.kakao-buttons-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.kakao-branch-btn { display: inline-flex; align-items: center; gap: 8px; }
.kakao-branch-btn .kakao-icon { width: 18px; height: 18px; flex-shrink: 0; background: #fee500; border-radius: 50%; padding: 3px; box-sizing: border-box; }
.kakao-branch-btn:hover .kakao-icon { background: #ffeb3b; }

/* ---------- Calendar tool CTA ---------- */
.cal-tool-link {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(90deg, rgba(201,162,75,.1), rgba(201,162,75,.03));
  border: 1px solid rgba(201,162,75,.3);
  border-radius: 12px;
  padding: 20px 24px;
  transition: transform .2s ease, border-color .2s ease;
}
.cal-tool-link:hover { transform: translateY(-2px); border-color: rgba(201,162,75,.55); }
.cal-tool-text strong { display: block; font-size: 17px; margin-bottom: 4px; }
.cal-tool-text span { color: var(--text-dim); font-size: 16px; }
.cal-tool-arrow { color: var(--gold-2); font-size: 20px; flex-shrink: 0; }
.cal-tool-link-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  border-width: 2px;
  border-color: rgba(201,162,75,.5);
  box-shadow: 0 0 50px rgba(201,162,75,.1);
}
.cal-tool-link-hero .cal-tool-text strong { font-size: 22px; margin-bottom: 8px; }
.cal-tool-link-hero .cal-tool-text span { font-size: 17px; }
.cal-tool-link-hero .cal-tool-arrow { font-size: 28px; }

/* ---------- Final CTA ---------- */
.cta-final {
  padding: 130px 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(201,162,75,.12), transparent 60%), var(--bg-alt);
  clip-path: polygon(0 44px, 100% 0, 100% calc(100% - 44px), 0 100%);
}
.cta-final h2 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 16px; }
.cta-final p { color: var(--text-dim); margin: 0 0 32px; }
.cta-phone-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cta-phone-btn { display: inline-flex; align-items: center; gap: 8px; }
.phone-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { padding: 64px 24px 140px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-tagline {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 32px;
  color: var(--text);
}
.footer-brand { font-size: 20px; font-weight: 800; margin-bottom: 28px; }
.footer-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
.footer-branches strong { display: block; margin-bottom: 6px; font-size: 16px; }
.footer-branches p { margin: 0; color: var(--text-dim); font-size: 16px; }
.footer-registration {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-bottom: 16px;
}
.footer-registration li {
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- Floating CTA stack ---------- */
.float-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.float-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 100px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .15s ease;
}
.float-btn:hover { transform: translateX(-4px); }
.float-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.float-icon svg { width: 16px; height: 16px; display: block; }
.float-label { font-size: 13px; font-weight: 700; white-space: nowrap; }
.float-kakao { background: #fee500; color: #3c1e1e; }
.float-phone { background: linear-gradient(90deg, var(--gold-1), var(--gold-3)); color: #241a05; }
.float-consult { background: #1e293b; border: 1px solid var(--line); color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-content {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}
.lightbox-content h3 { margin: 0 0 6px; }
.lightbox-content p { margin: 0; color: var(--text-dim); font-size: 17px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 100%; margin: 0 auto; }
  .hero-mark { display: none; }
  .eitem { grid-template-columns: 60px 1fr; gap: 18px; }
  .eitem-num { font-size: 28px; }
  .section-alt, .cta-final { clip-path: polygon(0 24px, 100% 0, 100% calc(100% - 24px), 0 100%); }
  .card-grid, .branch-grid, .why-grid, .map-grid, .leveltest-grid { grid-template-columns: 1fr; }
  .facility-photo { width: 78vw; }
  .carousel-teachers .carousel-slide.tcard { width: 58vw; }
  .carousel-prev { left: 4px; }
  .carousel-next { right: 4px; }
  .director-card { flex-direction: column; align-items: center; text-align: center; }
  .director-photo-wrap { width: 78%; max-width: 300px; }
  .director-bio { text-align: left; }
  .director-facts { grid-template-columns: 1fr; text-align: left; }
  .footer-branches { grid-template-columns: 1fr; }
  .section { padding: 72px 20px; }
  .hero { padding: 140px 20px 80px; }
  .dot-nav { display: none; }
  .cal-tool-link { flex-direction: column; align-items: flex-start; }
  .cal-tool-link-hero { padding: 28px 24px; }
  .float-label { display: none; }
  .float-btn { padding: 11px; border-radius: 50%; }
  .float-icon svg { width: 15px; height: 15px; }

  /* Mobile-only type scale — everything above is sized for desktop reading
     distance; phones need noticeably smaller text, not just narrower columns. */
  body { font-size: 15px; }
  .btn { font-size: 14px; padding: 12px 20px; }
  .nav-links { font-size: 15px; }
  .badge { font-size: 10px; letter-spacing: 0.5px; padding: 6px 12px; white-space: nowrap; }
  .hero-sub { font-size: 15px; }
  .hero-note { font-size: 12px; }
  .kakao-buttons-note { font-size: 12px; }
  .eyebrow { font-size: 11px; }
  .section-sub { font-size: 14px; }
  .eitem-body h3 { font-size: 17px; }
  .eitem-body p { font-size: 14px; }
  .director-role { font-size: 13px; }
  .director-bio { font-size: 16px; }
  .director-quote { font-size: 20px; }
  .mission-title { font-size: 18px; }
  .mission-body { font-size: 14px; }
  .mission-signature { font-size: 12px; }
  .director-facts-label { font-size: 10px; }
  .director-facts li { font-size: 12px; }
  .wcard h3, .ltcard h3, .tcard h3, .bcard h3 { font-size: 16px; }
  .wcard p, .ltcard p, .tcard-role, .bcard-desc { font-size: 13px; }
  .ltcard-info li { font-size: 12px; }
  .school-label { font-size: 11px; }
  .school-tag { font-size: 12px; padding: 5px 10px; }
  .bcard-sub { font-size: 13px; }
  .teacher-tagline { font-size: 14px; }
  .kakao-buttons-label { font-size: 15px; }
  .kakao-branch-btn { font-size: 12px; padding: 10px 16px; }
  .kakao-branch-btn .kakao-icon { width: 15px; height: 15px; }
  .facility-branch-title { font-size: 16px; }
  .map-card-label { font-size: 13px; }
  .map-card-label span { font-size: 11px; }
  .map-card-transit li { font-size: 11px; }
  .kakao-banner-text strong { font-size: 16px; }
  .kakao-banner-text span { font-size: 12px; }
  .kakao-banner-icon { width: 40px; height: 40px; }
  .kakao-banner-icon svg { width: 18px; height: 18px; }
  .kakao-banner-btn { font-size: 13px; padding: 11px 18px; }
  .cal-tool-link-hero .cal-tool-text strong { font-size: 16px; }
  .cal-tool-link-hero .cal-tool-text span { font-size: 12px; }
  .cta-final p { font-size: 14px; }
  .footer-tagline { font-size: 14px; }
  .footer-branches strong { font-size: 13px; }
  .footer-branches p { font-size: 12px; }
  .footer-registration li { font-size: 10px; }
  .lightbox-content p { font-size: 13px; }
  .cta-phone-btn { font-size: 13px; padding: 12px 18px; }
}
