/**
 * pitch-tokens.css — extracted verbatim from /pitch (reference/pitch-index.html).
 *
 * Every Toto landing variant inherits this file so the pitch deck IS the
 * design landmark. Tokens, type system, slide-header rhythm, cover-mark
 * trick, and slide-entry stagger all live here. Per Alex: pitch-faithful
 * is the bar.
 *
 * Variant pages should also <link> the Google Fonts stylesheet for
 * Bricolage Grotesque + Karla + JetBrains Mono.
 */

:root {
  --purple: #7C5CFF;
  --purple-soft: rgba(124, 92, 255, 0.12);
  --orange: #cc785c;
  --orange-soft: rgba(204, 120, 92, 0.14);
  --cream: #F5F0E8;
  --cream-deeper: #EDE5D6;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --muted: #8a8175;
  --line: #d9d2c2;
  --dark: #0F0F12;
  --dark-soft: #1c1c20;
  --offwhite: #EFEBE3;
  --green-good: #4a7c59;
  --display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --body: 'Karla', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Aliases the toto-fx Dotgrid plugin reads via getComputedStyle */
  --accent: #7C5CFF;
  --ink-muted: #8a8175;

  /* Overlay timing tokens — shared by drawer + agent panel */
  --overlay-enter-dur: 360ms;
  --overlay-exit-dur: 240ms;
  --overlay-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --overlay-enter-dur: 0.01ms;
    --overlay-exit-dur: 0.01ms;
  }
}

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

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

/* Type system ------------------------------------------------------- */
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.7vw, 1.5rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

p {
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.2vw, 1.18rem);
  line-height: 1.5;
  max-width: 64ch;
  color: var(--ink-soft);
}

p.lede {
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 500;
}

strong { color: var(--ink); font-weight: 600; }
em { color: var(--ink-soft); font-style: italic; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--ink); }

.purple { color: var(--purple); }
.orange { color: var(--orange); }
.muted  { color: var(--muted); }

/* Eyebrow + page number HUD ---------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 1.4rem;
  display: block;
}

.pagenum {
  position: absolute;
  bottom: 4vh;
  right: 8vw;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Slide chrome ------------------------------------------------------ */
.slide {
  position: relative;
  background: transparent;
  width: 100vw;
  min-height: 100vh;
  padding: 6vh 8vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.slide.dark {
  background: var(--dark);
  color: var(--offwhite);
}

.slide.dark .eyebrow,
.slide.dark .pagenum { color: var(--muted); }

.slide.dark h1, .slide.dark h2 { color: var(--offwhite); }
.slide.dark p { color: rgba(239, 235, 227, 0.78); }
.slide.dark p.lede { color: var(--offwhite); }
.slide.dark strong { color: var(--offwhite); }

.slide-header { margin-bottom: 2.5vh; }

/* Cover -------------------------------------------------------------- */
.cover {
  justify-content: center;
  align-items: flex-start;
  background: var(--cream);
}

.slide.dark.cover {
  background: var(--dark);
}

.cover-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(8rem, 22vw, 22rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: 2vh;
}

.slide.dark .cover-mark { color: var(--offwhite); }

.cover-mark span { color: var(--purple); }

.cover-tag {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  line-height: 1.2;
  max-width: 28ch;
  color: var(--ink-soft);
  margin-bottom: 4vh;
}

.slide.dark .cover-tag { color: rgba(239, 235, 227, 0.78); }

.cover-meta {
  position: absolute;
  bottom: 6vh;
  left: 8vw;
  right: 8vw;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.slide.dark .cover-meta {
  border-top-color: rgba(239, 235, 227, 0.15);
}

.cover-dot {
  position: absolute;
  top: 12vh;
  right: 8vw;
  width: 14px;
  height: 14px;
  background: var(--purple);
  border-radius: 50%;
}

/* CTA stack — pitch-restrained, no big buttons -------------------- */
.cta-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.4vh;
}

.cta-primary {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--purple);
  padding-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 200ms ease, gap 200ms ease;
}

.cta-primary:hover {
  color: var(--purple);
  gap: 0.7rem;
}

.cta-primary .arrow {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--purple);
}

.cta-secondary {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.25rem;
  transition: color 200ms ease, border-color 200ms ease;
}

.cta-secondary:hover {
  color: var(--ink);
  border-bottom-color: var(--line);
}

.slide.dark .cta-primary { color: var(--offwhite); }
.slide.dark .cta-primary:hover { color: var(--purple); }
.slide.dark .cta-secondary { color: rgba(239, 235, 227, 0.55); }
.slide.dark .cta-secondary:hover {
  color: var(--offwhite);
  border-bottom-color: rgba(239, 235, 227, 0.2);
}

/* Two-col cards (col-card pattern) ---------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  margin-top: 4vh;
  align-items: start;
}

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
}

.col-card {
  border-left: 3px solid var(--purple);
  padding-left: 1.6rem;
  padding-right: 1rem;
}

.col-card.orange-accent {
  border-left-color: var(--orange);
}

.col-card-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.col-card.orange-accent .col-card-eyebrow { color: var(--orange); }

.col-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
}

.col-card p {
  font-size: 1rem;
  line-height: 1.55;
}

.col-card .stat {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  color: var(--purple);
  margin-top: 1.2rem;
  display: block;
}

.col-card.orange-accent .stat { color: var(--orange); }

.stat-cap {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Purple→orange horizontal rule motif ------------------------------ */
.rule-purple-orange {
  height: 2px;
  border: 0;
  background: linear-gradient(to right, var(--line), var(--purple), var(--orange));
  margin: 3vh 0;
}

/* HUD pill (nav indicator + help) ---------------------------------- */
.hud {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 100;
  padding: 8px 14px;
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 99px;
  border: 1px solid var(--line);
}

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-dot.active {
  background: var(--purple);
  width: 18px;
  border-radius: 99px;
}

.hud-dot:hover { background: var(--ink-soft); }

.help {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  z-index: 100;
}

.help kbd {
  background: var(--cream-deeper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 10px;
  margin: 0 2px;
}

@media (max-height: 600px) {
  .hud, .help { display: none; }
}

/* Demo board (TotoFX cards) — pitch-tinted version --------------- */
.toto-demo-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  width: 100%;
  max-width: 560px;
}

.toto-demo-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: var(--cream-deeper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--body);
  transition: background 240ms ease, border-color 240ms ease,
              transform 320ms cubic-bezier(0.34, 1.4, 0.64, 1),
              opacity 320ms ease;
}

.toto-demo-card[data-status="in_progress"] {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-soft);
}

.toto-demo-card[data-status="done"] {
  opacity: 0.55;
  border-color: var(--line);
}

.toto-demo-card[data-status="done"] .toto-demo-title {
  text-decoration: line-through;
  color: var(--muted);
}

.toto-demo-left { display: flex; align-items: center; }

.toto-demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
  transition: background 240ms ease, box-shadow 240ms ease;
}

.toto-demo-card[data-status="in_progress"] .toto-demo-dot {
  background: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}

.toto-demo-card[data-status="done"] .toto-demo-dot {
  background: var(--orange);
}

.toto-demo-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.toto-demo-meta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 0.2rem;
}

.slide.dark .toto-demo-card {
  background: var(--dark-soft);
  border-color: rgba(239, 235, 227, 0.14);
}

.slide.dark .toto-demo-title { color: var(--offwhite); }

.slide.dark .toto-demo-card[data-status="in_progress"] {
  border-color: var(--purple);
}

/* ── FX: Slide-entry element stagger ─────────────── */
/* Direct children of each slide fade up + stagger when the slide
   gets .is-active (added by IntersectionObserver). */
.slide > *:not(.pagenum):not(.cover-meta):not(.cover-dot) {
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}

.slide:not(.is-active) > *:not(.pagenum):not(.cover-meta):not(.cover-dot) {
  opacity: 0;
  transform: translateY(20px);
}

.slide.is-active > *:not(.pagenum):not(.cover-meta):not(.cover-dot) {
  opacity: 1;
  transform: translateY(0);
}

.slide.is-active > *:nth-child(1) { transition-delay:  60ms; }
.slide.is-active > *:nth-child(2) { transition-delay: 150ms; }
.slide.is-active > *:nth-child(3) { transition-delay: 240ms; }
.slide.is-active > *:nth-child(4) { transition-delay: 330ms; }
.slide.is-active > *:nth-child(5) { transition-delay: 420ms; }
.slide.is-active > *:nth-child(6) { transition-delay: 510ms; }

/* Cover slide gets a slower, more cinematic entry */
.slide.cover > *:not(.pagenum):not(.cover-meta):not(.cover-dot) {
  transition-duration: 1100ms;
}
.slide.cover.is-active > *:nth-child(1) { transition-delay: 120ms; }
.slide.cover.is-active > *:nth-child(2) { transition-delay: 380ms; }
.slide.cover.is-active > *:nth-child(3) { transition-delay: 660ms; }
.slide.cover.is-active > *:nth-child(4) { transition-delay: 880ms; }

@media (prefers-reduced-motion: reduce) {
  .slide > *:not(.pagenum):not(.cover-meta):not(.cover-dot),
  .slide:not(.is-active) > *:not(.pagenum):not(.cover-meta):not(.cover-dot),
  .slide.is-active > *:not(.pagenum):not(.cover-meta):not(.cover-dot) {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
