/* 교육 사이트 — 건원엔지니어링 디자인 가이드(kunwon-design.md) 적용. A안(site.css)과 같은 토큰 */
:root {
  --accent: #FC4B00; --accent-hover: #E34400; --accent-text: #B83800;
  --gold: #AE7F64; --gold-text: #8A5E44;
  --ink: #000; --ink-2: #3D3E42; --muted: #5E5F63;
  --g100: #F0EFF0; --g200: #E3E3E3; --g300: #949598; --charcoal: #54555A;
  --ok: #1F7A3D; --ok-bg: #EAF5EE; --ng: #B3261E; --ng-bg: #FCEDEC;
  --wrap: 1920px; --gutter: clamp(20px, 4vw, 74px);
  --font: "Spoqa Han Sans Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-en: "IBM Plex Sans", var(--font);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 100px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.7; color: var(--ink); background: #fff; word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; transition: color .2s, background-color .2s, border-color .2s; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(32px, 4.4vw, 47px); font-weight: 300; }
h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 300; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 1000px; padding-top: 56px; padding-bottom: 96px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.lead { font-size: 20px; font-weight: 300; color: var(--ink-2); max-width: 62ch; }
.skip { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.draft-bar { background: var(--g100); color: var(--ink-2); font-size: 14px; text-align: center; padding: 6px 16px; border-bottom: 1px solid var(--g200); }

.label { font-family: var(--font-en); font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.sec { padding-top: clamp(72px, 9vw, 140px); }
.sec.first { padding-top: clamp(64px, 6vw, 84px); }
.sec-title { font-size: clamp(30px, 3.4vw, 47px); font-weight: 300; margin-bottom: 28px; }
.lead-line { position: relative; padding-left: 150px; font-size: 20px; font-weight: 300; line-height: 1.7; color: var(--ink-2); max-width: calc(150px + 52ch); margin: 28px 0; }
.lead-line::before { content: ""; position: absolute; left: 0; top: .85em; width: 122px; height: 1px; background: var(--accent); }

.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--g200); }
.top-in { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 112px; height: auto; display: block; }
.brand-t { font-size: 15px; font-weight: 500; padding-left: 12px; border-left: 1px solid var(--g200); }
.top-nav { display: flex; gap: 28px; margin-left: auto; }
.top-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.top-nav a[aria-current], .top-nav a:hover { border-bottom-color: var(--accent); }
.top-prog { margin: 0; font-family: var(--font-en); font-size: 15px; border: 1px solid var(--g300); padding: 4px 12px; }
.top-prog span { color: var(--accent-text); font-weight: 500; }

.btn { font: inherit; font-size: 16px; cursor: pointer; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 0; text-decoration: none; display: inline-block; line-height: 1.4; transition: background-color .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--g100); border-color: var(--ink); }
.btn.big { font-size: 18px; padding: 15px 32px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 500; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #000; }

/* 홈 히어로: 건축 현장 사진 */
.hero-photo { position: relative; padding: clamp(40px, 5.5vw, 88px) 0 clamp(28px, 3vw, 44px); background:
  linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.86) 40%, rgba(255,255,255,.3) 64%, rgba(255,255,255,0) 80%),
  var(--hero) right center / cover no-repeat, #DCEBF8; }
.hero-in { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; }
.display { font-size: clamp(38px, 5.2vw, 72px); font-weight: 100; line-height: 1.12; letter-spacing: -.03em; margin: 0; }
.ring-box { text-align: center; position: relative; background: rgba(255,255,255,.92); padding: 24px 16px 18px; }
.ring { width: 190px; height: 190px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--g200); }
.ring-fg { stroke: var(--accent); transition: stroke-dasharray .6s; }
.ring-t { position: absolute; top: 78px; left: 0; right: 0; margin: 0; font-size: 20px; }
.ring-t b { font-family: var(--font-en); font-size: 52px; font-weight: 200; }
.ring-t span { display: block; font-family: var(--font-en); font-size: 12px; letter-spacing: .16em; color: var(--muted); margin-top: -6px; }
.ring-sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); }


/* 스크롤 안내: 히어로 하단 가운데, 경계선에 걸친 버튼 */
.scroll-cue { position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%); z-index: 3; display: inline-flex; align-items: center; gap: 16px; padding: 18px 38px 18px 32px; background: #fff; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 500; white-space: nowrap; transition: background-color .2s, color .2s; }
.scroll-cue:hover { background: var(--ink); color: #fff; }
.scroll-cue .arrow { width: 18px; height: 18px; border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(45deg); margin-top: -8px; animation: cue 1.4s ease-in-out infinite; }
.scroll-cue .en { font-family: var(--font-en); font-size: 14px; font-weight: 500; letter-spacing: .18em; color: var(--muted); }
.scroll-cue:hover .en { color: #E3E3E3; }
@keyframes cue { 0%, 100% { translate: 0 0; opacity: 1; } 50% { translate: 0 6px; opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .arrow { animation: none; } }
@media (max-width: 700px) { .scroll-cue { font-size: 16px; padding: 13px 22px; gap: 12px; } .scroll-cue .en { display: none; } }

/* 교육 과정 */
.steps-legend { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0; margin: 0 0 64px; }
.steps-legend li { border-top: 3px solid var(--accent); padding: 16px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 18px; }
.steps-legend b { font-family: var(--font-en); font-size: 32px; font-weight: 200; color: var(--accent); line-height: 1; }
.course-part { margin-bottom: 72px; }
.course-part h3 { font-size: 28px; font-weight: 300; border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: 24px; }
.pno { font-family: var(--font-en); color: var(--accent); font-weight: 200; margin-right: 14px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card a, .card > div { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--g200); height: 100%; transition: border-color .2s; }
.card a:hover { border-color: var(--ink); }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--g100); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.card a:hover .thumb img { opacity: .85; }
.thumb.blank { display: grid; place-items: center; color: var(--g300); font-family: var(--font-en); font-size: 40px; font-weight: 200; }
.dur { position: absolute; right: 0; bottom: 0; background: #000; color: #fff; font-family: var(--font-en); font-size: 13px; padding: 2px 10px; }
.card-b { display: flex; flex-direction: column; padding: 16px 18px 18px; gap: 2px; }
.cno { font-family: var(--font-en); font-size: 14px; color: var(--accent-text); font-weight: 500; }
.ct { font-size: 18px; font-weight: 500; line-height: 1.4; }
.status { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 2px 10px; margin-top: 10px; border: 1px solid var(--g300); color: var(--ink-2); }
.status.s-ing { border-color: var(--accent-text); color: var(--accent-text); }
.status.s-quiz { border-color: var(--gold-text); color: var(--gold-text); }
.status.s-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.status.s-soon { border-style: dashed; color: var(--muted); }
.card.soon .ct { color: var(--muted); }

/* 강의 */
.lesson { padding-top: 40px; padding-bottom: 80px; max-width: 1080px; }
.crumb { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
.crumb a { color: var(--muted); }
.tno { font-family: var(--font-en); color: var(--accent); font-weight: 200; margin-right: .35em; }
/* 단계 표시: 탭선 (비활성 6px 회색 / 진행 중 골드 / 완료 초록) */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 28px 0; gap: 0 4px; }
.stepper li { padding: 10px 4px; font-size: 16px; color: var(--muted); border-bottom: 6px solid var(--g200); display: flex; align-items: center; gap: 10px; }
.stepper b { font-family: var(--font-en); font-weight: 300; font-size: 22px; }
.stepper li.now { color: var(--ink); font-weight: 500; border-bottom-color: var(--gold); }
.stepper li.now b { color: var(--accent); }
.stepper li.ok { color: var(--ok); border-bottom-color: var(--ok); }
.stepper .st { margin-left: auto; font-family: var(--font-en); font-size: 14px; }
.player video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.watchbar { height: 4px; background: var(--g200); }
.watchbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
[data-seek-msg] { transition: color .2s; }
[data-seek-msg].warn { color: var(--ng); font-weight: 700; }
.script { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--g200); margin: 28px 0 8px; }
.script summary { cursor: pointer; padding: 14px 0; font-weight: 500; }
.script p { margin: 0 0 14px; color: var(--ink-2); }
.quiz { margin-top: 56px; }
.sec-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin-bottom: 24px; }
.sec-row h2, .sec-row p { margin: 0; }
.locked { background: var(--g100); padding: 32px; text-align: center; }
.locked p { margin: 0 0 4px; }
.qs { list-style: none; padding: 0; margin: 0; }
.q fieldset { border: 1px solid var(--g200); border-top: 3px solid var(--ink); padding: 22px; margin: 0 0 18px; }
.q legend { font-size: 18px; font-weight: 500; padding: 0; float: left; width: 100%; margin-bottom: 14px; }
.qn { font-family: var(--font-en); color: var(--accent-text); font-weight: 500; margin-right: 10px; }
.opts { display: grid; gap: 8px; clear: both; }
.opts.ox { grid-template-columns: 1fr 1fr; }
.opt { display: flex; gap: 12px; align-items: center; border: 1px solid var(--g200); padding: 12px 14px; cursor: pointer; font-size: 17px; transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: var(--ink); }
.opt input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.opt:has(input:checked) { border-color: var(--ink); background: #FFF6F1; }
.opts.ox .opt { justify-content: center; font-family: var(--font-en); font-size: 28px; font-weight: 300; }
.result:focus { outline: none; }
.res { padding: 24px; margin-bottom: 20px; }
.res p { margin: 0; }
.res.pass { background: var(--ok-bg); border-top: 3px solid var(--ok); }
.res.fail { background: var(--ng-bg); border-top: 3px solid var(--ng); }
.res-big { font-size: 26px; font-weight: 300; }
.res.pass .res-big { color: var(--ok); }
.res.fail .res-big { color: var(--ng); }
.review { list-style: none; padding: 0; margin: 0 0 20px; }
.review li { border-bottom: 1px solid var(--g200); padding: 14px 0; }
.review p { margin: 0 0 4px; }
.rq { font-weight: 500; }
.mark { font-size: 13px; font-weight: 700; padding: 1px 8px; margin-right: 6px; color: #fff; }
.ok .mark { background: var(--ok); }
.ng .mark { background: var(--ng); }
.ex { color: var(--ink-2); font-size: 15px; background: var(--g100); padding: 8px 12px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; border-top: 1px solid var(--ink); padding-top: 20px; }
.pager a { text-decoration: none; color: var(--ink); }
.pager .next { text-align: right; display: flex; flex-direction: column; font-size: 18px; font-weight: 300; }
.pager .next:hover { color: var(--accent-text); }
.pager small { font-family: var(--font-en); font-size: 13px; letter-spacing: .1em; color: var(--muted); }

/* 이수증 */
.filter { display: flex; flex-direction: column; gap: 6px; max-width: 320px; margin: 16px 0 24px; font-size: 15px; }
.filter input { font: inherit; padding: 10px 14px; border: 1px solid var(--g300); border-radius: 0; }
.cert-list { list-style: none; padding: 0; }
.cert-list li { padding: 10px 0; border-top: 1px solid var(--g200); display: flex; align-items: center; gap: 12px; }
.cert-list .status { margin: 0 0 0 auto; }
.cert { border: 1px solid var(--ink); outline: 6px solid var(--g100); outline-offset: -14px; padding: 72px 64px; text-align: center; margin-bottom: 24px; }
.cert-eyebrow { font-family: var(--font-en); letter-spacing: .25em; color: var(--accent-text); font-size: 14px; }
.cert h2 { font-size: 52px; font-weight: 100; letter-spacing: .4em; margin: 8px 0 40px; }
.cert-name { font-size: 32px; font-weight: 300; border-bottom: 1px solid var(--ink); display: inline-block; min-width: 240px; margin-bottom: 32px; }
.cert-date { margin-top: 40px; }
.cert-org { font-size: 24px; font-weight: 500; }

/* 푸터: 차콜 + 흰 로고 */
.foot { background: var(--charcoal); color: #fff; padding: 48px 0 56px; margin-top: 96px; font-size: 15px; }
.foot-in { display: flex; gap: 40px; align-items: flex-start; }
.foot-logo { width: 120px; height: auto; flex: none; }
.foot p { margin: 0 0 6px; }
.foot-t { font-weight: 500; }
.foot-s { color: #E3E3E3; max-width: 80ch; }

@media (max-width: 800px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 8px 16px; }
  .brand-t { display: none; }
  .top-prog { order: 3; }
  .hero-in { grid-template-columns: 1fr; }
  .ring-box { display: none; }
  .hero-photo { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.86)), var(--hero) 70% center / cover no-repeat; }
  .lead-line { padding-left: 0; padding-top: 20px; }
  .lead-line::before { top: 0; width: 80px; }
  .steps-legend { grid-template-columns: 1fr; gap: 16px; }
  .stepper li { flex-direction: column; text-align: center; font-size: 14px; gap: 2px; }
  .stepper .st { margin: 0; }
  .cert { padding: 48px 20px; }
  .cert h2 { font-size: 36px; }
  .foot-in { flex-direction: column; gap: 20px; }
}
@media print {
  .draft-bar, .top, .foot, .filter, .btn, .muted, [data-cert-locked] { display: none !important; }
  .cert { margin: 40px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
