/* ========================================
   Container CVE Workflow Diagnostics
   Impeccable Design System
   Canvas: #ffffff | Ink: #000000 | Signal: #0052cc
   ======================================== */

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

:root {
  --canvas: #ffffff;
  --ink: #000000;
  --signal: #0052cc;
  --signal-light: #e8f0fe;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-400: #767676;
  --gray-600: #666666;
  --radius: 4px;
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Pretendard JP', 'SF Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.7;
  font-weight: 400;
}

.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--signal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 9999;
}

.skip-nav:focus {
  top: 16px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== ANIMATIONS ========== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========== HERO ========== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 1.2s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.7;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 24px;
  max-width: 680px;
}

.hero-desc {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: var(--signal);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.15s ease;
}

.hero-cta:hover {
  background: #003d99;
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(0);
}

/* ========== SECTIONS ========== */

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.section-title.center {
  text-align: center;
}

.section-desc {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 640px;
  margin-bottom: 48px;
}

.section-desc.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.body-text {
  font-size: 17px;
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.8;
}

/* ========== PROBLEM SECTION ========== */

.problem {
  padding: 96px 0;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.problem-text {
  animation: slideInLeft 0.6s ease both;
}

.problem-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  animation: slideInRight 0.6s ease 0.2s both;
}

.stat-list {
  list-style: none;
  padding: 0;
}

.stat-list li {
  font-size: 15px;
  color: var(--gray-600);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--signal);
  margin-right: 8px;
}

/* ========== HOW IT WORKS ========== */

.how-it-works {
  padding: 96px 0;
  background: var(--gray-100);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.step-card {
  background: var(--canvas);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--signal);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--signal);
  margin-bottom: 16px;
  opacity: 0.4;
}

.step-card:hover .step-number {
  opacity: 1;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ========== DIAGNOSTIC TOOL ========== */

.diagnostic {
  padding: 96px 0;
}

.diagnostic-panel {
  max-width: 720px;
  margin: 0 auto;
  background: var(--canvas);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 48px 40px;
  animation: fadeInUp 0.5s ease;
}

/* Progress Bar */

.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--signal);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-400);
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* Questions */

.question-group {
  margin-bottom: 32px;
  animation: fadeIn 0.3s ease;
}

.question-group h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.5;
}

.question-number {
  color: var(--signal);
  font-family: var(--font-mono);
  margin-right: 4px;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}

.answer-option:hover,
.answer-option:focus-within {
  border-color: var(--signal);
  background: var(--signal-light);
}

.answer-option input[type="radio"]:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.answer-option.selected {
  border-color: var(--signal);
  background: var(--signal-light);
}

.answer-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-400);
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s ease;
}

.answer-option.selected input[type="radio"] {
  border-color: var(--signal);
}

.answer-option.selected input[type="radio"]::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background: var(--signal);
  border-radius: 50%;
}

.answer-label {
  font-size: 15px;
  line-height: 1.5;
}

/* Category header in questions */

.category-header {
  padding: 8px 0;
  margin-bottom: 20px;
  margin-top: 40px;
  border-top: 2px solid var(--ink);
}

.category-header:first-child {
  margin-top: 0;
}

.category-header h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation Buttons */

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.btn {
  padding: 12px 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  border: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--signal);
  color: #ffffff;
}

.btn-primary:hover {
  background: #003d99;
}

.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========== RESULTS PANEL ========== */

.results-panel {
  max-width: 720px;
  margin: 48px auto 0;
  background: var(--canvas);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 48px 40px;
  animation: fadeInUp 0.5s ease;
}

.results-heading {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.results-grade-wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  padding: 32px;
  background: var(--gray-100);
  border-radius: var(--radius);
}

.grade-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: countUp 0.5s ease;
}

.grade-letter {
  font-size: 40px;
  font-weight: 700;
  color: #ffffff;
}

.grade-detail {
  flex: 1;
}

.grade-score {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.grade-score strong {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--ink);
}

.grade-level {
  font-size: 18px;
  font-weight: 700;
}

/* Category Score Bars */

.category-scores {
  margin-bottom: 40px;
}

.category-score-item {
  margin-bottom: 20px;
}

.category-score-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-score-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.category-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* Recommendations */

.recommendations {
  margin-bottom: 40px;
}

.recommendations h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.rec-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 15px;
  line-height: 1.6;
}

.rec-priority {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: var(--radius);
  margin-right: 8px;
  display: inline-block;
}

.rec-priority.high {
  background: #fef2f2;
  color: #dc2626;
}

.rec-priority.medium {
  background: #fffbeb;
  color: #d97706;
}

.rec-priority.low {
  background: #f0fdf4;
  color: #16a34a;
}

/* ISMS-P Mapping */

.isms-mapping {
  margin-bottom: 40px;
}

.isms-mapping h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.isms-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}

.isms-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius);
}

.isms-status.pass {
  background: #f0fdf4;
  color: #16a34a;
}

.isms-status.partial {
  background: #fffbeb;
  color: #d97706;
}

.isms-status.fail {
  background: #fef2f2;
  color: #dc2626;
}

/* Results CTA */

.results-cta {
  text-align: center;
  padding: 32px;
  background: var(--gray-100);
  border-radius: var(--radius);
}

.results-cta p {
  font-size: 16px;
  margin-bottom: 16px;
}

/* ========== FEATURES ========== */

.features {
  padding: 96px 0;
  background: var(--gray-100);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.feature-image-col img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.feature-items {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.feature-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ========== COMPARISON TABLE ========== */

.comparison {
  padding: 96px 0;
}

.compare-table-wrap {
  overflow-x: auto;
  margin-top: 48px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.compare-table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--gray-100);
}

.compare-table th:first-child {
  background: transparent;
}

.compare-table td.check {
  color: var(--signal);
  font-weight: 700;
}

.compare-table tbody tr:hover {
  background: var(--gray-100);
}

/* ========== FOOTER ========== */

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--gray-200);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
}

.footer-desc {
  font-size: 13px;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  transition: border-color 0.2s ease;
  display: inline-block;
  padding: 8px 0;
  min-height: 44px;
  line-height: 28px;
}

.footer-links a:hover {
  border-color: var(--ink);
}

.footer-copy {
  font-size: 13px;
  color: var(--gray-400);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .problem-image img {
    height: 280px;
  }

  .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .diagnostic-panel {
    padding: 32px 20px;
  }

  .results-panel {
    padding: 32px 20px;
  }

  .results-grade-wrap {
    flex-direction: column;
    text-align: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-image-col img {
    height: 280px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .compare-table {
    font-size: 13px;
  }

  .compare-table th,
  .compare-table td {
    padding: 12px 10px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    display: block;
    text-align: center;
  }
}

/* ========== SCROLL ANIMATION TRIGGER ========== */

@media (prefers-reduced-motion: no-preference) {
  .step-card,
  .feature-item,
  .stat-list li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .step-card.visible,
  .feature-item.visible,
  .stat-list li.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
