/* ============================================================
   Docu eSign: Presentation (XodetiStudio Unified Dark)
   Clean Zinc Obsidian + Sovereign Emerald / Cyan Security Palette
   ============================================================ */
:root {
  --obsidian-950: #09090b;
  --obsidian-900: #111115;
  --obsidian-800: #14141a;
  --obsidian-700: #18181e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-faint:   #94a3b8;
  --emerald: #10b981;
  --emerald-soft: #34d399;
  --cyan: #06b6d4;
  --cyan-soft: #38bdf8;
  --amber: #f59e0b;
  --gold: #f59e0b;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --rose: #f43f5e;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html, body {
  height: 100%;
  background: #09090b;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ---------- Ambient background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(120px); opacity: 0.18;
}
.bg-glow--emerald { width: 48vw; height: 48vw; left: -14vw; top: -14vw; background: radial-gradient(circle, rgba(16,185,129,0.35), transparent 70%); }
.bg-glow--cyan { width: 42vw; height: 42vw; right: -12vw; bottom: -16vw; background: radial-gradient(circle, rgba(6,182,212,0.26), transparent 70%); }

.scanline {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.35;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------- Progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: rgba(255,255,255,0.05); }
.progress span { display: block; height: 100%; width: 12.5%; background: linear-gradient(90deg, var(--emerald), var(--cyan-soft)); transition: width .5s cubic-bezier(.22,1,.36,1); }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; gap: 16px;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand__mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px; font-weight: 900; font-size: 15px; color: #000000;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 24px rgba(16,185,129,0.5);
  font-family: var(--mono);
}
.brand__text { font-weight: 700; letter-spacing: -0.02em; font-size: 15px; }
.brand__text em { font-style: normal; color: var(--emerald-soft); }

.topnav { display: flex; gap: 4px; padding: 6px; background: rgba(17,17,21,0.7); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(16px); }
.topnav__link {
  border: 0; background: transparent; color: var(--text-dim); font-family: var(--font);
  font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: color .2s, background .2s;
}
.topnav__link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.topnav__link.is-active { color: #000000; background: var(--emerald); }

.counter { font-family: var(--mono); font-size: 13px; color: var(--text-faint); letter-spacing: 0.05em; }
.counter #slideNow { color: var(--emerald); }

.back-suite {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-dim); text-decoration: none; padding: 5px 12px;
  border-radius: 999px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line); transition: color .2s, border-color .2s, background .2s;
}
.back-suite:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,0.08); }

/* ---------- Deck / slides ---------- */
#deck { position: relative; z-index: 2; flex: 1; }
.slide {
  position: absolute; inset: 0; display: none;
  padding: 96px 32px 100px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.65) rgba(17, 17, 21, 0.9);
}
.slide: -webkit-scrollbar { width: 10px; }
.slide: -webkit-scrollbar-track { background: rgba(17, 17, 21, 0.9); border-left: 1px solid var(--line); }
.slide: -webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.6);
  border-radius: 999px;
  border: 2px solid #09090b;
  min-height: 48px;
}
.slide: -webkit-scrollbar-thumb:hover { background: var(--emerald); box-shadow: 0 0 12px rgba(16, 185, 129, 0.7); }
.slide.is-active { display: block; animation: slideIn .6s cubic-bezier(.22,1,.36,1); }
@keyframes slideIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.slide__inner { max-width: 1200px; margin: 0 auto; }
.slide--hero { display: none; }
.slide--hero.is-active { display: flex; flex-direction: column; }

/* ---------- Typography helpers ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.grad { background: linear-gradient(120deg, var(--emerald) 0%, var(--cyan-soft) 45%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(16,185,129,0.12); color: var(--emerald-soft); padding: 2px 7px; border-radius: 6px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.18fr 0.82fr; gap: 48px; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; }
.hero__title { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.08; font-weight: 900; letter-spacing: -0.035em; margin: 18px 0; }
.hero__title .line { display: block; }
.hero__title .line.grad { font-size: 0.88em; line-height: 1.15; margin-top: 4px; }
.hero__lead { font-size: 17px; line-height: 1.7; color: var(--text-dim); max-width: 600px; }
.hero__lead strong { color: var(--text); font-weight: 700; }
.hero__lead em { color: var(--emerald-soft); font-style: normal; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.pill { font-family: var(--mono); font-size: 12px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); }
.pill--emerald { color: #6ee7b7; border-color: rgba(16,185,129,0.4); }
.pill--cyan { color: var(--cyan-soft); border-color: rgba(6,182,212,0.4); }
.pill--gold { color: var(--amber); border-color: rgba(245,158,11,0.4); }
.pill--violet { color: #c4b5fd; border-color: rgba(139,92,246,0.4); }

.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.btn { font-family: var(--font); font-size: 14px; font-weight: 700; padding: 14px 26px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: transform .18s, box-shadow .2s, background .2s; }
.btn--primary { background: linear-gradient(120deg, var(--emerald), #059669); color: #000000; box-shadow: 0 10px 30px -8px rgba(16,185,129,0.6); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(16,185,129,0.8); }
.btn--ghost { background: rgba(255,255,255,0.04); border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,0.09); transform: translateY(-2px); }

.hero__right { display: grid; place-items: center; }
.orbit { position: relative; width: min(380px, 42vw); aspect-ratio: 1; display: grid; place-items: center; }
.orbit__core {
  width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center;
  font-size: 38px; font-weight: 900; color: #000000; font-family: var(--mono);
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 60px rgba(16,185,129,0.55), inset 0 0 30px rgba(255,255,255,0.25);
  z-index: 2;
}
.orbit__ring { position: absolute; border: 1px dashed rgba(255,255,255,0.16); border-radius: 50%; animation: spin 24s linear infinite; }
.orbit__ring--1 { width: 62%; height: 62%; }
.orbit__ring--2 { width: 100%; height: 100%; animation-duration: 36s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit__node {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: var(--obsidian-800); border: 1px solid var(--line-strong); color: var(--emerald-soft);
  white-space: nowrap; box-shadow: var(--shadow);
}
.orbit__ring--2 .orbit__node:last-child { top: auto; bottom: -16px; color: var(--cyan-soft); }

.stat-strip {
  margin-top: auto; width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.stat { text-align: left; }
.stat b { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; color: var(--emerald-soft); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--text-faint); }

/* ---------- Section head ---------- */
.section-head { margin-bottom: 34px; }
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--emerald); }
.section-head h2 { font-size: clamp(32px, 4.8vw, 56px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin: 12px 0; }
.section-sub { font-size: 16px; line-height: 1.65; color: var(--text-dim); max-width: 780px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; backdrop-filter: blur(20px);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.22,1,.36,1), border-color .25s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); }
.card:hover { transform: translateY(-4px); border-color: rgba(16,185,129,0.4); }
.card h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.card p { font-size: 13.5px; line-height: 1.65; color: var(--text-dim); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 16px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--text);
}
.card__icon.emerald { background: rgba(16,185,129,0.16); box-shadow: 0 0 24px rgba(16,185,129,0.3); color: var(--emerald-soft); }
.card__icon.cyan { background: rgba(6,182,212,0.16); box-shadow: 0 0 24px rgba(6,182,212,0.3); color: var(--cyan-soft); }
.card__icon.gold { background: rgba(245,158,11,0.16); box-shadow: 0 0 24px rgba(245,158,11,0.3); color: var(--amber); }
.card__icon.violet { background: rgba(139,92,246,0.18); box-shadow: 0 0 24px rgba(139,92,246,0.3); color: #c4b5fd; }

.ticks { list-style: none; margin-top: 14px; display: grid; gap: 7px; }
.ticks li { position: relative; padding-left: 20px; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.ticks li::before { content: "▸"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }

/* ---------- Feature row ---------- */
.feature-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.feature {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
}
.feature b { font-size: 24px; font-weight: 900; color: var(--emerald-soft); letter-spacing: -0.03em; flex-shrink: 0; font-family: var(--mono); }
.feature span { font-size: 13px; font-weight: 600; line-height: 1.35; min-width: 0; }
.feature small { display: block; font-weight: 400; font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* ---------- Screenshot frames ---------- */
.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--obsidian-800);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.03);
  position: relative;
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: 12px 18px; font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim); letter-spacing: 0.02em;
  background: rgba(17,17,21,0.88); border-top: 1px solid var(--line);
}
.shot--wide { margin-bottom: 28px; }
.shot-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; margin-top: 24px; margin-bottom: 28px; align-items: stretch; }
.shot-col { display: grid; gap: 20px; align-content: start; }

/* ---------- Formula / Code blocks ---------- */
.formula-box {
  background: rgba(17, 17, 21, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--cyan-soft);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  margin-top: 14px;
}
.formula-box .comment { color: var(--text-faint); }
.formula-box .keyword { color: var(--emerald-soft); font-weight: 700; }
.formula-box .number { color: var(--amber); }

/* ---------- Architecture Pipeline & Steps ---------- */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.pipeline-step {
  padding: 18px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line);
  position: relative;
}
.pipeline-step__num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--emerald); margin-bottom: 6px; }
.pipeline-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pipeline-step p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ---------- Architecture Schematics ---------- */
.arch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: center;
  padding: 44px 20px; margin-bottom: 24px; border-radius: var(--radius);
  background: rgba(255,255,255,0.02); border: 1px solid var(--line);
}
.arch__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.arch__lines path { fill: none; stroke: var(--emerald); stroke-width: 2; stroke-dasharray: 7 7; opacity: 0.6; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.arch__node {
  position: relative; z-index: 2; text-align: center; padding: 24px 18px; border-radius: 16px;
  background: var(--obsidian-800); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.arch__node h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.arch__node span { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.arch__node--center { background: linear-gradient(180deg, rgba(16,185,129,0.18), rgba(16,185,129,0.04)); border-color: rgba(16,185,129,0.5); box-shadow: 0 0 50px -10px rgba(16,185,129,0.5); }
.arch__node--left { border-color: rgba(6,182,212,0.35); }
.arch__node--right { border-color: rgba(245,158,11,0.35); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.slide.is-active .reveal { animation: revealUp .7s cubic-bezier(.22,1,.36,1) forwards; }
.slide.is-active .reveal:nth-child(2) { animation-delay: .08s; }
.slide.is-active .reveal:nth-child(3) { animation-delay: .16s; }
.slide.is-active .reveal:nth-child(4) { animation-delay: .24s; }
.slide.is-active .reveal:nth-child(5) { animation-delay: .32s; }
.slide.is-active .reveal:nth-child(6) { animation-delay: .40s; }
@keyframes revealUp { to { opacity: 1; transform: none; } }

/* ---------- Controls ---------- */
.controls {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 18px 32px;
}
.controls::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,9,11,0.96), transparent); pointer-events: none; }
.ctrl { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(17,17,21,0.85); color: var(--text); font-size: 20px; cursor: pointer; backdrop-filter: blur(14px); transition: background .2s, transform .2s; }
.ctrl:hover { background: rgba(16,185,129,0.18); transform: translateY(-2px); }
.ctrl--wide { width: auto; padding: 0 18px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ctrl.is-on { background: var(--emerald); color: #000000; border-color: var(--emerald); }
.dots { position: relative; z-index: 1; display: flex; gap: 9px; }
.dot-btn { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.2); cursor: pointer; transition: all .25s; }
.dot-btn:hover { background: rgba(255,255,255,0.45); }
.dot-btn.is-active { width: 28px; border-radius: 999px; background: var(--emerald); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero__right { display: none; }
  .grid--3, .grid--2, .grid--4, .feature-row, .stat-strip, .pipeline { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: 1fr; padding: 24px; }
  .arch__lines { display: none; }
  .shot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topnav { display: none; }
  .slide { padding: 84px 20px 96px; }
  .grid--3, .grid--2, .grid--4, .feature-row, .pipeline { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
