/* ===== 디자인 토큰 — 브랜드 색상은 여기서만 바꾸면 됩니다 ===== */
:root {
  --c-primary: #00214d; /* 브랜드 남색 */
  --c-primary-dark: #00163a;
  --c-accent: #d5c4a1; /* 샴페인 골드 (장식용) */
  --c-accent-strong: #7d6c50; /* 흰 글자를 올려도 잘 읽히는 진한 금색 (버튼용) */
  --c-accent-stronger: #6a5b43;
  --c-text: #161e30;
  --c-muted: #535d70;
  --c-line: #dfe4ee;
  --c-bg: #ffffff;
  --c-tint: #f2f5fb;
  --c-dark: #0f1d40;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 29, 64, 0.08);
  --header-h: 72px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); accent-color: var(--c-primary); }

::selection { background: #d5e0f5; color: var(--c-text); }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .footer :focus-visible { outline-color: #fff; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 32px); }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.16s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--ghost { border-color: var(--c-primary); color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: #fff; }
.btn--accent { background: var(--c-accent-strong); color: #fff; }
.btn--accent:hover { background: var(--c-accent-stronger); }
/* 네이버 초록 위에는 흰 글자가 잘 안 읽혀서 진한 글자를 씁니다 */
.btn--cafe { background: #03c75a; color: #062b17; }
.btn--cafe:hover { background: #2fd479; }
.btn--light { background: #fff; color: var(--c-dark); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--c-dark); }
.btn--sm { padding: 0.55em 1.2em; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* ===== 헤더 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header.is-scrolled { border-color: var(--c-line); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); }
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--c-primary); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; margin: 5px 0;
  background: var(--c-text);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 첫 화면 버튼 줄 (강의 상세 페이지) ===== */
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== 섹션 공통 ===== */
.section { padding: 100px 0; }
.section--tint { background: var(--c-tint); }
.section--dark { background: var(--c-primary); color: #fff; padding: 72px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
.section__head p:last-child { color: var(--c-muted); }

/* ===== 소개 ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  align-content: start;
  padding-top: 28px;
  border-top: 2px solid var(--c-text);
}
.feature__icon { display: flex; }
.feature__icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: var(--c-primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feature h3 { font-size: 1.3rem; margin: 0; }
.feature p { grid-column: 1 / -1; color: var(--c-muted); margin: 14px 0 0; }

/* ===== 강의 · 출강 · 도서 카드 ===== */
.cards { display: grid; gap: 24px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3, .card h4 { font-size: 1.375rem; margin: 0 0 0.5em; }
.card p { color: var(--c-muted); }
.card > .btn { margin-top: auto; }
.card__tag {
  align-self: flex-start;
  padding: 4px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--c-tint);
  color: var(--c-primary);
  font-size: 0.8rem;
  font-weight: 700;
}
.card__tag--accent { background: #f6efe2; color: var(--c-accent-stronger); }

.center { text-align: center; margin-top: 48px; }

/* ===== 커뮤니티 ===== */
.community { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.community h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.community p:last-child { color: rgba(255, 255, 255, 0.85); margin: 0; max-width: 560px; }
.community__actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ===== 출강 신청 폼 ===== */
.form { display: grid; gap: 18px; }
.form--card { padding: 40px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.form label b { color: var(--c-accent-strong); }
.form__types { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.form__types legend { font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; }
.form__types label { display: block; position: relative; cursor: pointer; }
.form__types input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.form__types span {
  display: block;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.form__types input:checked + span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.form__types input:focus-visible + span { box-shadow: 0 0 0 3px rgba(29, 69, 156, 0.3); }
.contact-alt { text-align: center; margin: 24px 0 0; color: var(--c-muted); font-size: 0.95rem; }
.contact-alt a { color: var(--c-primary); font-weight: 700; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 0.95rem; }
.form input:not([type="checkbox"]):not([type="radio"]),
.form select,
.form textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(29, 69, 156, 0.15);
}
.form .is-invalid { border-color: #d64545 !important; }
.form__check { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; color: var(--c-muted); }
.form__check input { margin-top: 5px; accent-color: var(--c-primary); }
.form__status { min-height: 1.5em; margin: 0; text-align: center; font-weight: 500; }
.form__status.is-error { color: #d64545; }
.form__status.is-success { color: var(--c-primary); }

/* ===== 푸터 ===== */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.08); background: var(--c-dark); color: rgba(255, 255, 255, 0.65); padding: 48px 0; font-size: 0.9rem; }
.footer strong { color: #fff; display: block; margin-bottom: 8px; }
.footer__logo { height: 48px; width: auto; margin-bottom: 20px; }
.footer p { margin: 0 0 4px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.footer__links a:hover { color: #fff; }

/* ===== 모바일 플로팅 버튼 ===== */
.floating-cta {
  display: none;
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--c-accent-strong);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 29, 64, 0.22);
}

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

/* ===== 반응형 ===== */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr; gap: 36px; }
  .community { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 24px;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--c-line); }
  .nav .btn { margin-top: 16px; }

  .section { padding: 72px 0; }
  .cards--2 { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }
  .form--card { padding: 28px 20px; }
  .form__row { grid-template-columns: 1fr; }
  .floating-cta { display: block; }
  .footer { padding-bottom: 88px; }
}

@media (max-width: 480px) {
  .form__types { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 강의 상세 페이지 ===== */
.page-hero { padding: 40px 0 80px; background: linear-gradient(160deg, var(--c-tint) 0%, #fff 70%); }
.page-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 800; }
.page-hero__lead { font-size: 1.05rem; color: var(--c-muted); max-width: 560px; }
.page-hero__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; margin-top: 32px; }

.breadcrumb { font-size: 0.9rem; color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span { margin: 0 4px; }

.info-card {
  margin: 0;
  padding: 28px;
  display: grid; gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.info-card div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; }
.info-card div + div { padding-top: 16px; border-top: 1px solid var(--c-line); }
.info-card dt { font-weight: 700; color: var(--c-primary); }
.info-card dd { margin: 0; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-dark);
  box-shadow: var(--shadow);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--empty { display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); font-weight: 700; }
.video--empty::before {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 72px; height: 72px;
  transform: translate(-50%, -110%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12) no-repeat center / 28px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}
.video--empty span { margin-top: 64px; }

.feature__icon--num { color: var(--c-primary); font-weight: 800; font-size: 1.3rem; line-height: 1.3; }

.curriculum { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.curriculum li {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.curriculum__week {
  flex-shrink: 0;
  min-width: 48px;
  padding: 4px 0;
  text-align: center;
  border-radius: 8px;
  background: var(--c-tint);
  color: var(--c-primary);
  font-weight: 800;
  font-size: 0.9rem;
}

.schedule {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.schedule th, .schedule td { padding: 16px 20px; text-align: left; }
.schedule th { background: var(--c-primary); color: #fff; font-weight: 700; font-size: 0.9rem; }
.schedule tbody tr + tr td { border-top: 1px solid var(--c-line); }

.status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.status--open { background: #e3eaf8; color: var(--c-primary); }
.status--soon { background: #f6efe2; color: var(--c-accent-stronger); }
.status--closed { background: #eceef2; color: #5f6878; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 960px) {
  .page-hero__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-hero { padding-bottom: 56px; }
  .schedule, .schedule tbody, .schedule tr, .schedule td { display: block; }
  .schedule { background: none; box-shadow: none; }
  .schedule thead { display: none; }
  .schedule tbody { display: grid; gap: 12px; }
  .schedule tr { padding: 8px 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
  .schedule tbody tr + tr td { border-top: 0; }
  .schedule td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 20px; }
  .schedule td::before { content: attr(data-label); color: var(--c-muted); font-size: 0.9rem; }
  .curriculum li { align-items: flex-start; }
}
.text-link { color: var(--c-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
