:root {
  --ink: #14221d;
  --muted: #607067;
  --paper: #fff6dc;
  --surface: rgba(255, 252, 241, 0.82);
  --line: rgba(20, 34, 29, 0.16);
  --acid: #d9f85f;
  --rust: #c85f3f;
  --blue: #76c7dc;
  --green: #214d36;
  --shadow: 0 26px 70px rgba(20, 34, 29, 0.18);
}

body.alt-theme {
  --paper: #e7f3ee;
  --surface: rgba(239, 252, 248, 0.84);
  --acid: #ffce55;
  --rust: #2457a6;
  --blue: #b8e56d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--acid) 70%, transparent), transparent 30rem),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--blue) 80%, transparent), transparent 26rem),
    linear-gradient(135deg, #fffdf4 0%, var(--paper) 54%, #dfceb0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

.shell {
  position: relative;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero,
.upload-panel,
.check,
.tools {
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 36px;
  align-items: center;
  min-height: 560px;
  padding: clamp(30px, 6vw, 78px);
  border-radius: 40px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--acid), var(--blue), var(--rust), var(--acid));
  animation: float 4.8s ease-in-out infinite;
}

.hero-badge img {
  width: 78%;
  filter: drop-shadow(0 18px 22px rgba(20, 34, 29, 0.24));
}

.eyebrow,
.label {
  display: inline-flex;
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Didot, "Bodoni 72", Georgia, serif;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

h1 {
  max-width: 800px;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
}

h2 {
  font-size: clamp(2.25rem, 5vw, 4.7rem);
}

.intro,
.upload-panel p,
.check p,
.result {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.62;
}

.intro {
  max-width: 650px;
  margin: 26px 0 0;
}

.actions,
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.actions {
  margin-top: 32px;
}

.button,
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.tool-button:hover,
.file-button:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 rgba(20, 34, 29, 0.16);
}

.primary,
.file-button {
  background: var(--acid);
}

.secondary {
  background: rgba(255, 255, 255, 0.4);
}

.upload-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  margin-top: 22px;
  padding: clamp(24px, 5vw, 54px);
  border-radius: 32px;
}

.picker-card {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: 26px;
  border: 2px dashed color-mix(in srgb, var(--green) 60%, transparent);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.34);
}

.file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-input:focus + .file-button {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
}

.result {
  margin: 0;
  font-weight: 800;
}

.diagnostics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.check {
  min-height: 205px;
  padding: 24px;
  border-radius: 26px;
  animation: rise 520ms ease both;
}

.check:nth-child(2) { animation-delay: 60ms; }
.check:nth-child(3) { animation-delay: 120ms; }
.check:nth-child(4) { animation-delay: 180ms; }
.check:nth-child(5) { animation-delay: 240ms; }
.check:nth-child(6) { animation-delay: 300ms; }
.check:nth-child(7) { animation-delay: 360ms; }
.check:nth-child(8) { animation-delay: 420ms; }

.check strong {
  display: block;
  font-size: 1.45rem;
}

.check.pass strong {
  color: var(--green);
}

.check.fail strong {
  color: var(--rust);
}

.tools {
  margin-top: 22px;
  padding: 22px;
  border-radius: 28px;
}

.tool-button {
  background: rgba(255, 255, 255, 0.35);
}

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 22px, 1160px);
    padding: 22px 0;
  }

  .hero,
  .upload-panel,
  .diagnostics {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    border-radius: 30px;
  }

  .hero-badge {
    width: min(240px, 70vw);
    justify-self: center;
  }

  .check {
    min-height: auto;
  }
}
