:root {
  --ink: #0d0f14;
  --ink-2: #151922;
  --ink-3: #1d2330;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f3f1ec;
  --muted: #a3a8b5;
  --dim: #6b7180;
  --accent: #ff7a45;
  --accent-2: #3dd6c4;
  --accent-soft: rgba(255, 122, 69, 0.14);
  --teal-soft: rgba(61, 214, 196, 0.12);
  --fit: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; }
body {
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage: fixed 1920x1080 canvas scaled to window ---------- */
#viewport { position: fixed; inset: 0; background: #000; cursor: none; overflow: hidden; }
#viewport.show-cursor { cursor: default; }
#stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform-origin: center center; overflow: hidden; background: var(--ink);
}

.slide {
  position: absolute; inset: 0; padding: 110px 150px 120px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 700px at 100% 0%, rgba(255, 122, 69, 0.10), transparent 60%),
    radial-gradient(900px 650px at 0% 100%, rgba(61, 214, 196, 0.07), transparent 60%),
    var(--ink);
  opacity: 0; transform: translateX(-40px);
  transition: opacity .55s ease, transform .7s cubic-bezier(.2, .7, .1, 1);
}
.slide.active { opacity: 1; transform: none; }
.slide.leaving { opacity: 0; transform: translateX(40px); }
.slide.back { transform: translateX(40px); }
.slide.back.leaving { transform: translateX(-40px); }

/* subtle grid texture */
.slide::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at 70% 30%, rgba(0,0,0,.55), transparent 70%);
  opacity: .5;
}

.kicker {
  position: relative; display: flex; align-items: center; gap: 18px;
  font-size: 26px; font-weight: 500; letter-spacing: .02em; color: var(--accent);
  margin-bottom: 34px;
}
.kicker::before { content: ""; width: 56px; height: 3px; border-radius: 3px; background: var(--accent); }

.content { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.fit { font-size: calc(1px * var(--fit)); }

h1.title {
  font-size: calc(88px * var(--fit)); line-height: 1.08; font-weight: 800; letter-spacing: -0.015em;
  max-width: 1500px;
}
.subtitle {
  margin-top: calc(26px * var(--fit)); font-size: calc(36px * var(--fit)); line-height: 1.4;
  font-weight: 300; color: var(--muted); max-width: 1400px;
}

footer.foot {
  position: absolute; left: 150px; right: 150px; bottom: 52px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 21px; color: var(--dim); letter-spacing: .03em;
}
footer.foot .num { font-variant-numeric: tabular-nums; font-weight: 500; }
footer.foot .brand { display: flex; align-items: center; gap: 12px; }
footer.foot .brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ---------- reveal animation ---------- */
.r { opacity: 0; transform: translateY(18px); }
.slide.active .r { animation: rise .7s cubic-bezier(.2, .7, .1, 1) forwards; animation-delay: calc(.12s + var(--i, 0) * .09s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- icons ---------- */
.ico { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico-wrap {
  width: calc(76px * var(--fit)); height: calc(76px * var(--fit)); border-radius: 20px;
  display: grid; place-items: center; font-size: calc(38px * var(--fit));
  background: var(--accent-soft); color: var(--accent); flex: none;
}
.alt .ico-wrap { background: var(--teal-soft); color: var(--accent-2); }

/* ---------- layout: title ---------- */
.layout-title { justify-content: center; padding-top: 0; }
.layout-title .content { justify-content: center; }
.layout-title h1.title { font-size: calc(124px * var(--fit)); max-width: 1450px; }
.layout-title h1.title em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ffb36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.layout-title .meta { margin-top: 70px; font-size: 26px; color: var(--dim); display: flex; gap: 24px; align-items: center; }
.layout-title .meta::before { content: ""; width: 40px; height: 2px; background: var(--dim); }
.orb {
  position: absolute; left: -220px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%);
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 200deg, rgba(255,122,69,.0), rgba(255,122,69,.55), rgba(61,214,196,.45), rgba(255,122,69,.0));
  filter: blur(70px); opacity: .55; animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ---------- layout: section ---------- */
.layout-section .content { justify-content: center; }
.layout-section .big-num {
  font-size: 300px; font-weight: 800; line-height: .9; color: transparent;
  -webkit-text-stroke: 2px rgba(255, 122, 69, .55); margin-bottom: 30px;
}
.layout-section h1.title { font-size: calc(110px * var(--fit)); }

/* ---------- layout: agenda ---------- */
.agenda { margin-top: 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 80px; }
.agenda .row { display: flex; align-items: baseline; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.agenda .row b { font-size: 30px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda .row span { font-size: calc(40px * var(--fit)); font-weight: 500; }
.agenda .row small { display: block; font-size: 24px; color: var(--muted); font-weight: 300; margin-top: 6px; }

/* ---------- layout: bullets ---------- */
.bullets { margin-top: calc(56px * var(--fit)); display: flex; flex-direction: column; gap: calc(30px * var(--fit)); }
.bullets .b { display: flex; gap: 34px; align-items: flex-start; }
.bullets h3 { font-size: calc(38px * var(--fit)); font-weight: 600; margin-top: 6px; }
.bullets p { font-size: calc(29px * var(--fit)); color: var(--muted); font-weight: 300; line-height: 1.45; margin-top: 6px; max-width: 1350px; }

/* ---------- layout: cards ---------- */
.cards { margin-top: calc(70px * var(--fit)); display: grid; gap: 30px; align-items: stretch; }
.card { min-height: 360px; }
.cards.n2 { grid-template-columns: repeat(2, 1fr); }
.cards.n3 { grid-template-columns: repeat(3, 1fr); }
.cards.n4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: 30px; padding: calc(44px * var(--fit)) 40px;
  display: flex; flex-direction: column; gap: calc(24px * var(--fit)); position: relative;
}
.card::after { content: ""; position: absolute; inset: 0 30px auto 30px; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.card h3 { font-size: calc(36px * var(--fit)); font-weight: 700; line-height: 1.2; }
.card p { font-size: calc(26px * var(--fit)); color: var(--muted); line-height: 1.5; font-weight: 300; }

/* ---------- layout: stats ---------- */
.stats { margin-top: calc(80px * var(--fit)); display: grid; gap: 40px; }
.stats.n2 { grid-template-columns: repeat(2, 1fr); }
.stats.n3 { grid-template-columns: repeat(3, 1fr); }
.stats.n4 { grid-template-columns: repeat(4, 1fr); }
.stat { border-top: 2px solid var(--accent); padding-top: 40px; }
.stat:nth-child(even) { border-color: var(--accent-2); }
.stat .v { font-size: calc(124px * var(--fit)); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat .v.long { font-size: calc(84px * var(--fit)); }
.stat h3 { font-size: calc(34px * var(--fit)); font-weight: 600; margin-top: 30px; }
.stat p { font-size: calc(25px * var(--fit)); color: var(--muted); font-weight: 300; line-height: 1.5; margin-top: 12px; }

/* ---------- layout: process ---------- */
.process { margin-top: calc(90px * var(--fit)); display: grid; gap: 34px; position: relative; }
.process.n3 { grid-template-columns: repeat(3, 1fr); }
.process.n4 { grid-template-columns: repeat(4, 1fr); }
.process.n5 { grid-template-columns: repeat(5, 1fr); }
.process::before { content: ""; position: absolute; top: 38px; right: 38px; left: 38px; height: 2px; background: linear-gradient(270deg, var(--accent), var(--accent-2)); opacity: .5; }
.step .dot {
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--ink); border: 2px solid var(--accent); font-size: 30px; font-weight: 700; color: var(--accent);
}
.step:nth-child(even) .dot { border-color: var(--accent-2); color: var(--accent-2); }
.step h3 { font-size: calc(34px * var(--fit)); font-weight: 700; margin-top: 40px; }
.step p { font-size: calc(25px * var(--fit)); color: var(--muted); line-height: 1.5; font-weight: 300; margin-top: 14px; }

/* ---------- layout: compare ---------- */
.compare { margin-top: calc(60px * var(--fit)); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.col { border-radius: 30px; padding: calc(50px * var(--fit)) 54px; border: 1px solid var(--line); background: var(--ink-2); }
.col.a { background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); }
.col.b { background: linear-gradient(160deg, rgba(255,122,69,.16), rgba(255,122,69,.03)); border-color: rgba(255,122,69,.35); }
.col h3 { font-size: calc(40px * var(--fit)); font-weight: 700; display: flex; align-items: center; gap: 20px; }
.col .tag { font-size: 20px; font-weight: 500; padding: 6px 16px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--muted); }
.col.b .tag { background: var(--accent); color: #1a0d06; }
.col ul { list-style: none; margin-top: calc(36px * var(--fit)); display: flex; flex-direction: column; gap: calc(22px * var(--fit)); }
.col li { font-size: calc(29px * var(--fit)); line-height: 1.45; font-weight: 300; color: #d9d7d2; display: flex; gap: 18px; }
.col li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: .6em; background: var(--dim); }
.col.b li::before { background: var(--accent); }

/* ---------- layout: quote ---------- */
.layout-quote .content { justify-content: center; }
.layout-quote .qmark { font-size: 260px; line-height: .6; color: var(--accent); font-family: Georgia, serif; height: 120px; }
.layout-quote blockquote { font-size: calc(64px * var(--fit)); line-height: 1.32; font-weight: 500; max-width: 1450px; letter-spacing: -0.01em; }
.layout-quote cite { display: block; margin-top: 50px; font-style: normal; font-size: 28px; color: var(--muted); }

/* ---------- layout: reveal ---------- */
.layout-reveal .content { justify-content: center; }
.reveal-list { margin-top: calc(60px * var(--fit)); display: flex; flex-direction: column; gap: 22px; }
.rv {
  display: flex; align-items: center; gap: 28px; padding: 30px 40px; border-radius: 24px;
  background: linear-gradient(90deg, rgba(255,122,69,.16), rgba(255,122,69,.02)); border: 1px solid rgba(255,122,69,.35);
}
.rv b { color: var(--accent); font-size: 40px; }
.rv span { font-size: calc(40px * var(--fit)); font-weight: 600; flex: 1; }
.rv small { font-size: 24px; color: var(--muted); }

/* ---------- layout: closing ---------- */
.layout-closing { justify-content: center; text-align: center; align-items: center; }
.layout-closing .content { justify-content: center; align-items: center; }
.layout-closing h1.title { font-size: calc(150px * var(--fit)); }
.layout-closing .subtitle { margin-inline: auto; }

/* ---------- listening dot (optional) ---------- */
#dot { position: fixed; left: 10px; bottom: 10px; width: 6px; height: 6px; border-radius: 50%; background: #333; opacity: .0; z-index: 5; transition: background .3s; }
#dot.on { opacity: .5; }
#dot.listen { background: #2f6b57; }
#dot.busy { background: #8a5a2a; }

/* presenter-only cue: number of a ready live slide, tiny and faint */
#cue { position: fixed; left: 22px; bottom: 14px; z-index: 5; display: flex; gap: 7px; align-items: center; direction: ltr;
  font: 500 11px/1 "Heebo", "Segoe UI", sans-serif; color: #8d93a0; opacity: 0; transition: opacity .6s; pointer-events: none;
  font-variant-numeric: tabular-nums; }
#cue.on { opacity: .42; }
#cue span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: #ff7a45; margin-right: 3px; vertical-align: middle; }
#cue i { width: 3px; height: 3px; border-radius: 50%; background: #8d93a0; animation: cuePulse 1.4s ease-in-out infinite; }
@keyframes cuePulse { 50% { opacity: .15; } }

/* ---------- rehearsal HUD (Shift+D) ---------- */
#hud {
  position: fixed; left: 16px; top: 16px; width: 440px; max-height: 70vh; overflow: auto; z-index: 20;
  background: rgba(10, 12, 16, .92); border: 1px solid #2a2f3a; border-radius: 12px; padding: 14px;
  font: 13px/1.5 "Segoe UI", Arial, sans-serif; color: #cfd3dc; display: none;
}
#hud.open { display: block; }
#hud h4 { font-size: 12px; color: #8b92a1; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .06em; }
#hud .line { border-bottom: 1px solid #1e232c; padding: 3px 0; }

/* ---------- setup screen ---------- */
#setup {
  position: fixed; inset: 0; z-index: 50; overflow: auto;
  background: radial-gradient(900px 600px at 85% 0%, rgba(255,122,69,.14), transparent 60%), #0b0d11;
  display: flex; justify-content: center; padding: 48px 16px;
}
#setup.hidden { display: none; }
.setup-card { width: 100%; max-width: 760px; }
.setup-card h1 { font-size: 40px; font-weight: 800; letter-spacing: -.01em; }
.setup-card h1 span { color: var(--accent); }
.setup-card .lead { color: var(--muted); font-size: 17px; margin-top: 10px; line-height: 1.6; }
.panel { margin-top: 26px; background: #12151c; border: 1px solid #232835; border-radius: 16px; padding: 22px; }
.panel h2 { font-size: 15px; color: #c7cbd4; font-weight: 600; margin-bottom: 14px; letter-spacing: .02em; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--text); background: #0c0e13; border: 1px solid #2a3040;
  border-radius: 10px; padding: 11px 13px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { font-size: 12.5px; color: var(--dim); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice { border: 1px solid #2a3040; border-radius: 12px; padding: 14px; cursor: pointer; background: #0c0e13; }
.choice input { display: none; }
.choice b { display: block; font-size: 15px; }
.choice small { color: var(--dim); font-size: 12.5px; }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(255,122,69,.08); }
.choice.disabled { opacity: .4; pointer-events: none; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); margin-top: 6px; }
.actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn {
  font: inherit; font-size: 16px; font-weight: 600; border-radius: 12px; padding: 13px 26px; cursor: pointer;
  border: 1px solid #2a3040; background: #171b24; color: var(--text);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a0d06; }
.btn:disabled { opacity: .5; cursor: wait; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.guide { margin: 0 0 12px; padding-inline-start: 22px; display: grid; gap: 8px; font-size: 15px; line-height: 1.6; color: #d6d9e0; }
#setupMsg { margin-top: 14px; font-size: 14px; color: #ffb38f; min-height: 20px; }
.keys { margin-top: 26px; font-size: 13.5px; color: var(--dim); line-height: 1.9; }
.keys kbd { font-family: inherit; background: #1b202b; border: 1px solid #2a3040; border-radius: 6px; padding: 1px 7px; color: #c7cbd4; }
@media (max-width: 640px) { .choices, .row2 { grid-template-columns: 1fr; } }

/* ---------- imported PowerPoint slides ---------- */
.slide.layout-image, .slide.layout-pptx-html { padding: 0; background: #000; }
.slide.layout-image::before, .slide.layout-pptx-html::before { display: none; }
.slide .pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.slide.layout-pptx-html { background: #fff; }
.slide .ptitle { display: flex; align-items: center; line-height: 1.15; overflow: hidden; }
.slide .pbody { margin: 0; padding-inline-start: 1.1em; line-height: 1.45; overflow: hidden; }
.slide .pbody li { margin-bottom: .45em; }
.slide .pframe { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 100%; max-width: 100%; background: #fff; }
.slide .pframe .pimg { object-fit: fill; }
#cue b { font-weight: 700; color: #ff9b7a; }
