/* The Blind Computer — Screen-Reader-First Stylesheet */

:root {
  --bg: #0a0a0a;
  --surface: #111214;
  --surface-accent: #14171d;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --link: #6eb5ff;
  --link-visited: #b4a7ff;
  --focus: #ffcc00;
  --border: #333;
  --input-bg: #1a1a1a;
  --success: #4ade80;
  --error: #f87171;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --surface: #f5f5f5;
    --surface-accent: #eef2f7;
    --text: #1a1a1a;
    --text-muted: #666;
    --link: #1a5fb4;
    --link-visited: #6a3d9a;
    --focus: #d97706;
    --border: #ccc;
    --input-bg: #fff;
    --success: #16a34a;
    --error: #dc2626;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 125%; /* 20px base */
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--focus);
  color: #000;
  padding: 0.5rem 1rem;
  font-weight: bold;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* Screen reader only */
.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;
}

/* Typography */
h1, h2, h3 {
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.4rem;
  margin-top: 0;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Links — always underlined */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Focus — visible, high contrast */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ── Layout: Full-width sections, constrained content ─────────────── */

header {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

header > * {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.site-name {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.site-name a {
  color: var(--text);
  text-decoration: none;
}

.site-name a:hover {
  text-decoration: underline;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

nav a[aria-current="page"] {
  font-weight: bold;
}

/* Main */
main {
  min-height: 60vh;
}

/* ── Section rhythm ───────────────────────────────────────────────── */

main > section,
main > article,
main > aside {
  padding: 4rem 1.5rem;
}

main > section > *,
main > article > *,
main > aside > * {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

/* Alternating backgrounds */
main > section:nth-child(even) {
  background: var(--surface);
}

main > section:nth-child(odd) {
  background: var(--bg);
}

/* Article prose stays narrower for readability */
main > article > * {
  max-width: 42rem;
}

/* ── Hero section ─────────────────────────────────────────────────── */

.hero {
  padding-top: 6rem;
  padding-bottom: 4rem;
  text-align: center;
  border-top: 2px solid var(--link);
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero .tagline {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ── Stat grid (dl) ───────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
}

.stat-grid dt {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--link);
  line-height: 1.2;
  border-left: 3px solid var(--link);
  padding-left: 1rem;
}

.stat-grid dd {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1rem;
  margin-left: 0;
  border-left: 3px solid transparent;
}

/* ── Capability cards (features page) ─────────────────────────────── */

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 56rem;
  margin: 2rem auto 0;
}

.capability {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 0.25rem;
}

.capability h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.capability p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── CTA / form sections ──────────────────────────────────────────── */

.cta {
  background: var(--surface-accent);
}

/* ── Forms ─────────────────────────────────────────────────────────── */

.waitlist-form {
  margin: 1.5rem 0;
}

.waitlist-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.35rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.waitlist-form input[type="email"] {
  flex: 1 1 16rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: 0.35rem;
  min-width: 0;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.waitlist-form button {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: bold;
  color: #000;
  background: var(--focus);
  border: 2px solid var(--focus);
  border-radius: 0.35rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.15s, border-color 0.15s;
}

.waitlist-form button:hover {
  background: #e6b800;
  border-color: #e6b800;
}

#form-status {
  margin-top: 0.75rem;
  font-weight: bold;
}

#form-status.success {
  color: var(--success);
}

#form-status.error {
  color: var(--error);
}

/* ── Footer ───────────────────────────────────────────────────────── */

footer {
  background: var(--surface);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer p {
  margin-bottom: 0.5rem;
}

/* ── Lists ─────────────────────────────────────────────────────────── */

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.35rem;
}

/* ── Article styling ──────────────────────────────────────────────── */

article {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem auto;
  max-width: 42rem;
}

article .byline {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Article aside CTA */
main > aside {
  background: var(--surface-accent);
  text-align: center;
}

main > aside p {
  margin-bottom: 0;
}

/* ── 404 centered ─────────────────────────────────────────────────── */

.not-found {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.not-found ul {
  list-style: none;
  padding-left: 0;
  text-align: left;
  display: inline-block;
}

/* ── Reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

/* ── Mobile adjustments ───────────────────────────────────────────── */

@media (max-width: 48rem) {
  html {
    font-size: 112.5%; /* 18px on small screens */
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }

  main > section,
  main > article,
  main > aside {
    padding: 3rem 1rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  nav ul {
    flex-direction: column;
    gap: 0.35rem;
  }

  .form-row {
    flex-direction: column;
  }

  .waitlist-form input[type="email"] {
    width: 100%;
  }
}
