:root {
  color-scheme: light;
  --paper: #f8f4eb;
  --paper-light: #fffcf5;
  --ink: #202122;
  --muted: #55544f;
  --line: #d9d1c2;
  --blue: #124d76;
  --blue-dark: #113e5d;
  --red: #a92e35;
  --green: #245c48;
  --width: 1160px;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1c70a6; outline-offset: 4px; }

.wrap { width: min(calc(100% - 80px), var(--width)); margin-inline: auto; }
.skip-link {
  position: absolute; z-index: 5; left: 1rem; top: 1rem; transform: translateY(-200%);
  background: var(--paper-light); border: 2px solid var(--ink); padding: .75rem 1rem;
}
.skip-link:focus { transform: none; }

.header {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 84px; gap: 1rem; border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap;
  font-weight: 800; line-height: 1; letter-spacing: -.055em; text-decoration: none;
}
.brand-mark {
  display: grid; place-items: center; width: 2rem; aspect-ratio: 1; flex: none;
  border: 2px solid #232629; border-radius: .58rem;
  background: linear-gradient(141deg, #b9303a 50%, #145c8d 50%);
  color: #fff; font-size: 1.04rem; letter-spacing: 0;
}
.main-nav { display: flex; gap: clamp(.75rem, 3vw, 2.25rem); align-items: center; }
.main-nav a { font-size: .91rem; font-weight: 750; text-underline-offset: .25em; text-decoration: none; }
.main-nav a:hover { text-decoration: underline; }
.main-nav span { color: var(--blue); margin-inline-start: .18rem; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2.25rem, 5vw, 4.75rem); padding-block: 67px 83px;
}
.eyebrow {
  margin: 0 0 1.25rem; color: var(--red); font-size: .88rem;
  letter-spacing: .04em; font-weight: 800;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { word-break: keep-all; }
h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.45rem); line-height: 1.16;
  font-weight: 850; letter-spacing: -.092em;
}
h1 span { color: var(--blue); }
.hero-summary {
  max-width: 31rem; margin-block: 1.5rem 2rem; font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.85; color: var(--muted); word-break: keep-all;
}
.primary {
  display: inline-flex; align-items: center; gap: 1.15rem; min-height: 52px; padding: .75rem 1.15rem;
  background: var(--blue-dark); color: #fff; text-decoration: none; font-weight: 750; border-radius: .7rem;
  box-shadow: 0 4px 0 #082a42;
}
.primary:hover { background: var(--blue); }
.primary span { font-size: 1.12rem; }

.hero-visual {
  isolation: isolate; position: relative; display: grid; place-items: start center; min-width: 0;
  height: clamp(390px, 43vw, 520px); padding: 33px 14px 36px; overflow: hidden;
  border-radius: 1.6rem; border: 1px solid #ddcdb5; background: #efe0c7;
}
.visual-halo {
  position: absolute; z-index: -1; width: 100%; height: 100%; top: 0; left: 0;
  background:
    radial-gradient(circle at 16% 12%, #f7ead6 0, #f7ead6 24%, transparent 25%),
    radial-gradient(circle at 84% 78%, #db796c 0, #db796c 19%, transparent 19.4%),
    radial-gradient(circle at 69% 44%, #f4c985 0, #f4c985 32%, transparent 32.3%);
}
.visual-halo::after {
  content: ""; position: absolute; inset: 12% 8%; border: 1px solid #cfaa7f;
  border-radius: 50%; transform: rotate(-30deg); pointer-events: none;
}
.phone {
  width: clamp(190px, 70%, 272px); height: 100%;
  overflow: hidden; border: 7px solid #212124; border-radius: 1.85rem;
  background: #f4f0e5; transform: rotate(-4deg);
  box-shadow: 14px 20px 33px #4d382646, 2px 5px 0 #3e3632;
}
.phone img { display: block; width: 100%; height: auto; }
.formula {
  position: absolute; bottom: 46px; right: 22px; padding: .52rem .85rem;
  border: 1px solid #213e51; border-radius: .6rem; color: #15374b; background: #e5f0f1;
  font-size: clamp(.91rem, 2.2vw, 1.14rem); font-weight: 850; box-shadow: 0 3px 0 #487080;
}
.formula b { font-weight: 500; color: #567183; }
.hero-visual figcaption {
  position: absolute; bottom: 14px; left: 17px; color: #483a32; font-size: .76rem; font-weight: 700;
}

.lessons { border-top: 1px solid var(--line); padding-block: 60px 79px; }
.section-heading h2, .practice h2 {
  font-size: clamp(2rem, 4.4vw, 3.05rem); font-weight: 850;
  letter-spacing: -.081em; line-height: 1.2;
}
.section-heading p, .practice-copy p { margin-top: .8rem; color: var(--muted); line-height: 1.75; word-break: keep-all; }
.lesson-path {
  list-style: none; margin: 2rem 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.lesson-path li {
  border: 1px solid var(--line); border-radius: 1rem; background: var(--paper-light);
  padding: 1.4rem; min-width: 0;
}
.lesson-example {
  display: inline-block; border-radius: .55rem; padding: .35rem .65rem;
  line-height: 1.35; font-size: 1.1rem; font-weight: 850; letter-spacing: .025em;
}
.example-red { background: #fae7df; color: #912f36; }
.example-blue { background: #e6eff5; color: #1b4d70; }
.example-green { background: #e4efe2; color: #265b45; }
.lesson-path h3 { margin-top: 1rem; font-size: 1.25rem; letter-spacing: -.052em; font-weight: 850; }
.lesson-path li > p:last-child { margin-top: .42rem; line-height: 1.66; color: var(--muted); word-break: keep-all; }
.app-details {
  display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 2rem; margin: 1.55rem 0 0;
  padding: 1.2rem 0 0; border-top: 1px solid var(--line);
}
.app-details div { display: grid; gap: .45rem; align-content: start; }
.app-details dt { color: var(--blue-dark); font-weight: 850; }
.app-details dd { margin: 0; color: var(--muted); line-height: 1.64; word-break: keep-all; }

.practice {
  padding-block: 70px 76px; color: #f9f5eb;
  background: #1b3443;
}
.practice-grid {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 9vw, 7rem); align-items: center;
}
.practice-copy p { color: #dbe6e8; max-width: 23rem; line-height: 1.81; }
.quiz {
  min-width: 0; border-radius: 1.15rem; padding: clamp(1rem, 4vw, 1.9rem);
  color: var(--ink); background: var(--paper-light); box-shadow: 0 7px 0 #102632;
}
.quiz-category { color: var(--blue); font-size: .85rem; font-weight: 800; }
.quiz h3 { margin: .45rem 0 1.15rem; font-size: clamp(1.15rem, 2.55vw, 1.65rem); line-height: 1.4; letter-spacing: -.055em; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.choice {
  min-width: 0; min-height: 50px; border: 1px solid #b7ad9c; border-radius: .55rem;
  background: #f6f1e6; color: var(--ink); white-space: nowrap; font-weight: 800; cursor: pointer;
}
.choice:hover { background: #ece4d6; }
.choice[data-result="correct"] { border-color: #397760; color: #194b38; background: #dbeee1; }
.choice[data-result="incorrect"] { border-color: #ba6d68; color: #852e32; background: #fae7e3; }
.feedback { min-height: 1.6rem; margin: .65rem 0 .3rem; font-size: .88rem; color: var(--blue-dark); line-height: 1.6; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.sound-button, .retry-button {
  min-height: 42px; border-radius: .55rem; padding: .45rem .8rem; font-size: .88rem; font-weight: 800; cursor: pointer;
}
.sound-button { border: 1px solid var(--blue-dark); color: #fff; background: var(--blue-dark); }
.sound-button:hover { background: var(--blue); }
.sound-button:disabled { opacity: .72; cursor: default; }
.retry-button { border: 1px solid #a79d8d; color: var(--ink); background: transparent; }
.retry-button:hover { background: #efe9dd; }

.footer {
  min-height: 95px; display: flex; justify-content: space-between; align-items: center; gap: .75rem;
}
.footer > span { color: var(--muted); font-size: .88rem; }
.footer .brand-mark { width: 1.75rem; }

@media (max-width: 1000px) {
  .wrap { width: min(calc(100% - 56px), var(--width)); }
  .hero { gap: 2rem; }
  .hero-visual { height: clamp(360px, 48vw, 490px); }
}

@media (max-width: 710px) {
  .wrap { width: calc(100% - 36px); }
  .header { min-height: 67px; }
  .main-nav { gap: .75rem; }
  .main-nav a { font-size: .79rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-block: 36px 44px; }
  h1 { font-size: clamp(2.22rem, 8vw, 3.25rem); }
  .hero-summary { margin-block: .95rem 1.25rem; line-height: 1.72; }
  .hero-visual { height: clamp(333px, 98vw, 478px); max-width: 520px; width: 100%; }
  .phone { width: clamp(193px, 68%, 272px); }
  .formula { right: 12px; bottom: 39px; }
  .lessons { padding-block: 39px 48px; }
  .lesson-path { grid-template-columns: 1fr; gap: .75rem; margin-top: 1.2rem; }
  .lesson-path li { padding: 1.1rem; }
  .lesson-path h3 { margin-top: .65rem; }
  .app-details { grid-template-columns: 1fr; gap: .9rem; margin-top: 1.2rem; }
  .practice { padding-block: 43px 54px; }
  .practice-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .practice-copy h2 br { display: none; }
  .footer { min-height: 80px; }
}
@media (max-width: 350px) {
  .wrap { width: calc(100% - 28px); }
  .main-nav { gap: .55rem; }
  .main-nav a { font-size: .75rem; }
  .brand { gap: .42rem; }
  .brand-mark { width: 1.7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
