/* ══════════════════════════════════════════════════════
   REGIME — Shared Design System
   Applies to all pages in the landing directory.
══════════════════════════════════════════════════════ */

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:       #0D0D0D;
  --text:     #F5F5F5;
  --red:      #DC2626;
  --red-dark: #B91C1C;
  --green:    #22C55E;
  --yellow:   #EAB308;
  --blue:     #3B82F6;
  --muted:    #6B7280;
  --muted-lt: #9CA3AF;
  --surface:  #1A1A1A;
  --surface2: #212121;
  --border:   #2A2A2A;
  --border2:  #383838;
}

/* ── BASE ───────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

@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;
  }
}

/* ── PROGRESS BAR ───────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--red);
  width: 0%;
  z-index: 3000;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ── ATMOSPHERIC OVERLAYS ───────────────────────────── */
@keyframes r-scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
.scanline {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(transparent, rgba(220,38,38,0.05), transparent);
  z-index: 1100;
  pointer-events: none;
  animation: r-scanline 12s linear infinite;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1099;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(13,13,13,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* Marketing page: navbar hides until scrolled */
.navbar[data-marketing] {
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.navbar[data-marketing].visible { transform: translateY(0); }

.navbar-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
}
.navbar-brand em { color: var(--red); font-style: normal; }
.navbar-brand:hover { text-decoration: none; }

.navbar-links {
  display: flex;
  gap: 20px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.navbar-links a { color: var(--muted); transition: color 0.2s; }
.navbar-links a:hover { color: var(--text); text-decoration: none; }
.navbar-links a.active { color: var(--text); }

.navbar-cta {
  background: var(--red);
  color: var(--text);
  border: 1px solid var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.navbar-cta:hover { background: var(--red-dark); border-color: var(--red-dark); text-decoration: none; color: var(--text); }

@media (max-width: 640px) { .navbar-links { display: none; } }

/* ── LAYOUT HELPERS ─────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-label {
  font-size: 10px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── SHARED KEYFRAMES ───────────────────────────────── */
@keyframes r-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes r-fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cursor {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--green);
  animation: r-blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 1px;
}

/* ── FORMS (shared across index + sub-pages) ────────── */
.form-label {
  font-size: 10px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.form-row {
  display: flex;
  max-width: 500px;
}
.form-row input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-row input::placeholder { color: var(--muted); }
.form-row input:focus { border-color: var(--red); }
.form-row button {
  background: var(--red);
  color: var(--text);
  border: 1px solid var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 14px 22px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.form-row button:hover { background: var(--red-dark); border-color: var(--red-dark); }
.form-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.form-msg {
  font-size: 11px;
  margin-top: 10px;
  min-height: 16px;
  letter-spacing: 0.5px;
}
.form-msg.ok  { color: var(--green); }
.form-msg.err { color: var(--red); }
.counter {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.counter strong { color: var(--red); font-weight: 700; }

@media (max-width: 480px) {
  .form-row { flex-direction: column; }
  .form-row input { border-right: 1px solid var(--border); border-bottom: none; }
  .form-row button { width: 100%; }
}

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  text-decoration: none;
  color: var(--text);
}
.footer-brand em { color: var(--red); font-style: normal; }
.footer-brand:hover { text-decoration: none; }
.footer-links {
  display: flex;
  gap: 20px;
  font-size: 11px;
}
.footer-links a { color: var(--muted); letter-spacing: 1px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy {
  width: 100%;
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
}

/* ── DOCUMENT PAGE LAYOUT ───────────────────────────── */
/* Used by privacy.html, terms.html, support.html */
.doc-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px 120px;
  font-size: 15px;
  line-height: 1.75;
}
.doc-prefix {
  color: var(--green);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.doc-content h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.doc-updated {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 48px;
  letter-spacing: 1px;
}
.doc-content h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 52px;
  margin-bottom: 16px;
  padding-top: 52px;
  border-top: 1px solid var(--border);
}
.doc-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 48px; }
.doc-content h3 {
  font-size: 14px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--muted-lt);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.doc-content p { margin-bottom: 16px; color: var(--text); }
.doc-content ul {
  margin-bottom: 16px;
  padding-left: 0;
  list-style: none;
}
.doc-content ul li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--muted-lt);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.doc-content ul li:first-child { border-top: 1px solid var(--border); }
.doc-content ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.doc-content ul li strong { color: var(--text); }
.doc-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--muted-lt);
  line-height: 1.8;
}
.doc-callout strong { color: var(--text); }
.doc-callout.green { border-left-color: var(--green); }
.doc-callout a { color: var(--red); }
