/* ═══════════════════════════════════════════════
   Opulse Landing Page — style.css
   Aligned with TMA design system
   ═══════════════════════════════════════════════ */

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

:root {
  /* Base surfaces */
  --bg-deep:           #0f1115;
  --bg-surface:        #1a1d24;
  --bg-elevated:       #1f2330;   /* palette reserve — no current usage site */
  /* Text */
  --text-primary:      #e4e4e7;
  --text-secondary:    #a8a8aa;
  --text-muted:        #6b7280;
  /* Brand accents (SSOT — canvas reads these via getComputedStyle; SVG stops via .ig-stop-* classes) */
  --accent-gold:       #d4af37;
  --accent-gold-dark:  #8e7326;
  --accent-gold-light: #f0c448;
  --accent-green:      #10b981;
  /* Semantic infographic */
  --ig-bad:            #ff7878;   /* rgb(255, 120, 120) — comparison "bad" cards */
  /* Radii / motion */
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --transition: 0.3s ease;
  /* NOTE: pure white/black structural overlays (rgba(255,255,255,*) hairlines,
     rgba(15,17,21,.9) nav bg) intentionally kept literal — not brand colors, no drift risk. */
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(rgb(from var(--accent-green) r g b / 0.12) 1px, transparent 1px);
  background-size: 30px 30px;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Centering: max-width + padding only, NO margin here ── */
body > * {
  max-width: 860px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.375rem 0.875rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--accent-gold);
  background: rgb(from var(--accent-gold) r g b / 0.1);
}

/* ── Language Pills ── */
.lang-pills {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.lang-pill {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  padding: 0.3125rem 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.lang-pill:hover {
  color: var(--accent-gold);
  border-color: rgb(from var(--accent-gold) r g b / 0.35);
}

.lang-pill.is-current {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  border-color: transparent;
  font-weight: 600;
}

/* ── H1 ── */
h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* use "auto" for left/right to keep centering from body > * */
  margin: 3rem auto 1.5rem;
  padding-top: 1rem;
}

/* ── H2 ── */
h2 {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 3rem auto 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgb(from var(--accent-gold) r g b / 0.2);
}

/* ── H3 ── */
h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin: 2rem auto 0.75rem;
}

/* ── Paragraphs ── */
p {
  color: var(--text-secondary);
  margin: 0 auto 1rem;
}

/* ── Lists ── */
ul, ol {
  padding-left: 0;
  padding-right: 0;
  list-style: none;
  margin: 0 auto 1.5rem;
}

ul li, ol li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  margin-bottom: 0.5rem;
  background: rgb(from var(--bg-surface) r g b / 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

ul li::before {
  content: '◆';
  position: absolute;
  left: 1rem;
  color: var(--accent-gold);
  font-size: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
}

ol { counter-reset: item; }
ol li { counter-increment: item; }
ol li::before {
  content: counter(item);
  position: absolute;
  left: 1rem;
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  top: 50%;
  transform: translateY(-50%);
}

ul li:hover, ol li:hover {
  border-color: rgb(from var(--accent-gold) r g b / 0.3);
  transform: translateX(3px);
}

ul li strong, ol li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.125rem;
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem auto;
  background: rgb(from var(--bg-surface) r g b / 0.7);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgb(from var(--accent-gold) r g b / 0.2);
  backdrop-filter: blur(10px);
}

thead tr {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
}

thead th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bg-deep);
  letter-spacing: 0.04em;
}

tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

tbody tr:hover { background: rgb(from var(--accent-gold) r g b / 0.05); }

tbody td {
  padding: 0.875rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ── Blockquote ── */
blockquote {
  margin: 1.25rem auto;
  padding: 1.25rem 1.5rem;
  background: rgb(from var(--accent-gold) r g b / 0.06);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 12px 12px 0;
  backdrop-filter: blur(10px);
}

blockquote p {
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-style: italic;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ── Emphasis ── */
em {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9375rem;
}

/* ── CTA Section ──
   ⚠️  Refactored from div:last-of-type to explicit .cta-block class.
   The positional selector silently restyled whichever <div> was last; adding
   hero/stats/infographic <div>s would have hijacked the Coming-Soon styling. */
.cta-block {
  margin: 4rem auto;
  padding: 2.5rem 2rem;
  background: rgb(from var(--bg-surface) r g b / 0.8);
  border: 1px solid rgb(from var(--accent-gold) r g b / 0.2);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  text-align: center;
  box-shadow: 0 0 40px rgb(from var(--accent-gold) r g b / 0.08);
}

.cta-block p {
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Reusable gold CTA button — used by .cta-block and .hero-cta */
.cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.875rem 2.5rem;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  letter-spacing: 0.03em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgb(from var(--accent-gold) r g b / 0.3);
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgb(from var(--accent-gold) r g b / 0.5);
}

/* ── Waitlist Form ── */
.waitlist-form { margin-top: 1.5rem; }
.waitlist-field {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.waitlist-input {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgb(from var(--accent-gold) r g b / 0.3);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.waitlist-input:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.1);
}
.waitlist-input::placeholder { color: var(--text-muted); }
.waitlist-btn { border: none; cursor: pointer; margin-top: 0; }
.waitlist-success {
  color: var(--accent-green);
  font-size: 1rem;
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ── Footer ── */
footer {
  margin: 4rem auto 2rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover { color: var(--accent-gold); }

/* ── Hero ──
   max-width:100% + width:100% override the global `body > *` 860px clamp so the
   canvas spans the full viewport; .hero-content re-applies the 860px reading width. */
.hero {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  width: 100%;
  padding: 3.5rem 1.5rem 2.5rem;
  margin: 0 auto;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.hero-tagline {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin: 0 auto 0.5rem;
  max-width: 640px;
}

/* ── Stats ── */
.stats {
  max-width: 860px;
  margin: 1.5rem auto 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.stat-card {
  background: rgb(from var(--bg-surface) r g b / 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-card:hover {
  border-color: rgb(from var(--accent-gold) r g b / 0.3);
  transform: translateY(-3px);
}

.stat-num {
  display: block;
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card.is-visible .stat-num { animation: statpop 0.5s ease both; }

.stat-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

@keyframes statpop {
  0%   { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

/* ── SVG Infographics ──
   SVG elements style themselves via presentation attributes (fill=/stroke=) or
   these classes — NEVER inline style="" (style-src 'self' would block it). */
.infographic {
  max-width: 860px;
  margin: 2rem auto;
}

.ig-svg {
  width: 100%;
  height: auto;
  display: block;
}

.ig-card {
  fill: rgb(from var(--bg-surface) r g b / 0.7);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.ig-card-bad { fill: rgba(40, 28, 28, 0.6); stroke: rgb(from var(--ig-bad) r g b / 0.18); }
.ig-card-good { fill: rgba(28, 36, 32, 0.6); stroke: rgb(from var(--accent-green) r g b / 0.25); }

.ig-text {
  fill: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.ig-text-strong { fill: var(--text-primary); font-weight: 600; }
.ig-text-dark { fill: var(--bg-deep); font-weight: 600; }
.ig-line { stroke: rgb(from var(--accent-gold) r g b / 0.4); stroke-width: 2; fill: none; }
.ig-arrow { fill: var(--accent-gold); }

/* SVG linearGradient stops — SSOT via :root tokens (CSP-safe: external sheet, no inline style) */
.ig-stop-dark  { stop-color: var(--accent-gold-dark); }
.ig-stop-mid   { stop-color: var(--accent-gold); }
.ig-stop-light { stop-color: var(--accent-gold-light); }

.infographic figcaption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body > * { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 1.625rem; }
  .nav-inner {
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    padding-top: 0.375rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    gap: 0.125rem;
  }
  .lang-pills { margin-left: auto; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Defense in depth — disable reveal animations for reduced-motion users
   (the JS particle engine has its own prefers-reduced-motion guard). */
@media (prefers-reduced-motion: reduce) {
  .stat-card.is-visible .stat-num { animation: none; }
  .stat-card,
  .cta,
  ul li, ol li { transition: none; }
}
