/* ============================================================
   AgentLab / Christoph Hellmuth — Presentation Decks
   Matching the exact branding and styling of https://agentlab.framer.ai/
   Merriweather Light (300) display headings, Cabin/Inter body,
   #FFFFFF architectural paper slides, #000000 + Cobalt field slides.
   ============================================================ */

@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/merriweather/Merriweather-roman.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('../fonts/merriweather/Merriweather-italic.woff2') format('woff2');
  font-weight: 300 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cabin';
  src: url('../fonts/cabin/Cabin-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cabin';
  src: url('../fonts/cabin/Cabin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono/JetBrainsMono-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --indigo: #0036fa;
  --indigo-bright: #558bfb;
  --bone: #ffffff;
  --bone-dim: rgba(255, 255, 255, 0.76);
  --stone: #ffffff;
  --ink: #000000;
  --ink-dim: #4d4d4d;
  --ink-faint: #737373;
  --obsidian: #000000;
  --line: #e6e6e6;
  --line-bright: #558bfb;
  --serif: "Merriweather", Georgia, serif;
  --sans: "Cabin", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --chrome: 54px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #ffffff; color: #000000; }
body {
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
.skip-link {
  position: absolute; left: 12px; top: -40px; z-index: 20;
  background: #000000; color: #ffffff; padding: 8px 14px;
  border-radius: 0; font-weight: 500; font-size: 12px; text-transform: uppercase;
}
.skip-link:focus { top: 12px; }

.deck {
  height: calc(100vh - var(--chrome));
  height: calc(100dvh - var(--chrome));
  position: relative;
  background: #ffffff;
}
body.notes-open .deck { height: calc(58dvh - var(--chrome)); }

.slide {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.slide.is-current { display: flex; flex-direction: column; }

.slide-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 6vh, 84px) clamp(28px, 6vw, 96px);
  gap: 18px;
  overflow: auto;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000000;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 10px;
  flex: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='10' viewBox='0 0 18 10' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='18' y1='0' x2='0' y2='0' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%230036FA'/%3E%3Cstop offset='0.55' stop-color='%23558BFB'/%3E%3Cstop offset='1' stop-color='%23C0E2F9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpolygon points='5,0 18,0 16,4 3,4' fill='url(%23g)'/%3E%3Cpolygon points='2,6 15,6 13,10 0,10' fill='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  color: #000000;
}
.slide h1 { font-size: clamp(2.5rem, 5.8vw, 5.2rem); max-width: 16ch; }
.slide h2 { font-size: clamp(2rem, 4.2vw, 3.8rem); max-width: 18ch; }
.sub, .body, .item p, .col p, .step p {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.55;
  max-width: 44ch;
  color: var(--ink-dim);
}
.fine {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* Field / Section / Close: AgentLab Pitch-Black + Cobalt Facet */
.slide[data-layout="field"],
.slide[data-layout="section"],
.slide[data-layout="close"] {
  background:
    linear-gradient(135deg, #000000 0%, #000000 50%, #0022b8 74%, #558bfb 90%, #c0e2f9 100%);
  color: #ffffff;
}
.slide[data-layout="field"] .slide-inner,
.slide[data-layout="section"] .slide-inner,
.slide[data-layout="close"] .slide-inner {
  border-left-color: rgba(255, 255, 255, 0.14);
  border-right-color: rgba(255, 255, 255, 0.14);
}
.slide[data-layout="field"] h1,
.slide[data-layout="field"] h2,
.slide[data-layout="section"] h1,
.slide[data-layout="section"] h2,
.slide[data-layout="close"] h1,
.slide[data-layout="close"] h2 {
  color: #ffffff;
}
.slide[data-layout="field"] .sub,
.slide[data-layout="field"] .body,
.slide[data-layout="section"] .sub,
.slide[data-layout="section"] .body,
.slide[data-layout="close"] .sub,
.slide[data-layout="close"] .body {
  color: rgba(255, 255, 255, 0.8);
}
.slide[data-layout="field"] .kicker,
.slide[data-layout="section"] .kicker,
.slide[data-layout="close"] .kicker { color: #ffffff; }
.slide[data-layout="field"] .fine,
.slide[data-layout="close"] .fine { color: rgba(255, 255, 255, 0.65); }
.slide[data-layout="field"] .slide-inner,
.slide[data-layout="close"] .slide-inner { justify-content: flex-end; }
.slide[data-layout="section"] .slide-inner { justify-content: flex-end; }
.part {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c0e2f9;
  margin: 0 0 auto;
}

/* Paper / Architectural White Grid Slides */
.slide[data-layout="paper"],
.slide[data-layout="list"],
.slide[data-layout="pair"],
.slide[data-layout="agenda"],
.slide[data-layout="steps"] { background: #ffffff; color: #000000; }
.slide[data-layout="paper"] .slide-inner,
.slide[data-layout="list"] .slide-inner,
.slide[data-layout="pair"] .slide-inner,
.slide[data-layout="agenda"] .slide-inner,
.slide[data-layout="steps"] .slide-inner { justify-content: center; }
.slide[data-layout="paper"] .body { color: var(--ink-dim); max-width: 36em; }

/* Dark Editorial Plate */
.slide[data-layout="dark"] { background: #000000; color: #ffffff; }
.slide[data-layout="dark"] .slide-inner {
  border-left-color: rgba(255, 255, 255, 0.14);
  border-right-color: rgba(255, 255, 255, 0.14);
  justify-content: flex-end;
}
.slide[data-layout="dark"] h1,
.slide[data-layout="dark"] h2 { color: #ffffff; }
.slide[data-layout="dark"] .sub,
.slide[data-layout="dark"] .body { color: rgba(255, 255, 255, 0.76); }
.slide[data-layout="dark"] .kicker { color: #ffffff; }
.slide[data-layout="dark"] .fine { color: rgba(255, 255, 255, 0.55); }

/* Lists in 1px Architectural Grid */
.items, .steps, .agenda { list-style: none; margin: 16px 0 0; padding: 0; width: min(960px, 100%); }
.items li, .steps li, .agenda li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.items li:last-child, .steps li:last-child, .agenda li:last-child { border-bottom: 1px solid var(--line); }
.num, .when {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--indigo);
  padding-top: 4px;
}
.items strong, .steps strong, .agenda strong {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -0.015em;
  line-height: 1.22;
  color: #000000;
}
.items p, .steps p, .agenda p {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  max-width: 52ch;
}

/* Pair */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: min(1040px, 100%);
  margin-top: 20px;
  border: 1px solid var(--line);
  background: #fafafa;
}
.col { padding: 32px; }
.col + .col { padding: 32px; border-left: 1px solid var(--line); background: #ffffff; }
.col .num { display: block; margin-bottom: 10px; }
.col strong {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin-bottom: 12px;
  color: #000000;
}
.col p { color: var(--ink-dim); max-width: 34ch; }

/* Photograph */
.slide[data-layout="photo"] { background: #000000; }
.slide[data-layout="photo"] .photo-frame { flex: 1; min-height: 0; position: relative; background: #080a10; }
.slide[data-layout="photo"] .photo-band { flex: none; }
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.photo-band {
  background: #000000;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 28%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: clamp(22px, 3.5vh, 40px) clamp(28px, 7vw, 120px) clamp(26px, 4vh, 48px);
}
.photo-band h2 { color: #ffffff; max-width: 24ch; font-size: clamp(1.8rem, 3.6vw, 3.2rem); }
.photo-band .kicker { color: #ffffff; }
.credit { color: var(--bone-dim); max-width: 70ch; font-size: 13.5px; }

/* Chrome Navigation Bar */
.deck-chrome {
  height: var(--chrome);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #000000;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 10;
}
.deck-chrome a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.deck-chrome a:hover { color: #558bfb; }
.chrome-left, .chrome-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.chrome-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.counter, .clock {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #ffffff;
}
.clock { color: rgba(255, 255, 255, 0.55); }
.chrome-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.15s ease;
}
.chrome-btn:hover, .chrome-btn[aria-pressed="true"] {
  background: #0036fa;
  border-color: #0036fa;
  color: #ffffff;
}

.progress {
  position: fixed;
  left: 0; right: 0; bottom: var(--chrome);
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  z-index: 15;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0036fa 0%, #558bfb 100%);
  width: 0;
  transition: width 0.2s ease;
}

.deck-notes {
  display: none;
  height: 42dvh;
  overflow: auto;
  background: #000000;
  color: #ffffff;
  padding: 24px clamp(28px, 7vw, 120px) 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
body.notes-open .deck-notes { display: block; }
.deck-notes p {
  margin: 0 0 12px;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.82);
}
.notes-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #558bfb;
  margin: 0 0 12px;
}

.overview {
  display: none;
  position: fixed;
  inset: 0 0 var(--chrome) 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 20;
  overflow: auto;
  padding: 32px clamp(20px, 4vw, 64px) 48px;
}
body.overview-open .overview { display: block; }
.overview h2 {
  font-size: 1.8rem;
  margin: 0 0 20px;
  color: #000000;
}
.overview ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 36px; }
.overview button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  color: var(--ink-dim);
  transition: color 0.15s ease;
}
.overview button:hover { color: #0036fa; }
.overview button strong { font-weight: 500; color: inherit; }
.overview button span { font-family: var(--mono); font-size: 11px; color: #0036fa; padding-top: 3px; }
.overview button.is-current strong { color: #000000; font-weight: 600; }

.help {
  display: none;
  position: fixed;
  inset: 0 0 var(--chrome) 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 25;
  align-items: center;
  justify-content: center;
}
body.help-open .help { display: flex; }
.help-card {
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 0;
  color: #000000;
  padding: 36px 40px;
  width: min(520px, calc(100% - 40px));
}
.help-card h2 { font-size: 1.8rem; margin-bottom: 18px; color: #000000; }
.help-card dl { margin: 0; display: grid; grid-template-columns: 88px 1fr; gap: 10px 16px; }
.help-card dt { font-family: var(--mono); font-size: 12px; color: #0036fa; }
.help-card dd { margin: 0; color: var(--ink-dim); }

@media (max-width: 800px) {
  .pair { grid-template-columns: 1fr; }
  .col + .col { border-left: 0; border-top: 1px solid var(--line); }
  .items li, .steps li, .agenda li { grid-template-columns: 52px 1fr; }
  .overview ol { columns: 1; }
  .chrome-title, .clock { display: none; }
  .slide h1 { font-size: clamp(2.2rem, 10vw, 3.4rem); }
}

@media print {
  body { overflow: visible; background: #fff; color: #000; }
  .deck { height: auto; }
  .slide, .slide.is-current { display: block; position: relative; page-break-after: always; min-height: 100vh; }
  .deck-chrome, .progress, .deck-notes, .overview, .help { display: none !important; }
}
