/* Device Buyers theme, taken from devicebuyers.com: black ground, cyan accent
   (#7CF4FF) with black text on buttons, Metropolis for headings and buttons.
   The brand commits to a single dark look, so there is no light variant. */

@font-face {
  font-family: "Metropolis";
  src: url("/assets/fonts/metropolis-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: url("/assets/fonts/metropolis-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #0f1113;
  --field: #16191c;
  --text: #ffffff;
  --muted: #b3b9c2;
  --line: #2a2f35;
  --accent: #7cf4ff;
  --accent-ink: #000000;
  --accent-glow: rgba(124, 244, 255, 0.14);
  --danger: #ff8a80;
  --danger-soft: #2c1412;
  --radius: 12px;
  --display: "Metropolis", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 28rem at 50% -8rem, var(--accent-glow), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
}
.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding-inline: max(1rem, env(safe-area-inset-left));
  padding-block: 1.25rem 2rem;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.brand img {
  width: 88px;
  height: 88px;
  display: block;
  filter: drop-shadow(0 0 18px rgba(124, 244, 255, 0.25));
}

h1, h2, button, .display {
  font-family: var(--display);
}
h1 {
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.08;
  margin: 0 0 0.85rem;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h2 { font-size: 1.1rem; margin: 0 0 0.35rem; font-weight: 700; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }

.hero { text-align: center; margin-bottom: 1.75rem; }
.hero .accent { color: var(--accent); }
.lede { font-size: 1.08rem; color: var(--muted); margin: 0 auto; max-width: 30rem; }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.75rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  column-gap: 0.8rem;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-ink);
}
.steps strong { font-family: var(--display); font-weight: 700; }
.steps span { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.optin { box-shadow: 0 0 0 1px rgba(124, 244, 255, 0.08), 0 24px 48px -24px rgba(124, 244, 255, 0.18); }
.desktop-card { display: flex; gap: 1rem; align-items: center; }
.qr { flex: 0 0 auto; width: 7.5rem; background: #fff; border-radius: 8px; overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-large { width: min(16rem, 100%); margin: 1rem auto 1.25rem; }

label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
label:first-of-type { margin-top: 0; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
}
input::placeholder { color: #7d858f; }
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.9rem; margin: 0.35rem 0 0; }
.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 138, 128, 0.35);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
}
.form-status { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }
.cf-turnstile { margin-top: 1.25rem; min-height: 65px; }

button[type="submit"] {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 0.75rem 0.95rem;
  font-weight: 700;
  /* Scales so the uppercase label stays on one line on common phone widths. */
  font-size: clamp(0.85rem, 3.8vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(124, 244, 255, 0.55);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
button[type="submit"]:hover { box-shadow: 0 12px 28px -8px rgba(124, 244, 255, 0.7); }
button[type="submit"]:active { transform: translateY(1px); }
button[disabled] { opacity: 0.7; cursor: progress; }
.fine { color: var(--muted); font-size: 0.85rem; margin: 0.9rem 0 0; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}
.site-footer a { color: var(--muted); text-decoration-color: var(--line); }
.site-footer a:hover { color: var(--accent); }

.simple { text-align: center; }
.simple p { color: var(--muted); }

.admin-body .wrap { max-width: 56rem; }
.admin table { border-collapse: collapse; margin-bottom: 1rem; }
.admin th, .admin td { text-align: left; padding: 0.3rem 1rem 0.3rem 0; border-bottom: 1px solid var(--line); }
.checks { padding-left: 1.2rem; }
.checks .ok { color: var(--accent); }
.checks .bad { color: var(--danger); font-weight: 600; }

@media (max-width: 26rem) {
  .desktop-card { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  button[type="submit"] { transition: none; }
}
