/* ================================================
   Zero Trust Access Architecture Comparator
   Design: 다크 테마, Pretendard, 단일 accent, 비대칭 레이아웃
   ================================================ */

:root {
  /* Canvas & Ink */
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --ink: #f0f0f0;
  --ink-secondary: #a0a0a0;
  --ink-muted: #888;
  --border: #2a2a2a;
  
  /* Signal (single accent) */
  --accent: #0052cc;
  --accent-light: #3388ff;
  --accent-bg: rgba(0,82,204,0.12);
  
  /* Heatmap */
  --hm-1: #1a1a2e;
  --hm-2: #16213e;
  --hm-3: #0f3460;
  --hm-4: #0052cc;
  --hm-5: #3388ff;
  
  /* Score colors */
  --score-high: #22c55e;
  --score-mid: #eab308;
  --score-low: #ef4444;
  
  /* Spacing */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  
  /* Radius */
  --r: 4px;
  
  /* Font */
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'Pretendard', ui-monospace, monospace;
  
  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.2s;

  /* Focus */
  --focus-ring: 0 0 0 2px var(--accent-light);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.02em;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; color: inherit; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--s5); }

/* View management */
.view { display: none; }
.view.active { display: block; }

/* Focus styles for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: var(--s2) var(--s4);
  z-index: 200;
  font-size: 0.85rem;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s5);
  height: 56px;
}
.nav-brand { display: flex; align-items: center; gap: var(--s2); }
.nav-logo { font-size: 1.2rem; }
.nav-title { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; }
.nav-cta {
  font-size: 0.85rem; font-weight: 700;
  padding: var(--s2) var(--s4);
  background: var(--accent);
  color: #fff;
  border-radius: var(--r);
  transition: background var(--dur) var(--ease);
}
.nav-cta:hover { background: var(--accent-light); text-decoration: none; }
.nav-actions { display: flex; gap: var(--s3); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  padding: var(--s3) var(--s6);
  background: var(--accent);
  color: #fff;
  border-radius: var(--r);
  transition: all var(--dur) var(--ease);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  padding: var(--s3) var(--s6);
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all var(--dur) var(--ease);
}
.btn-secondary:hover { border-color: var(--ink-muted); background: var(--bg-elevated); text-decoration: none; }

.btn-ghost {
  font-size: 0.85rem; font-weight: 400;
  padding: var(--s2) var(--s3);
  color: var(--ink-secondary);
  transition: color var(--dur) var(--ease);
}
.btn-ghost:hover { color: var(--ink); }

.btn-lg { padding: var(--s4) var(--s7); font-size: 1rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 56px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: grayscale(40%);
}
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 720px;
  padding: var(--s8) var(--s5);
}
.hero-badge {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700;
  padding: var(--s2) var(--s4);
  background: var(--accent-bg);
  color: var(--accent-light);
  border-radius: var(--r);
  margin-bottom: var(--s5);
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: var(--s5);
}
.accent { color: var(--accent-light); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.7;
  margin-bottom: var(--s6);
}
.hero-cta-group { display: flex; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s6); }
.hero-trust { font-size: 0.85rem; color: var(--ink-muted); }
.vendor-pills { display: inline-flex; flex-wrap: wrap; gap: var(--s2); margin-left: var(--s2); }
.pill {
  font-size: 0.75rem; font-weight: 400;
  padding: 2px var(--s2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink-secondary);
}

/* ===== SECTIONS ===== */
.section { padding: var(--s8) 0; }
.section-grid { display: grid; gap: var(--s7); }
.section-grid.asymmetric { grid-template-columns: 1.2fr 0.8fr; }
.section-text { display: flex; flex-direction: column; justify-content: center; }
.section-label {
  font-size: 0.8rem; font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--s3);
}
.section-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: var(--s4);
}
.section-heading-center {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: var(--s4);
}
.section-body { color: var(--ink-secondary); margin-bottom: var(--s5); line-height: 1.7; }
.section-desc { text-align: center; color: var(--ink-secondary); margin-bottom: var(--s6); }
.section-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
}
.section-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(30%) brightness(0.8);
  transition: filter 0.4s var(--ease);
}
.section-image:hover img { filter: grayscale(10%) brightness(0.9); }
.stat-list { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.stat-list li {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  padding-left: var(--s4);
  border-left: 2px solid var(--accent);
}
.stat-list strong { color: var(--accent-light); font-weight: 700; font-family: var(--mono); }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s5);
  margin-top: var(--s6);
}
.feature-card {
  padding: var(--s6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 1.5rem; margin-bottom: var(--s3); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: var(--s2); }
.feature-card p { font-size: 0.9rem; color: var(--ink-secondary); line-height: 1.6; }

/* ===== CTA BLOCK ===== */
.cta-block {
  text-align: center;
  padding: var(--s8) var(--s5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.cta-block h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin-bottom: var(--s5); letter-spacing: -0.02em; }
.cta-block p { color: var(--ink-secondary); margin-bottom: var(--s5); }

/* ===== FOOTER ===== */
.footer {
  padding: var(--s6) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--s8);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--ink-muted);
}
.footer-brand { display: flex; align-items: center; gap: var(--s2); }
.footer-links { display: flex; align-items: center; gap: var(--s2); }
.footer-divider { color: var(--border); }

/* ===== WIZARD ===== */
.wizard {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(56px + var(--s8)) var(--s5) var(--s8);
  min-height: 100vh;
}
.wizard-progress {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s2);
  margin-bottom: var(--s8);
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center; gap: var(--s2);
}
.step-dot {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--ink-muted);
  transition: all 0.3s var(--ease);
}
.wizard-step.active .step-dot,
.wizard-step.completed .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.step-label { font-size: 0.8rem; color: var(--ink-muted); }
.wizard-step.active .step-label { color: var(--ink); }
.wizard-line {
  flex: 1; max-width: 80px; height: 2px;
  background: var(--border);
}
.wizard-title { font-size: 1.6rem; font-weight: 700; margin-bottom: var(--s3); letter-spacing: -0.02em; }
.wizard-desc { color: var(--ink-secondary); margin-bottom: var(--s6); line-height: 1.6; }

/* Wizard panels */
.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fadeSlideIn 0.4s var(--ease); }

/* Industry cards */
.industry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s4);
}
.industry-card {
  padding: var(--s5);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  transition: all var(--dur) var(--ease);
  min-height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.industry-card:hover { border-color: var(--ink-muted); }
.industry-card.selected { border-color: var(--accent); background: var(--accent-bg); }
.ic-icon { font-size: 2rem; margin-bottom: var(--s3); }
.industry-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s1); }
.industry-card p { font-size: 0.8rem; color: var(--ink-muted); }

/* Form elements */
.form-group { margin-bottom: var(--s6); }
.form-label {
  display: block;
  font-size: 0.9rem; font-weight: 700;
  margin-bottom: var(--s3);
}
.checkbox-group, .radio-group {
  display: flex; flex-direction: column; gap: var(--s2);
}
.checkbox-item, .radio-item {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--dur) var(--ease);
}
.checkbox-item:hover, .radio-item:hover { border-color: var(--ink-muted); }
.checkbox-item:has(input:checked), .radio-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.checkbox-item input, .radio-item input { accent-color: var(--accent); width: 18px; height: 18px; }

/* Priority grid */
.priority-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s3);
}
.priority-item {
  padding: var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--dur) var(--ease);
  user-select: none;
}
.priority-item:hover { border-color: var(--ink-muted); }
.priority-item.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.priority-item .pi-name { font-weight: 700; }
.priority-item .pi-cat { font-size: 0.75rem; color: var(--ink-muted); margin-top: 2px; }

/* Wizard nav */
.wizard-nav {
  display: flex; justify-content: space-between;
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
}

/* ===== RESULTS ===== */
.results {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(56px + var(--s6)) var(--s5) var(--s8);
}
.results-header { text-align: center; padding: var(--s7) 0; }
.results-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--s3); }
.results-subtitle { color: var(--ink-secondary); font-size: 1.05rem; }
.results-section { padding: var(--s7) 0; }

/* Top 3 */
.top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
}
.top3-card {
  padding: var(--s6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
}
.top3-card.rank-1 { border-color: var(--accent); }
.top3-card.rank-1::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.top3-rank {
  font-size: 3rem; font-weight: 700; color: var(--bg-card);
  line-height: 1;
  position: absolute; top: var(--s3); right: var(--s4);
  text-shadow: 0 0 40px rgba(0,82,204,0.15);
}
.top3-card.rank-1 .top3-rank { color: rgba(0,82,204,0.2); }
.top3-name { font-size: 1.2rem; font-weight: 700; margin-bottom: var(--s1); }
.top3-category { font-size: 0.8rem; color: var(--ink-muted); margin-bottom: var(--s4); }
.top3-score {
  font-size: 2.5rem; font-weight: 700;
  font-family: var(--mono);
  color: var(--accent-light);
  margin-bottom: var(--s3);
}
.top3-score span { font-size: 1rem; color: var(--ink-muted); }
.top3-highlights {
  list-style: none;
  display: flex; flex-direction: column; gap: var(--s2);
}
.top3-highlights li {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  padding-left: var(--s3);
  border-left: 2px solid var(--border);
}

/* Heatmap */
.heatmap-wrapper { margin-top: var(--s5); }
.heatmap-scroll { overflow-x: auto; }
.heatmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.heatmap th, .heatmap td {
  padding: var(--s3) var(--s4);
  text-align: center;
  white-space: nowrap;
}
.heatmap thead th {
  position: sticky; top: 0;
  background: var(--bg-elevated);
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.heatmap thead th:first-child { text-align: left; }
.heatmap tbody th {
  text-align: left;
  font-weight: 400;
  color: var(--ink-secondary);
  background: var(--bg);
  position: sticky; left: 0;
  z-index: 1;
}
.heatmap td {
  font-weight: 700;
  font-family: var(--mono);
  transition: transform 0.15s var(--ease);
}
.heatmap tr:hover td { transform: scale(1.05); }
.hm-cell {
  width: 48px; height: 36px;
  border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.hm-1 { background: var(--hm-1); color: var(--ink-muted); }
.hm-2 { background: var(--hm-2); color: var(--ink-secondary); }
.hm-3 { background: var(--hm-3); color: var(--ink); }
.hm-4 { background: var(--hm-4); color: #fff; }
.hm-5 { background: var(--hm-5); color: #fff; }

/* KISA grid */
.kisa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
}
.kisa-card {
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.kisa-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: var(--s3); }
.kisa-bar-group { display: flex; flex-direction: column; gap: var(--s2); }
.kisa-bar-item {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 0.8rem;
}
.kisa-bar-label { width: 90px; flex-shrink: 0; color: var(--ink-secondary); }
.kisa-bar-track {
  flex: 1; height: 8px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
}
.kisa-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s var(--ease);
}

/* Detail cards */
.detail-cards {
  display: flex; flex-direction: column; gap: var(--s5);
  margin-top: var(--s5);
}
.detail-card {
  padding: var(--s6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.detail-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s4);
}
.detail-card-name { font-size: 1.1rem; font-weight: 700; }
.detail-card-category { font-size: 0.8rem; color: var(--ink-muted); }
.detail-card-desc { color: var(--ink-secondary); font-size: 0.9rem; margin-bottom: var(--s4); line-height: 1.6; }
.detail-card-pricing { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: var(--s3); }
.detail-card-kisa {
  font-size: 0.85rem; color: var(--ink-secondary);
  padding: var(--s3);
  background: var(--bg);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  margin-top: var(--s3);
}
.detail-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s2);
}
.detail-score-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s2) var(--s3);
  font-size: 0.85rem;
}
.detail-score-item .score-label { color: var(--ink-secondary); }
.detail-score-item .score-value { font-weight: 700; font-family: var(--mono); }

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideRight {
  from { width: 0; }
  to { width: var(--w); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .section-grid.asymmetric { grid-template-columns: 1fr; }
  .top3-grid { grid-template-columns: 1fr; }
  .hero-content { max-width: 100%; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 1.6rem; }
  .hero-cta-group { flex-direction: column; }
  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary { width: 100%; }
  .industry-cards { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .kisa-grid { grid-template-columns: 1fr; }
  .nav-actions { gap: var(--s2); }
  .priority-grid { grid-template-columns: 1fr; }
  .wizard-progress { gap: 0; }
  .step-label { display: none; }
}

/* ===== PRINT (PDF) ===== */
@media print {
  body { background: #fff; color: #000; }
  .nav, .hero-bg, .wizard, #pdf-content { display: none !important; }
  .view { display: block !important; }
  .results { padding-top: 0; }
  .top3-card, .detail-card, .kisa-card, .feature-card {
    background: #fff;
    border: 1px solid #ddd;
    color: #000;
  }
}
