:root {
  --bg: #2f3336;
  --bg-elev: #383c40;
  --line: #4a4e52;
  --text: #fdfdfd;
  --muted: #b5babd;
  --muted-dim: #8b9094;
  --accent: #fdfdfd;
  --radius: 14px;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* subtle scan-line texture, very low opacity */
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 4px
  );
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { border-radius: 8px; display: block; }
.brand-name { font-weight: 800; letter-spacing: 0.02em; font-size: 1.05rem; }
.nav-cta {
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: 999px;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.nav-cta:hover { transform: translateY(-1px); opacity: 0.9; }

/* ---------- Layout sections ---------- */
section { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Scanner frame ---------- */
.frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 64px 48px;
  margin: 40px auto 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.frame.compact { padding: 48px 40px; }

.corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 3px solid var(--text);
}
.corner.tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.corner.tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: var(--radius); }
.corner.bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: var(--radius); }
.corner.br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }

/* ---------- Hero ---------- */
.hero { padding-top: 8px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-dim);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  overflow-wrap: break-word;
}
.lede {
  max-width: 560px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

/* ---------- Signup form ---------- */
.signup {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.signup input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.signup input::placeholder { color: var(--muted-dim); }
.signup input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(253, 253, 253, 0.12);
}
.signup input.invalid {
  border-color: #e07a7a;
  box-shadow: 0 0 0 3px rgba(224, 122, 122, 0.15);
}
.signup button {
  white-space: nowrap;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.signup button:hover:not(:disabled) { transform: translateY(-1px); }
.signup button:disabled { opacity: 0.6; cursor: default; }

.signup-note {
  margin: 16px auto 0;
  font-size: 0.85rem;
  color: var(--muted-dim);
  min-height: 1.2em;
}
.signup-note.success { color: #8fe0a8; }
.signup-note.error { color: #e8a0a0; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 88px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.feature-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 18px;
  color: var(--text);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h2 { font-size: 1.15rem; margin: 0 0 8px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- How it works ---------- */
.how { margin-top: 96px; text-align: center; }
.how-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 1rem;
}
.steps h3 { margin: 4px 0 4px; font-size: 1.02rem; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- Closing CTA ---------- */
.cta { margin-top: 100px; scroll-margin-top: 80px; }
.cta h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 12px; font-weight: 800; }
.cta p { color: var(--muted); margin: 0 0 28px; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 90px auto 0;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; margin-top: 64px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .frame { padding: 48px 24px; }
  .signup { flex-direction: column; }
  .signup button { width: 100%; }
  .how, .cta { margin-top: 72px; }
}

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