/* ─────────────────────────────────────────────────────────────
   deck.css — Shared styles for all michaelangeles.com decks
   Each deck references this file and can override CSS variables
   in a local <style> block for per-deck theming.
   ───────────────────────────────────────────────────────────── */

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg-page:      #f9fafc;
  --bg-white:     #ffffff;
  --bg-surface:   #f0f4f8;
  --bg-tint:      #e8f4fb;
  --blue-primary: #37bcf5;
  --blue-dark:    #0e80be;
  --blue-light:   #c9f2ff;
  --blue-label:   #0784c6;
  --navy:         #10172a;
  --slate:        #39414e;
  --body-text:    #3e4245;
  --muted:        #6b7280;
  --border:       #d2d5da;
  --border-light: #e8eaed;
  --sans: 'Figtree', system-ui, sans-serif;
  --serif: 'Lora', Georgia, serif;
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

::selection { background: var(--blue-light); color: var(--navy); }

/* ─── Base layout: viewport-filling deck ────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-white);
  color: var(--body-text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.deck-wrap {
  width: 100%;
  height: 100vh;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Slide container & transitions ─────────────────────────── */
.slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 52px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: scale(0.988);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}

.slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.slide.exit   { opacity: 0; transform: scale(1.004); }

/* Enter choreography: direct children settle in sequence (screen only —
   print stylesheets reveal everything and must not inherit start-frames) */
@media screen {
  .slide.active > :not(.slide-accent-bar):not([data-fragment]) {
    animation: deck-rise 0.6s var(--ease-out-expo) backwards;
  }
  .slide.active > :nth-child(3) { animation-delay: 0.06s; }
  .slide.active > :nth-child(4) { animation-delay: 0.12s; }
  .slide.active > :nth-child(5) { animation-delay: 0.18s; }
  .slide.active > :nth-child(n+6) { animation-delay: 0.24s; }
}

@keyframes deck-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Slide chrome ───────────────────────────────────────────── */
.slide-accent-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blue-primary);
}

.slide-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 18px;
}

.slide-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 18px;
  max-width: 640px;
  text-wrap: balance;
}

.slide-title em { font-style: normal; color: var(--blue-dark); }

.slide-body { font-size: 21px; line-height: 1.75; color: var(--body-text); max-width: 600px; text-wrap: pretty; }
.slide-body strong { color: var(--navy); font-weight: 600; }

.divider { width: 40px; height: 2px; background: var(--blue-primary); margin: 18px 0; border-radius: 2px; }

.title-sub { font-size: 21px; color: var(--muted); line-height: 1.75; max-width: 100%; text-wrap: pretty; }

/* ─── ICP grid (who / pain / scale data table) ──────────────── */
.icp-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 28px;
  margin-bottom: 10px;
}

.icp-grid {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.icp-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--border-light);
}

.icp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.icp-row:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.icp-col-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
  padding: 12px 20px;
}

.icp-col-label:not(:last-child),
.icp-cell:not(:last-child) {
  border-right: 1px solid var(--border-light);
}

.icp-cell {
  padding: 16px 20px;
}

.icp-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1;
  margin-bottom: 8px;
}

.icp-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--body-text);
  margin-bottom: 10px;
  text-wrap: pretty;
}

.icp-source {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-primary);
}

.icp-source a,
.cc-body a,
.step-content a,
.col-block p a,
.principle a,
.slide-body a,
.quote-text a,
.quote-attr a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--blue-light);
  transition: border-color 0.15s, color 0.15s;
}

.icp-source a:hover,
.cc-body a:hover,
.step-content a:hover,
.col-block p a:hover,
.principle a:hover,
.slide-body a:hover,
.quote-text a:hover,
.quote-attr a:hover {
  color: var(--blue-dark);
  border-bottom-color: var(--blue-dark);
}

/* ─── Meta bar (role / duration / scope / team) ─────────────── */
.meta-bar {
  display: flex;
  gap: 48px;
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.meta-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

/* ─── Stat row ───────────────────────────────────────────────── */
.stat-row { display: flex; gap: 14px; margin-top: 28px; }

.stat {
  flex: 1;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 18px 20px;
}

.stat-num { font-size: 36px; font-weight: 800; color: var(--blue-dark); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 16px; color: var(--muted); line-height: 1.5; }

/* ─── Two-column blocks ──────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.col-block {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 22px 24px;
}

.col-block .block-label { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-label); margin-bottom: 10px; }
.col-block p { font-size: 21px; line-height: 1.65; color: var(--body-text); text-wrap: pretty; }
.col-block p strong { color: var(--navy); font-weight: 600; }

/* ─── Pull quote ─────────────────────────────────────────────── */
.quote-block {
  padding: 18px 26px;
  margin-top: 22px;
  background: var(--bg-tint);
  border-radius: 10px;
}

.quote-text { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.55; color: var(--navy); margin-bottom: 8px; text-wrap: pretty; }
.quote-attr { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--blue-dark); text-transform: uppercase; }

/* ─── Numbered steps ─────────────────────────────────────────── */
.journey-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 18px;
}

.step-num { font-size: 24px; font-weight: 800; color: var(--blue-primary); min-width: 36px; line-height: 1.2; flex-shrink: 0; }
.step-title { font-size: 21px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.step-desc { font-size: 21px; color: var(--muted); line-height: 1.55; text-wrap: pretty; }

/* ─── Bullet principles ──────────────────────────────────────── */
.principle-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.principle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.principle-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-primary); margin-top: 5px; flex-shrink: 0; }
.principle-dot.dark { background: var(--blue-dark); }
.principle p { font-size: 21px; color: var(--body-text); line-height: 1.55; text-wrap: pretty; }
.principle p strong { color: var(--navy); font-weight: 600; }

/* ─── Then/Now mirror grid ───────────────────────────────────── */
.mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  position: relative;
}

.mirror-grid::after {
  content: '→';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-primary);
  background: var(--bg-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 36px;
  text-align: center;
  z-index: 1;
}

.mirror-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 18px 20px;
}

.mirror-card.balsamiq { border-top: 3px solid var(--blue-primary); }
.mirror-card.te       { border-top: 3px solid var(--blue-dark); }
.mirror-card.accent   { border-top: 3px solid var(--blue-primary); }
.mirror-card.then-card { background: var(--bg-page); }
.mirror-card.now-card  { background: var(--bg-tint); }
.mirror-card .mc-label { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.mirror-card.balsamiq .mc-label { color: var(--blue-label); }
.mirror-card.te .mc-label       { color: var(--blue-dark); }
.mirror-card.accent .mc-label   { color: var(--blue-label); }
.mirror-card p { font-size: 21px; line-height: 1.65; color: var(--body-text); text-wrap: pretty; }

/* ─── Content + image split layout ──────────────────────────── */
.slide-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: center;
  height: 100%;
}

.img-placeholder {
  height: 100%;
  min-height: 200px;
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--border);
}

.img-placeholder svg { width: 32px; height: 32px; }

.img-placeholder-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--border);
}

.slide-split img,
.slide-split video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.slide-img-below {
  flex: 1;
  min-height: 0;
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.slide-img-below img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* ─── Left-to-right wipe between two images ─────────────────── */
.img-wipe {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.img-wipe img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.img-wipe .img-wipe-over {
  transform: translateX(100%);
}

.img-wipe {
  cursor: pointer;
}

/* ─── Closing card grid ──────────────────────────────────────── */
.closing-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }

.closing-card {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 16px;
}

.closing-card .cc-title { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.closing-card .cc-body  { font-size: 18px; color: var(--muted); line-height: 1.55; text-wrap: pretty; }

/* ─── Media carousel ─────────────────────────────────────────── */
.media-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  display: block;
}

.carousel-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(240,244,248,0.92);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  z-index: 2;
}

.carousel-progress {
  font-size: 11px;
  color: var(--muted);
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.carousel-btn {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.carousel-btn:hover { color: var(--blue-dark); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }

.carousel-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.2s, background 0.2s;
}

.carousel-dot.on {
  background: var(--blue-primary);
  width: 18px;
  border-radius: 3px;
}


/* ─── UX strip carousel (bottom autoplay) ───────────────────── */
.ux-strip {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: var(--bg-surface);
}
.ux-strip-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.ux-strip-item.active {
  opacity: 1;
}
.ux-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.ux-strip-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(240,244,248,0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}
.ux-strip-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--slate);
  padding: 2px 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ux-strip-btn:hover { color: var(--blue-dark); }
.ux-strip-btn svg { width: 13px; height: 13px; display: block; }
.ux-strip-progress {
  font-size: 11px;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ─── Slide action button ────────────────────────────────────── */
.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--blue-primary);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.slide-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* ─── Nav bar ────────────────────────────────────────────────── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
  flex-shrink: 0;
}

.nav-dots { display: flex; gap: 5px; align-items: center; }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  border: none;
  transition: background 0.2s, width 0.2s;
  padding: 0;
}

.dot.on { background: var(--blue-primary); width: 18px; border-radius: 3px; }

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

.nav-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--slate);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-btn:hover:not(:disabled) { background: var(--bg-tint); border-color: var(--blue-primary); color: var(--blue-dark); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }

.slide-counter { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

/* ─── Progressive reveal (fragments) ───────────────────────── */
[data-fragment] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
  pointer-events: none;
}
[data-fragment].visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ─── Focus visibility (keyboard users) ─────────────────────── */
.dot:focus-visible,
.nav-btn:focus-visible,
.carousel-btn:focus-visible,
.ux-strip-btn:focus-visible,
.slide-btn:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .slide,
  [data-fragment],
  .carousel-item,
  .ux-strip-item {
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
  .slide.active > * { animation: none !important; }
}
