:root {
  --rose: #9e4a3c;
  --rose-dark: #733328;
  --gold: #b8860b;
  --blue: #2563eb;
  --bg: #fffaf7;
  --bg-soft: #f8eee8;
  --surface: #ffffff;
  --text: #2b1b18;
  --muted: #755d58;
  --line: rgba(158, 74, 60, 0.2);
  --shadow: 0 18px 45px rgba(69, 32, 25, 0.13);
}

[data-theme="dark"] {
  --bg: #171312;
  --bg-soft: #211817;
  --surface: #261d1b;
  --text: #f7ece8;
  --muted: #cdb8b1;
  --line: rgba(184, 134, 11, 0.28);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 1000;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(30, 18, 15, 0.14);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  font-family: "Noto Serif KR", serif;
  font-weight: 800;
}

.brand strong,
h1,
h2 {
  font-family: "Noto Serif KR", serif;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
}

.desktop-nav > a,
.nav-item > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 7px;
}

.desktop-nav > a:hover,
.nav-item:hover > a {
  background: var(--bg-soft);
  color: var(--rose);
}

.nav-item {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
}

.dropdown a:hover {
  background: var(--bg-soft);
  color: var(--rose);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.menu-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  grid-template-columns: 1fr 1fr;
  width: 58px;
  font-size: 15px;
}

.menu-toggle {
  display: none;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 107px);
  overflow: hidden;
}

.hero-media,
.hero-overlay,
.hero-content {
  grid-area: 1 / 1;
}

.hero-media {
  background-image: url("assets/hero-academy.png");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(39, 17, 13, 0.88), rgba(39, 17, 13, 0.48), rgba(39, 17, 13, 0.1)),
    linear-gradient(0deg, rgba(39, 17, 13, 0.45), transparent 35%);
}

.hero-content {
  align-self: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 80px 20px 110px;
  color: #fff;
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0;
  font-size: clamp(36px, 6.4vw, 70px);
  line-height: 1.12;
}

.hero p {
  max-width: 580px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.4vw, 21px);
}

.hero-buttons,
.ai-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.btn.primary {
  background: var(--rose);
  color: #fff;
}

.btn.kakao {
  background: #fee500;
  color: #221f16;
}

.btn.ghost {
  border-color: color-mix(in srgb, currentColor 35%, transparent);
  background: color-mix(in srgb, var(--surface) 8%, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.badge-blue {
  background: var(--blue);
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1120px, calc(100% - 32px));
  margin: -54px auto 34px;
  position: relative;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stats div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border-right: 0;
}

.stats strong {
  display: block;
  color: var(--rose);
  font-size: clamp(21px, 4vw, 31px);
  line-height: 1.1;
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section.alt,
.card-section {
  width: 100%;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background: var(--bg-soft);
}

.section-head {
  max-width: 740px;
  margin-bottom: 28px;
}

.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

p {
  color: var(--muted);
}

.intro-grid,
.course-grid,
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.intro-grid article,
.course-card,
.teacher-panel article,
.steps article,
.steps a,
.ai-box,
.news-card,
.contact-card,
.map-card,
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(56, 25, 21, 0.07);
}

.intro-grid article,
.course-card,
.teacher-panel article,
.steps article,
.steps a,
.ai-box,
.news-card,
.contact-card {
  padding: 24px;
}

.support-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--rose) 8%, var(--surface));
}

.support-banner strong {
  flex: 1;
  font-size: 19px;
}

.support-banner a,
.course-card a,
.map-card a {
  color: var(--rose);
  font-weight: 900;
}

.split-section,
.ai-section,
.location-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 26px;
  align-items: center;
}

.teacher-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.teacher-panel span {
  color: var(--gold);
  font-weight: 900;
}

.teacher-detail {
  overflow: hidden;
  padding: 0;
}

[hidden] {
  display: none !important;
}

.teacher-detail.no-photo .teacher-photo-wrap {
  display: none;
}

.teacher-photo-wrap {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
  background: linear-gradient(145deg, #3d3a3a, #1f1c1c);
}

.teacher-photo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: center top;
}

.teacher-detail-body {
  padding: 22px 24px 24px;
}

.teacher-detail-body > strong {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: 12px;
  padding: 0 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rose) 9%, var(--surface));
  color: var(--rose);
  font-size: 14px;
}

.teacher-detail-body ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.teacher-selector {
  align-self: start;
}

.teacher-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
}

.teacher-select {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.teacher-select.no-photo {
  grid-template-columns: 1fr;
}

.teacher-select:hover,
.teacher-select.is-active {
  border-color: color-mix(in srgb, var(--rose) 48%, var(--line));
  box-shadow: 0 10px 24px rgba(56, 25, 21, 0.08);
  transform: translateY(-1px);
}

.teacher-select img {
  grid-row: span 2;
  display: block;
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  object-fit: cover;
  object-position: center top;
}

.teacher-select strong {
  align-self: end;
  font-size: 18px;
  line-height: 1.2;
}

.teacher-select span {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rose) 9%, var(--surface));
  color: var(--rose);
  font-size: 13px;
}

.course-grid.four {
  grid-template-columns: repeat(5, 1fr);
}

.course-grid.four .course-card {
  min-height: 220px;
}

.course-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  align-items: flex-start;
}

.image-course-card {
  overflow: hidden;
  padding: 0;
}

.image-course-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5efe6;
  object-fit: contain;
  object-position: center;
}

.image-course-card h3,
.image-course-card .difficulty,
.image-course-card p {
  margin-left: 24px;
  margin-right: 24px;
}

.image-course-card h3 {
  margin-top: 22px;
}

.difficulty {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  color: var(--rose);
  font-size: 13px;
  line-height: 1.4;
}

.image-course-card p {
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.75;
}

.course-card ul {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
}

.course-card a {
  margin-top: auto;
}

.steps {
  grid-template-columns: repeat(4, 1fr);
}

.steps span {
  display: block;
  color: var(--gold);
  font-family: "Noto Serif KR", serif;
  font-size: 30px;
  font-weight: 800;
}

.steps strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 18px;
}

.steps a {
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.steps a:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  transform: translateY(-2px);
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.faq details {
  padding: 16px 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 900;
}

.ai-section {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--gold) 12%, transparent), transparent 34%),
    var(--rose-dark);
  width: 100%;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  color: #fff;
}

.ai-section p,
.ai-section .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.ai-box {
  color: var(--text);
}

.chat-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.16);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
}

.news-card span {
  width: max-content;
  margin-bottom: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.news-card time {
  margin-top: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.news-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.news-more a {
  color: var(--rose);
  font-weight: 900;
}

.map-card {
  overflow: hidden;
}

.map-card a {
  display: block;
  padding: 16px 18px;
}

.map-preview {
  display: grid;
  min-height: 360px;
  align-content: center;
  gap: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--rose) 20%, transparent), transparent 38%),
    linear-gradient(45deg, transparent 47%, color-mix(in srgb, var(--gold) 24%, transparent) 48%, transparent 52%),
    var(--bg-soft);
}

.map-preview span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #03c75a;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.map-preview strong {
  max-width: 440px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.25;
}

.map-preview p {
  margin: 0;
}

.contact-card > a {
  display: block;
  margin-top: 10px;
  color: var(--rose);
  font-size: 20px;
  font-weight: 900;
}

.transport {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  color: var(--muted);
}

.transport strong {
  margin-top: 8px;
  color: var(--text);
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
}

.floating-actions a {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 900;
}

.floating-actions .floating-kakao {
  background: #fee500;
  color: #221f16;
}

.floating-actions .floating-phone {
  background: var(--gold);
}

.floating-actions .floating-instagram {
  background: #e4405f;
}

.floating-actions .floating-youtube {
  background: #ff0033;
}

.floating-actions .floating-naver {
  background: #03c75a;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px max(16px, calc((100% - 1180px) / 2));
  background: #1f1715;
  color: #fff;
}

.site-footer p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .stats,
  .intro-grid,
  .course-grid,
  .course-grid.four,
  .steps,
  .news-grid,
  .split-section,
  .ai-section,
  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 16px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(39, 17, 13, 0.9), rgba(39, 17, 13, 0.5));
  }

  .hero-content {
    align-self: end;
    padding-bottom: 96px;
  }

  .stats,
  .intro-grid,
  .course-grid,
  .course-grid.four,
  .steps,
  .news-grid,
  .split-section,
  .teacher-panel,
  .ai-section,
  .location-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    margin-top: -34px;
  }

  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats div:last-child {
    border-bottom: 0;
  }

  .support-banner,
  .news-more,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section {
    padding: 54px 0;
  }

  .section.alt,
  .card-section,
  .ai-section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .floating-actions {
    right: 12px;
    bottom: 12px;
  }

  .floating-actions a {
    width: 48px;
    height: 48px;
  }
}
