/* ===================================================
   Cloud FinOps Readiness Self-Assessment Tool
   Impeccable Design System — Zero-Decoration Minimalism
   Font: Pretendard | Colors: Canvas #fff, Ink #000, Signal #0052cc
   =================================================== */

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

:root {
  --canvas: #ffffff;
  --ink: #000000;
  --signal: #0052cc;
  --signal-hover: #003d99;
  --border: #e5e5e5;
  --surface: #fafafa;
  --radius: 4px;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --section-pad: 64px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--signal);
  text-decoration: none;
}

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

/* --- Animation Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes scoreRing {
  from {
    stroke-dashoffset: 565.48;
  }
}

@keyframes countUp {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

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

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  padding: var(--section-pad) 0;
}

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 1s ease;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}

.hero-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease both;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #4d4d4d;
  margin-bottom: 40px;
  max-width: 440px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 700;
  color: var(--canvas);
  background: var(--signal);
  border-radius: var(--radius);
  min-height: 52px;
  min-width: 44px;
  transition: background 0.15s ease, transform 0.1s ease;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-primary:hover {
  background: var(--signal-hover);
}

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

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

.btn-primary:disabled {
  background: #b3b3b3;
  cursor: not-allowed;
  transform: none;
}

.hero-meta {
  font-size: 13px;
  color: #666666;
  margin-top: 16px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

/* --- Pain Points --- */
.pain-points {
  padding: var(--section-pad) 0;
  background: var(--surface);
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 48px;
}

.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pain-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--canvas);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

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

.pain-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--signal);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.pain-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.pain-card p {
  font-size: 14px;
  color: #4d4d4d;
  line-height: 1.6;
}

/* --- Assessment --- */
.assessment {
  padding: var(--section-pad) 0;
  min-height: 80vh;
}

.progress-bar-container {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 16px;
}

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

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666666;
  margin-bottom: 48px;
}

#progress-axis {
  font-weight: 700;
  color: var(--signal);
}

.question-card {
  max-width: 680px;
  margin: 0 auto;
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
}

.question-card.exit {
  animation: slideOut 0.3s ease forwards;
}

.axis-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--signal);
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.question-text {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 36px;
}

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

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 52px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-btn:hover {
  border-color: var(--signal);
  background: #f5f8ff;
}

.option-btn.selected {
  border-color: var(--signal);
  background: #f0f5ff;
  font-weight: 700;
}

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

.option-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-btn.selected .option-indicator {
  border-color: var(--signal);
  background: var(--signal);
}

.option-btn.selected .option-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--canvas);
  border-radius: 50%;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  max-width: 680px;
  margin: 48px auto 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 44px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover {
  border-color: #b3b3b3;
  background: var(--surface);
}

.btn-secondary:disabled {
  color: #b3b3b3;
  border-color: #f0f0f0;
  cursor: not-allowed;
}

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

/* --- Results --- */
.results {
  padding: var(--section-pad) 0;
}

.result-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.result-score-ring {
  position: relative;
  width: 200px;
  height: 200px;
}

.score-ring-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

#score-ring {
  animation: scoreRing 1.5s ease forwards;
}

.score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number span:first-child {
  font-size: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  animation: countUp 1s ease;
}

.score-max {
  display: block;
  font-size: 14px;
  color: #666666;
  font-weight: 400;
}

.result-grade {
  display: inline-block;
  padding: 4px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--canvas);
  background: var(--signal);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.result-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.result-desc {
  font-size: 16px;
  color: #4d4d4d;
  line-height: 1.7;
  max-width: 500px;
}

/* Axis Breakdown */
.axis-breakdown {
  margin-bottom: 64px;
}

.subsection-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.axis-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.axis-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.axis-row:last-child {
  border-bottom: none;
}

.axis-name {
  font-size: 14px;
  font-weight: 700;
}

.axis-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

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

.axis-score {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Recommendations */
.recommendations {
  margin-bottom: 64px;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rec-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.rec-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 50%;
}

.rec-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.rec-content p {
  font-size: 14px;
  color: #4d4d4d;
  line-height: 1.6;
}

/* Feature Visual */
.feature-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  margin-bottom: 48px;
  border-top: 1px solid var(--border);
}

.feature-image {
  overflow: hidden;
  border-radius: var(--radius);
}

.feature-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.feature-image:hover img {
  transform: scale(1.02);
}

.feature-content h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.feature-content p {
  font-size: 15px;
  color: #4d4d4d;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* --- Footer --- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: var(--section-pad);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

.footer-brand p {
  font-size: 13px;
  color: #666666;
}

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

.footer-links a {
  font-size: 14px;
  color: #4d4d4d;
  padding: 12px 4px;
  transition: color 0.15s ease;
}

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

.footer-copy {
  font-size: 12px;
  color: #666666;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --section-pad: 40px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 0;
  }

  .hero-image {
    height: 240px;
  }

  .hero-image img {
    height: 240px;
  }

  .hero-content {
    padding: 32px 24px;
  }

  .hero-title {
    font-size: 32px;
  }

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

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

  .section-title {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .question-text {
    font-size: 20px;
  }

  .option-btn {
    padding: 16px 20px;
    font-size: 14px;
  }

  .result-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .result-score-ring {
    margin: 0 auto;
  }

  .result-title {
    font-size: 24px;
  }

  .axis-row {
    grid-template-columns: 120px 1fr 48px;
  }

  .feature-visual {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-image img {
    height: 200px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn-primary,
  .result-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

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

  .pain-card {
    padding: 24px;
  }

  .question-text {
    font-size: 18px;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .nav-buttons .btn-primary,
  .nav-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
