/* One Long Impersonation -- Shared Design Tokens v2 */
/* Prosecution exhibit meets museum quality */
/* Full design system documented in docs/design.md */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&display=swap");

:root {
  /* Backgrounds */
  --ink:        #14142b;
  --ink-2:      #1d1d3a;
  --ink-3:      #262648;
  --rule:       #2e2e55;

  /* Paper surfaces */
  --paper:      #f1ece1;
  --paper-2:    #e8e1d1;
  --paper-3:    #ddd3bd;
  --bone:       #f6f2ea;

  /* Text */
  --cream:      #efe8d6;
  --cream-2:    #d8cfb6;
  --mute:       #8a8aa3;
  --rule-paper: #c8bea3;

  /* Accents */
  --gold:       #d4a017;
  --gold-hot:   #e8b727;
  --gold-dim:   rgba(212,160,23,0.12);
  --blood:      #b03434;
  --blood-deep: #7a1f1f;
  --moss:       #5f7d56;

  /* Typography */
  --serif:   "Fraunces", Georgia, serif;
  --sans:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration:   0.3s;
  --duration-slow: 0.6s;
}

/* ------------------------------------------------
   TYPE SYSTEM
   ------------------------------------------------ */

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 30, "opsz" 144, "WONK" 0;
  letter-spacing: -0.02em;
  line-height: 0.96;
}

.display-wonk {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 60, "opsz" 144, "WONK" 1;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.serif {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 30, "opsz" 24;
}

.mono {
  font-family: var(--mono);
  font-feature-settings: "ss02", "ss03";
}

.smallcaps {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 11px;
}

/* ------------------------------------------------
   SECTION PRIMITIVES
   ------------------------------------------------ */

.section {
  position: relative;
  padding: 120px 0;
}

.section--paper {
  background: var(--ink-3);
  color: var(--cream);
  border-top: 1px solid var(--gold-dim);
}

.section--bone {
  background: #1a1a38;
  color: var(--cream);
  border-top: 1px solid var(--gold-dim);
}

.section--ink {
  background: var(--ink);
  color: var(--cream);
}

.section--ink2 {
  background: var(--ink-2);
  color: var(--cream);
}

/* Subtle gradient transitions between sections */
.section + .section--ink2,
.section--ink + .section--paper {
  background-image: linear-gradient(to bottom, rgba(20,20,43,0.3) 0%, transparent 120px);
}

.container        { max-width: 1240px; margin: 0 auto; padding: 0 56px; }
.container--wide  { max-width: 1480px; }
.container--narrow { max-width: 880px; }

/* ------------------------------------------------
   COMPONENT TOKENS
   ------------------------------------------------ */

/* Horizontal rule */
.rule {
  height: 1px;
  background: currentColor;
  opacity: 0.18;
  border: 0;
  margin: 0;
}
.rule--gold {
  background: var(--gold);
  opacity: 0.55;
  height: 2px;
}

/* Exhibit label -- above every visualization */
.exhibit-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.exhibit-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

/* Pull-quote / opening statement */
blockquote.statement {
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

/* Prosecution callout -- for key findings */
.callout {
  position: relative;
  padding: 28px 32px;
  background: rgba(212,160,23,0.04);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
}
.callout--blood {
  background: rgba(176,52,52,0.06);
  border-left-color: var(--blood);
}

/* Verdict stamp */
.stamp {
  display: inline-block;
  border: 2px solid var(--blood);
  color: var(--blood);
  padding: 6px 14px 4px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  font-size: 12px;
}

/* Cross-hatched accent pattern */
.hatch {
  background-image:
    repeating-linear-gradient(45deg,
      rgba(212,160,23,0.55) 0 1px,
      transparent 1px 6px);
}

/* Tabular numbers */
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------
   LINKS & INTERACTIONS
   ------------------------------------------------ */

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

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

/* Text links within prose */
.prose a,
p a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(212,160,23,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration) var(--ease-out);
}
.prose a:hover,
p a:hover {
  text-decoration-color: var(--gold);
}

/* Focus states (accessibility) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Button-style links */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 12px 32px;
  transition: all var(--duration) var(--ease-out);
  cursor: pointer;
}
.btn:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ------------------------------------------------
   GLOBAL DEFAULTS
   ------------------------------------------------ */

html {
  scroll-behavior: smooth;
}

html, body { margin: 0; padding: 0; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* Film grain texture overlay */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

::selection { background: var(--gold); color: var(--ink); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(212,160,23,0.25);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212,160,23,0.45);
}

/* ------------------------------------------------
   ANIMATION UTILITIES
   ------------------------------------------------ */

/* Fade in on scroll (add via JS) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* Subtle pulse for live indicators */
@keyframes pulse-gold {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .section { padding: 80px 0; }
}

@media (max-width: 375px) {
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  body { font-size: 15px; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-inner { animation: none !important; }
}
