/* ==========================================================================
   Domain Zero — main stylesheet
   Mobile-first: base styles target phones; media queries scale up.
   Shared by every page. Add page-specific rules at the bottom.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* color */
  --bg: #14181b;
  --bg-deep: #0f1214;
  --surface: #1a1f23;
  --text: #e8eaec;
  --text-soft: #d4d8db;
  --muted: #9aa1a6;
  --faint: #6c7378;
  --accent: #94ab7f;
  --accent-hover: #a6bd91;
  --accent-ink: #1b211a;
  --border: #4f565c;
  --error: #d98b7a;

  /* type */
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-lede: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  --fs-h1: clamp(2rem, 1.1rem + 4.2vw, 3.6rem);
  --fs-h2: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);

  /* spacing & layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --content: 40rem;     /* readable text width */
  --wide: 72rem;        /* page max width */
  --radius: 2px;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
input, button { font: inherit; }

/* subtle film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main { flex: 1; }

/* ---------- 4. Site header ---------- */
.site-header {
  padding-block: clamp(1.5rem, 4vw, 2.75rem);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-decoration: none;
  white-space: nowrap;
}
.logo b { font-weight: 700; }

/* nav: empty for now — add <a> links inside .site-nav when pages exist */
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-nav a {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* ---------- 5. Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 12rem);
  padding-block: clamp(2.5rem, 8vw, 6rem);
}
.hero__inner {
  width: 100%;
  max-width: var(--content);
}
.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.accent { color: var(--accent); }
.lede {
  margin-top: 1.25rem;
  font-size: var(--fs-lede);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 34em;
}

/* ---------- 6. Signup form ---------- */
.signup { margin-top: clamp(2rem, 5vw, 2.5rem); }
.signup__row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.signup input[type="email"] {
  width: 100%;
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;           /* 16px+ stops iOS zoom-on-focus */
  font-weight: 300;
  transition: border-color 0.2s;
}
.signup input[type="email"]::placeholder { color: #8a9196; }
.signup input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--accent);
}
.btn {
  height: 3.25rem;
  padding: 0 1.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.signup__note {
  margin-top: 0.85rem;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--muted);
}
.signup__note.is-ok { color: var(--accent); }
.signup__note.is-err { color: var(--error); }
.hp { position: absolute; left: -9999px; }

/* ---------- 7. Generic content (for future pages) ---------- */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.prose { max-width: var(--content); }
.prose h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.prose p + p { margin-top: 1em; }
.prose a { color: var(--accent); }

/* ---------- 8. Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  padding-block: 1.25rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ---------- 9. Breakpoints ---------- */
/* ≥ 600px: email + button side by side */
@media (min-width: 600px) {
  .signup__row { flex-direction: row; gap: 0.5rem; }
  .signup input[type="email"] { flex: 1; }
}

/* ≥ 1024px: offset hero to match the desktop design */
@media (min-width: 1024px) {
  .hero__inner { margin-left: clamp(0rem, 14vw, 11rem); }
}

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