/* Certe platform pitch — deck styles. Brand tokens from reference/certe-webapp. */
:root {
  --teal: #043343;
  --teal-deep: #052732;
  --teal-bright: #0d5770;
  --teal-60: #68858e;
  --teal-80: #365c69;
  --tan: #ba947e;
  --tan-dark: #88735b;
  --paper: #fafcfc;
  --surface-muted: #f3f4f5;
  --border: #e0e4e5;
  --ink: #232526;
  --ink-muted: #5c6366;
  --ink-soft: #7a7e80;
  --good: #24ac62;
  --warn: #e49011;
  --bad: #ca141f;
  --ai-from: #6d28d9;
  --ai-via: #4f46e5;
  --ai-to: #0891b2;
  --gradient: linear-gradient(135deg, #043343 0%, #0d5770 100%);
  --shadow-card: 0px 10px 40px rgba(4, 51, 67, 0.18);
  --font-body: 'Montserrat', sans-serif;
  --font-display: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  /* Deep-teal stage to match the deck library + site hero surface (was #021018). */
  background: #043343;
  font-family: var(--font-body);
  color: var(--ink);
  overflow: hidden;
}

/* ---------- stage & slide frame ---------- */
#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.slide {
  width: 1280px; height: 720px;
  position: absolute;
  background: var(--paper);
  overflow: hidden;
  display: none;
  transform-origin: center center;
}
.slide.active { display: block; }

/* progress + counter chrome (screen only) */
#progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--tan); z-index: 50; transition: width 300ms ease;
}
#counter {
  position: fixed; right: 14px; bottom: 12px; z-index: 50;
  font-size: 12px; letter-spacing: 0.12em; color: rgba(250, 252, 252, 0.75);
  background: rgba(2, 16, 24, 0.72); padding: 5px 11px; border-radius: 999px;
}
#hint {
  position: fixed; left: 14px; bottom: 12px; z-index: 50;
  font-size: 11px; letter-spacing: 0.08em; color: rgba(250, 252, 252, 0.55);
  background: rgba(2, 16, 24, 0.72); padding: 5px 11px; border-radius: 999px;
}

/* share button + toast (injected by deck.js) */
#share-btn {
  position: fixed; right: 14px; bottom: 44px; z-index: 55;
  font-family: inherit; font-size: 12px; letter-spacing: 0.04em;
  color: rgba(250, 252, 252, 0.8); background: rgba(2, 16, 24, 0.72);
  border: 1px solid rgba(250, 252, 252, 0.2); border-radius: 999px;
  padding: 6px 13px; cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
#share-btn:hover { background: rgba(2, 16, 24, 0.92); color: #fff; border-color: var(--tan); }
#toast {
  position: fixed; left: 50%; bottom: 56px; z-index: 60;
  transform: translateX(-50%) translateY(8px);
  background: var(--teal); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  padding: 9px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(2, 16, 24, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* speaker notes drawer */
#notes {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 34vh; overflow-y: auto;
  background: rgba(2, 16, 24, 0.96);
  border-top: 2px solid var(--tan);
  color: #dfe7ea; padding: 18px 28px 24px;
  font-size: 14px; line-height: 1.65;
  display: none;
}
#notes.open { display: block; }
#notes .notes-label {
  color: var(--tan); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 8px;
}

/* ---------- shared slide anatomy ---------- */
/* z-index lifts content above the .slide.dark::after sheen so the diagonal
   bands stay atmospheric instead of dimming text. */
.slide-inner { position: absolute; inset: 0; padding: 64px 72px 58px; z-index: 1; }
.kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--tan-dark);
  margin-bottom: 14px;
}
.slide h1 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 44px; line-height: 1.12;
  color: var(--teal); letter-spacing: -0.01em;
  max-width: 900px;
  text-wrap: balance;
}
.slide h1 .accent { color: var(--tan-dark); }
.lede { font-size: 18px; color: var(--ink-muted); margin-top: 12px; max-width: 760px; line-height: 1.5; }

.bullets { list-style: none; margin-top: 22px; }
.bullets li {
  position: relative; padding-left: 26px;
  font-size: 17px; line-height: 1.45; color: var(--ink);
  margin-bottom: 13px; max-width: 520px;
}
.bullets li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 12px; height: 3px; background: var(--tan); border-radius: 2px;
}
.bullets li strong { color: var(--teal); }

.footer-brand {
  position: absolute; left: 72px; bottom: 22px;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.footer-brand img { height: 18px; display: block; }
.footer-brand { z-index: 1; }
.slide-no {
  position: absolute; right: 72px; bottom: 22px;
  font-size: 11px; letter-spacing: 0.16em; color: var(--ink-soft);
  z-index: 1;
}

/* dark slides (1 & 12) */
.slide.dark { background: var(--gradient); color: #fff; }
.slide.dark::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 55%, rgba(250, 252, 252, 0.045) 55.2%, transparent 78%),
    linear-gradient(295deg, transparent 60%, rgba(2, 16, 24, 0.25) 60.2%, transparent 88%);
}
.slide.dark h1 { color: #fff; }
.slide.dark .kicker { color: var(--tan); }
.slide.dark .footer-brand, .slide.dark .slide-no { color: rgba(250, 252, 252, 0.5); }

/* screenshot framing */
.shot {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-card);
  overflow: hidden;
}
.shot .bar {
  height: 22px; background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px; padding: 0 10px;
}
.shot .bar i { width: 7px; height: 7px; border-radius: 50%; background: #c8cbcc; display: block; }
.shot img { display: block; width: 100%; }

/* callout chips */
.callout {
  position: absolute; z-index: 5;
  background: var(--teal); color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  padding: 9px 13px; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(2, 16, 24, 0.35);
  max-width: 240px;
}
.callout::before {
  content: ''; position: absolute; width: 26px; height: 2px; background: var(--tan);
}
.callout.from-left::before { left: -26px; top: 50%; }
.callout.from-right::before { right: -26px; top: 50%; }
.callout.from-top::before { transform: rotate(90deg); left: 50%; top: -15px; }
.callout.from-bottom::before { transform: rotate(90deg); left: 50%; bottom: -15px; }
.callout .tick { color: var(--tan); }

/* question-slide layout (4-7) */
.q-num {
  position: absolute; top: 34px; right: 46px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 200px; line-height: 1; color: var(--teal);
  opacity: 0.055; user-select: none;
}
.q-layout { display: grid; grid-template-columns: 430px 1fr; gap: 40px; height: 100%; }
.q-copy { padding-top: 6px; }
.q-copy h1 { font-size: 38px; }
.q-visual { position: relative; align-self: center; }
.q-tagline {
  margin-top: 20px; font-size: 15px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--tan-dark);
}

/* strips (milestones, outages) */
.strip {
  position: absolute; left: 72px; right: 72px; bottom: 52px;
  border-top: 1px solid var(--border);
  padding-top: 14px; display: flex; gap: 34px; align-items: baseline;
  font-size: 13px; color: var(--ink-muted);
}
.strip b { color: var(--teal); font-weight: 600; }
.strip .flag { color: var(--bad); font-weight: 700; }
.strip .note { margin-left: auto; font-style: italic; color: var(--ink-soft); }

/* proof tiles (slide 11) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.tile {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 18px 16px; box-shadow: 0 4px 14px rgba(4, 51, 67, 0.06);
}
.tile .t-icon {
  width: 34px; height: 34px; border-radius: 8px; background: var(--teal);
  color: var(--tan); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 16px;
}
.tile h3 { font-size: 15px; color: var(--teal); margin-bottom: 6px; font-weight: 700; }
.tile p { font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }

.adoption { display: flex; align-items: stretch; gap: 0; margin-top: 30px; }
.step { flex: 1; position: relative; padding: 0 26px 0 0; }
.step + .step { padding-left: 26px; }
.step + .step::before {
  content: ''; position: absolute; left: -7px; top: 12px;
  width: 14px; height: 14px; border-top: 2.5px solid var(--tan); border-right: 2.5px solid var(--tan);
  transform: rotate(45deg);
}
.step .s-num {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: #fff; background: var(--tan-dark); width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.step h4 { font-size: 15.5px; color: var(--teal); margin-bottom: 5px; }
.step p { font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }

.pricing-foot {
  margin-top: 26px; font-size: 13.5px; color: var(--ink-muted);
  border-left: 3px solid var(--tan); padding-left: 14px; line-height: 1.55;
}
.pricing-foot .todo { color: var(--tan-dark); font-weight: 600; font-size: 12px; }

/* puzzle diagram (slides 3 & 12) */
.puzzle { position: relative; }
.puzzle .pz {
  position: absolute; border-radius: 14px; color: #fff; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.puzzle .pz .pz-q { font-size: 15.5px; font-weight: 600; line-height: 1.35; opacity: 0.95; }
.puzzle .pz .pz-m {
  font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em;
}
.puzzle .hub {
  position: absolute; z-index: 4; background: var(--tan); color: var(--teal-deep);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 700; font-size: 12.5px; line-height: 1.3;
  box-shadow: 0 8px 24px rgba(2, 16, 24, 0.35);
}

/* slide 12 */
.close-cta {
  font-size: 20px; line-height: 1.6; color: rgba(255, 255, 255, 0.92);
  max-width: 620px; margin-top: 26px;
}
.close-cta b { color: var(--tan); }
.proof-strip { position: absolute; right: 72px; bottom: 96px; display: flex; gap: 12px; }
.proof-strip .ps {
  width: 158px; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(250, 252, 252, 0.2); box-shadow: 0 8px 22px rgba(2, 16, 24, 0.4);
}
.proof-strip .ps img { width: 100%; display: block; }
.proof-strip .ps .ps-cap {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(2, 16, 24, 0.55); color: rgba(250, 252, 252, 0.85);
  padding: 5px 8px;
}

/* document chips (scramble slides) */
.doc-chip {
  display: inline-block; background: #fafcfc; color: #3d4244;
  font-size: 12.5px; font-weight: 500; padding: 8px 12px;
  border-radius: 6px; box-shadow: 0 4px 12px rgba(2, 16, 24, 0.35);
}

/* in-slide links (pricing page etc.) */
.slide a {
  color: var(--teal-bright); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--tan); text-underline-offset: 3px;
}
.slide.dark a { color: var(--tan); }

/* slide footnotes (deployment options etc. — understated by design) */
.footnote {
  position: absolute; left: 72px; right: 72px; bottom: 46px;
  font-size: 11px; line-height: 1.5; color: var(--ink-soft);
}
.slide.dark .footnote { color: rgba(250, 252, 252, 0.5); }

/* AI slide accent */
.ai-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--ai-from), var(--ai-via), var(--ai-to));
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 16px;
}
.ai-foot { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 18px; }

/* end-of-deck warning shake — first attempt past an edge shakes, second loops.
   Uses the standalone `translate` property so it composes with the scale transform. */
.slide.shake { animation: deck-shake 340ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes deck-shake {
  0%, 100% { translate: 0; }
  20% { translate: -16px 0; }
  45% { translate: 13px 0; }
  70% { translate: -8px 0; }
  85% { translate: 4px 0; }
}

/* print — one 16:9 page per slide, backgrounds forced (dark slides print their gradient) */
@page { size: 1280px 720px; margin: 0; }
@media print {
  html, body {
    overflow: visible; background: #fff;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #progress, #counter, #hint, #notes, #share-btn, #toast { display: none !important; }
  #stage { position: static; display: block; }
  .slide {
    display: block !important; position: relative; transform: none !important;
    page-break-after: always; break-inside: avoid; margin: 0;
  }
  .slide:last-of-type { page-break-after: auto; }
}
