:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #151519;
  --panel-2: #1d1d23;
  --line: #303039;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --soft: #71717a;
  --gold: #d7aa55;
  --gold-2: #a87a2c;
  --blue: #5ea3d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(94, 163, 216, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(215, 170, 85, 0.16), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
img, canvas { display: block; max-width: 100%; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.88);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1c1508;
  font-weight: 900;
}

.brand strong, .brand small { display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 0.72rem; margin-top: 0.15rem; }

nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.4rem);
  font-size: 0.9rem;
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }

.hero {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 4vw, 4rem);
  text-align: center;
}

.hero-copy { max-width: 880px; margin: 0 auto; }
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 1rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p:last-of-type {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.link-button { text-decoration: none; }

.lab, .upload-grid, .result-grid, .steps-grid, .case-grid, .science-grid, .pricing-grid {
  display: grid;
  gap: 1rem;
}
.lab { gap: 1rem; }
.upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.panel, .formula-card, .why-card, .price-card, .steps-grid article, .case-card, .dna-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.24);
}

.upload-panel, .controls, .result-panel, .formula-card, .why-card, .price-card {
  padding: clamp(1rem, 2.2vw, 1.4rem);
}

.panel-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.panel-head h2 { margin-bottom: 0.2rem; font-size: 1.25rem; }
.panel-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.step-badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.45rem;
  background: rgba(215, 170, 85, 0.14);
  border: 1px solid rgba(215, 170, 85, 0.36);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.82rem;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 15rem;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
  transition: border-color 0.18s, background 0.18s;
}
.dropzone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.dropzone:hover, .dropzone.drag { border-color: var(--gold); background: rgba(215, 170, 85, 0.07); }
.drop-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.7rem;
  border-radius: 0.45rem;
  background: var(--panel-2);
  color: var(--gold);
  font-size: 1.8rem;
  line-height: 1;
}
.dropzone small { color: var(--soft); margin-top: 0.35rem; }

.preview-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
figure { margin: 0; }
figure img, figure canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.45rem;
  background: var(--panel-2);
}
figcaption { margin-top: 0.45rem; color: var(--muted); font-size: 0.74rem; }

.dna-card { margin-top: 1rem; padding: 1rem; box-shadow: none; }
.dna-title {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 0.38rem;
  background: rgba(0, 0, 0, 0.2);
}
.metric small { color: var(--muted); }
.metric strong {
  overflow: hidden;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; margin-top: 0.75rem; }
.swatches span { aspect-ratio: 1; border-radius: 0.35rem; border: 1px solid rgba(255, 255, 255, 0.1); }

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: center;
}
.control-row, .result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.primary, .secondary, .ghost {
  min-height: 2.55rem;
  border-radius: 0.42rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  color: var(--text);
}
.primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1c1508; font-weight: 800; }
.primary:disabled { opacity: 0.45; cursor: not-allowed; }
.secondary { background: var(--panel-2); border-color: var(--line); }
.ghost { background: transparent; border-color: var(--line); color: var(--muted); }

.slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.slider input { width: 100%; accent-color: var(--gold); }
.slider output { color: var(--text); font-variant-numeric: tabular-nums; }
.status { grid-column: 1 / -1; margin: 0; color: var(--soft); font-size: 0.88rem; }

.result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.after canvas { box-shadow: 0 0 0 1px rgba(215, 170, 85, 0.55), 0 18px 46px rgba(215, 170, 85, 0.12); }
.result-actions { margin-top: 1rem; }

.section,
.section-tight {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.section-tight { padding-top: clamp(2rem, 4vw, 3rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.section-title { max-width: 780px; margin-bottom: 1.4rem; }
.section-title.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-title h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.06;
}
.section-title p:last-child { color: var(--muted); line-height: 1.7; }

.science-grid { grid-template-columns: 1.25fr 0.75fr; }
.formula { margin: 0.5rem 0 1rem; color: var(--gold); font-family: "JetBrains Mono", Consolas, monospace; font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.4; }
.formula-card p, .why-card p, .price-card p, .steps-grid p, .checks li { color: var(--muted); line-height: 1.7; }

.compare-card {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.compare-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}

.compare-frame canvas {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.compare-line {
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 1px;
  background: var(--gold);
}

.compare-line span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1c1508;
  font-weight: 900;
}

.compare-tags {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.8rem;
}

.compare-tags span,
.stats-grid article {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.22);
}

.compare-tags span {
  padding: 0.35rem 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(760px, 100%);
  margin: 1.1rem auto 0;
}

.stats-grid article {
  padding: 1rem;
  text-align: center;
}

.stats-grid strong {
  display: block;
  color: var(--gold);
  font-size: 1.35rem;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps-grid article { padding: 1.1rem; }
.steps-grid span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: rgba(215, 170, 85, 0.14);
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 1rem;
}
.steps-grid h3 { margin-bottom: 0.45rem; }

.case-filters { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1rem; }
.case-filters button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 0 0.8rem;
}
.case-filters button.active { border-color: rgba(215, 170, 85, 0.7); background: rgba(215, 170, 85, 0.12); color: var(--text); }
.case-filters small {
  display: inline-grid;
  place-items: center;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 0.3rem;
  background: rgba(0, 0, 0, 0.24);
  color: var(--gold);
  font-size: 0.72rem;
}

.case-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case-card {
  padding: 0;
  color: inherit;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.case-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.case-card.active { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(215, 170, 85, 0.35); }
.case-card img, .case-card canvas { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel-2); }
.case-card div { padding: 0.85rem; }
.case-badge {
  display: inline-flex;
  margin-bottom: 0.5rem;
  border-radius: 0.28rem;
  background: rgba(215, 170, 85, 0.14);
  color: var(--gold);
  padding: 0.15rem 0.38rem;
  font-size: 0.66rem;
  font-weight: 800;
}
.case-card strong { display: block; margin-bottom: 0.25rem; }
.case-card small { color: var(--muted); }

.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card strong { display: block; margin: 1rem 0; color: var(--text); font-size: 2rem; line-height: 1; }
.price-card.featured { border-color: rgba(215, 170, 85, 0.75); background: linear-gradient(135deg, rgba(215, 170, 85, 0.13), rgba(255, 255, 255, 0.04)); }

.checks ul { display: grid; gap: 0.65rem; padding-left: 1.1rem; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font-size: 0.85rem;
}

@media (max-width: 920px) {
  .upload-grid, .controls, .result-grid, .science-grid, .steps-grid, .case-grid, .pricing-grid, .stats-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { flex-wrap: wrap; }
  .compare-frame { grid-template-columns: 1fr; }
  .compare-line { display: none; }
}

@media (max-width: 560px) {
  .preview-pair, .metric-grid { grid-template-columns: 1fr; }
  .slider { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}
