/* @theme upshift */

/* ─── Fonts (local — works offline) ─── */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/fraunces.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/fraunces-italic.woff2') format('woff2');
}

/* ─── Design tokens ─── */
:root {
  /* Palette */
  --accent:       #E8612A;  /* orange — brand, interactive */
  --bg:           #0D1117;  /* primary slide background */
  --bg-raised:    #131920;  /* step / card surfaces */
  --bg-inset:     #141A24;  /* blockquote, table header */
  --bg-chapter:   #0F1520;  /* chapter divider */
  --border:       #1E2530;  /* rules, dividers, timeline line */
  --border-alt:   #1A2030;  /* table row borders */

  /* Text */
  --text:         #EDE9E4;  /* primary */
  --text-muted:   #8A8683;  /* secondary, body detail */
  --text-dim:     #5A5653;  /* very muted (attribution) */
  --text-faint:   #3A4050;  /* page numbers, date */
  --text-subtle:  #9A9693;  /* subdued (quote attribution strong) */
  --text-contact: #C0BCB8;  /* closing contact info */

  /* Typography */
  --font-sans: 'Manrope', 'Instrument Sans', sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
}

/* ═══════════════════════════════════════════
   BASE — applies to all slides
═══════════════════════════════════════════ */
section {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  padding: 64px 80px 56px;
  width: 1280px;
  height: 720px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Orange top stripe */
section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--accent);
}

/* Page number */
section[data-marpit-pagination]::after {
  position: absolute;
  bottom: 28px;
  right: 80px;
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  content: attr(data-marpit-pagination);
}

/* ─── Base typography ─── */
h1 {
  font-family: var(--font-serif);
  font-size: 72px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1, 'calt' 1;
}

/* Slide label — small orange all-caps above content */
h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 32px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-sans);
}

h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

p {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 1.5;
}

strong { font-weight: 700; color: var(--text); }
em { font-style: normal; color: var(--text-muted); }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ─── Lists ─── */
ul, ol {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 24px;
  font-size: 28px;
  line-height: 1.5;
}
ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ─── Blockquote ─── */
blockquote {
  border-left: 3px solid var(--accent);
  margin: 0 0 20px;
  padding: 16px 28px;
  background: var(--bg-inset);
}
blockquote p {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.45;
}

/* ─── Table ─── */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 22px;
}
th {
  text-align: left;
  padding: 10px 18px;
  background: var(--bg-inset);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-alt);
  line-height: 1.4;
  vertical-align: top;
}
td:first-child { color: var(--text-dim); }
tr:last-child td { border-bottom: none; }

/* ─── Logo ─── */
img.logo {
  position: absolute;
  top: 40px;
  left: 80px;
  width: 48px;
  height: 48px;
}

/* ═══════════════════════════════════════════
   1. COVER — title slide
═══════════════════════════════════════════ */
section.cover {
  justify-content: flex-end;
  padding-bottom: 72px;
}
section.cover img.logo {
  top: auto;
  bottom: 256px;
  left: 80px;
}
section.cover h1 {
  font-size: 64px;
  margin-bottom: 16px;
}
section.cover p {
  font-size: 26px;
  color: var(--text-muted);
  margin: 0;
}
section.cover strong { color: var(--text); font-weight: 500; }
/* Date — second paragraph, very muted */
section.cover p:nth-of-type(2) {
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-top: 12px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   2. TITLE-BODY — default workhorse (no class needed)
   Inherits base. Label (h2) + content below.
═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   3. SECTION / CHAPTER DIVIDER
═══════════════════════════════════════════ */
section.chapter {
  background: var(--bg-chapter);
  justify-content: center;
}
section.chapter h1 {
  font-size: 60px;
  margin: 0;
}
section.chapter h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   4. STATEMENT — single oversized claim
═══════════════════════════════════════════ */
section.statement {
  justify-content: center;
}
section.statement h2 {
  margin-bottom: 32px;
}
section.statement p {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.2;
  max-width: 1060px;
  font-weight: 400;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
section.statement p:last-of-type {
  margin-bottom: 0;
}
section.statement p strong {
  color: var(--accent);
  font-weight: 400;
}
section.statement p em {
  font-style: italic;
  font-size: 28px;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════
   5. AGENDA — numbered table of contents
═══════════════════════════════════════════ */
section.agenda ol {
  list-style: none;
  counter-reset: agenda;
  margin: 0;
  padding: 0;
}
section.agenda li {
  counter-increment: agenda;
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 24px;
  font-size: 40px;
  padding-left: 0;
}
section.agenda li::before {
  content: counter(agenda, decimal-leading-zero);
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 28px;
}

/* ─── AGENDA · long variant ───
   Sentence-length items (takeaway questions, principles, etc).
   Same counter primitive; hung italic numerals + tighter body. */
section.agenda.long h2 {
  margin-bottom: 44px;
}
section.agenda.long ol {
  max-width: 1000px;
}
section.agenda.long li {
  display: grid;
  grid-template-columns: 88px 1fr;
  column-gap: 32px;
  align-items: baseline;
  gap: 0 32px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
  padding: 22px 0 24px;
  border-top: 1px solid var(--border);
  text-wrap: pretty;
}
section.agenda.long li::before {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-align: right;
  width: auto;
  justify-self: end;
  align-self: baseline;
}
section.agenda.long li:first-child {
  border-top: none;
  padding-top: 0;
}

/* ═══════════════════════════════════════════
   6. TWO-COL — side-by-side content
═══════════════════════════════════════════ */
section.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  align-content: center;
}
section.two-col h2 {
  grid-column: 1 / -1;
  margin-bottom: 28px;
}
section.two-col h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}
section.two-col h3:nth-of-type(1) { grid-column: 1; grid-row: 2; }
section.two-col ul:nth-of-type(1) { grid-column: 1; grid-row: 3; }
section.two-col h3:nth-of-type(2) { grid-column: 2; grid-row: 2; }
section.two-col ul:nth-of-type(2) { grid-column: 2; grid-row: 3; }
section.two-col li { font-size: 26px; margin-bottom: 16px; }

/* ═══════════════════════════════════════════
   7. PROCESS — sequential steps
═══════════════════════════════════════════ */
section.process {
  justify-content: center;
}
section.process h2 {
  margin-bottom: 32px;
}
section.process ul {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 0;
}
section.process li {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 36px 32px 44px;
  background: var(--bg-raised);
  position: relative;
  margin-bottom: 0;
}
section.process li::before { content: none; }
section.process li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  z-index: 1;
  background: var(--bg);
  padding: 4px 2px;
}
/* Step label */
section.process li > p:first-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  line-height: 1;
}
/* Step title */
section.process li > p:nth-child(2) {
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 14px;
}
section.process li > p:nth-child(2) strong {
  font-weight: 700;
  color: var(--text);
  font-size: inherit;
}
/* Step body */
section.process li > p:nth-child(3) {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ═══════════════════════════════════════════
   8. QUOTE — attributed pull quote
═══════════════════════════════════════════ */
section.quote {
  justify-content: center;
}
section.quote blockquote {
  border: none;
  background: none;
  padding: 0 0 0 40px;
  margin: 0;
  border-left: 3px solid var(--accent);
}
section.quote blockquote p {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text);
  max-width: 880px;
  margin: 0;
}
section.quote > p {
  margin-top: 36px;
  padding-left: 40px;
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 0;
}
section.quote > p strong { color: var(--text-subtle); font-weight: 500; }

/* ═══════════════════════════════════════════
   9. DATA — multi-metric big-number grid
═══════════════════════════════════════════ */
section.data {
  justify-content: center;
}
section.data h2 {
  margin-bottom: 48px;
}
section.data ul {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
section.data li {
  flex: 1;
  min-width: 0;
  border-left: 2px solid var(--accent);
  padding: 0 40px 0 28px;
  margin-bottom: 0;
  font-size: 19px;
}
section.data li:last-child {
  padding-right: 0;
}
section.data li::before { content: none; }
/* Metric value — the strong inside the first paragraph */
section.data li > p:first-child {
  font-family: var(--font-serif);
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
section.data li > p:first-child strong {
  font-weight: 400;
  color: var(--text);
  font-size: inherit;
}
/* Metric label */
section.data li > p:nth-child(2) {
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ═══════════════════════════════════════════
   10. PILLARS — three concept labels with descriptions
   Same column layout as DATA but sized for words, not numbers
═══════════════════════════════════════════ */
section.pillars ul {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}
section.pillars li {
  flex: 1;
  min-width: 0;
  border-left: 2px solid var(--accent);
  padding: 0 40px 0 28px;
  margin-bottom: 0;
}
section.pillars li:last-child {
  padding-right: 0;
}
section.pillars li::before { content: none; }
/* Concept label */
section.pillars li > p:first-child {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}
/* Styled arrow in pillar titles */
section.pillars li > p:first-child .arrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  vertical-align: 0.15em;
  margin: 0 6px;
  letter-spacing: 0;
}
section.pillars li > p:first-child strong {
  font-weight: 400;
  color: var(--text);
  font-size: inherit;
}
/* Description */
section.pillars li > p:nth-child(2) {
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* ═══════════════════════════════════════════
   11. COMPARISON — criteria-by-options table
   Uses base table styles + enhanced treatment
═══════════════════════════════════════════ */
section.comparison {
  justify-content: center;
}
section.comparison h2 {
  margin-bottom: 28px;
}
section.comparison table { font-size: 24px; }
section.comparison td:last-child {
  color: var(--text);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   11. STAT — single big number
═══════════════════════════════════════════ */
section.stat {
  justify-content: center;
  align-items: center;
  text-align: center;
}
section.stat h1 {
  font-family: var(--font-serif);
  font-size: 140px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
section.stat p {
  font-size: 24px;
  color: var(--text-muted);
  margin: 0;
}

/* ═══════════════════════════════════════════
   12. CONTRAST — two large numbers in opposition
   Use for before/after or intent-vs-reality pairs
═══════════════════════════════════════════ */
section.contrast {
  justify-content: center;
}
section.contrast ul {
  display: flex;
  flex-direction: row;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  align-items: flex-start;
  width: 100%;
}
section.contrast li {
  flex: 1;
  min-width: 0;
  padding: 0 60px;
  text-align: center;
  margin-bottom: 0;
}
section.contrast li::before { content: none; }
section.contrast li:first-child {
  border-right: 1px solid rgba(255,255,255,0.12);
  padding-left: 0;
}
section.contrast li:last-child {
  padding-right: 0;
}
section.contrast li > p:first-child {
  font-family: var(--font-serif);
  font-size: 120px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  overflow-wrap: break-word;
}
section.contrast li:first-child > p:first-child strong {
  font-weight: 400;
  color: var(--text);
}
section.contrast li:last-child > p:first-child strong {
  font-weight: 400;
  color: var(--accent);
}
section.contrast li > p:nth-child(2) {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ═══════════════════════════════════════════
   13. IMAGE — full-bleed (use Marp's ![bg] directive)
   This class styles the text overlay on image slides
═══════════════════════════════════════════ */
section.image {
  justify-content: flex-end;
  padding-bottom: 72px;
}
/* Gradient overlay on ::before (::after is reserved for Marp pagination) */
section.image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13,17,23,0.25) 0%,
    rgba(232,97,42,0.08) 50%,
    rgba(13,17,23,0.55) 100%
  );
  pointer-events: none;
  z-index: 0;
  height: auto;
}
/* Dark desaturated wash with warm overlay */
section.image figure {
  filter: brightness(0.45) grayscale(0.6) !important;
  background-position: center 70% !important;
}
section.image.chapter {
  background: transparent;
}
section.image[data-marpit-pagination]::after {
  display: none;
}
section.image > * {
  position: relative;
  z-index: 1;
}
section.image h1 {
  font-size: 52px;
}
section.image h2 {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   13. CLOSING — CTA / contact
═══════════════════════════════════════════ */
section.closing {
  justify-content: center;
}
section.closing img.logo {
  position: static;
  margin-bottom: 36px;
}
section.closing h1 {
  font-size: 96px;
  margin-bottom: 20px;
}
section.closing p {
  font-size: 28px;
  color: var(--text-contact);
  margin: 0 0 6px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════
   14. TIMELINE — time-bound sequence
═══════════════════════════════════════════ */
section.timeline {
  justify-content: center;
}
section.timeline h2 {
  margin-bottom: 48px;
}
section.timeline ul {
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  position: relative;
}
/* Horizontal connecting line */
section.timeline ul::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0; right: 0;
  height: 2px;
  background: var(--border);
}
section.timeline li {
  flex: 1;
  min-width: 0;
  padding-top: 36px;
  padding-left: 0;
  position: relative;
  margin-bottom: 0;
  font-size: 15px;
}
/* Dot — overrides base ul li::before dash */
section.timeline li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
/* Date label */
section.timeline li > p:first-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  line-height: 1;
}
/* Title */
section.timeline li > p:nth-child(2) {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 8px;
}
section.timeline li > p:nth-child(2) strong {
  font-weight: 700;
  color: var(--text);
  font-size: inherit;
}
/* Body */
section.timeline li > p:nth-child(3) {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-right: 20px;
  margin: 0;
}

/* ═══════════════════════════════════════════
   NAVY DARK — cool blue-slate variant
   Same temperature family as base, elevated.
   Combine with any content class:
   <!-- _class: light two-col -->
   <!-- _class: light process -->
   etc.
═══════════════════════════════════════════ */
section.light {
  --bg:           #F8F7F5;
  --bg-raised:    #EFEEE9;
  --bg-inset:     #E8E6E2;
  --bg-chapter:   #F2F1EE;
  --border:       #D8D6D2;
  --border-alt:   #E2E0DC;
  --text:         #192334;
  --text-muted:   #284164;
  --text-dim:     #4A5E78;
  --text-faint:   #8A94A4;
  --text-subtle:  #375a87;
  --text-contact: #1e3048;

  background: var(--bg);
  color: var(--text);
}

/* Contrast divider on light bg */
section.light.contrast li:first-child {
  border-right-color: rgba(25,35,52,0.15);
}

/* ═══════════════════════════════════════════
   SOURCES — compact appendix table
═══════════════════════════════════════════ */
section.sources {
  justify-content: center;
}
section.sources ul {
  columns: 2;
  column-gap: 48px;
}
section.sources li {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 14px;
  padding-left: 0;
  break-inside: avoid;
}
section.sources li::before {
  content: none;
}
section.sources li em {
  display: block;
  font-size: 13px;
  color: var(--accent);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   TEXT WRAPPING — balanced headlines, pretty body
═══════════════════════════════════════════ */

/* Short, high-impact text: force balanced line lengths to kill orphans.
   Applies to headlines up to ~6 lines per spec. Do NOT apply to quotes —
   they rely on deliberate cadence-driven line breaks. */
section.statement p,
section.cover h1,
section.chapter h1,
section.chapter h2,
section.closing h1,
section.stat p,
section.two-col h2,
section.process h2,
section.data h2,
section.pillars h2,
section.timeline h2,
section.comparison h2 {
  text-wrap: balance;
}

/* Multi-line body copy: only fix orphan last lines, don't force balance. */
section.process li > p:nth-child(2),
section.pillars li > p:nth-child(2),
section.data li > p:nth-child(2),
section.contrast li > p:nth-child(2),
section.timeline li > p:nth-child(3) {
  text-wrap: pretty;
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
