/* House London reveal.js theme - Blueprint.
   Built from the House London design system (tokens from site/themes/blueprint.css):
   cream content slides, bp-green schematic section slides with the 28px grid,
   Space Grotesk for structure, IBM Plex Mono for labels and data, square corners,
   hairline rules, the corner-tick card and the dashed annotation underline.

   Hue: set data-hue="green" (default), "blue" or "red" on <html>. Green uses the
   Blueprint source values exactly; blue and red use the site's own hue-rotation
   formula: green hsl(h,42%,16%), accent hsl(h,42%,38%), grid hsla(h,90%,72%,.35). */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bp-cream: #fffbea;
  --bp-ink: #1a2e28;
  --bp-green: #1b3a2e;
  --bp-accent: #2f6f52;
  --bp-grid-line: rgba(120, 200, 170, 0.35);
  --bp-cream-muted: rgba(255, 251, 234, 0.85);
  --bp-ink-muted: rgba(26, 46, 40, 0.75);
  --bp-rule: rgba(27, 58, 46, 0.15);
  --bp-rule-strong: rgba(27, 58, 46, 0.2);
  --bp-border: rgba(27, 58, 46, 0.25);
  --bp-code-bg: rgba(27, 58, 46, 0.08);
  --river-blue: #5170ff;
  --grid-pitch: 28px;
  --font-sans: "Space Grotesk", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}
:root[data-hue="blue"] {
  --bp-green: hsl(215, 42%, 16%);
  --bp-accent: hsl(215, 42%, 38%);
  --bp-grid-line: hsla(215, 90%, 72%, 0.35);
}
:root[data-hue="red"] {
  --bp-green: hsl(355, 42%, 16%);
  --bp-accent: hsl(355, 42%, 38%);
  --bp-grid-line: hsla(355, 90%, 72%, 0.35);
}

/* reveal.js theme variables */
.reveal-viewport {
  --r-background-color: var(--bp-cream);
  --r-main-font: var(--font-sans);
  --r-main-font-size: 30px;
  --r-main-color: var(--bp-ink);
  --r-heading-font: var(--font-sans);
  --r-heading-color: var(--bp-ink);
  --r-heading-line-height: 1.15;
  --r-heading-font-weight: 500;
  --r-heading-text-transform: none;
  --r-link-color: var(--bp-accent);
  --r-selection-background-color: var(--bp-accent);
  --r-selection-color: var(--bp-cream);
  background: var(--bp-cream);
}

.reveal { font-family: var(--font-sans); font-size: 30px; font-weight: 400; color: var(--bp-ink); line-height: 1.45; }
.reveal ::selection { background: var(--bp-accent); color: var(--bp-cream); }
.reveal .slides { text-align: left; }
.reveal .slides section { height: 100%; padding: 0; box-sizing: border-box; }

/* Type */
.reveal h1, .reveal h2, .reveal h3 { font-family: var(--font-sans); font-weight: 500; color: inherit; letter-spacing: -0.01em; text-wrap: balance; margin: 0 0 0.6em; }
.reveal h1 { font-size: 2.4em; line-height: 1.08; }
.reveal h2 { font-size: 1.6em; line-height: 1.15; }
.reveal h3 { font-size: 1.1em; line-height: 1.25; }
.reveal p { margin: 0 0 0.7em; max-width: 34em; }
.reveal strong { font-weight: 700; }
.reveal a { color: var(--bp-accent); text-decoration: underline; text-underline-offset: 0.15em; }
.reveal ul, .reveal ol { margin: 0 0 0.7em 1.1em; padding: 0; }
.reveal li { margin: 0.25em 0; }
.reveal li::marker { color: var(--bp-accent); }
.reveal code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bp-code-bg); padding: 0.1em 0.3em; }

/* Eyebrow label: the brief tag. */
.reveal .hl-label {
  font-family: var(--font-mono); font-size: 0.5em; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--bp-accent); margin: 0 0 1.2em; display: block;
}
/* Mono section heading with a rule, as the site's h2. */
.reveal .hl-rule-heading {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.55em; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--bp-accent); border-bottom: 1px solid var(--bp-rule-strong); padding-bottom: 0.6em; margin: 0 0 1.4em;
}
.reveal .hl-muted { color: var(--bp-ink-muted); }
.reveal .hl-small { font-size: 0.7em; }
.reveal .hl-mono { font-family: var(--font-mono); }

/* Annotation: dashed underline, like a callout on a schematic. */
.reveal .hl-notable {
  padding-bottom: 0.08em;
  background-image: repeating-linear-gradient(90deg, currentColor 0, currentColor 0.24em, transparent 0.24em, transparent 0.5em);
  background-position: 0 100%; background-size: 100% 0.07em; background-repeat: repeat-x;
}

/* Slide layouts. Every slide is a padded frame; .hl-frame keeps content inside it. */
.reveal .slides section > .hl-frame {
  position: absolute; inset: 0; padding: 72px 88px 88px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
}
.reveal .hl-frame--top { justify-content: flex-start; }
.reveal .hl-frame--bottom { justify-content: flex-end; }

/* Dark schematic slide: bp-green under the 28px grid. Add data-state="hl-dark" too, so the chrome switches. */
.reveal .slides section.hl-dark { color: var(--bp-cream); }
.reveal .slides section.hl-dark > .hl-frame {
  background-color: var(--bp-green);
  background-image: linear-gradient(var(--bp-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--bp-grid-line) 1px, transparent 1px);
  background-size: var(--grid-pitch) var(--grid-pitch);
}
.reveal .slides section.hl-dark .hl-label,
.reveal .slides section.hl-dark .hl-muted { color: var(--bp-cream-muted); }
.reveal .slides section.hl-dark a { color: var(--bp-cream); }

/* Title slide: logo top left, title low. */
.reveal .hl-logo { position: absolute; top: 64px; left: 88px; height: 72px; width: auto; margin: 0; }
.reveal .hl-meta { font-family: var(--font-mono); font-size: 0.5em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bp-ink-muted); margin: 0; }

/* Big number. */
.reveal .hl-stat { display: grid; grid-template-columns: auto 1fr; gap: 0 1.2em; align-items: end; }
.reveal .hl-stat-value { font-family: var(--font-sans); font-weight: 500; font-size: 4.2em; line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.reveal .hl-stat-caption { margin: 0; max-width: 16em; padding-bottom: 0.4em; }

/* Columns and cards. */
.reveal .hl-cols { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 32px; }
.reveal .hl-card { border: 1px solid var(--bp-border); padding: 28px; position: relative; font-size: 0.72em; line-height: 1.45; }
.reveal .hl-card::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 14px; height: 14px;
  border-top: 2px solid var(--bp-accent); border-left: 2px solid var(--bp-accent);
}
.reveal .hl-card h3 { font-family: var(--font-mono); font-size: 0.75em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.8em; color: var(--bp-accent); }
.reveal .hl-card p { margin: 0; }

/* Bar chart: horizontal bars on one scale. Set --v (0-100) per row; the scale max is 100%. */
.reveal .hl-bars { display: grid; gap: 22px; font-size: 0.7em; }
.reveal .hl-bar { display: grid; grid-template-columns: 9em 1fr 4em; gap: 20px; align-items: center; }
.reveal .hl-bar-label { font-family: var(--font-mono); font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bp-ink-muted); }
.reveal .hl-bar-track { height: 36px; border: 1px solid var(--bp-border); position: relative; }
.reveal .hl-bar-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); background: var(--bp-green); }
.reveal .hl-bar--highlight .hl-bar-fill { background: var(--river-blue); }
.reveal .hl-bar-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* Figure: one image with a caption. */
.reveal .hl-figure { margin: 0; display: grid; gap: 14px; }
.reveal .hl-figure img { display: block; max-width: 100%; max-height: 470px; width: auto; height: auto; margin: 0; border: 1px solid var(--bp-border); box-shadow: none; }
.reveal .hl-figure figcaption { font-family: var(--font-mono); font-size: 0.45em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bp-ink-muted); }

/* Quote. */
.reveal blockquote { margin: 0; padding: 0 0 0 1em; border-left: 2px solid var(--bp-accent); width: auto; max-width: 30em; box-shadow: none; background: none; font-style: normal; font-size: 1.15em; line-height: 1.35; }
.reveal blockquote p { margin: 0 0 0.6em; }
.reveal .hl-cite { font-family: var(--font-mono); font-size: 0.45em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bp-ink-muted); font-style: normal; }

/* Footer strip: mono deck label bottom left on every slide (from Reveal config, see sample). */
.reveal .hl-footer { position: absolute; left: 88px; bottom: 40px; margin: 0; font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bp-ink-muted); }
.reveal .slides section.hl-dark .hl-footer { color: var(--bp-cream-muted); }

/* Reveal chrome: slide number, progress bar, controls. */
.reveal .slide-number {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.06em; background: transparent;
  color: var(--bp-ink-muted); right: 88px; bottom: 40px; padding: 0; line-height: 1;
}
.reveal .slide-number a { color: inherit; text-decoration: none; }
.reveal .progress { height: 3px; background: var(--bp-rule); color: var(--bp-accent); }
.reveal .controls { color: var(--bp-accent); }
.hl-dark .reveal .slide-number, .reveal-viewport.hl-dark .slide-number { color: var(--bp-cream-muted); }
.reveal-viewport.hl-dark .controls { color: var(--bp-cream); }

/* Print / PDF: keep the grid and green fills. */
@media print {
  .reveal .slides section.hl-dark > .hl-frame { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .reveal .hl-bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal .slides section { transition: none !important; }
}
