/* ═══════════════════════════════════════════════════════
   BROMIS Web Slide Deck — Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --bg-primary: #f5f3ee;
  --bg-secondary: #eae7df;
  --bg-card: rgba(255,255,255,0.72);
  --bg-card-hover: rgba(255,255,255,0.92);
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a58;
  --text-muted: #8a8a87;
  --accent-green: #7ba67b;
  --accent-green-soft: #c8dcc8;
  --accent-navy: #3a4a5e;
  --accent-red: #c84b40;
  --accent-gold: #c8a043;
  --accent-teal: #4a8b7f;
  --accent-blue: #4a7bb5;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.15);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --font-heading: 'Noto Sans KR', 'Inter', sans-serif;
  --font-body: 'Noto Sans KR', 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── Slide Deck Container ── */
.slide-deck {
  width: 100%; height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), visibility 0.6s;
  overflow-y: auto;
  padding: 40px 60px 80px;
}
.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-inner {
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

/* ── Background Decorations ── */
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-circles {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  pointer-events: none;
}
.bg-circles::before,
.bg-circles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.06);
}
.bg-circles::before {
  inset: 0;
}
.bg-circles::after {
  inset: 80px;
}

.bg-dot-accent {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  pointer-events: none;
}
.bg-dot-accent.red { background: var(--accent-red); }
.bg-dot-accent.navy { background: var(--accent-navy); }

/* ── Typography ── */
.slide-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

.slide-title-main {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.slide-subtitle-main {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.accent { color: var(--accent-red); }
.accent-green { color: var(--accent-green); }
.accent-navy { color: var(--accent-navy); }
.accent-gold { color: var(--accent-gold); }

/* ── Cover Slide ── */
.cover-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Stat Boxes ── */
.stat-row {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.stat-box {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.stat-value.green { color: var(--accent-green); }
.stat-value.red { color: var(--accent-red); }
.stat-unit {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.4;
}

/* ── Pie Chart CSS ── */
.pie-chart-container {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pie-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
}

.pie-chart-label {
  text-align: center;
}
.pie-chart-label .value {
  font-size: 1.4rem;
  font-weight: 800;
}
.pie-chart-label .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cards-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  background: rgba(123,166,123,0.1);
}
.card-icon.navy { background: rgba(58,74,94,0.1); }
.card-icon.red { background: rgba(200,75,64,0.1); }
.card-icon.gold { background: rgba(200,160,67,0.1); }

/* ── Flow / Process ── */
.flow-horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 24px 0;
  flex-wrap: wrap;
}
.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.flow-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.flow-step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.flow-step p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.flow-step .step-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 2px 8px;
  border: 1px solid var(--accent-green-soft);
  border-radius: 4px;
}
.flow-arrow {
  font-size: 1.6rem;
  color: var(--text-muted);
  padding: 0 8px;
  flex-shrink: 0;
}

/* ── Process Pipeline (BROMIS Architecture) ── */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 24px 0;
  position: relative;
}
.pipeline::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 60px;
  right: 60px;
  height: 3px;
  background: var(--accent-navy);
  z-index: 0;
}
.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.pipeline-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-navy);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.pipeline-icon {
  width: 64px; height: 64px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.pipeline-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.pipeline-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 160px;
}

/* ── Two-Part Split (Copyright Model) ── */
.split-container {
  display: flex;
  gap: 24px;
  margin: 20px 0;
}
.split-box {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.split-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.split-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.split-box ul {
  list-style: none;
}
.split-box ul li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.split-box ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ── Table ── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
}
.comparison-table thead {
  background: var(--accent-navy);
  color: white;
}
.comparison-table th {
  padding: 14px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}
.comparison-table td {
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.comparison-table tbody tr:nth-child(odd) {
  background: rgba(255,255,255,0.5);
}
.comparison-table tbody tr:nth-child(even) {
  background: rgba(245,243,238,0.8);
}
.comparison-table tbody tr:hover {
  background: rgba(123,166,123,0.08);
}
.comparison-table .row-label {
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  padding-left: 20px;
  background: rgba(0,0,0,0.02);
}
.highlight-cell {
  background: rgba(123,166,123,0.12) !important;
  font-weight: 600;
  color: var(--accent-green) !important;
}

/* ── Callout ── */
.callout {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 16px 0;
  backdrop-filter: blur(8px);
}
.callout strong {
  color: var(--text-primary);
}
.callout.green-border {
  border-left-color: var(--accent-green);
}
.callout.red-border {
  border-left-color: var(--accent-red);
}
.callout.center-box {
  border-left: none;
  border: 2px solid var(--accent-navy);
  border-radius: var(--radius-md);
  text-align: center;
}

/* ── Two Column ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 16px 0;
}

/* ── Styled List ── */
.styled-list {
  list-style: none;
}
.styled-list li {
  position: relative;
  padding: 5px 0 5px 22px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.styled-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

/* ── Area Chart (CSS Only) ── */
.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 16px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow: hidden;
}
.chart-bg-lines {
  position: absolute;
  inset: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-bg-lines .line {
  width: 100%;
  height: 1px;
  background: var(--border);
}
.chart-area {
  position: absolute;
  bottom: 20px; left: 20px; right: 20px;
  height: calc(100% - 40px);
  background: linear-gradient(180deg, var(--accent-green-soft) 0%, rgba(123,166,123,0.05) 100%);
  clip-path: polygon(0 100%, 2% 98%, 5% 96%, 10% 93%, 15% 90%, 20% 87%, 25% 83%, 30% 78%, 35% 72%, 40% 65%, 45% 57%, 50% 48%, 55% 42%, 60% 35%, 65% 30%, 70% 24%, 75% 20%, 80% 16%, 85% 13%, 90% 10%, 95% 6%, 100% 0%, 100% 100%, 0% 100%);
}
.chart-area::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(123,166,123,0.15));
}
.chart-label-left {
  position: absolute;
  left: 24px; bottom: 24px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.chart-label-right {
  position: absolute;
  right: 24px; top: 24px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Fade-up animation ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.slide.active .fade-up {
  opacity: 1;
  transform: translateY(0);
}
.slide.active .fade-up:nth-child(2) { transition-delay: 0.08s; }
.slide.active .fade-up:nth-child(3) { transition-delay: 0.16s; }
.slide.active .fade-up:nth-child(4) { transition-delay: 0.24s; }
.slide.active .fade-up:nth-child(5) { transition-delay: 0.32s; }
.slide.active .fade-up:nth-child(6) { transition-delay: 0.40s; }

/* ── Navigation ── */
.nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 52px;
  background: rgba(245,243,238,0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 100;
  padding: 0 24px;
}

.nav-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: all 0.3s;
}
.nav-dot.active {
  background: var(--accent-navy);
  width: 24px;
  border-radius: 4px;
}

.nav-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}

.nav-buttons {
  display: flex;
  gap: 6px;
}
.nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: var(--accent-navy);
  color: white;
  border-color: var(--accent-navy);
}

/* ── Video Icon ── */
.video-icon {
  width: 80px; height: 64px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .slide { padding: 40px 24px 90px; }
  .cards-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .split-container { flex-direction: column; }
  .flow-horizontal { flex-direction: column; gap: 8px; }
  .flow-arrow { transform: rotate(90deg); padding: 0; }
  .pipeline { flex-wrap: wrap; justify-content: center; }
  .pipeline::before { display: none; }
  .stat-row { flex-direction: column; }
}

@media (max-width: 600px) {
  .slide { padding: 30px 16px 90px; }
  .cards-grid.cols-2 { grid-template-columns: 1fr; }
  .cards-grid.cols-3 { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.7rem; }
  .comparison-table th, .comparison-table td { padding: 8px 6px; }
}

.slide { align-items: flex-start; }
.slide-inner { margin: auto; }

.slide-source {
  margin-top: 30px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
  font-family: monospace;
  width: 100%;
  display: block;
}
