/* =========================================================================
   AIO2O Proposal Deck — shared styles
   - 디자인 기준 캔버스: 1600 x 900 (PPT 16:9)
   - 모든 크기는 calc(var(--u) * N) 으로 지정 (N = 1600 기준 px)
   - --u 값은 deck.js 가 화면 크기에 맞춰 계산
   - 데스크톱: 한 화면에 한 장(스크롤 스냅) / 모바일: 세로 스크롤 반응형
   ========================================================================= */

:root {
  --u: 1px;
  --bg: #0B0B10;
  --card: #15151C;
  --card-2: #1E1E29;
  --line: #2A2A35;
  --text: #F2F2F7;
  --body: #C9CBD6;
  --muted: #A3A8B8;
  --accent: #613CFF;
  --accent-2: #9B7CFF;
  --accent-3: #DCD3FF;
  --accent-bg: #19132F;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Deck / Slide ---------- */
.deck {
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}
.slide--hero {
  background: var(--bg) url("assets/bg-hero.jpg") right center / cover no-repeat;
}

.frame {
  position: relative;
  width: calc(var(--u) * 1600);
  height: calc(var(--u) * 900);
  padding: calc(var(--u) * 46) calc(var(--u) * 72) calc(var(--u) * 84);
  display: flex; flex-direction: column;
}

/* 슬라이드 공통 크롬 (deck.js 가 삽입) */
.chrome-logo {
  position: absolute;
  top: calc(var(--u) * 48); right: calc(var(--u) * 72);
  height: calc(var(--u) * 34);
  width: auto;
}
.slide--hero .chrome-logo {
  top: calc(var(--u) * 58); left: calc(var(--u) * 72); right: auto;
  height: calc(var(--u) * 34);
}
.chrome-foot {
  position: absolute;
  left: calc(var(--u) * 72); right: calc(var(--u) * 72); bottom: calc(var(--u) * 30);
  display: flex; justify-content: space-between;
  font-size: calc(var(--u) * 16);
  color: var(--muted);
  white-space: pre;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-size: calc(var(--u) * 20);
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: -0.01em;
}
.eyebrow b { font-weight: 700; margin-right: calc(var(--u) * 10); }
.title {
  margin-top: calc(var(--u) * 18);
  font-size: calc(var(--u) * 52);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}
.lead {
  margin-top: calc(var(--u) * 14);
  font-size: calc(var(--u) * 24);
  color: var(--muted);
  letter-spacing: -0.02em;
}
.s-head { margin-bottom: calc(var(--u) * 40); max-width: calc(var(--u) * 1240); }
.s-body { flex: 1; display: flex; flex-direction: column; gap: calc(var(--u) * 24); min-height: 0; }

.hl { color: var(--accent-2); }
.pale { color: var(--accent-3); }
.muted { color: var(--muted); }
.strong { font-weight: 700; color: var(--text); }
.note { font-size: calc(var(--u) * 18); color: var(--muted); }
.center { text-align: center; }

/* ---------- Layout helpers ---------- */
.grid { display: grid; gap: calc(var(--u) * 26); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.row { display: flex; gap: calc(var(--u) * 26); align-items: stretch; }
.row > * { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: calc(var(--u) * 16); }
.fill { flex: 1; }
.gap-s { gap: calc(var(--u) * 14); }
.gap-l { gap: calc(var(--u) * 40); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--card);
  border: calc(var(--u) * 1.5) solid var(--line);
  border-radius: calc(var(--u) * 16);
  padding: calc(var(--u) * 28) calc(var(--u) * 32);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.card.is-accent { background: var(--accent-bg); border-color: var(--accent); }
.card.is-solid { background: var(--accent); border-color: var(--accent); }
.card.is-ghost { background: transparent; }
.card:hover { border-color: var(--accent-2); }
.card h3 {
  font-size: calc(var(--u) * 28);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}
.card h4 {
  font-size: calc(var(--u) * 22);
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.card p { font-size: calc(var(--u) * 21); color: var(--body); line-height: 1.5; }
.card .label { font-size: calc(var(--u) * 18); color: var(--accent-2); font-weight: 600; }
.card .k { font-size: calc(var(--u) * 19); color: var(--accent-2); font-weight: 700; }
.card > * + * { margin-top: calc(var(--u) * 10); }

/* 아이콘 + 텍스트 카드 */
.icard { display: flex; gap: calc(var(--u) * 24); align-items: flex-start; }
.icard > .ico { flex: none; width: calc(var(--u) * 70); height: calc(var(--u) * 70); }
.icard > .ico img { width: 100%; height: 100%; object-fit: contain; }
.icard > div > * + * { margin-top: calc(var(--u) * 8); }

/* 번호 배지 */
.num-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: calc(var(--u) * 44); height: calc(var(--u) * 44);
  padding: 0 calc(var(--u) * 10);
  border-radius: calc(var(--u) * 22);
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: calc(var(--u) * 20);
}

/* 태그 / 칩 */
.tag {
  display: inline-block;
  padding: calc(var(--u) * 7) calc(var(--u) * 22);
  border-radius: calc(var(--u) * 8);
  font-size: calc(var(--u) * 18); font-weight: 700;
  background: var(--card-2); color: var(--accent-3);
  border: calc(var(--u) * 1.5) solid var(--line);
}
.tag.is-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 10); }

/* 하단 강조 바 */
.callout {
  margin-top: auto;
  background: var(--accent);
  border-radius: calc(var(--u) * 12);
  padding: calc(var(--u) * 17) calc(var(--u) * 30);
  text-align: center;
  font-size: calc(var(--u) * 27);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.callout.is-line { background: transparent; border: calc(var(--u) * 1.5) solid var(--accent); color: var(--accent-3); }
.s-body + .callout, .s-body + .cta { margin-top: calc(var(--u) * 24); }
.card p.label { color: var(--accent-2); }

/* 리스트 */
.list { list-style: none; display: flex; flex-direction: column; gap: calc(var(--u) * 12); }
.list li {
  position: relative;
  padding-left: calc(var(--u) * 26);
  font-size: calc(var(--u) * 22);
  color: var(--body);
  line-height: 1.45;
}
.list li::before {
  content: ""; position: absolute; left: calc(var(--u) * 4); top: .62em;
  width: calc(var(--u) * 7); height: calc(var(--u) * 7); border-radius: 50%;
  background: var(--accent-2);
}
.list li.hl { color: var(--accent-2); font-weight: 700; }

/* 가격 */
.price { display: flex; align-items: baseline; gap: calc(var(--u) * 10); }
.price .num {
  font-size: calc(var(--u) * 76); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.price .unit { font-size: calc(var(--u) * 22); color: var(--muted); }
.divider { height: calc(var(--u) * 1.5); background: var(--line); border: 0; margin: calc(var(--u) * 22) 0; }

/* 화살표 */
.arrow { color: var(--accent-2); font-weight: 700; font-size: calc(var(--u) * 28); display: flex; align-items: center; justify-content: center; }

/* 단계 흐름 (01 → 02 → 03 …) */
.steps { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: calc(var(--u) * 18); }
.steps::before {
  content: ""; position: absolute; left: calc(var(--u) * 20); right: calc(var(--u) * 20); top: calc(var(--u) * 22);
  height: calc(var(--u) * 2); background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left center; transform: scaleX(0);
  transition: transform 1.4s var(--ease) .3s;
}
.slide.is-in .steps::before { transform: scaleX(1); }
.steps .step { position: relative; }
.steps .step .num-badge { position: relative; z-index: 1; box-shadow: 0 0 0 calc(var(--u) * 6) var(--bg); }
.steps .step h4 { margin-top: calc(var(--u) * 16); font-size: calc(var(--u) * 23); font-weight: 700; color: var(--text); }
.steps .step p { margin-top: calc(var(--u) * 6); font-size: calc(var(--u) * 19); color: var(--muted); }

/* 타임라인 (점 + 선) */
.timeline { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; text-align: center; }
.timeline::before {
  content: ""; position: absolute; top: calc(var(--u) * 17); left: 10%; right: 10%;
  height: calc(var(--u) * 3); background: var(--accent);
  transform-origin: left center; transform: scaleX(0); transition: transform 1.4s var(--ease) .3s;
}
.slide.is-in .timeline::before { transform: scaleX(1); }
.timeline .t-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 18); }
.timeline .dot {
  width: calc(var(--u) * 36); height: calc(var(--u) * 36); border-radius: 50%;
  background: var(--bg); border: calc(var(--u) * 3) solid var(--accent-2); position: relative; z-index: 1;
}
.timeline .t-item:first-child .dot { background: var(--accent); border-color: var(--accent); }
.timeline .t-item b { font-size: calc(var(--u) * 21); font-weight: 700; color: var(--text); }

/* 모바일 전용 / 데스크톱 전용 */
.m-only { display: none !important; }

/* 브라우저 목업 / 스크린샷 */
.shot {
  border-radius: calc(var(--u) * 14);
  overflow: hidden;
  border: calc(var(--u) * 1.5) solid var(--line);
  box-shadow: 0 calc(var(--u) * 30) calc(var(--u) * 80) rgba(0, 0, 0, .45);
  background: #fff;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* 표 */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: calc(var(--u) * 20); }
.table th, .table td { padding: calc(var(--u) * 14) calc(var(--u) * 18); text-align: left; border-bottom: calc(var(--u) * 1.5) solid var(--line); }
.table th { color: var(--accent-2); font-weight: 700; background: var(--card); }
.table td { color: var(--body); }
.table tr.is-accent td { background: var(--accent-bg); color: var(--text); }

/* ---------- Hero ---------- */
.hero { flex: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: calc(var(--u) * 60); align-items: center; padding-top: calc(var(--u) * 80); }
.hero .kicker { font-size: calc(var(--u) * 24); font-weight: 600; color: var(--accent-2); }
.hero h1 {
  margin-top: calc(var(--u) * 22);
  font-size: calc(var(--u) * 72); font-weight: 700; line-height: 1.24; letter-spacing: -0.025em;
}
.hero .sub { margin-top: calc(var(--u) * 28); font-size: calc(var(--u) * 26); color: var(--body); line-height: 1.6; }

/* ---------- Animations ---------- */
[data-anim] {
  opacity: 0;
  transform: translate3d(0, calc(var(--u) * 28), 0);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 85ms + 120ms);
  will-change: opacity, transform;
}
[data-anim="fade"] { transform: none; }
[data-anim="left"] { transform: translate3d(calc(var(--u) * -48), 0, 0); }
[data-anim="right"] { transform: translate3d(calc(var(--u) * 48), 0, 0); }
[data-anim="zoom"] { transform: scale(.92); }
[data-anim="pop"] { transform: scale(.6); transition-timing-function: cubic-bezier(.3, 1.6, .5, 1); }
.slide.is-in [data-anim] { opacity: 1; transform: none; }

/* 배경 글로우 천천히 움직이기 */
.slide--hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 70%, rgba(155, 124, 255, .28), transparent 40%);
  animation: glow 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow { from { opacity: .35; transform: scale(1); } to { opacity: 1; transform: scale(1.06); } }

/* 강조 카드 은은한 맥동 */
.pulse { animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(97, 60, 255, 0); }
  50% { box-shadow: 0 0 calc(var(--u) * 40) calc(var(--u) * 4) rgba(97, 60, 255, .35); }
}

@media (prefers-reduced-motion: reduce) {
  [data-anim], .steps::before { transition: none !important; opacity: 1 !important; transform: none !important; }
  .slide--hero::before, .pulse { animation: none; }
}
html.is-static [data-anim], html.is-static .steps::before, html.is-static .timeline::before { transition: none !important; opacity: 1 !important; transform: none !important; }
html.is-static .toolbar, html.is-static .progress { display: none !important; }

/* ---------- Toolbar ---------- */
.toolbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 4px;
  padding: 6px;
  background: rgba(21, 21, 28, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  font-size: 14px;
  transition: opacity .35s, transform .35s var(--ease);
}
.toolbar.is-idle { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s;
}
.tb-btn:hover { background: rgba(255, 255, 255, .08); }
.tb-btn.is-primary { background: var(--accent); }
.tb-btn.is-primary:hover { background: #7352ff; }
.tb-btn svg { width: 17px; height: 17px; flex: none; }
.tb-icon { width: 38px; padding: 0; justify-content: center; }
.tb-count { min-width: 64px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.tb-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .12); margin: 0 4px; }

.progress { position: fixed; left: 0; top: 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .5s var(--ease); }

.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 13px 22px; border-radius: 12px;
  background: #fff; color: #111; font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  transition: opacity .3s, transform .3s var(--ease);
  pointer-events: none; text-align: center; max-width: calc(100vw - 32px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile (세로 스크롤 반응형) ---------- */
html.is-mobile .deck { height: auto; overflow: visible; scroll-snap-type: none; }
html.is-mobile .slide { height: auto; min-height: 0; display: block; overflow: visible; }
html.is-mobile .slide--hero { background-size: auto 100%; background-position: 70% center; }
html.is-mobile .frame {
  width: 100%; height: auto;
  padding: calc(var(--u) * 64) calc(var(--u) * 34) calc(var(--u) * 80);
}
html.is-mobile .slide + .slide .frame { border-top: 1px solid rgba(255, 255, 255, .06); }
html.is-mobile .chrome-logo { display: none; }
html.is-mobile .slide--hero .chrome-logo { display: block; position: static; align-self: flex-start; width: auto; height: calc(var(--u) * 40); margin-bottom: calc(var(--u) * 50); }
html.is-mobile .chrome-foot { left: calc(var(--u) * 34); right: calc(var(--u) * 34); bottom: calc(var(--u) * 28); }
html.is-mobile .title { font-size: calc(var(--u) * 42); }
html.is-mobile .s-head { margin-bottom: calc(var(--u) * 36); }
html.is-mobile .s-body { gap: calc(var(--u) * 20); }
html.is-mobile .grid,
html.is-mobile .cols-2, html.is-mobile .cols-3, html.is-mobile .cols-4, html.is-mobile .cols-5 { grid-template-columns: minmax(0, 1fr); gap: calc(var(--u) * 18); }
html.is-mobile .m-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html.is-mobile .row { flex-direction: column; gap: calc(var(--u) * 18); }
html.is-mobile .m-row { flex-direction: row !important; }
html.is-mobile .m-hide { display: none !important; }
html.is-mobile .m-only { display: block !important; }
html.is-mobile .timeline { grid-auto-flow: row; grid-auto-columns: auto; text-align: left; gap: calc(var(--u) * 22); }
html.is-mobile .timeline::before { left: calc(var(--u) * 17); right: auto; top: calc(var(--u) * 18); bottom: calc(var(--u) * 18); width: calc(var(--u) * 3); height: auto; transform-origin: top center; transform: scaleY(0); }
html.is-mobile .slide.is-in .timeline::before { transform: scaleY(1); }
html.is-mobile .timeline .t-item { flex-direction: row; }
html.is-mobile .arrow { transform: rotate(90deg); }
html.is-mobile .m-keep-arrow .arrow { transform: none; }
html.is-mobile .callout { margin-top: calc(var(--u) * 30); font-size: calc(var(--u) * 25); }
html.is-mobile .hero { grid-template-columns: minmax(0, 1fr); padding-top: 0; gap: calc(var(--u) * 44); }
html.is-mobile .hero h1 { font-size: calc(var(--u) * 58); }
html.is-mobile .steps { grid-auto-flow: row; grid-auto-columns: auto; gap: calc(var(--u) * 22); padding-left: calc(var(--u) * 2); }
html.is-mobile .steps::before { left: calc(var(--u) * 21); right: auto; top: calc(var(--u) * 20); bottom: calc(var(--u) * 20); width: calc(var(--u) * 2); height: auto; transform-origin: top center; transform: scaleY(0); }
html.is-mobile .slide.is-in .steps::before { transform: scaleY(1); }
html.is-mobile .steps .step { display: grid; grid-template-columns: calc(var(--u) * 44) 1fr; column-gap: calc(var(--u) * 18); align-items: center; }
html.is-mobile .steps .step h4 { margin-top: 0; }
html.is-mobile .steps .step p { grid-column: 2; margin-top: 0; }
html.is-mobile .table { font-size: calc(var(--u) * 19); }
html.is-mobile .shot { max-height: none; }

html.is-mobile .toolbar { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); transform: none; justify-content: center; }
html.is-mobile body { padding-bottom: 80px; }
html.is-mobile.is-static body { padding-bottom: 0; }
html.is-mobile .toolbar.is-idle { opacity: 1; transform: none; pointer-events: auto; }
html.is-mobile .tb-nav, html.is-mobile .tb-fs, html.is-mobile .tb-sep { display: none; }
html.is-mobile .tb-btn { flex: 1; justify-content: center; height: 44px; font-size: 15px; }
html.is-mobile .toast { bottom: 90px; }

/* ---------- Print (브라우저에서 PDF 저장 시) ---------- */
@page { size: 1600px 900px; margin: 0; }
@media print {
  :root { --u: 1px !important; }
  html, body { background: var(--bg); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .deck { height: auto; overflow: visible; }
  .slide { height: 900px; width: 1600px; page-break-after: always; break-after: page; }
  .toolbar, .progress, .toast { display: none !important; }
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
