:root {
  --ink: #14213a;
  --muted: #4a5873;
  --paper: #f6f8fb;
  --sand: #e8eef6;
  --cobalt: #1f4fbf;
  --cobalt-deep: #0f2a6b;
  --turq: #14a3a0;
  --turq-light: #7ff0e4;
  --coral-light: #ffa3a3;
  --line: rgba(20, 33, 58, 0.12);
  --display: "Bricolage Grotesque", "Noto Sans KR", system-ui, sans-serif;
  --body: "Figtree", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: max(20px, calc((100% - 1120px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ko"] body { word-break: keep-all; line-height: 1.75; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; }
h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 24ch;
  margin-bottom: 40px;
}
h3 { font-size: 1.2rem; line-height: 1.3; }
html[lang="ko"] h2, html[lang="ko"] h1 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }

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

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.sr-right { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gutter);
  background: rgba(246, 248, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem; }
.nav a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 16px; }
.lang { font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--cobalt); padding: 6px 4px; }
.lang:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none;
  background: var(--cobalt); color: #fff;
  font-weight: 600; font-size: 1rem;
  padding: 14px 24px; border-radius: 12px;
  border: 1.5px solid var(--cobalt);
  transition: background 0.15s;
}
.btn:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); }
.btn-sm { padding: 9px 16px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(20, 33, 58, 0.28); }
.btn-ghost:hover { background: var(--sand); border-color: rgba(20, 33, 58, 0.28); }
.btn-light { background: #fff; color: var(--cobalt-deep); border-color: #fff; }
.btn-light:hover { background: var(--sand); border-color: var(--sand); }

main > section { padding: clamp(56px, 9vw, 112px) var(--gutter); }
.band { background: var(--sand); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(40px, 7vw, 88px);
}
h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.02; letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Correction demo: the one memorable element */
.demo {
  background: var(--cobalt-deep); color: #fff;
  border-radius: 24px; padding: clamp(20px, 3vw, 32px);
}
.demo-label { font-weight: 500; opacity: 0.85; margin-bottom: 18px; }
.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fix {
  position: relative; display: grid; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px; padding: 16px 18px 34px;
  transition: background 0.15s;
}
.fix:hover { background: rgba(255, 255, 255, 0.12); }
.fix-wrong, .fix-right {
  grid-area: 1 / 1;
  font-family: var(--display); font-weight: 500; font-size: 1.3rem; line-height: 1.3;
}
.fix-wrong { color: var(--coral-light); }
.fix-right { color: var(--turq-light); }
.fix-right::before { content: "\2713\00a0"; }
.fix-hint { position: absolute; left: 18px; bottom: 10px; font-size: 0.85rem; opacity: 0.7; }
.fix-note { color: rgba(255, 255, 255, 0.88); font-size: 0.97rem; padding: 10px 6px 4px; }

/* With JS: swap the sentence, hide/show the note */
.js .fix-right { opacity: 0; visibility: hidden; transition: opacity 0.2s; }
.js .fix-wrong { transition: opacity 0.2s; }
.js .fix[aria-expanded="true"] .fix-wrong { opacity: 0; visibility: hidden; }
.js .fix[aria-expanded="true"] .fix-right { opacity: 1; visibility: visible; }
.js .fix[aria-expanded="true"] .fix-hint { display: none; }
.js .fix-note { display: none; }
.js .fix[aria-expanded="true"] + .fix-note { display: block; }
/* Without JS: show both lines */
html:not(.js) .fix { padding-bottom: 16px; }
html:not(.js) .fix-wrong, html:not(.js) .fix-right { grid-area: auto; }
html:not(.js) .fix-wrong { text-decoration: line-through; }
html:not(.js) .fix-hint { display: none; }

/* Why */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.why h3 { margin-bottom: 10px; }
.why p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.portrait { width: 100%; height: auto; border-radius: 24px; display: block; background: var(--sand); }
.about p { font-size: 1.15rem; max-width: 36em; color: var(--muted); }
.creds { list-style: none; margin: 28px 0 0; padding: 0; max-width: 32em; }
.creds li { padding: 12px 0; border-top: 1px solid var(--line); font-weight: 500; }
.creds li:last-child { border-bottom: 1px solid var(--line); }

/* Lessons */
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons li {
  display: grid; grid-template-columns: 1fr 2fr; gap: 24px;
  padding: 22px 0; border-top: 1px solid rgba(20, 33, 58, 0.18);
}
.lessons li:last-child { border-bottom: 1px solid rgba(20, 33, 58, 0.18); }
.lessons p { color: var(--muted); max-width: 38em; }
.sched {
  margin-top: 48px; padding: 24px 28px; background: #fff;
  border-radius: 16px; border-left: 4px solid var(--turq); max-width: 640px;
}
.sched h3 { margin-bottom: 6px; }
.sched p { color: var(--muted); }

/* How it works */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 3rem; line-height: 1; color: var(--cobalt); margin-bottom: 14px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }

/* Pricing */
.prices { margin: 0; max-width: 560px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid rgba(20, 33, 58, 0.18); }
.price-row:first-child { border-top: 1px solid rgba(20, 33, 58, 0.18); }
.price-row dt { font-size: 1.1rem; }
.price-row dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.5rem; }

/* FAQ */
.faq details { max-width: 720px; border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--cobalt); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }

/* Final call to action */
.final { background: var(--cobalt-deep); color: #fff; }
.final h2 { color: #fff; margin-bottom: 16px; max-width: 18ch; }
.final > p { font-size: 1.2rem; opacity: 0.88; margin-bottom: 28px; max-width: 32em; }
.contact { margin-top: 56px; }
.contact h3 { font-size: 1rem; font-weight: 500; opacity: 0.8; margin-bottom: 10px; font-family: var(--body); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.contact-links a { font-weight: 600; text-underline-offset: 4px; }
.email-wrap { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-links .email-wrap a { font-size: 1.25rem; }
.copy {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  color: #fff; background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.5); border-radius: 10px; padding: 6px 14px;
}
.copy:hover { background: rgba(255, 255, 255, 0.12); }
.final .contact { margin-top: 32px; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 24px var(--gutter); color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--line); }
.foot a { color: var(--cobalt); font-weight: 600; text-decoration: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .why, .steps { grid-template-columns: 1fr; gap: 28px; }
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
  .lessons li { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
