/*
 * Wanderu Presentations — shared slide stylesheet
 *
 * Tokens trace to the Wanderu design system (wanderu/strategy → .docs/design/).
 * When this file diverges from the spec, the spec wins — update here, not there.
 *
 * Used by every deck under presentations/demos/<date>/index.html.
 * To start a new presentation: copy an existing demos/<date>/ folder, change
 * the slide content, and link this stylesheet via <link rel="stylesheet"
 * href="../../shared/slides.css">.
 */

/* ---------- Web fonts ---------- */
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 300;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Light.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: italic;
  font-weight: 300;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Light It.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 400;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Reg.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: italic;
  font-weight: 400;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Reg It.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 600;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Sbold.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: italic;
  font-weight: 600;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Sbold It.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 700;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Bold.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: italic;
  font-weight: 700;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Bold It.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 800;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Xbold.otf") format("opentype");
}
@font-face {
  font-family: "Proxima Nova";
  font-style: normal;
  font-weight: 900;
  src: url("../../.docs/knowledge/proxima-nova/Proxima Nova Black.otf") format("opentype");
}

/* ---------- Wanderu design tokens (subset) ---------- */
:root {
  /* Wanderblu — primary brand */
  --color-primary: #007380;          /* Wanderblu 700 */
  --color-primary-dark: #004C55;     /* Wanderblu 900 */
  --color-primary-darker: #003940;   /* Wanderblu 950 */
  --color-primary-hover: #00606B;    /* Wanderblu 800 */
  --color-primary-bright: #00AEC2;   /* Wanderblu 550 — accent bar */
  --color-primary-light: #B3ECF2;    /* Wanderblu 100 */
  --color-primary-pale: #CCF2F7;     /* Wanderblu 50 — callout bg */
  --color-primary-tint: #E6F9FB;     /* Wanderblu 25 */

  /* Watermelon — strong / error */
  --color-strong: #D13B3B;           /* Watermelon 700 */
  --color-error: #B72424;            /* Watermelon 750 */
  --color-error-light: #FFCECE;      /* Watermelon 100 */
  --color-error-tint: #FFEFEF;       /* Watermelon 25 */

  /* Chiku Green — success */
  --color-success: #476600;          /* Chiku Green 900 */
  --color-success-mid: #6E9E00;      /* Chiku Green 700 — callout accent line */
  --color-success-light: #DCEEB3;    /* Chiku Green 100 */
  --color-success-mascot: #8AC600;   /* Chiku Green 500 */

  /* Banana — warning */
  --color-warning: #937706;          /* Banana 800 */
  --color-warning-mid: #C19F06;      /* Banana 700 — callout accent line */
  --color-warning-light: #FAF2B2;    /* Banana 200 */

  /* Smoke — neutrals */
  --color-text-primary: #2E3033;     /* Smoke 950 */
  --color-text-secondary: #5F6368;   /* Smoke 800 */
  --color-text-muted: #BFC6CF;       /* Smoke 400 */
  --color-text-inverse: #FFFFFF;
  --color-text-link: #007380;        /* Wanderblu 700 */

  --color-surface: #FFFFFF;
  --color-surface-tint: #F7F8FA;     /* Smoke 25 */
  --color-surface-muted: #F2F2F5;    /* Smoke 50 */

  --color-border: #D9DEE5;           /* Smoke 200 */
  --color-border-light: #E5E8ED;     /* Smoke 100 */

  /* Typography */
  --font-family-base: "Proxima Nova", "Proxima Vara", Arial, Helvetica, sans-serif;

  /* Spacing — page scale (between sections) */
  --space-xs: 36px;
  --space-s: 60px;
  --space-m: 96px;
  --space-l: 120px;

  /* Spacing — component scale (within UI elements) */
  --space-c-xs: 4px;
  --space-c-s: 8px;
  --space-c-m: 12px;
  --space-c-l: 18px;
  --space-c-xl: 24px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-1: 0 3px 6px 2px rgba(46, 48, 51, 0.05);
  --shadow-3: 0 6px 10px 4px rgba(46, 48, 51, 0.1);

  /* Motion */
  --motion-fast: 100ms;
  --motion-normal: 150ms;

  /* Deck sizing — 16:9 */
  --deck-width: 1920px;
  --deck-height: 1080px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background: var(--color-surface-tint);
  height: 100%;
  overflow: hidden;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- Deck container ---------- */
.deck {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--color-surface-tint);
}

/* Each slide renders at 1920x1080 then scales to fit the viewport
   while preserving aspect ratio — via JS setting --scale. */
.slide {
  position: absolute;
  width: var(--deck-width);
  height: var(--deck-height);
  background: var(--color-surface);
  box-shadow: var(--shadow-3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 96px 120px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
  top: 50%;
  left: 50%;
  transition: opacity var(--motion-normal) ease-in-out;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Slide chrome (top accent + footer) ---------- */
.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--color-primary-bright);
}

.slide__footer {
  position: absolute;
  bottom: 36px;
  left: 120px;
  right: 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.slide__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

.slide__brand::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--color-success-mascot);
}

.slide__counter {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

/* ---------- Slide content ---------- */
.slide__eyebrow {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin: 0 0 24px;
}

.slide__title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin: 0 0 24px;
  text-wrap: balance;
}

.slide__subtitle {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xs);
  max-width: 1400px;
  text-wrap: balance;
}

.slide__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 30px;
  line-height: 1.45;
  color: var(--color-text-primary);
  max-width: 1500px;
  text-wrap: pretty;
}

.slide__body p {
  margin: 0;
}

.slide__body ul {
  margin: 0;
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.slide__body ul ul {
  margin-top: 10px;
  padding-left: 28px;
  font-size: 26px;
  color: var(--color-text-secondary);
  gap: 8px;
}

.slide__body li::marker {
  color: var(--color-primary);
  font-weight: 700;
}

.slide__body strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

.slide__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--color-surface-muted);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ---------- Title slide variant ---------- */
.slide--title {
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
  justify-content: center;
}

.slide--title::before {
  background: var(--color-success-mascot);
}

.slide--title .slide__eyebrow {
  color: var(--color-primary-light);
}

.slide--title .slide__title {
  color: var(--color-text-inverse);
  font-size: 88px;
  letter-spacing: -0.025em;
  text-align: center;
  position: absolute;
  top: 90px;
  left: 120px;
  right: 120px;
  margin: 0;
}

.slide--title .slide__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 36px;
}

.slide--title .slide__footer {
  color: rgba(255, 255, 255, 0.7);
}

.slide--title .slide__brand {
  color: var(--color-text-inverse);
}

.slide--title .slide__counter {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Section divider variant (chapter breaks) ---------- */
.slide--section {
  background: var(--color-surface);
  justify-content: center;
}

.slide--section .slide__title {
  font-size: 88px;
}

.slide--section .slide__eyebrow {
  align-self: flex-start;
  background: var(--color-primary-pale);
  color: var(--color-primary);
  padding: 10px 22px;
  border-radius: var(--radius-full);
}

/* ---------- Two-column layout ---------- */
.slide__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
  flex: 1;
  align-items: start;
}

.slide__column h3 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 16px;
}

/* ---------- Cards / callouts ---------- */
.callout {
  --callout-accent: var(--color-primary);
  --callout-bg: var(--color-primary-pale);
  background: var(--callout-bg);
  border-left: 6px solid var(--callout-accent);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-top: 32px;
  font-size: 26px;
  color: var(--color-text-primary);
  text-wrap: pretty;
}

.callout--warning {
  --callout-accent: var(--color-warning-mid);
  --callout-bg: var(--color-warning-light);
}

.callout--error {
  --callout-accent: var(--color-error);
  --callout-bg: var(--color-error-tint);
}

.callout--success {
  --callout-accent: var(--color-success-mid);
  --callout-bg: var(--color-success-light);
}

.callout__label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--callout-accent);
  margin-bottom: 8px;
}

/* ---------- Status chip row (Accept / Reject / Skip / etc.) ---------- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  font-size: 24px;
  line-height: 1.4;
}

.status__badge {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.status--accept {
  border-color: var(--color-success-light);
}
.status--accept .status__badge {
  background: var(--color-success-light);
  color: var(--color-success-mid);
}

.status--reject {
  border-color: var(--color-error-light);
}
.status--reject .status__badge {
  background: var(--color-error-light);
  color: var(--color-error);
}

.status--skip {
  border-color: var(--color-border);
}
.status--skip .status__badge {
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
}

.status--investigate {
  border-color: #FDED86; /* Banana 300 — keeps pill outline darker than callout bg */
}
.status--investigate .status__badge {
  background: #FDED86; /* Banana 300 */
  color: var(--color-warning-mid);
}

.status--group {
  border-color: var(--color-primary-pale);
}
.status--group .status__badge {
  background: var(--color-primary-pale);
  color: var(--color-primary);
}

/* Layout modifier — chip spans the full row of a 2-col status-grid */
.status--wide {
  grid-column: 1 / -1;
}

/* ---------- Corner accent image (mascot, lower-right) ---------- */
.slide__corner-image {
  position: absolute;
  bottom: 60px;
  right: 60px;
  max-height: 304px;
  max-width: 26%;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

/* Compact variant — ~32% smaller, same bottom-right anchor */
.slide__corner-image--sm {
  max-height: 256px;
  max-width: 22%;
}

/* ---------- Hero image (title slide) ---------- */
.slide__hero-image {
  display: block;
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 78%;
  max-height: 673px;
  height: auto;
  width: auto;
}

/* ---------- Inline video ---------- */
.slide__video {
  display: block;
  align-self: center;
  margin-top: auto;
  height: 540px;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-lg);
  background: #000;
}

/* ---------- Inline video row (multiple side-by-side) ---------- */
.slide__video-row {
  display: flex;
  gap: 24px;
  margin-top: auto;
  justify-content: center;
  align-items: flex-end;
}

.slide__video-row .slide__video {
  align-self: flex-end;
  margin-top: 0;
  height: auto;
  max-height: 720px;
  max-width: calc(50% - 12px);
}

/* ---------- Screenshot / embedded image ---------- */
.slide__screenshot {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* ---------- Code / front-matter block ---------- */
.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  line-height: 1.5;
  background: var(--color-primary-darker);
  color: var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-1);
}

.code-block .k {
  color: var(--color-success-mascot);
}

.code-block .n {
  color: var(--color-text-muted);
}

/* ---------- Labeled field list (template sections) ---------- */
.field-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 24px;
  line-height: 1.35;
}

.field-list strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.field-list span {
  color: var(--color-text-secondary);
}

/* ---------- Screenshot / image placeholder ---------- */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--color-surface-muted);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: 22px;
  padding: 48px;
  min-height: 240px;
  text-align: center;
}

.placeholder__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-border-light);
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  font-weight: 700;
}

/* Slim variant — for a caption-height screenshot slot under other content */
.placeholder--slim {
  flex-direction: row;
  min-height: 0;
  padding: 18px 28px;
  font-size: 20px;
}

/* ---------- Embedded screenshot ---------- */
.slide__shot {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.caption {
  margin: 14px 0 0;
  font-size: 20px;
  color: var(--color-text-secondary);
}

/* ---------- Tag / pill ---------- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag--planned {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.tag--placeholder {
  background: var(--color-surface-muted);
  color: var(--color-text-secondary);
}

/* ---------- On-screen nav arrows (subtle, bottom-right) ---------- */
.deck__navbar {
  position: fixed;
  bottom: 18px;
  right: 24px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.deck__nav {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color var(--motion-fast) ease;
}

.deck__nav:hover:not(:disabled) {
  color: var(--color-primary);
}

.deck__nav:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.deck__nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .deck__nav {
    transition: none;
  }
}

@media print {
  .deck__navbar {
    display: none !important;
  }
}

/* ---------- Help overlay (press ?) ---------- */
.help {
  position: fixed;
  inset: 0;
  background: rgba(46, 48, 51, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: var(--color-text-inverse);
}

.help.is-open {
  display: flex;
}

.help__panel {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  font-size: 18px;
  min-width: 360px;
}

.help__panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.help__panel dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}

.help__panel dt {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--color-surface-muted);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: none;
  }
}

/* ---------- Print (PDF export) ----------
   Renders one slide per page when printing. The JS does not need to do anything
   special — print stylesheet shows all slides stacked, each forcing a page break. */
@media print {
  html,
  body {
    overflow: visible;
    background: white;
  }

  .deck {
    position: static;
    display: block;
    background: white;
  }

  .slide {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 0;
    page-break-after: always;
    width: 100%;
    height: 100vh;
  }

  .slide__footer {
    color: var(--color-text-secondary);
  }

  .help {
    display: none !important;
  }
}
