/* CivilQuants placeholder — v3 charcoal palette, IBM Plex.
   Single page. Brand canon: charcoal background, orange accent (#F08A1E),
   IBM Plex Sans / Mono / Serif. Compositor-friendly animation only. */

:root {
  --ink-900: #000000;
  --ink-800: #0A0A0A;
  --charcoal-825: #1A1A1A;
  --charcoal-750: #2A2A2A;
  --charcoal-600: #4A4A4A;
  --paper-100: #F5F5F0;
  --text-primary: rgba(245, 245, 240, 0.95);
  --text-secondary: rgba(245, 245, 240, 0.62);
  --text-muted: rgba(245, 245, 240, 0.42);
  --rule: rgba(245, 245, 240, 0.12);
  --orange-500: #F08A1E;
  --orange-600: #D67719;

  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif: 'IBM Plex Serif', Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 7rem;

  --max-content: 56rem;

  --radius-sm: 4px;
  --radius-md: 6px;

  --duration-fast: 150ms;
  --duration-base: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--ink-800);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;   /* iOS Safari dynamic viewport */
  display: flex;
  flex-direction: column;
}

img, video {
  max-width: 100%;
  height: auto;
}

.shell {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  flex: 1 0 auto;
}

/* ── CE banner video ─────────────────────────────────────────── */

.banner {
  width: 100%;
  margin: var(--space-md) 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--charcoal-825);
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.banner-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .banner-video { animation-play-state: paused; }
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  padding-top: var(--space-md);
}

.lockup {
  width: clamp(220px, 36vw, 380px);
  height: auto;
  max-width: 100%;
  display: block;
}

.tagline {
  margin: 0;
  max-width: 36rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: 0.005em;
}

.tagline .standards {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85em;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.launch {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-500);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.launch .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-500);
  box-shadow: 0 0 0 0 rgba(240, 138, 30, 0.6);
  animation: pulse 2.6s var(--ease-out) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(240, 138, 30, 0.55); }
  60%  { box-shadow: 0 0 0 10px rgba(240, 138, 30, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 138, 30, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .launch .dot { animation: none; }
}

/* ── Signup ─────────────────────────────────────────────────── */

.signup {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

.signup-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

#email {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--charcoal-825);
  color: var(--text-primary);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

#email::placeholder {
  color: var(--text-muted);
}

#email:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(240, 138, 30, 0.18);
}

#signup-button {
  flex: 0 0 auto;
  background: var(--orange-500);
  color: var(--ink-900);
  border: 1px solid var(--orange-500);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

#signup-button:hover:not(:disabled) {
  background: var(--orange-600);
  border-color: var(--orange-600);
}

#signup-button:active:not(:disabled) {
  transform: translateY(1px);
}

#signup-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.consent {
  margin: 0.6rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.consent a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}

.consent a:hover { color: var(--orange-500); text-decoration-color: var(--orange-500); }

.signup-error {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: #ff6b6b;
  text-align: center;
}

.signup-success {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--orange-500);
  padding: 1rem 0;
  letter-spacing: 0.01em;
}

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

.footer {
  margin-top: auto;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-top: 1px solid var(--rule);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.legal-line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.legal-line .dot-sep {
  margin: 0 0.4rem;
  color: var(--charcoal-600);
}

.legal-links {
  margin: 0;
  font-size: 0.8125rem;
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-links a:hover { color: var(--orange-500); }

/* ── Accessibility ──────────────────────────────────────────── */

.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;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .shell {
    padding: var(--space-sm) var(--space-sm) var(--space-lg);
    gap: var(--space-lg);
  }
  .banner {
    margin-top: 0;
    border-radius: var(--radius-sm);
    max-height: 50vh;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  }
  .hero {
    padding-top: 0;
    gap: var(--space-md);
  }
  .lockup {
    width: clamp(180px, 60vw, 280px);
  }
  .tagline {
    font-size: clamp(1.125rem, 4.5vw, 1.375rem);
    max-width: 100%;
    padding: 0 var(--space-xs);
  }
  .tagline .standards {
    font-size: 0.75em;
  }
  .launch {
    font-size: 0.8125rem;
  }
  .signup {
    max-width: 100%;
  }
  .signup-row {
    flex-direction: column;
    gap: 0.6rem;
  }
  #signup-button {
    width: 100%;
    padding: 0.85rem 1rem;
  }
  #email {
    width: 100%;
    font-size: 16px;  /* iOS — anything <16px triggers zoom-on-focus */
  }
  .footer {
    padding: var(--space-sm);
  }
  .legal-line {
    font-size: 0.6875rem;
    line-height: 1.6;
  }
  .legal-line .dot-sep {
    margin: 0 0.3rem;
  }
}

@media (max-width: 380px) {
  /* Very narrow phones — collapse the legal line to stacked */
  .legal-line {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .legal-line .dot-sep {
    display: none;
  }
}

/* ── Privacy / Terms inner pages share these tokens ─────────── */

.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.prose h1 { font-family: var(--font-serif); font-size: 2rem; margin: 0 0 0.5rem; }
.prose h2 { font-family: var(--font-serif); font-size: 1.375rem; margin: 2rem 0 0.5rem; color: var(--text-primary); }
.prose h3 { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--orange-500); margin: 1.5rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; color: var(--text-secondary); }
.prose ul { color: var(--text-secondary); }
.prose a { color: var(--orange-500); text-decoration: underline; text-decoration-color: var(--orange-600); text-underline-offset: 2px; }
.prose .back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.prose .back:hover { color: var(--orange-500); }
.prose .meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
