/* CSS Style sheet for slides. Heavily based on: https://github.com/zarazhangrui/frontend-slides */

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap");

@font-face {
  font-family: "SatoshiRegular";
  src: url("../fonts/satoshi_regular.woff");
}

@font-face {
  font-family: "TiemposBold";
  src: url("../fonts/tiempos_bold.woff");
  font-style: bold;
}

@font-face {
  font-family: "TiemposRegular";
  src: url("../fonts/tiempos_regular.woff");
  font-style: normal;
}

@font-face {
  font-family: "TiemposItalic";
  src: url("../fonts/tiempos_talic.woff");
  font-style: italic;
}

:root {
  /* Core Palette */
  /* --bg: #fafadf; */
  --bg: #ffffff;
  --text: #1a1a16;
  --text-alt-1: #5e5e54;
  --test-alt-2: #8a8a80;

  /* Font Families */
  --font-serif: "TiemposRegular", Georgia, serif;
  --font-sans: "SatoshiRegular", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* ── Type Scale ───────────────────────────────────────────────────── */
  --sz-display: 6.5vw; /* hero/cover — very large, very light         */
  --sz-h1: 5vw; /* chapter / statement headline                */
  --sz-h2: 3.2vw; /* slide headline                              */
  --sz-h3: 2vw; /* sub-headline                                */
  --sz-lead: 1.5vw; /* generous lead text                          */
  --sz-body: 1.1vw; /* body text                                   */
  --sz-caption: 0.85vw; /* captions, footnotes                         */
  --sz-label: 0.72vw; /* chrome labels, sidebar labels               */
  --sz-counter: 0.65vw; /* slide counter               */

  /* Spacing */
  --pad-x: 8vw; /* generous horizontal padding — space is the design */
  --pad-y: 6vh;
  --gap-lg: 5vh;
  --gap-md: 3vh;
  --gap-sm: 1.5vh;

  /* Motion */
  --ease-slide: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-slide: 0.9s;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-enter: 0.7s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

/* Base Canvas / Slide Properties */
.slide {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  padding: var(--pad-y) var(--pad-x);
  box-sizing: border-box;
}

/* ===========================================
   HEADER, FOOTER AND SLIDE COUNTER
   =========================================== */
.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--gap-sm);
  border-bottom: 1px solid var(--text);
  margin-bottom: var(--gap-md);
}

.slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--gap-sm);
  /* border-bottom: 1px solid var(--text); */
  margin-top: var(--gap-md);
}

/* Slide counter — bottom-right */
#slide-counter {
  position: fixed;
  bottom: 20px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: var(--sz-counter);
  letter-spacing: 0.12em;
  color: rgba(26, 26, 22, 0.28);
  z-index: 100;
  user-select: none;
}

/* ===========================================
   LISTS
   =========================================== */

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.bullet-list li {
  display: grid;
  grid-template-columns: 1.2em 1fr;
  /* gap: 0.5em; */
  font-family: var(--font-sans);
  /* font-weight: 300; */
  /* line-height: 1.5; */
}
/* Ivory Ledger bullet: em dash in muted tan — never a heavy accent dot */
.bullet-list li::before {
  content: "—";
  color: var(--c-fg-light-3);
  font-family: var(--font-mono);
}

/* ===========================================
   ANIMATIONS
   =========================================== */
/*
* All [data-anim] elements start invisible (opacity:0).
* They animate when their parent slide gains .is-active.
* JS forcefully resets them before adding .is-active so re-visiting
* a slide replays the entrance animation from the beginning.
*/

[data-anim] {
  opacity: 0;
}
.slide.is-active [data-anim] {
  animation-duration: var(--dur-enter);
  animation-timing-function: var(--ease-enter);
  animation-fill-mode: forwards;
}
.slide.is-active [data-anim="fade-up"] {
  animation-name: kFadeUp;
}
.slide.is-active [data-anim="fade-in"] {
  animation-name: kFadeIn;
}
.slide.is-active [data-anim="reveal-right"] {
  animation-name: kRevealRight;
}
.slide.is-active [data-anim="reveal-left"] {
  animation-name: kRevealLeft;
}
.slide.is-active [data-anim="scale-in"] {
  animation-name: kScaleIn;
}

/* Stagger delays — add data-delay="N" to offset elements */
[data-delay="0"] {
  animation-delay: 0s;
}
[data-delay="1"] {
  animation-delay: 0.08s;
}
[data-delay="2"] {
  animation-delay: 0.18s;
}
[data-delay="3"] {
  animation-delay: 0.3s;
}
[data-delay="4"] {
  animation-delay: 0.44s;
}
[data-delay="5"] {
  animation-delay: 0.6s;
}
[data-delay="6"] {
  animation-delay: 0.78s;
}
[data-delay="7"] {
  animation-delay: 0.96s;
}

@keyframes kFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes kRevealRight {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 1;
  }
  to {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}
@keyframes kRevealLeft {
  from {
    clip-path: inset(0 0 0 100%);
    opacity: 1;
  }
  to {
    clip-path: inset(0 0 0 0%);
    opacity: 1;
  }
}
@keyframes kScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

.hidden.is-visible {
  visibility: visible;
  animation-name: kFadeUp;
  animation-duration: var(--dur-enter);
  animation-timing-function: var(--ease-enter);
  animation-fill-mode: forwards;
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */

/* Display: hero headline, weight 200 — maximum airiness */
.display {
  font-family: var(--font-serif);
  font-size: var(--sz-display);
  font-weight: 200;
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.h1 {
  font-family: var(--font-serif);
  font-size: var(--sz-h1);
  font-weight: 200;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.h2 {
  font-family: var(--font-serif);
  font-size: var(--sz-h2);
  font-weight: 300;
  line-height: 1.2;
}
.h3 {
  font-family: var(--font-serif);
  font-size: var(--sz-h3);
  font-weight: 400;
  line-height: 1.3;
}
.lead {
  font-family: var(--font-serif);
  font-size: var(--sz-lead);
  font-weight: 300;
  line-height: 1.65;
}
.body {
  font-family: var(--font-sans);
  font-size: var(--sz-body);
  font-weight: 300;
  line-height: 1.7;
}
.caption {
  font-family: var(--font-sans);
  font-size: var(--sz-label);
  font-weight: 300;
  line-height: 1.55;
}
/* Labels: the one exception — tracked mono uppercase for structural chrome */
.label {
  font-family: var(--font-mono);
  font-size: var(--sz-label);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.note {
  position: fixed;
  bottom: 20px;
  left: 28px;
  font-family: var(--font-sans);
  font-size: var(--sz-counter);
  color: var(--text);
  z-index: 100;
  user-select: none;
}

.top-right {
  position: absolute;
  top: var(--pad-y);
  right: var(--pad-x);
  text-align: right;
}

.top-right {
  position: absolute;
  top: var(--pad-y);
  right: var(--pad-x);
  text-align: left;
}

.muted {
  color: var(--text-alt-2);
}

.accent {
  color: var(--text-alt-3);
}

/* =============================
   COMPONENTS
   ============================= */

.rule {
  width: 36px;
  height: 1px;
  background: var(--text);
}

.rule-full {
  width: 100%;
  height: 1px;
  background: var(--text);
  /* background: var(--c-border-light); */
}

/* =============================
   LAYOUT PATTERNS
   ============================= */

/* 1. COVER */
/* Opening slide: light cream bg, bottom-anchored content, no chrome */
.slide--cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cover-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-end;
  gap: var(--gap-md);
}
/* Bottom meta bar: thin rule above, author left, version right */
.cover-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: var(--gap-lg);
  padding-top: var(--gap-sm);
  /* border-top: 1px solid var(--text); */
}

/* 2. Section title */
/* Opening slide: light cream bg, bottom-anchored content, no chrome */
.slide--section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  min-height: 0;
  /* height: 100vh; /* Ensures the slide fills the entire screen height */ */
}
.slide--section-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  gap: var(--gap-md);
}
/* Bottom meta bar: thin rule above, author left, version right */
.cover-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: var(--gap-lg);
  padding-top: var(--gap-sm);
  /* border-top: 1px solid var(--text); */
}

/* ── DIAGRAM ────────────────────────────────────────────────────────── */
.slide--diagram {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  min-height: 0;
  height: 100vh; /* Ensures the slide fills the entire screen height */
}

.slide--diagram-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  min-height: 0;
}

.flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.flow-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  padding-right: calc(var(--pad-x) * 0.4);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--text);
}

.flow-num {
  font-family: var(--font-sans);
  font-size: 3.5vw;
  font-weight: 200;
  line-height: 1;
  color: var(--c-fg-light-3);
  letter-spacing: -0.02em;
}
.flow-title {
  font-family: var(--font-serif);
  font-size: var(--sz-h3);
  font-weight: 400;
  line-height: 1.2;
  color: var(--c-fg-light);
}
.flow-desc {
  font-family: var(--font-sans);
  font-size: var(--sz-body);
  font-weight: 300;
  color: var(--c-fg-light-2);
  line-height: 1.68;
}

/* Single-column slide */
.slide--single {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  min-height: 0;
}

.slide--single-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--gap-lg);
  min-height: 0;
}

/* Two-column slide */
.slide--split {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-lg);
  min-height: 0;
}

.align-top {
  align-items: start;
}

.slide--split-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  align-items: center;
  gap: var(--gap-lg);
  min-height: 0;
}
.split-text {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.split-image {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}
/* Always specify explicit height in vh — never auto or aspect-ratio */
.split-image img,
.img-placeholder {
  width: 100%;
  height: 55vh;
}
.split-image img {
  object-fit: fit;
  display: block;
}
.img-placeholder {
  border: 1px solid var(--c-border-light);
  background: var(--c-bg-light-alt);
  color: var(--c-fg-light-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: var(--sz-label);
  font-weight: 400;
}

/* 9. END */
/* Closing slide: cream bg, centered vertically, simple */
.slide--end {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap-md);
}
