:root {
  color-scheme: light;
  --ink: #1f2623;
  --muted: #65716b;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --sage: #2f6657;
  --sage-strong: #254f45;
  --sage-soft: #e6f0ec;
  --rose: #9c4454;
  --rose-soft: #f7e9ec;
  --gold: #a57432;
  --sky-soft: #edf3f7;
  --line: #d9ddd7;
  --shadow: 0 18px 45px rgba(31, 38, 35, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Malgun Gothic",
    system-ui,
    sans-serif;
  line-height: 1.65;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(47, 102, 87, 0.38);
  outline-offset: 3px;
}

.svg-sprite {
  display: none;
}

.icon {
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(24px, calc(50% - 580px));
  border-bottom: 1px solid rgba(217, 221, 215, 0.8);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(16px);
}

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

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: white;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--sage-soft);
  color: var(--sage-strong);
}

.header-cta,
.button,
.class-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.2;
}

.header-cta {
  padding: 10px 14px;
  background: var(--ink);
  color: white;
}

.button {
  border: 1px solid transparent;
  padding: 13px 18px;
}

.button-primary {
  background: var(--sage);
  color: white;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--sage-strong);
}

.button-ghost {
  border-color: rgba(31, 38, 35, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: rgba(47, 102, 87, 0.32);
  background: white;
}

.hero {
  position: relative;
  display: grid;
  min-height: 68svh;
  padding: 76px max(24px, calc(50% - 580px)) 34px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(251, 250, 247, 0.98) 0%, rgba(251, 250, 247, 0.92) 42%, rgba(251, 250, 247, 0.34) 100%),
    url("assets/hero-gallery.jpeg") right center / cover no-repeat;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: min(42vw, 540px);
  height: 10px;
  background: var(--rose);
  content: "";
}

.hero-content {
  align-self: center;
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero h1,
.section h2,
.benefits h2,
.poster-section h2,
.application-intro h2 {
  margin: 0;
  line-height: 1.15;
}

.hero h1 {
  font-size: 4.15rem;
  font-weight: 900;
}

.hero-copy {
  max-width: 540px;
  margin: 22px 0 0;
  color: #3f4944;
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-info {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 46px;
}

.hero-info span,
.contact-list span,
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 102, 87, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #33413b;
  font-size: 0.92rem;
  font-weight: 700;
}

.summary-band {
  padding: 26px max(24px, calc(50% - 580px));
  background: var(--sage);
  color: white;
}

.summary-band p {
  max-width: 900px;
  margin: 0;
  font-size: 1.08rem;
}

.section,
.application-section,
.poster-section {
  padding: 86px max(24px, calc(50% - 580px));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2,
.benefits h2,
.poster-section h2,
.application-intro h2 {
  font-size: 2.35rem;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.class-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(217, 221, 215, 0.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(31, 38, 35, 0.06);
}

.class-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.class-card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-height: 300px;
  padding: 20px;
}

.class-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.class-title .icon {
  color: var(--sage);
}

.class-title h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.tagline {
  margin: 0;
  color: var(--rose);
  font-size: 0.92rem;
  font-weight: 800;
}

.class-card p:not(.tagline) {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.class-select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(47, 102, 87, 0.22);
  background: var(--sage-soft);
  color: var(--sage-strong);
}

.class-select:hover {
  border-color: rgba(47, 102, 87, 0.46);
  background: #dbeae4;
}

.curriculum-section {
  background: var(--sky-soft);
}

.gallery-section {
  background: var(--paper);
}

.gallery-subtitle {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  text-align: right;
  align-self: end;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--wide img {
  aspect-ratio: 16 / 9;
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item--tall img {
  aspect-ratio: auto;
  height: 100%;
}

.gallery-item--full {
  grid-column: span 3;
}

.gallery-item--full img {
  aspect-ratio: 21 / 7;
}

figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(31, 38, 35, 0.72) 0%, transparent 100%);
  color: white;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.gallery-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rose);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(47, 102, 87, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 9px 14px;
}

.tab.is-active {
  background: var(--sage);
  color: white;
}

.curriculum-panel {
  margin-top: 22px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 178px;
  padding: 20px;
  border: 1px solid rgba(47, 102, 87, 0.14);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline span {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline strong {
  line-height: 1.4;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.benefits {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: start;
  padding: 64px max(24px, calc(50% - 580px));
  background: var(--ink);
  color: white;
}

.benefits .eyebrow {
  color: #f1b4c0;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.benefit-list .icon {
  color: #b6e1d2;
}

.application-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 36px;
  align-items: start;
  background: linear-gradient(180deg, var(--paper), var(--rose-soft));
}

.application-intro {
  position: sticky;
  top: 104px;
}

.application-intro p {
  margin: 18px 0 0;
  color: var(--muted);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.application-form {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(217, 221, 215, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

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

label,
.class-options legend {
  color: #35413c;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  border: 1px solid #cfd7d1;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #9eb5aa;
}

.class-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.class-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.class-options label {
  min-width: 0;
}

.class-options label {
  position: relative;
}

.class-options input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.class-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  padding: 9px;
  border: 1px solid #cfd7d1;
  border-radius: var(--radius);
  background: white;
  color: #3d4a45;
  text-align: center;
}

.class-options input:checked + span {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage-strong);
  box-shadow: inset 0 0 0 1px var(--sage);
}

.class-options input:focus-visible + span {
  outline: 3px solid rgba(47, 102, 87, 0.38);
  outline-offset: 3px;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-weight: 700;
}

.consent input {
  width: 18px;
  min-height: 18px;
  margin: 5px 0 0;
}

.submit-button {
  width: 100%;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.form-status.is-success {
  color: var(--sage-strong);
}

.form-status.is-error {
  color: #b12d3a;
}

.poster-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(240px, 0.42fr);
  gap: 32px;
  align-items: start;
  background: var(--surface);
}

.poster-section p {
  max-width: 560px;
  color: var(--muted);
}

.poster-link {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(217, 221, 215, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 15px 35px rgba(31, 38, 35, 0.1);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background: var(--sage-strong);
  color: white;
  text-align: center;
}

.site-footer span {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  font-weight: 900;
}

/* ── 태블릿 (980px 이하) ── */
@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: 540px;
    background:
      linear-gradient(90deg, rgba(251, 250, 247, 0.99) 0%, rgba(251, 250, 247, 0.9) 55%, rgba(251, 250, 247, 0.5) 100%),
      url("assets/hero-gallery.jpeg") right center / cover no-repeat;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .section-heading h2,
  .benefits h2,
  .poster-section h2,
  .application-intro h2 {
    font-size: 2rem;
  }

  .class-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefits {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .application-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .application-intro {
    position: static;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .class-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .class-card-body {
    min-height: 0;
  }

  .poster-section {
    grid-template-columns: 1fr minmax(0, 0.55fr);
    gap: 24px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .gallery-item--tall {
    grid-row: span 1;
  }

  .gallery-item--tall img {
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .gallery-item--full {
    grid-column: span 2;
  }

  .gallery-item--full img {
    aspect-ratio: 16 / 7;
  }
}

/* ── 모바일 (720px 이하) ── */
@media (max-width: 720px) {
  .site-header {
    gap: 10px;
    min-height: 60px;
    padding: 10px 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand small {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: unset;
    padding: 56px 20px 32px;
    background:
      linear-gradient(180deg, rgba(251, 250, 247, 0.97) 0%, rgba(251, 250, 247, 0.88) 60%, rgba(251, 250, 247, 0.6) 100%),
      url("assets/hero-gallery.jpeg") center / cover no-repeat;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-copy {
    font-size: 1rem;
    margin-top: 14px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-info {
    margin-top: 32px;
  }

  .section,
  .application-section,
  .poster-section {
    padding: 56px 20px;
  }

  .summary-band {
    padding-right: 20px;
    padding-left: 20px;
  }

  .benefits {
    padding-right: 20px;
    padding-left: 20px;
  }

  .section-heading {
    flex-direction: column;
    align-items: start;
    gap: 6px;
  }

  .gallery-subtitle {
    text-align: left;
  }

  .section-heading h2,
  .benefits h2,
  .poster-section h2,
  .application-intro h2 {
    font-size: 1.85rem;
  }

  .class-grid,
  .timeline,
  .benefit-list,
  .field-grid,
  .class-options,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide,
  .gallery-item--full {
    grid-column: span 1;
  }

  .gallery-item--full img {
    aspect-ratio: 4 / 3;
  }

  .poster-section {
    grid-template-columns: 1fr;
  }

  .poster-link img {
    aspect-ratio: 16 / 9;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  .tab {
    width: 100%;
    text-align: center;
  }

  .application-form {
    padding: 18px;
  }

  .timeline li {
    min-height: 0;
  }
}

/* ── 소형폰 (480px 이하) ── */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.1rem;
  }

  .section-heading h2,
  .benefits h2,
  .poster-section h2,
  .application-intro h2 {
    font-size: 1.65rem;
  }

  .section,
  .application-section,
  .poster-section {
    padding: 44px 16px;
  }

  .summary-band,
  .benefits {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero {
    padding: 48px 16px 28px;
  }

  .application-form {
    padding: 14px;
  }

  .hero-info span,
  .contact-list span,
  .contact-list a {
    font-size: 0.84rem;
    padding: 6px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
