/* Clause5 Shared CSS — Molten Trace Design System
 * Source of truth: landing/design-tokens.md
 * Covers: tokens, reset, base typography, layout, arc-line, sparks, keyframes,
 * accessibility (reduced-motion, touch targets), mobile, print.
 *
 * Pages link this BEFORE their page-specific <style> block.
 * Page-specific CSS (calculator forms, result cards) stays inline.
 * Component CSS (FAQ, related-links) loaded separately via /components/*.css.
 * This file also covers: tables, CTA buttons, field-notes, trust asides, snippets, footer.
 */

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-gutter: stable; }

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg: #08080A; --surface: #111115; --surface-deep: #0C0C10;
  --arc: #FFB627; --arc-hot: #FF8C00;
  --arc-glow: rgba(255,182,39,0.15); --arc-glow-strong: rgba(255,182,39,0.3);
  --arc-glow-subtle: rgba(255,182,39,0.10);
  --text: #F0EDE8; --text-muted: #9A9AA0; --text-dim: #6A6A72;
  --border: #2A2A2E; --border-subtle: #1A1A1E; --success: #34D399; --radius: 6px;
}

/* ── Base ────────────────────────────────────────────────────────────── */
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-weight: 400; line-height: 1.6; min-height: 100vh; min-height: 100dvh; overflow-x: clip; position: relative; }
body::before { content: ''; position: fixed; inset: 0; opacity: 0.03; 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; background-size: 256px; pointer-events: none; z-index: 1; }
body::after { content: ''; position: fixed; top: 30%; left: 50%; transform: translate(-50%,-50%); width: 900px; height: 600px; background: radial-gradient(ellipse, var(--arc-glow-subtle) 0%, transparent 70%); pointer-events: none; z-index: 0; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.page { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb { margin-top: 24px; font-size: 0.95rem; color: var(--text-dim); font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.04em; opacity: 0; animation: fadeIn 0.8s ease 0.1s forwards; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.breadcrumb a:hover { color: var(--arc); }
.breadcrumb span { color: var(--text-dim); margin: 0 6px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 48px 0 32px; opacity: 0; animation: slideUp 0.8s ease 0.15s forwards; }
.hero__label { font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--arc); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 16px; }
h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.8rem,4.5vw,2.6rem); line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero__sub { color: var(--text-muted); font-size: 1rem; line-height: 1.7; max-width: 580px; }

/* ── Arc Line + Sparks ───────────────────────────────────────────────── */
.arc-line { position: relative; height: 2px; margin: 32px 0; background: linear-gradient(90deg, transparent 0%, var(--arc) 30%, var(--arc-hot) 50%, var(--arc) 70%, transparent 100%); opacity: 0; animation: arcIgnite 1.2s ease 0.4s forwards; overflow: visible; }
.arc-line::before { content: ''; position: absolute; inset: -8px 0; background: linear-gradient(90deg, transparent 0%, var(--arc-glow) 30%, rgba(255,140,0,0.2) 50%, var(--arc-glow) 70%, transparent 100%); filter: blur(8px); animation: arcPulse 3s ease-in-out infinite; }
.arc-line::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 12px var(--arc), 0 0 24px var(--arc-hot), 0 0 48px var(--arc-glow-strong); animation: arcCenter 3s ease-in-out infinite; }
.sparks { position: absolute; left: 50%; top: 0; width: 200px; transform: translateX(-50%); pointer-events: none; }
.spark { position: absolute; width: 2px; height: 2px; background: var(--arc); border-radius: 50%; opacity: 0; animation: sparkFloat var(--duration) ease-out var(--delay) infinite; }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding: 48px 0; opacity: 0; transition: opacity 0.5s ease; }
.section.visible { opacity: 1; }
.section + .section { border-top: 1px solid var(--border-subtle); }
.section__label { font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--arc); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 20px; }

/* ── Typography ──────────────────────────────────────────────────────── */
h2 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em; margin-bottom: 20px; }
p { color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }
a { color: var(--arc); text-decoration: none; }
a:hover { color: var(--arc-hot); }

/* ── Trust Line ──────────────────────────────────────────────────────── */
.trust-line { text-align: center; font-size: 0.75rem; color: var(--text-dim); font-family: 'IBM Plex Mono', monospace; padding: 24px 0 8px; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 20px 0 24px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare-table th { text-align: left; padding: 10px 12px; background: var(--surface); color: var(--arc); font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); }
.compare-table a { color: var(--arc); text-decoration: none; }
.compare-table a:hover { color: var(--arc-hot); }

/* ── CTA Buttons ─────────────────────────────────────────────────────── */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0; }
.cta-btn { display: inline-block; padding: 12px 24px; background: var(--arc); color: #08080A; border-radius: var(--radius); font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--arc-glow); }

/* ── Field Notes ─────────────────────────────────────────────────────── */
.field-note { margin: 24px 0; padding: 16px 20px; border-left: 3px solid var(--arc); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.field-note p { margin-bottom: 0; font-size: 1rem; }

/* ── Snippet ─────────────────────────────────────────────────────────── */
.snippet { color: var(--text); font-size: 1.05rem; line-height: 1.7; margin-bottom: 20px; }

/* ── Trust Aside ─────────────────────────────────────────────────────── */
aside.trust { margin: 40px 0 0; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius); text-align: center; }
aside.trust p { font-size: 0.75rem; color: var(--text-dim); font-family: 'IBM Plex Mono', monospace; margin: 0; }
aside.trust p + p { margin-top: 6px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
footer { padding: 24px 24px 40px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; color: var(--text-dim); flex-wrap: wrap; gap: 12px; max-width: 760px; margin: 0 auto; }
footer a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
footer a:hover { color: var(--arc); }

/* ── Keyframes ───────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sparkFloat { 0% { opacity: 0.9; transform: translate(var(--x), 0) scale(1); } 100% { opacity: 0; transform: translate(calc(var(--x) + var(--drift)), -60px) scale(0); } }
@keyframes arcIgnite { 0% { opacity: 0; transform: scaleX(0); } 60% { opacity: 1; transform: scaleX(1.02); } 100% { opacity: 1; transform: scaleX(1); } }
@keyframes arcPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes arcCenter { 0%, 100% { box-shadow: 0 0 12px var(--arc), 0 0 24px var(--arc-hot), 0 0 48px var(--arc-glow-strong); } 50% { box-shadow: 0 0 16px var(--arc), 0 0 32px var(--arc-hot), 0 0 64px rgba(255,182,39,0.4); } }

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page { padding-inline: 1.25rem; }
  .cta-row { flex-direction: column; }
}

/* ── Accessibility ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  nav, .breadcrumb, .hero, .arc-line, .section { opacity: 1 !important; transform: none !important; }
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  body::before, body::after { display: none !important; }
  body { background: #fff; color: #000; }
  .page { max-width: 100%; }
}
