/* ════════════════════════════════════════
   Newsletter OS — Shared Styles
   ════════════════════════════════════════ */

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

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #1a1a24;
  --border: rgba(255,255,255,0.08);
  --text: #e8e6e3;
  --text-muted: #8a8780;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Skip link ────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--accent); color: #fff;
  padding: 0.5rem 1rem; font-family: var(--mono); font-size: 0.8rem;
  z-index: 200; border-radius: 0 0 6px 0;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: none; }

/* ── Navigation ───────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem;
  color: var(--accent-light); letter-spacing: -0.02em;
}
.nav-logo span { color: var(--text-muted); font-weight: 400; }

.nav-links {
  display: flex; gap: 2rem; align-items: center;
  flex-wrap: wrap; justify-content: flex-end;
}

.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  padding: 0.25rem; margin-left: auto;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

.nav-links a {
  font-size: 0.9rem; color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:active { color: var(--accent-light); }
.nav-links a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px;
}

.nav-cta {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
  padding: 0.5rem 1rem; border-radius: 6px;
  background: var(--accent); color: #fff;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--accent-light); transform: translateY(-1px); }
.nav-cta:active { transform: translateY(0) scale(0.97); }
.nav-cta:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 2px;
}

@media (max-width: 640px) {
  .nav { padding: 1rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
}

/* ── Section header (shared pattern) ──── */
.section {
  padding: 6rem 2rem; max-width: 1100px; margin: 0 auto;
}
.section-header {
  text-align: center; margin-bottom: 4rem;
}
.section-header p {
  font-family: var(--mono); font-size: 0.75rem; color: var(--accent-light);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.02em;
}
.section-header .sub {
  font-size: 1.1rem; color: var(--text-muted); margin-top: 0.75rem;
}

/* ── CTA section (shared pattern) ─────── */
.cta-section {
  text-align: center; padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent 0%, var(--accent-glow) 50%, transparent 100%);
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700;
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--text-muted); margin-bottom: 2rem;
  max-width: 500px; margin-left: auto; margin-right: auto;
}

/* ── Footer ───────────────────────────── */
.footer {
  padding: 3rem 2rem; text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
}
.footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.footer a:hover { color: var(--accent-light); }
.footer a:active { color: var(--accent); }
.footer a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; }

/* ── Scrollbar ────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Reduced motion ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
