/* ─────────────────────────────────────────────────────────────────────────────
   weyoga™ Discovery Layer — Shared Stylesheet
   Designer v3 FINAL · 2026-05-19
   Token authority: docs/design/2026-05-19-discovery-design-system-v3-FINAL.md
   Component sources:
     - docs/design/2026-05-19-discovery-layer/discover-homepage-v3-FINAL.html
     - docs/design/2026-05-19-discovery-layer/route-page-how-to-stop-overreacting-v3-FINAL.html
   All values ported verbatim from Designer v3 ratified artifacts.
   ───────────────────────────────────────────────────────────────────────────── */


/* ── §1 Root tokens ────────────────────────────────────────────────────────── */

:root {
  /* Color — 7 tokens + rule-soft */
  --paper:        rgb(249, 247, 242);
  --paper-deep:   rgb(244, 241, 234);
  --paper-edge:   rgb(238, 234, 224);
  --ink:          rgb(12, 13, 10);
  --ink-dim:      rgb(86, 84, 78);
  --ink-soft:     rgb(140, 137, 128);
  --rule:         rgb(28, 28, 24);
  --rule-soft:    rgba(28, 28, 24, 0.12);

  /* Spacing — Fibonacci-derived, 8px → 168px */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  40px;
  --space-5:  64px;
  --space-6:  104px;
  --space-7:  168px;

  /* Motion */
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:  240ms;
  --dur-mid:   480ms;
  --dur-slow:  720ms;
}


/* ── §2 Base reset ─────────────────────────────────────────────────────────── */

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

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-feature-settings: 'kern', 'liga', 'onum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


/* ── §3 Type classes ───────────────────────────────────────────────────────── */

/* Homepage hero — Zone 1 /discover only */
.type-display {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

/* Section heads + Zone 3 recovery-rate thesis */
.type-head {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* Body prose — route pages and homepage body lines */
.type-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.4vw, 1.1875rem);
  line-height: 1.7;
}

/* Microtype — Inter, uppercase, tracked; used for eyebrows, meta, index numbers */
.type-meta {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

/* Cluster index numbers — tabular-nums variant of microtype */
.type-index {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* Recognition rows — em-dash italic, route pages §3 */
.type-recognition {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
}


/* ── §4 Link primitives ────────────────────────────────────────────────────── */

.link-quiet {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 480ms var(--ease);
  padding-bottom: 0.18em;
}
.link-quiet:hover { background-size: 100% 1px; }

.link-cta {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.18em;
}

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}


/* ── §5 Component primitives (13) ──────────────────────────────────────────── */

/* 1. header-minimal
   Sticky bar, wordmark left, two-link nav right, 1px bottom rule.
   Layout handled in HTML; no dedicated class — rule applied as border-bottom. */

/* 2. hero-line
   .type-display applied directly to <h1> in Zone 1. */

/* 3. route-cluster-row — clickable row with hover paper-deep tint */
.route-row {
  transition: background-color 320ms var(--ease);
}
.route-row:hover {
  background-color: var(--paper-deep);
}

/* 4. transition-note
   Two-sentence editorial bridge. .prose-column + .type-body applied in HTML. */

/* 5. cta-quiet
   Extends .link-cta. .type-meta class applied alongside in HTML. */

/* 6. signature-footer
   Three meta lines, middle-dot separators. .type-meta applied in HTML. */

/* 7. article-hook — route page §1 display-weight opening sentence */
.article-hook {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* 8. recognition-row — em-dash italic row with rule-soft separators */
.recognition-row {
  border-top: 1px solid var(--rule-soft);
  padding-top: 1.75rem;
}
.recognition-row:last-child {
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 1.75rem;
}
.recognition-row .em {
  color: var(--ink-dim);
  margin-right: 0.5em;
}

/* 9. prose-column — 60ch body serif column */
.prose-column { max-width: 60ch; }
.prose-column p + p { margin-top: 1.4em; }

/* 10. interrupt-card — paper-deep background, 1px rule border, no radius */
.interrupt-card {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* 11. meta-strip
   Editorial sig + read time + date. .type-meta applied directly in HTML. */

/* 12. operational-block — em-dash eyebrow + observation body, hairlines top/bottom */
.operational-block {
  max-width: 60ch;
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.operational-block:last-of-type {
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 1024px) {
  .operational-block {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}
.operational-block p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.4vw, 1.1875rem);
  line-height: 1.7;
  color: var(--ink);
}

/* 13. block-eyebrow — microtype Inter, uppercase, tracked, em-dash prefix */
.block-eyebrow {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin-bottom: 1.5rem;
  display: block;
}


/* ── §6 Video slot ─────────────────────────────────────────────────────────── */

.video-slot {
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 9;
  background: var(--paper-deep);
  position: relative;
  overflow: hidden;
}
.video-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, transparent 49.5%, var(--rule) 49.5%, var(--rule) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, var(--rule) 49.5%, var(--rule) 50.5%, transparent 50.5%);
  background-size: 100% 100%;
  opacity: 0.18;
  pointer-events: none;
}


/* ── §7 Scroll-reveal ──────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .link-quiet { transition: none; }
}
