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

:root {
  --ink: #000000;
  --canvas: #ffffff;
  --signal: #0052cc;
  --signal-light: #e8f0fe;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --success: #0a8a3e;
  --warning: #b36b00;
  --danger: #c41e1e;
  --font: 'Pretendard', -apple-system, 'Segoe UI', sans-serif;
  --radius: 4px;
  --section-pad: 80px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
}

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

.section {
  padding: var(--section-pad) 0;
}

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

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

/* ===== Typography ===== */
.section-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--ink);
}

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

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 32px;
}

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

/* ===== Buttons ===== */
.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--signal);
  color: var(--canvas);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.4;
}

.cta-button:hover {
  opacity: 0.88;
}

.cta-button:active {
  transform: scale(0.98);
}

.cta-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.cta-button.secondary {
  background: var(--canvas);
  color: var(--signal);
  border: 2px solid var(--signal);
}

.cta-button.secondary:hover {
  background: var(--signal-light);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 48px;
  max-width: 680px;
  animation: fadeSlideUp 0.8s ease both;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--signal);
  color: var(--canvas);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--canvas);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--canvas);
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

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

/* ===== Problem Section ===== */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

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

.problem-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.check-list {
  list-style: none;
  margin-top: 20px;
}

.check-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 15px;
  color: var(--text);
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 16px;
  height: 16px;
  background: var(--signal);
  border-radius: 50%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.step-card {
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  animation: fadeSlideUp 0.6s ease both;
}

.step-card:nth-child(2) {
  animation-delay: 0.15s;
}

.step-card:nth-child(3) {
  animation-delay: 0.3s;
}

.step-number {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: var(--signal);
  line-height: 1;
  margin-bottom: 16px;
}

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

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Category Nav ===== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.cat-btn {
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  background: var(--canvas);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.cat-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.cat-btn.active {
  background: var(--signal);
  color: var(--canvas);
  border-color: var(--signal);
}

/* ===== Progress Bar ===== */
.progress-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

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

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

.progress-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
}

/* ===== Checklist ===== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checklist-category {
  margin-bottom: 16px;
}

.checklist-category-title {
  font-size: 18px;
  font-weight: 700;
  padding: 12px 0;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 16px;
}

.checklist-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s ease;
}

.checklist-item:hover {
  border-color: #ccc;
}

.checklist-item.answered {
  border-color: var(--signal);
  background: var(--signal-light);
}

.checklist-question {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}

.checklist-question .item-code {
  color: var(--signal);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  margin-right: 8px;
}

.checklist-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.option-btn {
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 14px;
  background: var(--canvas);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.option-btn.selected {
  font-weight: 700;
}

.option-btn.selected.met {
  background: var(--success);
  color: var(--canvas);
  border-color: var(--success);
}

.option-btn.selected.partial {
  background: var(--warning);
  color: var(--canvas);
  border-color: var(--warning);
}

.option-btn.selected.unmet {
  background: var(--danger);
  color: var(--canvas);
  border-color: var(--danger);
}

/* ===== Submit Area ===== */
.submit-area {
  text-align: center;
  padding: 48px 0 0;
}

.submit-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== Results ===== */
.score-overview {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 48px;
  animation: fadeSlideUp 0.6s ease both;
}

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

.score-circle svg {
  width: 200px;
  height: 200px;
}

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.score-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.score-meta h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.score-meta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== Chart ===== */
.chart-area {
  text-align: center;
  margin-bottom: 48px;
}

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

#radarChart {
  max-width: 100%;
  height: auto;
}

/* ===== Detail Table ===== */
.detail-table-wrapper {
  margin-bottom: 48px;
  overflow-x: auto;
}

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

.detail-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}

.detail-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.detail-table .rate-cell {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 700;
  text-align: right;
}

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

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

.rec-card {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--danger);
}

.rec-card.warning {
  border-left-color: var(--warning);
}

.rec-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.rec-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== Results CTA ===== */
.results-cta {
  text-align: center;
  padding: 48px;
  background: var(--signal-light);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.results-cta p {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.retry-area {
  text-align: center;
  padding: 24px 0;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeSlideUp 0.6s ease both;
}

.feature-card:nth-child(2) {
  animation-delay: 0.15s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  padding: 16px 20px 0;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 20px 20px;
  line-height: 1.5;
}

/* ===== Bottom CTA ===== */
.bottom-cta-section {
  background: var(--ink);
  color: var(--canvas);
}

.bottom-cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.bottom-cta-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.bottom-cta-content p {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  line-height: 1.7;
}

.bottom-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.bottom-cta-buttons .cta-button.secondary {
  background: transparent;
  color: var(--canvas);
  border-color: var(--canvas);
}

.bottom-cta-buttons .cta-button.secondary:hover {
  background: rgba(255,255,255,0.1);
}

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

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

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

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  :root {
    --section-pad: 56px;
  }

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

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

  .hero-stats {
    gap: 20px;
  }

  .stat-value {
    font-size: 20px;
  }

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

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

  .score-overview {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 32px 20px;
  }

  .score-circle {
    margin: 0 auto;
  }

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

  .checklist-options {
    gap: 8px;
  }

  .option-btn {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  .bottom-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 480px;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .footer-grid {
    flex-direction: column;
    gap: 24px;
  }

  .category-nav {
    gap: 6px;
  }

  .cat-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 44px;
  }
}
