@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --ink: #10110f;
  --ink-soft: #3d4038;
  --muted: #676b61;
  --line: #d8dccf;
  --surface: #ffffff;
  --surface-soft: #f6f8f0;
  --surface-warm: #edf2e4;
  --accent: #0052cc;
  --accent-dark: #003a91;
  --danger: #b3261e;
  --warning: #9a5d00;
  --ok: #2f6f45;
  --focus: #111111;
  --radius: 4px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(16, 17, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 15, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  z-index: -1;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup,
.top-nav,
.hero-actions,
.button-row,
.report-actions,
.report-topline,
.panel-header {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius);
  font-size: 13px;
}

.top-nav {
  gap: 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

.top-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-bottom-color: var(--ink);
}

.hero-section,
.workspace,
.report-shell,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: end;
  padding: 72px 0 64px;
}

.hero-copy {
  padding-top: 24px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
  font-weight: 700;
}

h2 {
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin-bottom: 16px;
  font-weight: 700;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero-lede {
  max-width: 680px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.hero-actions,
.button-row,
.report-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 16px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  background: var(--surface);
  color: var(--ink);
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
}

.button:active {
  transform: translate(0, 0);
}

.button.primary {
  background: var(--ink);
  color: var(--surface);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--surface-soft);
}

.button.quiet {
  border-color: transparent;
  color: var(--muted);
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

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

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 36px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.trust-strip div {
  background: var(--surface);
  padding: 16px;
}

.trust-strip dt,
.score-stats dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.trust-strip dd,
.score-stats dd {
  margin: 0;
  font-weight: 700;
}

.hero-visual {
  margin: 0 0 44px;
  transform: rotate(1.5deg);
}

.hero-visual img,
.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  filter: grayscale(0.18) contrast(1.05);
}

.hero-visual figcaption,
.feature-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  padding: 44px 0 64px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.input-panel,
.scope-panel,
.score-panel,
.findings-panel,
.evidence-panel,
.status-region {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.input-panel,
.scope-panel,
.score-panel,
.findings-panel,
.evidence-panel {
  padding: clamp(20px, 3vw, 32px);
}

.muted,
.hint {
  color: var(--muted);
}

.field-group,
.upload-zone,
.paste-box {
  margin-top: 22px;
}

label,
.file-label-title {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  min-height: 144px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.upload-zone {
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface-soft);
  transition: background-color 160ms ease, transform 160ms ease;
}

.upload-zone.dragover {
  background: var(--surface-warm);
  transform: translateX(6px);
}

.file-label {
  cursor: pointer;
}

.file-label-desc {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

input[type="file"] {
  min-height: 44px;
  width: 100%;
}

.field-error {
  min-height: 22px;
  color: var(--danger);
  margin: 8px 0 0;
  font-weight: 700;
}

.scope-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 24px;
  display: grid;
  gap: 10px;
}

.scope-list li {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.scope-list strong,
.scope-list span {
  display: block;
}

.scope-list span {
  color: var(--muted);
}

.feature-image {
  margin: 28px 0 0;
  transform: translateX(-22px);
  width: calc(100% + 22px);
}

.report-shell {
  padding: 20px 0 72px;
}

.report-topline {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.status-region {
  padding: 18px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.status-region.empty {
  background: var(--surface-soft);
}

.status-region.error {
  border-color: var(--danger);
  background: #fff7f5;
}

.status-region.success {
  border-color: var(--ok);
  background: #f3fbf5;
}

.status-region.partial {
  border-color: var(--warning);
  background: #fff9eb;
}

.progress-wrap {
  margin: 0 0 18px;
}

.progress-meter {
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.progress-meter span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 220ms ease;
}

#progress-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.2fr) minmax(240px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.score-number {
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.08em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 12px 0;
}

.score-number small {
  font-size: 20px;
  letter-spacing: 0;
  color: var(--muted);
}

.score-label {
  font-weight: 700;
}

.score-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 18px 0 0;
}

.score-stats div {
  background: var(--surface);
  padding: 12px;
}

.panel-header {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-header label {
  margin: 0 6px 0 auto;
}

.panel-header select {
  width: auto;
  min-width: 144px;
}

.findings-list,
.evidence-list {
  display: grid;
  gap: 12px;
}

.finding-card,
.evidence-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
}

.finding-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
}

.severity {
  align-self: start;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 8px;
}

.severity.critical {
  color: var(--danger);
  border-color: var(--danger);
}

.severity.warning {
  color: var(--warning);
  border-color: var(--warning);
}

.severity.review {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

.severity.ok {
  color: var(--ok);
  border-color: var(--ok);
}

.finding-card h4,
.evidence-card h4 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.3;
}

.finding-card p,
.evidence-card p {
  margin: 0 0 8px;
  color: var(--ink-soft);
}

.evidence-path,
.meta-line {
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.code-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 48px;
  color: var(--muted);
}

.reveal-block {
  opacity: 0;
  animation: riseIn 560ms ease forwards;
}

.reveal-block:nth-child(2) {
  animation-delay: 120ms;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .hero-section,
  .workspace-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual,
  .feature-image {
    transform: none;
    width: 100%;
    margin-bottom: 0;
  }

  .result-layout {
    gap: 14px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-section {
    padding-top: 44px;
  }

  .trust-strip,
  .score-stats {
    grid-template-columns: 1fr;
  }

  .button,
  .hero-actions,
  .button-row,
  .report-actions,
  .report-actions .button {
    width: 100%;
  }

  .report-topline,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header label {
    margin-left: 0;
  }

  .panel-header select {
    width: 100%;
  }

  .finding-card {
    grid-template-columns: 1fr;
  }

  .score-number {
    font-size: 58px;
  }
}
