/* ---------- Slide frame ---------- */
.deck { position: relative; z-index: 1; }

.slide {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 48px) var(--gutter) 64px;
  display: flex; align-items: safe center;
  overflow: hidden;
}
.slide-inner { position: relative; z-index: 2; width: 100%; max-width: var(--max-w); margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; box-shadow: 0 0 10px currentColor; }

.slide h1 { font-size: var(--fs-h1); }
.slide h2 { font-size: var(--fs-h2); }
.lead { font-size: calc(var(--fs-body) * 1.15); color: var(--text-2); max-width: 60ch; margin-top: 18px; }
.grad { background: linear-gradient(100deg, var(--accent-2) 0%, #4aa3ff 60%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Word-split text (built by animate.js) */
.wrd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wrd > span { display: inline-block; will-change: transform; }

/* ---------- Photo backgrounds with slow Ken Burns drift ---------- */
.slide-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.slide-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: 60% 50%;
  animation: kenburns 28s ease-in-out infinite alternate;
}
.slide-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(4, 10, 25, 0.92) 38%, rgba(4, 10, 25, 0.45) 75%, rgba(4, 10, 25, 0.65) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(-2%, -1.5%, 0); }
}

/* Electric scan line sweeping over photo slides */
.slide-photo .scan {
  position: absolute; inset: 0 auto 0 0; width: 30%; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(25, 211, 255, 0.10), transparent);
  animation: scan 7s var(--ease) infinite;
}
@keyframes scan { from { transform: translateX(-120%); } to { transform: translateX(420%); } }

/* ---------- Title slide ---------- */
.slide--title h1 { font-size: var(--fs-display); max-width: 14ch; }
.title-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 44px; }
.title-meta div { display: flex; flex-direction: column; gap: 2px; }
.title-meta small { font-size: var(--fs-small); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.title-meta strong { font-weight: 600; }
.client-logo { max-height: 56px; width: auto; margin-bottom: 28px; }

/* ---------- Pills & status tags ---------- */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.status--available { --c: var(--status-available); }
.status--pilot { --c: var(--status-pilot); }
.status--roadmap { --c: var(--status-roadmap); }
.status--concept { --c: var(--status-concept); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  padding: 22px;
  backdrop-filter: blur(6px);
}
.card h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: var(--fs-body); }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--ic, var(--accent-2));
  background: color-mix(in srgb, var(--ic, var(--accent-2)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic, var(--accent-2)) 35%, transparent);
}
.icon svg { width: 22px; height: 22px; }

/* ---------- Legend slide (how to read) ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; position: relative; }
.flow-step { text-align: left; }
.flow-step .num { font-size: 13px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.1em; }
.flow-step h3 { margin: 8px 0; }
.flow-line { position: absolute; left: 0; right: 0; top: -22px; height: 2px; }
.flow-line svg { width: 100%; height: 12px; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 40px; align-items: center; }
.legend p { color: var(--text-2); font-size: var(--fs-small); display: flex; gap: 10px; align-items: center; }

/* ---------- Agenda ---------- */
.agenda { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 36px; }
.agenda .card { padding: 18px; text-decoration: none; display: block; transition: border-color 0.25s, transform 0.25s; }
.agenda a.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.agenda .num { font-size: 2.2rem; font-weight: 800; color: transparent; -webkit-text-stroke: 1px var(--accent-2); line-height: 1; }
.agenda h3 { margin-top: 14px; font-size: var(--fs-h3); }
.agenda .card.is-pending { opacity: 0.5; }

/* ---------- Section cover ---------- */
.slide--section .section-num {
  font-size: clamp(5rem, 3rem + 9vw, 12rem); font-weight: 800; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  text-shadow: 0 0 60px var(--accent-glow);
}
.slide--section h1 { font-size: var(--fs-display); margin-top: 12px; }

/* ---------- Problems ---------- */
.problems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.problems .card { --ic: var(--warn); }
.problems .card::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--warn), transparent);
}

/* ---------- AI in action ---------- */
.ai-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: start; margin-top: 32px; }
.solutions { display: flex; flex-direction: column; gap: 12px; }
.solution { padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }
.solution .icon { margin: 0; width: 38px; height: 38px; }
.solution .icon svg { width: 18px; height: 18px; }
.solution-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.solution h3 { margin: 0; font-size: calc(var(--fs-h3) * 0.92); }
.solution p { font-size: var(--fs-small); }

/* Wide variant: feature points in a row, demo full width underneath */
.ai-layout--wide { grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
.ai-layout--wide .solutions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ai-layout--wide .solution { padding: 12px 14px; }
@media (max-width: 1100px) { .ai-layout--wide .solutions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .ai-layout--wide .solutions { grid-template-columns: 1fr; } }

/* ---------- AI types: compare & explainer ---------- */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.compare-card .num { font-size: 12px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.1em; text-transform: uppercase; }
.compare-card h3 { margin: 6px 0 8px; font-size: calc(var(--fs-h3) * 1.15); }
.compare-one { color: var(--text) !important; font-weight: 500; margin-bottom: 14px; }
.compare-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: var(--fs-small); }
.compare-card dt { color: var(--accent-2); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; padding-top: 2px; }
.compare-card dd { margin: 0; color: var(--text-2); }
.explain { padding: 16px 20px; }
.explain .col-title { margin-bottom: 8px; font-size: var(--fs-small); color: var(--accent-2); }
.explain ul, .explain ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); color: var(--text-2); }
.explain li::marker { color: var(--accent-2); font-weight: 700; }
.explain-note { font-size: var(--fs-small); color: var(--muted); padding: 0 4px; }
@media (max-width: 1100px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Impact & KPIs ---------- */
.impact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; margin-top: 36px; }
.col-title { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.impacts { display: flex; flex-direction: column; gap: 12px; }
.impact { display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.impact .icon { --ic: var(--good); margin: 0; width: 36px; height: 36px; flex: none; }
.impact .icon svg { width: 18px; height: 18px; }
.impact h3 { font-size: calc(var(--fs-h3) * 0.92); margin: 0; }
.impact p { font-size: var(--fs-small); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi h3 { font-size: calc(var(--fs-h3) * 0.9); margin: 0; }
.kpi p { font-size: var(--fs-small); }
.kpi-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.kpi-vals div { border-radius: 8px; background: rgba(0, 0, 0, 0.22); padding: 8px 10px; }
.kpi-vals small { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.kpi-vals strong { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.3; display: block; }
.kpi-vals strong.is-set { color: var(--text); font-size: 15px; }
.kpi-meter { height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.kpi-meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; }
.footnote { margin-top: 28px; font-size: var(--fs-small); color: var(--muted); max-width: 90ch; }

/* ---------- Closing ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.steps .num { font-size: 13px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.1em; margin-bottom: 10px; }
.contact { margin-top: 40px; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ai-layout, .impact-layout { grid-template-columns: 1fr; }
  .agenda { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow-line { display: none; }
}
@media (max-width: 680px) {
  .slide { padding-top: calc(var(--topbar-h) + 28px); padding-bottom: 40px; }
  .problems, .kpis, .steps, .agenda, .flow { grid-template-columns: 1fr; }
}

/* ---------- Presentation mode ---------- */
body.is-presenting { overflow: hidden; }
body.is-presenting .slide {
  position: fixed; inset: 0; min-height: 0; height: 100vh;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
body.is-presenting .slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease), visibility 0s; z-index: 3; }
body.is-presenting .topbar { opacity: 0; }
body.is-presenting .progress { top: 0; }
body.is-presenting .topbar:hover, body.is-presenting .topbar:focus-within { opacity: 1; }
body.is-presenting .slide { padding-top: 56px; }
/* Short screens (720p projectors, small laptops): tighter vertical rhythm so slides fit without scrolling */
@media (max-height: 820px) {
  body.is-presenting .slide { padding-top: 26px; padding-bottom: 20px; }
  .slide .eyebrow { margin-bottom: 10px; }
  .ai-layout, .impact-layout, .problems, .compare { margin-top: 20px; }
  .footnote { margin-top: 14px; }
  .kpi { padding: 14px; gap: 8px; }
  .impact, .solution { padding-top: 12px; padding-bottom: 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .slide-photo img, .slide-photo .scan { animation: none; }
  .slide-photo .scan { display: none; }
  body.is-presenting .slide { transition: none; }
}
