:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #171717;
  --ink-soft: rgba(23, 23, 23, 0.78);
  --muted: rgba(23, 23, 23, 0.62);
  --line: rgba(23, 23, 23, 0.12);
  --line-strong: rgba(23, 23, 23, 0.24);
  --red: #e33a2f;
  --red-dark: #bf2c24;
  --dark: #1a1a1a;
  --white: #ffffff;
  --surface-header: rgba(250, 250, 248, 0.9);
  --surface-header-scrolled: rgba(250, 250, 248, 0.97);
  --surface-ghost: rgba(255, 255, 255, 0.4);
  --surface-card-soft: rgba(255, 255, 255, 0.72);
  --surface-media: #ece8df;
  --surface-caption: rgba(250, 250, 248, 0.9);
  --highlight-red: rgba(227, 58, 47, 0.2);
  --line-red-soft: rgba(227, 58, 47, 0.5);
  --line-on-dark: rgba(255, 255, 255, 0.12);
  --line-on-dark-strong: rgba(255, 255, 255, 0.3);
  --text-on-dark: rgba(255, 255, 255, 0.86);
  --text-on-dark-soft: rgba(255, 255, 255, 0.68);
  --text-on-dark-muted: rgba(255, 255, 255, 0.55);
  --floating-line: rgba(23, 23, 23, 0.14);
  --floating-shadow: 0 8px 24px rgba(23, 23, 23, 0.14);
  --kakao: #fae100;
  --kakao-ink: #3a1d1d;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --content: 1160px;
  --page-x: 32px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-body-sm: 14px;
  --text-body: 16px;
  --text-lead: 17px;
  --text-brand: 18px;
  --text-card-title: 24px;
  --text-hero: clamp(46px, 5.6vw, 80px);
  --text-hero-mobile: clamp(38px, 10.8vw, 46px);
  --text-section-title: clamp(32px, 4vw, 46px);
  --text-contact-title: clamp(30px, 4vw, 44px);
  --touch-target: 44px;
  --header-height: 74px;
  --header-height-mobile: 66px;
  --button-height: 50px;
  --nav-cta-height: 40px;
  --hero-media-height: 540px;
  --hero-media-height-mobile: 310px;
  --program-body-height: 242px;
  --contact-height: 250px;
  --floating-size: 50px;
  --floating-size-mobile: 46px;
  --floating-icon-size: 23px;
  --menu-line-width: 21px;
  --menu-line-height: 2px;
  --menu-line-gap: 5px;
  --focus-width: 3px;
  --focus-offset: 4px;
  --header-blur: 18px;
  --menu-line-shift: 7px;
  --hero-padding: clamp(54px, 8vw, 104px);
  --programs-padding: clamp(72px, 8vw, 112px);
  --contact-padding: 54px;
  --footer-padding: 30px;
  --hero-copy-width: 540px;
  --section-copy-width: 720px;
  --hero-grid-min: 320px;
  --reveal-distance: 14px;
  --hero-padding-mobile: 34px 70px;
  --programs-padding-mobile: 66px;
  --mobile-card-gap: 18px;
  --mobile-caption-inset: 10px;
  --mobile-floating-inline: 14px;
  --radius-card: 12px;
  --radius-media: 10px;
  --radius-control: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--text-body);
  line-height: 1.72;
  word-break: keep-all;
}

body.menu-open {
  overflow: hidden;
}

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

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

button {
  color: inherit;
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-width) solid var(--ink);
  outline-offset: var(--focus-offset);
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 300;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(100%, calc(var(--content) + (var(--page-x) * 2)));
  margin-inline: auto;
  padding-inline: var(--page-x);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: var(--surface-header);
  backdrop-filter: blur(var(--header-blur));
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: var(--surface-header-scrolled);
}

.nav-bar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-7);
}

.brand {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  font-size: var(--text-brand);
  font-weight: 900;
  letter-spacing: 0;
}

.brand span {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: var(--text-body-sm);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

.menu-button {
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  cursor: pointer;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: var(--menu-line-gap);
}

.menu-button span {
  width: var(--menu-line-width);
  height: var(--menu-line-height);
  background: var(--ink);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(var(--menu-line-shift)) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(calc(var(--menu-line-shift) * -1)) rotate(-45deg);
}

.button {
  min-height: var(--button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: var(--text-body-sm);
  font-weight: 700;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
}

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

.button-primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.button-ghost {
  background: var(--surface-ghost);
}

.button-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.nav-cta {
  min-height: var(--nav-cta-height);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.hero {
  padding-block: var(--hero-padding);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(var(--hero-grid-min), 0.92fr);
  gap: clamp(var(--space-7), 6vw, var(--space-11));
  align-items: center;
}

.hero-media {
  min-width: 0;
}

.hero-media-frame {
  position: relative;
  overflow: hidden;
  min-height: var(--hero-media-height);
  border-radius: var(--radius-media);
  background: var(--surface-media);
}

.hero-media-frame img {
  width: 100%;
  height: 100%;
  min-height: var(--hero-media-height);
  object-fit: cover;
  object-position: 48% center;
}

.hero-media-caption {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  background: var(--surface-caption);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--red);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero h1 {
  max-width: 9ch;
  margin: 0 0 var(--space-6);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.hero h1 strong {
  background: linear-gradient(transparent 70%, var(--highlight-red) 0);
  color: inherit;
  font-weight: inherit;
}

.hero-lead {
  max-width: var(--hero-copy-width);
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lead);
  line-height: 1.8;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

.programs {
  padding-block: var(--programs-padding);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: var(--section-copy-width);
  margin-bottom: var(--space-8);
}

.section-head h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-section-title);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.12;
}

.section-head p:last-child {
  margin: 0;
  color: var(--muted);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.program-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-card-soft);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.program-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface);
}

.program-photo {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-media);
}

.program-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s var(--ease);
}

.program-card:hover .program-photo img {
  transform: scale(1.02);
}

.program-body {
  min-height: var(--program-body-height);
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
}

.program-label {
  margin: 0 0 var(--space-3);
  color: var(--red);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.program-card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-card-title);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.25;
}

.program-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-body-sm);
  line-height: 1.75;
}

.program-link {
  width: max-content;
  margin-top: auto;
  padding-top: var(--space-6);
  border-bottom: 1px solid var(--line-red-soft);
  font-size: var(--text-body-sm);
  font-weight: 700;
}

.contact-band {
  background: var(--dark);
  color: var(--white);
}

.contact-inner {
  min-height: var(--contact-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-7);
  align-items: center;
  padding-block: var(--contact-padding);
}

.contact-copy h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-contact-title);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.16;
}

.contact-copy p {
  margin: 0;
  color: var(--text-on-dark-soft);
  font-size: var(--text-body-sm);
}

.contact-copy p a {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-decoration-color: var(--line-on-dark-strong);
  text-underline-offset: var(--space-1);
}

.contact-actions {
  display: flex;
  gap: var(--space-3);
}

.contact-actions .button-ghost {
  border-color: var(--line-on-dark-strong);
  background: transparent;
  color: var(--white);
}

.site-footer {
  border-top: 1px solid var(--line-on-dark);
  background: var(--dark);
  color: var(--text-on-dark-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--footer-padding);
  font-size: var(--text-sm);
}

.footer-brand {
  color: var(--text-on-dark);
  font-size: var(--text-body);
  font-weight: 850;
}

.footer-brand span {
  color: var(--red);
}

.floating-actions {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-6);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.floating-action {
  width: var(--floating-size);
  height: var(--floating-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--floating-line);
  border-radius: 50%;
  box-shadow: var(--floating-shadow);
  transition: transform 0.2s var(--ease);
}

.floating-action:hover {
  transform: translateY(-2px);
}

.floating-action.kakao {
  background: var(--kakao);
  color: var(--kakao-ink);
}

.floating-action.phone {
  background: var(--red);
  color: var(--white);
}

.floating-action svg {
  width: var(--floating-icon-size);
  height: var(--floating-icon-size);
}

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  :root {
    --page-x: 20px;
  }

  .site-header {
    backdrop-filter: none;
  }

  .nav-bar {
    min-height: var(--header-height-mobile);
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-panel {
    position: absolute;
    top: var(--header-height-mobile);
    right: 0;
    left: 0;
    display: block;
    padding: var(--space-4) var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), visibility 0.22s var(--ease);
  }

  .nav-panel.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    width: min(100%, var(--content));
    margin-inline: auto;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }

  .nav-links a {
    min-height: var(--touch-target);
    justify-content: flex-start;
    font-size: var(--text-body);
  }

  .nav-links .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-2);
    font-size: var(--text-body-sm);
  }

  .hero {
    padding-block: var(--hero-padding-mobile);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  .hero-copy {
    order: -1;
  }

  .hero h1 {
    max-width: 9ch;
    font-size: var(--text-hero-mobile);
    line-height: 1.08;
  }

  .hero-lead {
    font-size: var(--text-body);
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .hero-media-frame,
  .hero-media-frame img {
    min-height: var(--hero-media-height-mobile);
  }

  .hero-media-frame img {
    object-position: center;
  }

  .program-grid,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .program-body {
    min-height: auto;
  }

  .program-link {
    margin-top: var(--space-5);
  }

  .contact-actions {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .hero-media-caption {
    right: var(--mobile-caption-inset);
    bottom: var(--mobile-caption-inset);
  }

  .programs {
    padding-block: var(--programs-padding-mobile);
  }

  .program-grid {
    gap: var(--mobile-card-gap);
  }

  .program-body {
    padding: var(--space-5);
  }

  .floating-actions {
    right: var(--mobile-floating-inline);
    bottom: var(--space-4);
  }

  .floating-action {
    width: var(--floating-size-mobile);
    height: var(--floating-size-mobile);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

.reveal {
    opacity: 1;
    transform: none;
  }
}

.no-break {
  white-space: nowrap;
}
