/* Lotgentix deck framework — shared by all decks on docs.lotgentix.com */

:root {
  --brand: #349993;
  --brand-deep: #1f6f6a;
  --brand-soft: #e8f5f4;
  --brand-hover: #2c8580;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --header: #0b1220;
  --header-2: #121c2e;
  --warn: #b45309;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

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

html, body { height: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--soft);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- slides */

.deck { position: fixed; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 72px) clamp(20px, 7vw, 110px) clamp(84px, 12vh, 120px);
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(52, 153, 147, .07), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(15, 23, 42, .05), transparent 55%),
    #ffffff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .38s var(--ease), transform .38s var(--ease), visibility 0s linear .38s;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .38s var(--ease), transform .38s var(--ease);
  pointer-events: auto;
}

/* going backwards: subtle downward exit direction handled by shared fade — keep it calm */

.slide-inner { width: min(1120px, 100%); margin: 0 auto; }

/* dark slides (title / section dividers) */
.slide.dark {
  background:
    radial-gradient(1000px 500px at 80% -20%, rgba(52, 153, 147, .28), transparent 60%),
    radial-gradient(700px 400px at 10% 120%, rgba(52, 153, 147, .12), transparent 55%),
    linear-gradient(135deg, var(--header), var(--header-2));
  color: #f1f5f9;
}
.slide.dark .kicker { color: #7fd1cb; }
.slide.dark h1, .slide.dark h2 { color: #ffffff; }
.slide.dark .lead, .slide.dark p { color: #cbd5e1; }
.slide.dark .rule { background: rgba(127, 209, 203, .4); }

/* ------------------------------------------------------------ typography */

.kicker {
  font-size: clamp(12px, 1.3vw, 14px);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.15;
  font-weight: 600;
  margin-bottom: 16px;
}

h3 { font-size: clamp(16px, 1.7vw, 19px); font-weight: 600; margin-bottom: 6px; }

.lead {
  font-size: clamp(16px, 1.9vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}

p { line-height: 1.55; }

.rule {
  width: 64px; height: 3px; border-radius: 2px;
  background: var(--brand);
  margin: 4px 0 22px;
}

.brand-em { color: var(--brand-deep); }
.slide.dark .brand-em { color: #7fd1cb; }

/* ----------------------------------------------------------- components */

.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(16px, 2.4vh, 28px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 1.8vw, 22px);
  box-shadow: var(--shadow);
}
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.card p, .card li { color: var(--muted); font-size: clamp(13px, 1.4vw, 15.5px); }
.card.accent { border-top: 3px solid var(--brand); }

.slide.dark .card {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
}
.slide.dark .card h3 { color: #f1f5f9; }
.slide.dark .card p, .slide.dark .card li { color: #94a3b8; }

.stat { text-align: left; }
.stat .stat-value {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600; color: var(--brand-deep); line-height: 1;
}
.stat .stat-label { color: var(--muted); font-size: clamp(13px, 1.4vw, 15px); margin-top: 8px; }
.slide.dark .stat .stat-value { color: #7fd1cb; }
.slide.dark .stat .stat-label { color: #94a3b8; }

.pill {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 13px; font-weight: 600;
}
.slide.dark .pill { background: rgba(127, 209, 203, .14); color: #7fd1cb; }

/* tables */
table { width: 100%; border-collapse: collapse; margin-top: clamp(14px, 2vh, 22px); font-size: clamp(13px, 1.4vw, 15.5px); }
th {
  text-align: left; font-weight: 600; color: var(--brand-deep);
  text-transform: uppercase; letter-spacing: .06em; font-size: clamp(11px, 1.1vw, 12.5px);
  padding: 10px 14px; border-bottom: 2px solid var(--brand);
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; line-height: 1.45; }
td.muted, .muted { color: var(--muted); }
tbody tr:nth-child(even) { background: var(--soft); }
td strong { color: var(--brand-deep); }

/* checklist */
.checklist { list-style: none; margin-top: clamp(14px, 2vh, 22px); }
.checklist li {
  position: relative; padding: 9px 0 9px 36px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(13.5px, 1.5vw, 16px); line-height: 1.45;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--brand-soft);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M5 10.5l3.2 3.2L15 7" fill="none" stroke="%231f6f6a" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}

/* plain list */
.bullets { list-style: none; margin-top: clamp(14px, 2vh, 22px); }
.bullets li {
  position: relative; padding: 8px 0 8px 26px;
  font-size: clamp(14px, 1.6vw, 17px); line-height: 1.5; color: var(--ink);
}
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 16px;
  width: 8px; height: 8px; border-radius: 999px; background: var(--brand);
}
.bullets li em { color: var(--muted); font-style: normal; }
.slide.dark .bullets li { color: #e2e8f0; }

/* quote / callout */
.callout {
  margin-top: clamp(16px, 2.4vh, 26px);
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: clamp(14px, 1.6vw, 17px); line-height: 1.5;
  color: var(--brand-deep);
}
.callout.warn { border-color: var(--warn); background: #fef3e2; color: #92400e; }

.footer-note { margin-top: clamp(16px, 2.6vh, 30px); color: var(--muted); font-size: clamp(12.5px, 1.3vw, 14px); }

/* logo — the lockup PNG has a baked black background; screen-blend it away on dark slides */
.logo-lockup { height: clamp(34px, 4.5vw, 52px); width: auto; display: block; mix-blend-mode: screen; }

/* ------------------------------------------------------ entrance stagger */

[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms + 120ms);
}
.slide.active [data-animate] { opacity: 1; transform: none; }

/* --------------------------------------------------------- svg diagrams */

.diagram { margin-top: clamp(16px, 3vh, 32px); width: 100%; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }

.diagram .node, .diagram .d-pop { opacity: 0; }
.slide.active .diagram .node,
.slide.active .diagram .d-pop {
  animation: d-pop .55s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes d-pop {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.diagram .wire {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
}
.slide.active .diagram .wire {
  animation: d-draw .7s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes d-draw { to { stroke-dashoffset: 0; } }

.diagram .bar { transform: scaleX(0); transform-origin: left center; transform-box: fill-box; }
.slide.active .diagram .bar {
  animation: d-grow .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes d-grow { to { transform: scaleX(1); } }

.diagram text { font-family: var(--sans); }

/* ---------------------------------------------------------------- chrome */

.deck-chrome {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 3vw, 36px) 16px;
  pointer-events: none;
}
.deck-chrome > * { pointer-events: auto; }

.chrome-brand { display: flex; align-items: center; gap: 10px; }
.chrome-brand img { height: 22px; width: auto; opacity: .85; border-radius: 6px; }
.chrome-brand a { display: flex; align-items: center; }

.chrome-nav { display: flex; align-items: center; gap: 10px; }

.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; font-size: 18px;
  box-shadow: var(--shadow);
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
.nav-btn:hover { background: var(--brand-soft); transform: translateY(-1px); }
.nav-btn:disabled { opacity: .35; cursor: default; transform: none; }
.nav-btn svg { width: 18px; height: 18px; }

.chrome-count {
  font-size: 13px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; min-width: 56px; text-align: center;
}

.menu-btn { width: auto; padding: 0 16px; font-size: 13px; font-weight: 600; gap: 8px; }

.deck-progress {
  position: fixed; left: 0; bottom: 0; height: 3px; z-index: 60;
  background: var(--brand); width: 0%;
  transition: width .35s var(--ease);
}

/* dark-slide chrome adaptation */
body.on-dark .nav-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #e2e8f0; box-shadow: none; }
body.on-dark .nav-btn:hover { background: rgba(255,255,255,.16); }
body.on-dark .chrome-count { color: #94a3b8; }

/* slide menu overlay */
.deck-menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 18, 32, .55);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.deck-menu.open { display: flex; }
.deck-menu-panel {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  width: min(560px, 100%); max-height: 80vh; overflow-y: auto;
  padding: 22px;
}
.deck-menu-panel h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 12px; font-weight: 600;
}
.deck-menu-panel button {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  text-align: left; padding: 10px 12px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; font-family: var(--sans);
  font-size: 15px; color: var(--ink);
}
.deck-menu-panel button:hover { background: var(--brand-soft); }
.deck-menu-panel button.current { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.deck-menu-panel button .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 20px; }
.menu-deployed-at {
  margin: 14px 12px 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em;
}

/* Deploy stamp — tiny, top-right; not part of the presentation chrome */
.page-deployed-at {
  position: fixed; top: 10px; right: 14px; z-index: 40;
  font-size: 10px; font-weight: 500; letter-spacing: .02em;
  color: var(--muted); opacity: .55; pointer-events: none;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
body.on-dark .page-deployed-at { color: #94a3b8; opacity: .45; }
@media print {
  .page-deployed-at { display: none !important; }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .slide { justify-content: flex-start; padding-top: clamp(28px, 6vh, 48px); }
}
@media (max-width: 620px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .chrome-brand { display: none; }
  table { font-size: 12.5px; }
  th, td { padding: 8px 8px; }
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .slide, [data-animate], .deck-progress, .nav-btn { transition: none !important; }
  .slide.active .diagram .node,
  .slide.active .diagram .d-pop,
  .slide.active .diagram .wire,
  .slide.active .diagram .bar { animation: none !important; }
  .diagram .node, .diagram .d-pop { opacity: 1; }
  .diagram .wire { stroke-dashoffset: 0; }
  .diagram .bar { transform: none; }
  [data-animate] { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ print */

@media print {
  body { overflow: visible; background: #fff; }
  .deck { position: static; }
  .slide {
    position: static; opacity: 1; visibility: visible; transform: none;
    pointer-events: auto; overflow: visible;
    min-height: 100vh; break-after: page; page-break-after: always;
  }
  [data-animate] { opacity: 1; transform: none; }
  .diagram .node, .diagram .d-pop { opacity: 1; }
  .diagram .wire { stroke-dashoffset: 0; }
  .diagram .bar { transform: none; }
  .deck-chrome, .deck-progress, .deck-menu { display: none !important; }
}
