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

:root {
  --background-color: #030811;
  --section-divider-bg: radial-gradient(circle at 20% 20%, rgba(78, 255, 198, 0.05), transparent 40%), radial-gradient(circle at 80% 0%, rgba(117, 146, 255, 0.08), transparent 30%), linear-gradient(145deg, #030811 0%, #050d1a 52%, #081224 100%);
  --heading-font: "Space Grotesk", Helvetica, sans-serif;
  --body-font: "IBM Plex Sans", Arial, sans-serif;

  --h1-size: clamp(36pt, 4.5vw, 56pt);
  --h2-size: clamp(23pt, 2.9vw, 34pt);
  --h3-size: clamp(16pt, 1.9vw, 22pt);
  --text-size: clamp(12.5pt, 1.45vw, 17pt);
  --code-size: clamp(10.5pt, 1.15vw, 14.5pt);
  --footnote-size: clamp(9pt, 0.95vw, 12pt);

  --primary-color: #4effc6;
  --secondary-color: #7a8dff;
  --tertiary-color: #18d1ff;
  --danger-color: #ff6b7d;
  --warning-color: #ffb95e;
  --text-color: #eef6ff;
  --muted-color: #8b9eb3;
  --line-color: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(6, 14, 26, 0.6);
  --card-strong: rgba(10, 20, 36, 0.8);
  --card-soft: rgba(255, 255, 255, 0.03);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

  --slide-pad-x: clamp(36px, 5vw, 72px);
  --slide-pad-y: clamp(34px, 4.2vh, 56px);
  --gap: clamp(14px, 1.9vh, 24px);
  --card-pad: clamp(16px, 1.7vw, 26px);
  --box-radius: 12px;
}

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

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #030811;
}

/* ── Typography ── */

.reveal {
  font-family: var(--body-font);
  font-size: var(--text-size);
}

.reveal strong, .reveal b { font-weight: 700; }

.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  font-family: var(--heading-font);
  text-transform: none;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

.reveal h1 { font-size: var(--h1-size); }
.reveal h2 {
  font-size: var(--h2-size);
  width: 100%;
  max-width: 1200px;
  padding-bottom: calc(var(--gap) * 0.62);
  border-bottom: 1px solid var(--line-color);
  text-align: left;
  margin-bottom: calc(var(--gap) * 1.2);
  flex-shrink: 0;
}
.reveal h3 {
  font-size: var(--h3-size);
  line-height: 1.2;
  margin: 0;
}

.reveal p, .reveal li, .reveal td, .reveal th, .reveal blockquote {
  font-size: var(--text-size);
  color: var(--text-color);
  line-height: 1.6;
  text-wrap: pretty;
  margin: 0;
}

.reveal code {
  font-family: Consolas, "Courier New", monospace;
  font-size: var(--code-size);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--text-color);
  line-height: 1.42;
  overflow-wrap: break-word;
  word-break: break-all;
}

.reveal ul {
  list-style: none;
  padding-left: 0;
  margin: 4px 0;
}

.reveal ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.reveal ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--secondary-color);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(122, 141, 255, 0.1);
}

/* ── Slide layout ── */

.reveal .slides section {
  padding: clamp(48px, 7vh, 80px) var(--slide-pad-x) var(--slide-pad-y) !important;
  box-sizing: border-box;
  text-align: left;
  position: absolute !important;
  inset: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
}

.reveal .slides section > .content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  gap: var(--gap);
  min-height: 0;
  overflow: visible;
}

.reveal .slides section > .content::-webkit-scrollbar {
  display: none;
}

.reveal .slides section > .footnote {
  position: absolute;
  bottom: 10px;
  left: var(--slide-pad-x);
  right: var(--slide-pad-x);
  font-size: var(--footnote-size);
  color: var(--muted-color);
}

/* ── Section dividers (hero/outro) ── */

.reveal .slides section.section-divider {
  text-align: center;
  overflow: hidden;
  justify-content: center !important;
  padding-top: var(--slide-pad-y) !important;
}

.reveal .slides section:not(.section-divider) {
  padding-top: clamp(42px, 5.6vh, 72px) !important;
}

.step-shell {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--gap) * 1.05);
  min-height: 0;
  transform-origin: center center;
  will-change: transform;
}

.step-shell > h2,
.step-shell > .content {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.step-shell > .content {
  flex: 0 1 auto;
}

.reveal .slides section.section-divider h1 {
  font-size: clamp(36pt, 4.8vw, 58pt);
  text-align: center;
  max-width: 1000px;
}

.reveal .slides section.section-divider p {
  font-size: clamp(16pt, 2vw, 24pt);
  color: var(--muted-color);
}

.hero-slide, .outro-slide { background: transparent; }

.hero-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  padding: clamp(36px, 5vh, 64px) clamp(36px, 4vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(6, 14, 26, 0.7), rgba(8, 18, 32, 0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-shell h1 { margin-bottom: 20px; }

.hero-subtitle { max-width: 860px; margin: 0 auto; text-wrap: balance; }

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-meta p {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-color);
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}
.orbit-a { width: 820px; height: 820px; left: -160px; top: -120px; }
.orbit-b { width: 1040px; height: 1040px; right: -280px; bottom: -340px; }

.outro-shell { max-width: 920px; }

/* ── Utility text ── */

.text-lg  { font-size: clamp(16pt, 2vw, 22pt) !important; }
.text-lg  { font-size: clamp(14.5pt, 1.7vw, 19pt) !important; }
.text-xl  { font-size: clamp(15.5pt, 1.85vw, 21pt) !important; }
.text-2xl { font-size: clamp(17pt, 2.05vw, 24pt) !important; }
.text-3xl { font-size: clamp(20pt, 2.45vw, 28pt) !important; }
.text-4xl { font-size: clamp(24pt, 2.9vw, 34pt) !important; }
.text-muted  { color: var(--muted-color) !important; }
.text-center { text-align: center !important; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--primary-color) !important;
  font-size: clamp(10.5pt, 1.1vw, 13pt) !important;
  margin-bottom: 16px;
}

/* ── Cards ── */

.panel, .statement-card, .feature-card, .quote-box,
.trust-card, .combo-card, .loop-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--box-radius);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
}

/* Panels behave as a vertical flex stack so the prompt block fills middle
   space and any footnote stays glued to the bottom. This keeps left/right
   cards in a `.grid-2` visually aligned regardless of body length. */
.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.panel > * {
  margin-top: 0;
  margin-bottom: 0;
}

.panel > .panel-kicker {
  margin: 0;
}

.panel > .prompt-box,
.panel > .steps-box {
  margin: 0;
  flex: 1 1 auto;
}

.panel > .api-row,
.panel > .api-tag {
  margin: 0;
  flex-shrink: 0;
}

.panel > .panel-footnote {
  margin: 0;
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--footnote-size);
  color: var(--muted-color);
  line-height: 1.55;
  flex-shrink: 0;
}

.api-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.api-row .api-tag {
  margin: 0;
}

.mini-card, .stat-box {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--box-radius);
  box-shadow: var(--shadow);
  padding: clamp(8px, 1vw, 16px);
}

.statement-card {
  background: linear-gradient(135deg, rgba(16, 32, 54, 0.8), rgba(12, 24, 42, 0.8));
  border-color: rgba(78, 255, 198, 0.15);
}

.panel-kicker {
  color: var(--primary-color) !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(10.5pt, 1.1vw, 13.5pt) !important;
  line-height: 1.35;
  margin-bottom: 0;
}

.panel-dark {
  background: linear-gradient(180deg, rgba(16, 28, 47, 0.6), rgba(8, 18, 32, 0.6));
}

.wide-panel { margin-top: var(--gap); }

.bottom-quote {
  margin-top: var(--gap);
  padding-top: var(--gap);
}

.mini-card {
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.8), rgba(6, 14, 26, 0.8));
  border-color: rgba(255,255,255,0.05);
}

.mini-card.soft {
  background: linear-gradient(180deg, rgba(12, 24, 42, 0.8), rgba(8, 18, 32, 0.8));
  border-color: rgba(78, 255, 198, 0.12);
}

.mini-card i, .feature-card i {
  font-size: clamp(12pt, 1.5vw, 18pt);
  color: var(--primary-color);
  margin-bottom: 6px;
}

/* ── Process strip ── */

.process-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.process-step {
  padding: var(--card-pad);
  background: var(--card-bg);
  border-radius: var(--box-radius);
  border: 1px solid rgba(255,255,255,0.08);
}

.step-no {
  display: inline-block;
  margin-bottom: 4px;
  font-size: clamp(8pt, 0.9vw, 10pt);
  letter-spacing: 0.2em;
  color: var(--secondary-color);
}

.process-arrow {
  color: var(--primary-color);
  font-size: clamp(12pt, 1.4vw, 16pt);
  text-align: center;
}

/* ── Stats ── */

.stat-column {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.stat-box {
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.stat-number {
  font-family: var(--heading-font);
  font-size: clamp(20pt, 2.6vw, 30pt) !important;
  color: var(--primary-color) !important;
  margin-bottom: 4px;
}

/* ── Loop ── */

.loop-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.loop-arrow {
  font-size: clamp(18pt, 2.2vw, 26pt);
  color: var(--primary-color);
  text-align: center;
}

/* ── Feature / combo / trust ── */

.feature-card { min-height: 0; }

.quote-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.trust-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  min-height: 0;
}

.combo-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  min-height: 0;
}

.combo-no {
  font-family: var(--heading-font);
  font-size: clamp(18pt, 2.2vw, 26pt) !important;
  color: var(--primary-color) !important;
  margin-bottom: 6px;
}

.combo-no i {
  font-size: clamp(14pt, 1.6vw, 20pt);
  color: var(--primary-color);
}

/* ── Scene tag ── */

.scene-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(78, 255, 198, 0.12);
  border: 1px solid rgba(78, 255, 198, 0.25);
  color: var(--primary-color);
  font-size: clamp(10.5pt, 1.05vw, 13pt);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-right: 10px;
  vertical-align: middle;
}

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

/* ── Grid utilities ── */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  min-height: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap);
}

.grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: var(--gap);
}

/* ── Small-viewport overrides ── */

@media (max-height: 800px) {
  :root {
    --h2-size: clamp(19pt, 2.35vw, 26pt);
    --h3-size: clamp(14pt, 1.5vw, 18pt);
    --text-size: clamp(11.5pt, 1.18vw, 15pt);
    --code-size: clamp(10pt, 1vw, 13pt);
    --footnote-size: clamp(8.5pt, 0.9vw, 11pt);
    --slide-pad-y: clamp(18px, 2.4vh, 28px);
    --gap: clamp(10px, 1.15vh, 16px);
    --card-pad: clamp(12px, 1.25vw, 18px);
  }

  .reveal h2 { padding-bottom: 5px; margin-bottom: 8px; }
  .hero-shell { padding: 18px 24px; }
  .hero-shell h1 { margin-bottom: 6px; }
  .hero-meta { margin-top: 10px; gap: 8px; }
  .hero-meta p { padding: 4px 10px; }
  .stat-number { font-size: clamp(16pt, 2vw, 22pt) !important; }
  .combo-no { font-size: clamp(14pt, 1.8vw, 20pt) !important; }
  .eyebrow { margin-bottom: 8px; }
  .bottom-quote { margin-top: 4px; padding-top: 4px; }
  .wide-panel { margin-top: 4px; }

  .reveal ul li { margin-bottom: 1px; padding-left: 14px; }
  .reveal ul li::before { width: 4px; height: 4px; }
}

@media (max-height: 700px) {
  :root {
    --h1-size: clamp(28pt, 3.6vw, 40pt);
    --h2-size: clamp(17pt, 2.15vw, 23pt);
    --h3-size: clamp(12.5pt, 1.3vw, 16pt);
    --text-size: clamp(10.8pt, 1.05vw, 14pt);
    --code-size: clamp(9.5pt, 0.95vw, 12pt);
    --slide-pad-x: clamp(20px, 3vw, 40px);
    --slide-pad-y: clamp(14px, 1.8vh, 22px);
    --gap: clamp(8px, 0.95vh, 13px);
    --card-pad: clamp(10px, 1vw, 15px);
  }

  .process-strip { gap: 4px; }
  .process-arrow { font-size: clamp(10pt, 1.2vw, 14pt); }
}

/* ── Deck chrome ── */

.custom-deck {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(78, 255, 198, 0.03), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(122, 141, 255, 0.03), transparent 25%);
}

.custom-deck::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 10%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.custom-deck .slides {
  width: 100%;
  min-height: 100%;
  position: relative;
}

.custom-deck .slide {
  display: flex;
  position: absolute !important;
  inset: 0;
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(48px) scale(0.985);
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 500ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 500ms;
  align-items: center;
  justify-content: center;
}

.custom-deck .slide.active {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 2;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-deck .slide.prev {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-48px) scale(0.985);
  z-index: 1;
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 500ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 500ms;
}

.custom-deck .slide:not(.active) .footnote { display: none; }

.deck-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255,255,255,0.05);
  z-index: 20;
}

.deck-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1f4266, var(--secondary-color));
  box-shadow: 0 0 12px rgba(122, 141, 255, 0.2);
}

.deck-ui {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
}

.deck-counter {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(3, 8, 17, 0.72);
  color: var(--text-color);
  font-size: clamp(7pt, 0.8vw, 9pt);
  letter-spacing: 0.03em;
}

.deck-nav { display: flex; gap: 8px; }

.nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(3, 8, 17, 0.72);
  color: var(--text-color);
  cursor: pointer;
  font-size: 11px;
  transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(78, 255, 198, 0.35);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Deck logo ── */

.deck-logo {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 25;
  height: clamp(55px, 7.5vh, 80px);
  width: auto;
  opacity: 0.9;
  transition: opacity 200ms ease;
  pointer-events: none;
  object-fit: contain;
}

/* ── Deck QR code ── */

.deck-qrcode-wrap {
  position: absolute;
  bottom: 18px;
  left: 20px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
  transition: opacity 200ms ease;
}

.deck-qrcode {
  height: clamp(100px, 14vh, 140px);
  width: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #fff;
  padding: 4px;
}

.deck-qrcode-label {
  font-family: var(--body-font);
  font-size: clamp(7pt, 0.9vw, 10pt);
  color: var(--muted-color);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 20px);
  margin-bottom: 20px;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.hero-logo {
  height: clamp(40px, 5vh, 64px);
  width: auto;
  flex-shrink: 0;
}

@media (max-height: 800px) {
  .hero-logo { height: clamp(32px, 4vh, 48px); }
  .deck-logo { height: clamp(45px, 6vh, 65px); }
  .deck-qrcode { height: clamp(80px, 11vh, 110px); }
}

/* ── Reveal compat shim (not using reveal.js but classes remain) ── */

.reveal-viewport {
  background:
    radial-gradient(circle at 12% 12%, rgba(78, 255, 198, 0.08), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(122, 141, 255, 0.08), transparent 28%),
    linear-gradient(140deg, #06101d 0%, #071322 45%, #0a1930 100%);
}

.reveal .progress { color: var(--primary-color); height: 4px; }

.reveal .slide-number {
  right: 14px; bottom: 10px;
  background: rgba(3, 8, 17, 0.72);
  color: var(--text-color);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 8pt;
  border: 1px solid rgba(255,255,255,0.08);
}
