/* ============================================================
   Write it Right — design tokens
   Source: brief/03-design-system.md
   ============================================================ */

:root {
  /* Navy */
  --navy-deep: #001C3F;
  --navy-mid: #003366;
  --navy-shadow: #00102A;
  --navy-overlay: rgba(0, 8, 20, 0.85);
  --navy-text-on-light: #001C3F;

  /* Gold */
  --gold-foil: #C9A961;
  --gold-light: #E0BC7A;
  --gold-bright: #F5D88A;
  --gold-thread-bg: rgba(201, 169, 97, 0.35);
  --gold-emboss: #856216; /* darkened from #8B6818 to clear WCAG AA (4.5:1) for small labels on cream */

  /* Paper */
  --paper-cream: #F5EFE0;
  --paper-warm: #FAF5E8;
  --cork: #D9C7A8;
  --ruled-blue: rgba(0, 28, 63, 0.08);
  --margin-red: rgba(196, 36, 36, 0.4);

  /* Risk / urgency */
  --urgent-red: #8B2818;
  --urgent-bg: rgba(252, 230, 220, 0.92);
  --pin-red: #C42424;
  --pin-navy-mid: #4A6B9C;
  --brown-ink: #6B4423;
  --warm-text: #1A1410;

  /* Typography — display + body match the journey intro (Fraunces / Inter);
     mono and hand stay: they are the case-file stamps and margin scribbles */
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --font-serif: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Homemade Apple", "Patrick Hand", cursive;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* Radius */
  --r-sharp: 2px;
  --r-soft: 4px;
  --r-card: 7px;

  /* Shadows */
  --sh-polaroid: 3px 5px 10px rgba(0, 28, 63, 0.35);
  --sh-polaroid-hover: 4px 8px 16px rgba(0, 28, 63, 0.4);
  --sh-modal: 0 30px 60px rgba(0, 0, 0, 0.7);
  --sh-emboss-on-cover: inset 0 0 80px rgba(0, 0, 0, 0.4);

  /* Motion */
  --ease-page: cubic-bezier(0.45, 0, 0.25, 1);
  --ease-stamp: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-reveal: cubic-bezier(0.7, 0, 0.3, 1);
  --ease-tab: ease-out;
  --d-fast: 150ms;
  --d-quick: 250ms;
  --d-medium: 400ms;
  --d-page: 600ms;
  --d-stamp: 500ms;
}

/* ---- base reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--paper-cream);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; }

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

/* shared eyebrow / headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 8px;
}
.section-title em { font-style: italic; }
.section-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  margin: 0;
  opacity: 0.9;
}

/* shared CTA button */
.cta-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 13px 24px;
  background: var(--navy-deep);
  color: var(--gold-foil);
  border: 1.5px solid var(--gold-foil);
  cursor: pointer;
  transition: transform var(--d-fast) ease, box-shadow var(--d-fast) ease, color var(--d-fast) ease;
}
.cta-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 18px rgba(201, 169, 97, 0.45);
  color: var(--gold-bright);
}
.cta-link {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--gold-emboss);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* gold pulse when a case file is fully revealed */
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(201, 169, 97, 0); }
  50% { box-shadow: 0 0 22px rgba(201, 169, 97, 0.65); }
}
.cta-btn.gold-pulsing { animation: gold-pulse 2s ease-in-out infinite; }

/* reveal-on-scroll helper */
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s var(--ease-page); }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .reveal-up { opacity: 1; transform: none; }
}
