/* Midnight Meter — decibel.web.app */
:root {
  --ground: #0B0E24;
  --ground-2: #10142F;
  --ground-3: #080A1C;
  --surface: #151A3A;
  --line: #2A3166;
  --line-soft: #1D2350;
  --text: #EEF0FF;
  --text-2: #D8DAF2;
  --muted: #C9CCEB;
  --faint: #A9AED6;
  --accent: #FFB547;
  --accent-ink: #1A1300;
  --link: #FFC978;
  --link-hover: #FFE2B0;
  --green: #4CAF50;
  --green-text: #6FCF73;
  --yellow: #FFC107;
  --red: #F44336;
  --red-chip: #C62828;
  --radius: 20px;
  --sans: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --num: 'Space Grotesk', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--sans); line-height: 1.6; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }

/* 언어 전환: <html data-lang="ko|en"> */
html[data-lang="ko"] [data-lang="en"],
html[data-lang="en"] [data-lang="ko"] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand:hover { color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 12px; }
.site-nav a:hover { color: var(--text); }
.lang-toggle { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.lang-toggle:hover { color: var(--text); border-color: var(--faint); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 56px 96px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.eyebrow { font-family: var(--num); font-weight: 500; font-size: 15px; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.15; font-weight: 900; letter-spacing: -0.02em; }
.lead { font-size: 19px; line-height: 1.7; color: var(--muted); max-width: 520px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 14px 24px; border-radius: 14px; font-weight: 700; font-size: 17px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #FFC56E; color: var(--accent-ink); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }
.meta { font-size: 14px; color: var(--faint); }

.hero-visual { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.meter-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.meter-card .title { align-self: flex-start; font-weight: 700; font-size: 18px; }
.meter-card svg { width: 100%; max-width: 280px; height: auto; }
.meter-state { font-weight: 700; font-size: 17px; color: var(--green-text); }
.meter-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; text-align: center; }
.meter-stats dt { font-size: 13px; color: var(--faint); }
.meter-stats dd { margin: 4px 0 0; font-family: var(--num); font-weight: 700; font-size: 20px; }

/* Sections */
.band { background: var(--ground-2); border-block: 1px solid var(--line-soft); }
.section { padding-block: 96px; display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 36px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.25; }
.section-head p { font-size: 17px; color: var(--muted); }

.features { display: flex; flex-wrap: wrap; gap: 20px; }
.feature { flex: 1 1 240px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature h3 { font-size: 20px; font-weight: 700; }
.feature p { font-size: 15px; line-height: 1.7; color: var(--muted); }

.levels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.level { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.level-db { flex: 0 0 96px; font-family: var(--num); font-weight: 700; font-size: 26px; }
.level-body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.level-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.level-body p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.chip { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; color: var(--ground); }
.chip-quiet { background: var(--green-text); }
.chip-mid { background: var(--yellow); }
.chip-danger { background: var(--red-chip); color: #fff; }
.bar { flex: 0 1 240px; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; }

.promise { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 40px; }
.promise-copy { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.promise-copy h2 { font-size: 30px; font-weight: 900; line-height: 1.3; }
.promise-copy p { font-size: 16px; line-height: 1.7; color: var(--muted); }
.promise-copy a { font-weight: 700; padding-block: 12px; }
.checks { flex: 1 1 420px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.checks li { display: flex; gap: 14px; font-size: 16px; line-height: 1.6; }
.checks svg { flex: 0 0 22px; margin-top: 2px; }

.note { font-size: 14px; line-height: 1.7; color: var(--faint); border-top: 1px solid var(--line-soft); padding-top: 24px; margin-bottom: 96px; }

/* Legal documents */
.doc-head { display: flex; flex-direction: column; gap: 16px; padding-block: 40px 24px; }
.doc-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 900; letter-spacing: -0.02em; }
.doc-head .date { font-size: 15px; color: var(--faint); }
.doc { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-block: 24px 96px; }
.toc { flex: 1 1 240px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.toc p { margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--faint); }
.toc a { color: var(--text); text-decoration: none; font-size: 15px; padding-block: 8px; }
.toc a:hover { color: var(--link); }
.doc-body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; font-size: 16px; line-height: 1.8; color: var(--text-2); }
.doc-body section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.doc-body h2 { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.4; }
.doc-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc-body strong { color: var(--text); }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.summary > p { font-weight: 700; color: var(--text); font-size: 17px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.table-box table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.table-box th { background: var(--surface); text-align: left; color: var(--text); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table-box td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-box tr:last-child td { border-bottom: 0; }
.table-box td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); gap: 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.facts dt { font-weight: 700; color: var(--text); }
.facts dd { margin: 0; }
.warn { background: #2A1F0A; border: 1px solid #6B4A12; border-radius: 16px; padding: 20px 24px; color: #FFE7BF; }
.warn strong { color: #FFF3DC; }

/* Footer */
.site-footer { background: var(--ground-3); border-top: 1px solid var(--line-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 40px 48px; }
.wordmark { font-family: var(--num); font-weight: 700; font-size: 20px; }
.wordmark span { color: var(--accent); }
.copy { font-size: 14px; color: var(--faint); margin-top: 6px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.footer-nav a { padding-block: 12px; }

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .hero { padding-block: 32px 72px; gap: 40px; }
  .section { padding-block: 72px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
