:root {
  --ink: #14282b;
  --deep: #123c43;
  --coral: #ff765e;
  --mint: #cde8df;
  --paper: #f3f0e8;
  --white: #fffdf8;
  --line: rgba(20, 40, 43, .2);
  --muted: #617073;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Pretendard", "Noto Sans KR", sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }

.site-header { position: absolute; top: 0; left: 50%; z-index: 10; width: min(calc(100% - 48px), var(--max-width)); height: 88px; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; color: white; border-bottom: 1px solid rgba(255,255,255,.35); }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.05rem; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; color: var(--deep); background: var(--coral); font-family: Georgia, serif; font-size: 1.25rem; }
.desktop-nav { display: flex; gap: 2.5rem; font-size: .92rem; }
.desktop-nav a:hover { opacity: .65; }
.header-cta { padding: .65rem 1rem; border: 1px solid rgba(255,255,255,.7); font-size: .9rem; }

.hero { position: relative; min-height: min(830px, 92vh); color: white; overflow: hidden; }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: center; animation: reveal-image 1.2s ease-out both; }
.hero-shade { background: linear-gradient(90deg, rgba(5,35,40,.93), rgba(5,35,40,.62) 52%, rgba(5,35,40,.14)); }
.hero-content { position: relative; z-index: 1; width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; padding-top: clamp(180px, 24vh, 230px); animation: rise .8s .15s ease-out both; }
.eyebrow, .section-number { margin: 0 0 1.5rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.hero h1 { margin: 0; font-family: "Gowun Batang", serif; font-size: clamp(4rem, 8vw, 7.2rem); line-height: 1.02; letter-spacing: 0; }
.hero-copy { max-width: 590px; margin: 1.6rem 0 0; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; align-items: center; gap: 2rem; margin-top: 2.4rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: .8rem 1.4rem; border: 0; cursor: pointer; font-weight: 700; }
.button-primary { color: var(--deep); background: var(--coral); }
.text-link { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.65); }
.hero-note { position: absolute; right: max(24px, calc((100% - var(--max-width))/2)); bottom: 36px; z-index: 1; display: flex; gap: 2rem; font-size: .8rem; }
.hero-note span { padding-left: 1rem; border-left: 2px solid var(--coral); }

.intro { max-width: var(--max-width); margin: 0 auto; padding: 8rem 24px; }
.section-heading { display: grid; grid-template-columns: .8fr 1.2fr; }
.section-number { color: #6b797b; }
h2 { margin: 0; font-family: "Gowun Batang", serif; font-size: clamp(2.3rem, 5vw, 4.5rem); line-height: 1.22; letter-spacing: 0; }
.intro-copy { width: min(600px, 100%); margin: 3rem 0 5rem auto; color: #46585b; font-size: 1.08rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps article { min-height: 240px; padding: 1.5rem; border-right: 1px solid var(--line); }
.steps article:first-child { padding-left: 0; }
.steps article:last-child { border-right: 0; }
.steps span { color: #758386; font-size: .75rem; }
.steps h3 { margin: 3rem 0 .8rem; font-size: 1.18rem; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

.program { display: grid; grid-template-columns: 1fr 1fr; min-height: 760px; color: white; background: var(--deep); }
.program-image-wrap { min-height: 560px; overflow: hidden; }
.program-image-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: .83; }
.program-content { align-self: center; padding: clamp(3rem, 7vw, 7rem); }
.program-content .section-number { color: var(--coral); }
.program-list { margin-top: 3rem; border-top: 1px solid rgba(255,255,255,.25); }
.program-list details { border-bottom: 1px solid rgba(255,255,255,.25); }
.program-list summary { display: flex; justify-content: space-between; padding: 1.35rem 0; cursor: pointer; list-style: none; font-weight: 700; }
.program-list summary::-webkit-details-marker { display: none; }
.program-list details[open] summary span:last-child { transform: rotate(45deg); }
.program-list p { margin: -.2rem 0 1.4rem; color: rgba(255,255,255,.74); }

.area { max-width: var(--max-width); margin: 0 auto; padding: 8rem 24px; display: grid; grid-template-columns: .72fr 1.28fr; gap: 5rem; }
.area-heading { position: sticky; top: 2rem; align-self: start; }
.area-heading > p:last-child { max-width: 420px; margin-top: 2rem; color: var(--muted); }
.districts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.districts a { display: grid; place-items: center; min-height: 96px; padding: .7rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: "Gowun Batang", serif; font-size: 1.05rem; transition: background .2s, color .2s; }
.districts a:hover, .districts a:focus-visible { color: white; background: var(--deep); }

.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 8rem); padding: 7rem max(24px, calc((100% - var(--max-width))/2)); background: var(--mint); }
.contact-heading > p:last-child { max-width: 400px; margin-top: 2rem; color: #435d5e; }
.contact-phone { display: inline-block; margin-top: 1rem; padding-bottom: .2rem; border-bottom: 2px solid var(--deep); font-family: "Gowun Batang", serif; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-content: start; }
.contact-form label:not(.consent) { display: flex; flex-direction: column; gap: .45rem; }
.contact-form label > span { font-size: .86rem; font-weight: 700; }
.contact-form input:not([type="checkbox"]), .contact-form select, .contact-form textarea { width: 100%; padding: .8rem .2rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #668083; border-radius: 0; outline: none; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.full-width { grid-column: 1 / -1; }
.consent { display: flex; align-items: center; gap: .65rem; }
.consent input { width: 18px; height: 18px; accent-color: var(--deep); }
.button-submit { color: white; background: var(--deep); }
.form-status { min-height: 1.5rem; margin: 0; font-size: .9rem; }

.location-page .site-header { position: relative; left: auto; width: 100%; height: 80px; padding: 0 max(24px, calc((100% - var(--max-width))/2)); transform: none; background: var(--deep); }
.location-hero { padding: 5.5rem max(24px, calc((100% - var(--max-width))/2)) 6rem; color: white; background: var(--deep); }
.breadcrumbs { display: flex; gap: .65rem; margin-bottom: 3.5rem; color: rgba(255,255,255,.62); font-size: .82rem; }
.location-hero h1 { margin: 0; font-family: "Gowun Batang", serif; font-size: clamp(3rem, 7vw, 6.3rem); line-height: 1.1; letter-spacing: 0; }
.location-hero > p { max-width: 700px; margin: 1.7rem 0 0; color: rgba(255,255,255,.78); font-size: 1.12rem; }
.location-layout { max-width: var(--max-width); margin: 0 auto; padding: 7rem 24px; }
.location-intro { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; padding-bottom: 6rem; }
.location-intro-copy { max-width: 650px; color: #46585b; font-size: 1.04rem; }
.grade-guide { padding: 5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grade-guide h2, .lesson-flow h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
.grade-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.grade-grid article { padding-top: 1.3rem; border-top: 3px solid var(--coral); }
.grade-grid h3 { margin: 0 0 .8rem; font-size: 1.08rem; }
.grade-grid p { margin: 0; color: var(--muted); }
.lesson-flow { padding-top: 6rem; }
.lesson-flow ol { display: grid; grid-template-columns: repeat(4, 1fr); margin: 3rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lesson-flow li { display: flex; flex-direction: column; gap: .7rem; min-height: 150px; padding: 1.5rem; border-right: 1px solid var(--line); }
.lesson-flow li:first-child { padding-left: 0; }
.lesson-flow li:last-child { border-right: 0; }
.lesson-flow span { color: var(--muted); font-size: .92rem; }
.local-list { padding-top: 6rem; }
.local-list h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
.area-links { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.area-links a { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.area-links a:hover, .area-links a:focus-visible { color: white; background: var(--deep); }
.location-cta { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 6rem; padding: 2.5rem; color: white; background: var(--deep); }
.location-cta h2 { font-size: clamp(1.8rem, 4vw, 3.1rem); }
.location-cta .button { flex: 0 0 auto; color: var(--deep); background: var(--coral); }

footer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; padding: 3rem max(24px, calc((100% - var(--max-width))/2)); color: rgba(255,255,255,.7); background: #0c2225; font-size: .85rem; }
.footer-brand { color: white; }
footer > p { margin: 0; }
.copyright { grid-column: 2; }

@keyframes reveal-image { from { transform: scale(1.06); filter: brightness(.7); } to { transform: scale(1); filter: brightness(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .section-heading, .location-intro { grid-template-columns: 1fr; gap: 2rem; }
  .program { grid-template-columns: 1fr; }
  .program-image-wrap { min-height: 380px; }
  .area { grid-template-columns: 1fr; }
  .area-heading { position: static; }
  .districts { grid-template-columns: repeat(3, 1fr); }
  .area-links { grid-template-columns: repeat(2, 1fr); }
  .grade-grid, .lesson-flow ol { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header { width: calc(100% - 32px); height: 72px; }
  .header-cta { padding: .45rem .55rem; font-size: .78rem; }
  .hero { min-height: 760px; }
  .hero-content { width: calc(100% - 32px); padding-top: 180px; }
  .hero h1 { font-size: clamp(3.5rem, 18vw, 5.2rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .hero-note { left: 16px; right: 16px; bottom: 22px; flex-direction: column; gap: .55rem; }
  .intro, .area { padding: 6rem 16px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps article { min-height: 210px; }
  .program-content { padding: 5rem 16px; }
  .districts { grid-template-columns: repeat(2, 1fr); }
  .districts a { min-height: 82px; }
  .contact { padding: 6rem 16px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form > * { grid-column: 1; }
  .location-page .site-header { padding: 0 16px; }
  .location-hero { padding: 4rem 16px 5rem; }
  .location-hero h1 { font-size: 2.8rem; word-break: keep-all; }
  .location-layout { padding: 5rem 16px; }
  .grade-grid, .lesson-flow ol { grid-template-columns: 1fr; }
  .area-links { grid-template-columns: 1fr; }
  .lesson-flow li { min-height: 120px; padding: 1.5rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .location-cta { align-items: flex-start; flex-direction: column; padding: 2rem; }
  footer { grid-template-columns: 1fr; }
  .copyright { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}