/* Layout: 좌정렬 에디토리얼 그리드, 섹션마다 왼쪽 라벨 레일 + 본문 */
:root {
  --bg: #F5F7F6;
  --surface: #FFFFFF;
  --ink: #13201C;
  --muted: #56645F;
  --line: #D9E0DD;
  --accent: #0D6B5B;
  --accent-ink: #FFFFFF;
  --signal: #C77A00;
  --band: #E8EEEB;
  --font-display: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --max: 1160px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1513; --surface: #16201D; --ink: #E4EBE8; --muted: #9AA8A3;
    --line: #2A3632; --accent: #4CC2A6; --accent-ink: #0B1210; --signal: #F0A93A; --band: #131C19;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1513; --surface: #16201D; --ink: #E4EBE8; --muted: #9AA8A3;
  --line: #2A3632; --accent: #4CC2A6; --accent-ink: #0B1210; --signal: #F0A93A; --band: #131C19;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; font-size: 14.5px; color: var(--muted);
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--band); }
.nav .btn { margin-left: 8px; }
.nav-group { position: relative; display: flex; }
.nav-group > a::after { content: "▾"; font-size: 10px; margin-left: 5px; opacity: 0.6; }
.subnav {
  display: none; position: absolute; top: 100%; left: 0; min-width: 150px; z-index: 30;
  padding: 6px; margin-top: 4px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 28px -16px rgba(0,0,0,.35);
  flex-direction: column;
}
.subnav::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-group:hover .subnav, .nav-group:focus-within .subnav { display: flex; }
.subnav a { padding: 8px 10px; }
.menu-btn {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
@media (max-width: 920px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; gap: 0; padding-block: 10px 0; }
  .brand { height: 40px; }
  .nav {
    order: 3; flex: 0 0 100%; margin: 0; gap: 2px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-block: 6px 8px;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 휴대폰: 하위 메뉴(ABOUT, 대표 소개)를 상단 메뉴에 바로 펼쳐 보여줌 */
  .nav-group > a { display: none; }
  .subnav, .nav-group:hover .subnav, .nav-group:focus-within .subnav {
    display: flex; position: static; flex-direction: row; gap: 2px;
    min-width: 0; margin: 0; padding: 0; border: 0; box-shadow: none; background: none;
  }
  .subnav::before { content: none; }
  .subnav a { padding: 7px 11px; }
  .nav a { padding: 7px 11px; font-size: 14px; flex: 0 0 auto; }
  .nav .btn { margin-left: 4px; padding: 7px 12px; font-size: 14px; }
  html { scroll-padding-top: 120px; }
  .rail .eyebrow { top: 120px; }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; font-family: inherit;
}
.nav a.btn, .btn-primary { background: var(--accent); color: var(--accent-ink); }
.nav a.btn:hover, .btn-primary:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- 공통 섹션 ---------- */
.section { padding-block: 96px; border-top: 1px solid var(--line); }
.section.band { background: var(--band); }
.section-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
.rail { position: relative; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); font-weight: 500;
}
.rail .eyebrow { position: sticky; top: 96px; display: block; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 16px; }
.lead { color: var(--muted); font-size: 17px; max-width: 62ch; }
@media (max-width: 860px) {
  .section { padding-block: 64px; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rail .eyebrow { position: static; }
}

main > .section:first-child { border-top: 0; padding-block-start: 72px; }
.clients { border-bottom: 0; }

/* ---------- 히어로 ---------- */
.hero { padding-block: 72px 80px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); font-weight: 700; letter-spacing: -0.01em; margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 14px; color: var(--muted); }
.hero-meta span::before { content: "✓"; color: var(--accent); margin-right: 6px; font-weight: 700; }

/* 업무 흐름 카드 — 실제 교육에서 만드는 자동화 한 줄 */
.flow {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; box-shadow: 0 24px 48px -32px rgba(13, 40, 33, 0.35);
}
.flow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.flow-title { font-weight: 700; }
.flow-tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flow li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 10px; background: var(--band);
}
.flow .step-no {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; border: 1px solid var(--line); background: var(--surface);
}
.flow .step-name { font-weight: 600; font-size: 15px; }
.flow .step-desc { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.flow .step-who { font-family: var(--font-mono); font-size: 11.5px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.flow .who-ai { background: var(--accent); color: var(--accent-ink); }
.flow .who-me { border: 1px solid var(--line); color: var(--muted); }
.flow-foot { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) {
  .hero { padding-block: 48px 56px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* ---------- 고객사 로고 마퀴 (우→좌) ---------- */
.clients { padding-block: 40px 44px; border-top: 1px solid var(--line); }
.clients-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.clients-head p { font-size: 15px; color: var(--muted); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 20px; width: max-content;
  animation: marquee var(--marquee-duration, 40s) linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 10px)); }
}
.logo-tile {
  flex: 0 0 auto; width: 184px; height: 84px;
  display: grid; place-items: center; padding: 12px 20px;
  border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line);
}
.logo-tile img { max-height: 54px; max-width: 100%; object-fit: contain; }
.logo-tile .logo-name { font-weight: 600; font-size: 14.5px; color: var(--muted); text-align: center; line-height: 1.35; }
.logo-tile.placeholder { border-style: dashed; background: transparent; }
.logo-tile.placeholder .logo-name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
}

/* ---------- 소개 ---------- */
.about-body { display: grid; gap: 20px; max-width: 70ch; }
.about-body p { color: var(--muted); }
.about-body strong { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }

/* ---------- 프로그램 ---------- */
.programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.program {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.program .tag { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.program h3 { font-size: 22px; }
.program p { color: var(--muted); font-size: 15px; }
.program ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 14px; }
.program li { display: flex; gap: 8px; }
.program li::before { content: "—"; color: var(--accent); }
.program .mods { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.service { display: grid; gap: 8px; padding: 22px 24px; border-radius: 14px; border: 1px solid var(--line); }
.service h3 { font-size: 19px; }
.service p { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .programs { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 커리큘럼 ---------- */
.table-scroll { overflow-x: auto; margin-top: 36px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table.formats { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 15px; }
.formats th, .formats td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.formats thead th { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); background: var(--band); }
.formats tbody tr:last-child td { border-bottom: 0; }
.formats td:first-child { font-weight: 700; white-space: nowrap; }
.formats .dur { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.formats td:last-child { color: var(--muted); }
.note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.modules-title { margin-top: 56px; font-size: 22px; }
.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 16px; }
.module { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.module-code { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.module h4 { margin: 0 0 4px; font-size: 16.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.module p { font-size: 14.5px; color: var(--muted); }
.level { font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 760px) { .modules { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 프로세스 ---------- */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; counter-reset: step; }
.process li { list-style: none; padding: 0 20px 0 0; position: relative; }
.process .no { font-family: var(--font-mono); font-size: 13px; color: var(--accent); display: block; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 2px solid var(--accent); }
.process h3 { font-size: 19px; margin-bottom: 8px; }
.process p { font-size: 15px; color: var(--muted); }
.process { padding: 0; }
@media (max-width: 860px) {
  .process { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .process li { padding: 0; }
}

/* ---------- 후기 ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.review {
  display: flex; flex-direction: column; gap: 10px; margin: 0;
  padding: 26px 26px 28px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.review figcaption { font-size: 14.5px; font-weight: 600; color: var(--ink); display: flex; flex-wrap: wrap; gap: 0; align-items: center; white-space: pre-wrap; }
.review figcaption span + span { font-weight: 400; color: var(--muted); }
.stars { display: flex; gap: 2px; font-size: 17px; line-height: 1; }
.stars .on { color: var(--signal); }
.stars .off { color: var(--line); }
.review .course-name { align-self: flex-start; font-size: 13.5px; font-weight: 700; color: var(--accent); background: var(--band); border-radius: 999px; padding: 4px 12px; margin-bottom: 6px; }
.review blockquote { margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: 18.5px; line-height: 1.65; font-weight: 500; }
.review .todo { font-family: var(--font-mono); font-size: 12px; color: var(--signal); border: 1px dashed var(--signal); border-radius: 6px; padding: 1px 6px; }
.more-link { margin-top: 28px; }
@media (max-width: 960px) { .reviews-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 대표 ---------- */
.profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.portrait {
  width: 220px; max-width: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: var(--band) url("assets/ceo.jpg") center / cover no-repeat;
  border: 0; box-shadow: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: default;
}
.profile h3 { font-size: 26px; }
.profile .role { color: var(--muted); margin: 4px 0 20px; }
.creds { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; font-size: 15px; }
.creds li { display: flex; gap: 10px; }
.creds .k { font-family: var(--font-mono); font-size: 12px; color: var(--accent); min-width: 28px; padding-top: 3px; }
.profile .bio { color: var(--muted); display: grid; gap: 14px; max-width: 66ch; }
.pull { margin: 28px 0 0; padding: 0; border: 0; font-family: var(--font-display); font-size: 18px; font-weight: 500; line-height: 1.7; max-width: 60ch; }
.pull + .pull { margin-top: 20px; }
.pull::before, .pull::after { color: var(--accent); font-size: 1.7em; font-weight: 700; line-height: 0; vertical-align: -0.28em; }
.pull::before { content: "“"; margin-right: 4px; }
.pull::after { content: "”"; margin-left: 4px; }
@media (max-width: 760px) { .profile { grid-template-columns: minmax(0, 1fr); } .portrait { width: 180px; } }

/* ---------- 문의 ---------- */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.contact-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.contact-card h3 { font-size: 18px; }
.contact-card p { color: var(--muted); font-size: 14.5px; }
.contact-card .value { font-family: var(--font-mono); font-size: 14px; color: var(--ink); user-select: all; word-break: break-all; }
.contact-card .actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.contact-card .btn { padding: 9px 14px; font-size: 14px; }
.checklist { margin-top: 32px; padding: 22px 24px; border-radius: 14px; border: 1px dashed var(--line); }
.checklist h3 { font-size: 16px; font-family: var(--font-body); margin-bottom: 10px; }
.checklist ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 후기 페이지 ---------- */
.page-head { padding-block: 64px 48px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 14px 0 16px; }
.count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 20px; font-variant-numeric: tabular-nums; }
.reviews-page .reviews-grid { margin-top: 0; }
.cta-band { padding-block: 64px; border-top: 1px solid var(--line); background: var(--band); }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); }

/* ---------- 푸터 ---------- */
.site-footer { padding-block: 40px 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50;
}

/* 후기 페이지: 2열 (후기 수가 늘어도 줄이 고르게) */
@media (min-width: 961px) { .reviews-page .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
