:root {
  --primary: #2b50ec;
  --primary-dark: #1f3bb3;
  --accent: #ff5a78;
  --text: #15192c;
  --muted: #5b6178;
  --bg: #ffffff;
  --bg-alt: #f5f7ff;
  --border: #e5e8f3;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 80, 236, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.logo span { color: var(--primary); }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta { padding: 10px 18px; font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 14px 8px;
}
.btn-ghost:hover { color: var(--primary); }

/* Hero */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #f5f7ff 0%, #ffffff 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 8px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  margin: 0 0 18px;
}
.accent { color: var(--accent); }
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.4rem; color: var(--text); }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

.hero-card {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.card-row:last-of-type { border-bottom: none; }
.hangul { font-size: 2rem; font-weight: 700; }
.roman { color: var(--muted); }
.card-tag {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--accent);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin: 0 0 12px;
  text-align: center;
}
.section-title.left { text-align: left; }
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 48px;
}
.section-sub.left { text-align: left; margin-left: 0; }

/* Course grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.course-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}
.level {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary);
  background: rgba(43, 80, 236, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  align-self: flex-start;
}
.course-card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.course-card p { color: var(--muted); margin: 0 0 16px; }
.course-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  color: var(--text);
}
.course-card ul li {
  padding: 8px 0 8px 22px;
  position: relative;
}
.course-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.course-card .btn { align-self: flex-start; margin-top: auto; }

/* Hangul */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.alphabet {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.alphabet h4 { margin: 16px 0 12px; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.alphabet h4:first-child { margin-top: 0; }
.letters {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.letters span {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 14px 0;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .1s ease;
  cursor: default;
}
.letters span:hover { background: var(--primary); color: white; transform: scale(1.05); }

/* Phrases */
.phrase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.phrase {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
}
.phrase strong { font-size: 1.2rem; grid-column: 1; }
.phrase span { color: var(--muted); font-size: 0.9rem; grid-column: 1; }
.phrase em {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-style: normal;
  color: var(--primary);
  font-weight: 600;
  text-align: right;
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonials blockquote {
  background: white;
  border-left: 4px solid var(--primary);
  padding: 24px;
  margin: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.testimonials blockquote p { margin: 0 0 14px; }
.testimonials footer { color: var(--muted); font-size: 0.9rem; }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 8px;
}
.contact-form input,
.contact-form select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
}
.contact-form input:focus,
.contact-form select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

/* Footer */
.footer {
  background: var(--text);
  color: #c5c8d6;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .hero-inner,
  .two-col,
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .grid,
  .testimonials,
  .phrase-grid { grid-template-columns: 1fr; }
  .letters { grid-template-columns: repeat(5, 1fr); }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}