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

:root {
  --color-bg: #0c0f14;
  --color-surface: #151921;
  --color-surface-alt: #1a1f2b;
  --color-border: #252b3a;
  --color-text: #e4e7ed;
  --color-text-dim: #8a91a0;
  --color-accent: #6c9bff;
  --color-accent-glow: rgba(108, 155, 255, .15);
  --color-green: #4ade80;
  --color-orange: #fb923c;
  --color-purple: #a78bfa;
  --color-blue: #38bdf8;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; width: 100%;
  height: var(--nav-h);
  background: rgba(12, 15, 20, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
.nav-logo span { color: var(--color-accent); }
.nav-logo:hover { text-decoration: none; }

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--color-text-dim); font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--color-text); text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: none;
  color: var(--color-text); font-size: 1.5rem; cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(108,155,255,.08) 0%, transparent 70%),
              var(--color-bg);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><rect fill="none" stroke="rgba(108,155,255,0.04)" stroke-width=".5" width="60" height="60"/></svg>');
}
.hero-content { position: relative; z-index: 1; padding: 0 24px; }
.hero-sub {
  font-size: .95rem; color: var(--color-accent); font-weight: 500;
  letter-spacing: .05em; margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 20px;
}
.hero-title span { color: var(--color-accent); }
.hero-desc { font-size: 1.1rem; color: var(--color-text-dim); max-width: 540px; margin: 0 auto 32px; }
.hero-cta {
  display: inline-block;
  padding: 14px 32px; border-radius: 50px;
  background: var(--color-accent); color: #0c0f14;
  font-weight: 700; font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,155,255,.3);
  text-decoration: none;
}

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--color-surface); }

.section-title {
  font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 12px;
}
.section-desc {
  text-align: center; color: var(--color-text-dim); max-width: 600px;
  margin: 0 auto 48px; font-size: .95rem;
}

/* ===== Status Grid ===== */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.status-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  transition: border-color .2s, transform .2s;
}
.status-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
}
.status-icon { font-size: 2rem; margin-bottom: 12px; }
.status-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.status-card p { font-size: .88rem; color: var(--color-text-dim); }

/* ===== Filter Bar ===== */
.filter-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 20px; border-radius: 50px;
  border: 1px solid var(--color-border);
  background: transparent; color: var(--color-text-dim);
  font-size: .88rem; cursor: pointer; transition: all .2s;
}
.filter-btn:hover { border-color: var(--color-accent); color: var(--color-text); }
.filter-btn.active {
  background: var(--color-accent); color: #0c0f14;
  border-color: var(--color-accent); font-weight: 600;
}

/* ===== Project Cards ===== */
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}
.project-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px; position: relative;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.project-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.project-card.hidden { display: none; }

.card-badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 50px; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: .03em;
}
.badge-green { background: rgba(74,222,128,.15); color: var(--color-green); }
.badge-blue { background: rgba(56,189,248,.15); color: var(--color-blue); }
.badge-orange { background: rgba(251,146,60,.15); color: var(--color-orange); }
.badge-purple { background: rgba(167,139,250,.15); color: var(--color-purple); }

.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.card-law { font-size: .78rem; color: var(--color-text-dim); margin-bottom: 14px; }
.card-desc { font-size: .88rem; color: var(--color-text-dim); margin-bottom: 16px; line-height: 1.6; }

.card-specs { list-style: none; margin-bottom: 18px; }
.card-specs li {
  font-size: .84rem; padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dim);
}
.card-specs li:last-child { border-bottom: none; }
.card-specs strong { color: var(--color-text); margin-right: 8px; min-width: 50px; display: inline-block; }

.card-meter { margin-top: auto; }
.meter-label { font-size: .75rem; color: var(--color-text-dim); }
.meter-bar {
  height: 6px; border-radius: 3px;
  background: var(--color-border); margin: 6px 0 4px; overflow: hidden;
}
.meter-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--color-green), var(--color-orange));
  transition: width .6s ease-out;
}
.meter-value { font-size: .75rem; color: var(--color-text-dim); }

/* ===== Comparison Table ===== */
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
  min-width: 800px;
}
.comparison-table th, .comparison-table td {
  padding: 12px 14px; text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.comparison-table th {
  background: var(--color-surface);
  color: var(--color-accent); font-weight: 600;
  position: sticky; top: 0;
}
.comparison-table td { color: var(--color-text-dim); }
.comparison-table td strong { color: var(--color-orange); }
.row-label {
  text-align: left !important; font-weight: 600;
  color: var(--color-text) !important; white-space: nowrap;
}
.comparison-table tbody tr:hover td { background: var(--color-accent-glow); }
.table-note { font-size: .8rem; color: var(--color-text-dim); }

/* ===== Regulation Cards ===== */
.reg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.reg-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.reg-card h3 { font-size: 1.1rem; margin-bottom: 16px; }

.reg-table-wrap { margin-bottom: 12px; }
.reg-table { width: 100%; border-collapse: collapse; }
.reg-table td { padding: 8px 0; font-size: .88rem; border-bottom: 1px solid var(--color-border); }
.reg-table td:first-child { color: var(--color-text-dim); }
.reg-value { text-align: right; font-weight: 700; color: var(--color-accent); }

.reg-note { font-size: .78rem; color: var(--color-text-dim); }

.reg-list { list-style: none; }
.reg-list li {
  font-size: .86rem; padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dim);
}
.reg-list li:last-child { border-bottom: none; }
.reg-badge {
  font-size: .7rem; background: rgba(251,146,60,.15);
  color: var(--color-orange); padding: 2px 6px; border-radius: 4px;
  font-weight: 600; margin-left: 4px;
}

/* ===== Timeline ===== */
.timeline { max-width: 700px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 24px; top: 0; bottom: 0; width: 2px;
  background: var(--color-border);
}
.timeline-item {
  display: flex; gap: 24px; margin-bottom: 36px;
  position: relative;
}
.timeline-number {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  color: var(--color-accent); font-weight: 800; font-size: 1.1rem;
  z-index: 1;
}
.timeline-content {
  padding-top: 8px;
}
.timeline-content h3 { font-size: 1.05rem; margin-bottom: 6px; }
.timeline-content p { font-size: .88rem; color: var(--color-text-dim); }

/* Active step */
.timeline-item.active .timeline-number {
  background: var(--color-accent); color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 0 16px rgba(108,155,255,.5);
  animation: pulse-ring 2s infinite;
}
.timeline-item.active .timeline-content h3 { color: #fff; }
.timeline-item.active .timeline-content h3::after {
  content: ' ◀ 현재 단계'; font-size: .75rem; color: #4ade80; font-weight: 600;
}

/* Locked steps */
.timeline-item.locked {
  opacity: .35; filter: grayscale(100%);
  pointer-events: none;
}
.timeline-item.locked .timeline-number {
  border-color: #444; color: #555; background: #1a1a1a;
}
.timeline-item.locked .timeline-content h3 { color: #555; }
.timeline-item.locked .timeline-content h3::after {
  content: ' 🔒'; font-size: .8rem;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(108,155,255,.4); }
  70% { box-shadow: 0 0 0 10px rgba(108,155,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(108,155,255,0); }
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0; text-align: center;
  border-top: 1px solid var(--color-border);
}
.footer-disclaimer {
  font-size: .85rem; color: var(--color-orange);
  background: rgba(251,146,60,.08); display: inline-block;
  padding: 8px 20px; border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.footer-law { font-size: .78rem; color: var(--color-text-dim); margin-bottom: 8px; }
.footer-copy { font-size: .75rem; color: var(--color-text-dim); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; width: 100%;
    background: rgba(12, 15, 20, .95);
    padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-toggle { display: block; }

  .section { padding: 64px 0; }
  .section-title { font-size: 1.5rem; }

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

  .timeline::before { left: 23px; }
}

/* ===== Scroll Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
