:root {
  --ink: #ecf2f0;
  --muted: #8c9995;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(16, 21, 20, 0.78);
  --acid: #b9f85d;
  --acid-dark: #86c432;
  --background: #090c0b;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
  font: 400 15px/1.6 "DM Sans", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  opacity: 0.38;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.ambient { position: fixed; z-index: -2; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.ambient-one { width: 420px; height: 420px; top: -180px; right: 2%; background: rgba(147, 255, 72, .13); }
.ambient-two { width: 350px; height: 350px; bottom: -180px; left: -80px; background: rgba(42, 122, 97, .15); }

.nav, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.nav { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font: 700 20px "Space Grotesk", sans-serif; text-decoration: none; letter-spacing: -.04em; }
.brand-mark { width: 18px; height: 18px; display: inline-block; transform: rotate(45deg); border: 5px solid var(--acid); border-radius: 2px; box-shadow: 0 0 24px rgba(185,248,93,.25); }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); }

.hero { min-height: 610px; padding: 80px 0 100px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(50px, 10vw, 140px); }
.eyebrow { display: block; margin-bottom: 18px; color: var(--acid); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.hero h1 { max-width: 690px; font-size: clamp(58px, 7vw, 96px); line-height: .96; }
.hero h1 em { color: var(--acid); font-style: normal; }
.hero-copy > p { max-width: 560px; margin: 30px 0; color: var(--muted); font-size: 17px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 20px; color: #b9c1bf; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.feature-row span::before { content: "+"; margin-right: 7px; color: var(--acid); }

.upload-card { padding: 20px; background: linear-gradient(145deg, rgba(24,30,28,.92), rgba(12,16,15,.92)); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.35); backdrop-filter: blur(16px); }
.card-top { display: flex; justify-content: space-between; padding: 1px 2px 18px; font-weight: 600; }
.shortcut { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.drop-zone { min-height: 235px; padding: 35px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #3c4743; border-radius: 13px; background: rgba(255,255,255,.015); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--acid); background: rgba(185,248,93,.04); transform: translateY(-2px); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone strong { margin-top: 19px; font-size: 15px; }
.drop-zone small { margin-top: 4px; color: var(--muted); }
.upload-icon { position: relative; width: 48px; height: 48px; border: 1px solid #49534f; border-radius: 50%; }
.upload-icon::before { position: absolute; width: 12px; height: 12px; top: 14px; left: 17px; content: ""; border-top: 2px solid var(--acid); border-left: 2px solid var(--acid); transform: rotate(45deg); }
.upload-icon::after { position: absolute; width: 2px; height: 18px; top: 14px; left: 22px; content: ""; background: var(--acid); }
.file-name { max-width: 100%; margin-top: 12px; overflow: hidden; color: var(--acid); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.key-field { display: block; margin-top: 17px; }
.key-field span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.key-field input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: rgba(0,0,0,.25); font: inherit; transition: border-color .2s; }
.key-field input:focus { border-color: rgba(185,248,93,.6); }
.button { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 8px; font: 700 13px "DM Sans", sans-serif; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #11170d; background: var(--acid); }
.button.primary:hover { background: #cbff7f; }
.button.secondary { color: var(--ink); background: #202624; border: 1px solid var(--line); }
.upload-submit { width: 100%; margin-top: 14px; }
.upload-submit span { font-size: 18px; }
.upload-submit:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 0; margin: 10px 2px 0; color: #ff8585; font-size: 12px; text-align: center; }

.workflow { padding: 56px 0 90px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.workflow > div { min-height: 125px; padding: 5px 35px; border-right: 1px solid var(--line); }
.workflow > div:first-child { padding-left: 0; }
.workflow > div:last-child { border: 0; }
.step { color: var(--acid); font: 600 11px "Space Grotesk", sans-serif; letter-spacing: .1em; }
.workflow h2 { margin-top: 18px; font-size: 20px; }
.workflow p { max-width: 240px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.viewer { padding: 60px 0 100px; }
.viewer-heading { margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.viewer-heading .eyebrow { margin-bottom: 6px; }
.viewer-heading h1 { font-size: clamp(30px, 5vw, 48px); }
.actions { display: flex; gap: 10px; }
.image-stage { min-height: 300px; padding: 18px; display: grid; place-items: center; background-color: #111513; background-image: linear-gradient(45deg,#151a18 25%,transparent 25%),linear-gradient(-45deg,#151a18 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#151a18 75%),linear-gradient(-45deg,transparent 75%,#151a18 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; border: 1px solid var(--line); border-radius: 14px; }
.image-stage img { display: block; max-width: 100%; max-height: 72vh; border-radius: 5px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.image-meta { padding: 15px 3px; display: flex; gap: 24px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.empty-state { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h1 { font-size: clamp(42px, 7vw, 74px); }
.empty-state p { margin: 15px 0 25px; color: var(--muted); }

footer { padding: 24px 0 35px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #5f6966; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }

@media (max-width: 820px) {
  .nav, main, footer { width: min(100% - 30px, 620px); }
  .nav { height: 70px; }
  .status { display: none; }
  .hero { min-height: auto; padding: 60px 0 75px; grid-template-columns: 1fr; gap: 65px; }
  .hero h1 { font-size: clamp(51px, 15vw, 76px); }
  .hero-copy > p { font-size: 15px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow > div, .workflow > div:first-child { min-height: 0; padding: 25px 3px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow > div:last-child { border-bottom: 0; }
  .viewer { padding-top: 45px; }
  .viewer-heading { align-items: stretch; flex-direction: column; }
  .actions .button { flex: 1; }
  .image-stage { min-height: 180px; padding: 8px; }
  .image-meta { flex-wrap: wrap; gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
