/* 발표 모드 — 1920×1080 캔버스를 화면에 맞춰 축소·확대한다 */

:root {
  --w: 1920px;
  --h: 1080px;
  --ink: #0f1720;
  --ink-2: #3d4956;
  --ink-3: #6b7684;
  --paper: #ffffff;
  --paper-2: #f2f5f8;
  --line: #dde2e8;
  --dark: #0d1b26;
  --dark-ink: #e8eef3;
  --dark-ink-2: #a9b7c3;
  --c: #0b7f74;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs: 1;
}

[data-cat="foundation"] { --c: #2f6fdb; }
[data-cat="application"] { --c: #7a4fd6; }
[data-cat="edge"] { --c: #d0662b; }
[data-cat="hybrid"] { --c: #0b7f74; }
[data-cat="security"] { --c: #c23a52; }
[data-cat="observability"] { --c: #8a7a12; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #05090d; overflow: hidden; }
body { font-family: var(--font); color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }

.deck { position: fixed; inset: 0; }

.slide {
  position: absolute; left: 50%; top: 50%;
  width: var(--w); height: var(--h);
  margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  transform: scale(var(--scale, 1));
  display: none; flex-direction: column;
  padding: 96px 120px 88px;
  background: var(--paper);
  font-size: calc(30px * var(--fs));
  line-height: 1.5;
  overflow: hidden;
}
.slide.is-active { display: flex; }
.slide::after {
  content: attr(data-page); position: absolute; right: 120px; bottom: 40px;
  font-family: var(--mono); font-size: 20px; color: var(--ink-3);
}
.slide::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 10px; background: var(--c);
}

.s-head { margin-bottom: 48px; }
.s-kicker { font-family: var(--mono); font-size: 24px; letter-spacing: 0.03em; color: var(--c); margin-bottom: 14px; }
.s-head h2 { font-size: calc(64px * var(--fs)); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.s-lede { max-width: 1500px; color: var(--ink-2); margin-bottom: 40px; }
.s-lede-lg { font-size: calc(38px * var(--fs)); line-height: 1.55; color: var(--ink); }
h3 { font-size: calc(34px * var(--fs)); line-height: 1.3; letter-spacing: -0.01em; }
code { font-family: var(--mono); font-size: 0.88em; padding: 2px 8px; background: var(--paper-2); border-radius: 6px; }

/* 표지와 마지막 장 */
.s-title { background: var(--dark); color: var(--dark-ink); justify-content: space-between; }
.s-title::after { color: var(--dark-ink-2); }
.s-title-inner { margin-top: 110px; }
.s-title-icon { display: block; width: 128px; height: 128px; margin-bottom: 40px; border-radius: 20px; }
.s-title h1 { font-size: 132px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.s-title-sub { margin-top: 36px; font-size: 46px; color: var(--dark-ink-2); max-width: 1500px; }
.s-title .s-kicker { font-size: 28px; color: #3cc7b6; }
.s-title-foot { display: flex; gap: 32px; font-family: var(--mono); font-size: 24px; color: var(--dark-ink-2); }
.s-qa { margin-top: auto; font-size: 120px; font-weight: 800; color: var(--c); line-height: 1; }

/* 카드 그리드 */
.s-grid { display: grid; gap: 32px; flex: 1; align-content: start; }
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.s-card { padding: 40px; background: var(--paper-2); border-radius: 20px; border-top: 6px solid var(--c); }
.s-card p:not(.s-tag) { margin-top: 16px; color: var(--ink-2); }
.s-tag { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c); margin-bottom: 12px; }
.s-card-challenge { border-top-color: var(--ink-3); }
.s-card-feature { border-top: 0; border-left: 6px solid var(--c); }
.s-card .s-link { margin-top: 18px !important; font-family: var(--mono); font-size: 18px; }
.s-card .s-link a { color: var(--c); text-decoration: none; }
.s-card .s-link a:hover { text-decoration: underline; }
@media print { .s-card .s-link a::after { content: " " attr(href); font-size: 14px; color: var(--ink-3); } }
.s-since { font-family: var(--mono); font-size: 20px; font-weight: 500; padding: 2px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); vertical-align: 5px; }

/* 아젠다 */
.s-agenda { columns: 2; column-gap: 96px; margin: 0; padding: 0; list-style: none; counter-reset: a; font-size: 36px; }
.s-agenda li { counter-increment: a; display: flex; gap: 24px; padding: 18px 0; border-bottom: 2px solid var(--line); break-inside: avoid; }
.s-agenda li::before { content: counter(a, decimal-leading-zero); font-family: var(--mono); color: var(--c); min-width: 56px; }

/* 핵심 수치 */
.s-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 32px; margin: auto 0 0; }
.s-stats div { padding: 36px 40px; background: var(--dark); color: var(--dark-ink); border-radius: 20px; display: flex; flex-direction: column; gap: 12px; }
.s-stats dd { margin: 0; font-family: var(--mono); font-size: 52px; font-weight: 600; color: #fff; line-height: 1.1; white-space: nowrap; }
.s-stats dt { font-size: 24px; color: var(--dark-ink-2); }

/* 흐름 */
.s-flow { display: grid; gap: 32px; margin: 0; padding: 0; list-style: none; flex: 1; align-content: start; }
.s-flow.cols-2 { grid-template-columns: repeat(2, 1fr); }
.s-flow.cols-3 { grid-template-columns: repeat(3, 1fr); }
.s-flow.cols-4 { grid-template-columns: repeat(4, 1fr); }
.s-flow li { position: relative; padding: 40px; background: var(--paper-2); border-radius: 20px; }
.s-flow li p { margin-top: 16px; color: var(--ink-2); }
.s-num { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 50%; background: var(--c); color: #fff; font-family: var(--mono); font-size: 28px; font-weight: 700; }
.s-flow-v { grid-template-columns: 1fr; gap: 20px; }
.s-flow-v li { display: flex; gap: 36px; align-items: flex-start; padding: 28px 40px; }
.s-flow-v .s-num { flex: none; margin: 0; }
.s-flow-v li p { margin-top: 8px; }

/* 표 */
.s-table { width: 100%; border-collapse: collapse; font-size: calc(26px * var(--fs)); }
.s-table th, .s-table td { padding: 18px 24px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--line); }
.s-table thead th { font-size: calc(24px * var(--fs)); color: var(--ink-3); background: var(--paper-2); }
.s-table tbody th { white-space: nowrap; }
.s-table td { color: var(--ink-2); }

/* 아키텍처 */
.s-arch { display: grid; grid-template-columns: 3.2fr 1fr; gap: 36px; flex: 1; align-items: start; }
.s-arch figure { margin: 0; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
.s-arch img { display: block; max-width: 100%; max-height: 640px; margin: 0 auto; object-fit: contain; }
.s-arch figcaption { margin-top: 10px; font-family: var(--mono); font-size: 16px; color: var(--ink-3); overflow-wrap: anywhere; }
.s-arch p { color: var(--ink-2); font-size: calc(24px * var(--fs)); line-height: 1.55; }

/* 비용 */
.s-dims { display: grid; gap: 0; margin: 0; }
.s-dims div { display: grid; grid-template-columns: 480px 1fr; gap: 48px; padding: 24px 0; border-bottom: 2px solid var(--line); }
.s-dims dt { font-weight: 700; }
.s-dims dd { margin: 0; color: var(--ink-2); }
.s-foot-note { margin-top: auto; font-family: var(--mono); font-size: 22px; color: var(--ink-3); }

/* 최근 업데이트 */
.s-timeline { margin: 0; padding: 0; list-style: none; }
.s-timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 22px 0; border-bottom: 2px solid var(--line); }
.s-timeline time { font-family: var(--mono); font-size: 28px; color: var(--c); padding-top: 2px; }
.s-timeline h3 { font-size: calc(32px * var(--fs)); }
.s-timeline p { margin-top: 6px; color: var(--ink-2); font-size: calc(26px * var(--fs)); }

/* 참고 자료 */
.s-sources { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 72px; font-size: 24px; }
.s-sources li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.s-sources span { display: block; font-family: var(--mono); font-size: 17px; color: var(--ink-3); }
.s-sources .more { color: var(--ink-3); }

/* 조작 막대와 진행 표시 */
.hud {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  background: rgb(13 27 38 / 88%); color: #e8eef3; border-radius: 12px;
  font-family: var(--mono); font-size: 14px;
  opacity: 0; transition: opacity 0.25s ease;
}
body.show-hud .hud, .hud:focus-within { opacity: 1; }
.hud button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.hud button:hover { background: rgb(255 255 255 / 12%); }
.hud-count { padding: 0 10px; }
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; z-index: 9; }
.progress span { display: block; height: 100%; width: 0; background: var(--c); transition: width 0.2s ease; }

@media (prefers-reduced-motion: reduce) {
  .hud, .progress span { transition: none; }
}

/* 인쇄: 슬라이드 한 장 = PDF 한 쪽 */
@page { size: 1920px 1080px; margin: 0; }
@media print {
  html, body { height: auto; overflow: visible; background: none; }
  .deck { position: static; }
  .slide { position: relative; left: auto; top: auto; margin: 0; transform: none; display: flex; break-after: page; }
  .hud, .progress { display: none; }
}
