/* Fissure presentation deck - styling.
   Palette lifted verbatim from resources/webui/dashboard.html so the deck
   matches the running tool. ASCII only, no external fonts, works offline. */

:root {
  --bg: #12151b;
  --panel: #1b1f28;
  --panel2: #232836;
  --fg: #d7dbe4;
  --mut: #8b93a4;
  --acc: #4c8bf5;
  --ok: #3fb950;
  --warn: #d29922;
  --crit: #f85149;
  --brd: #2a3040;

  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --slide-w: 1280px;
  --slide-h: 720px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
}

/* subtle scanline/grid backdrop for the security vibe */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(76, 139, 245, 0.12), transparent 60%),
    linear-gradient(transparent 95%, rgba(76, 139, 245, 0.05) 95%) 0 0 / 100% 28px,
    linear-gradient(90deg, transparent 95%, rgba(76, 139, 245, 0.05) 95%) 0 0 / 28px 100%;
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------------------------------------------ stage */

#stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: var(--slide-w);
  height: var(--slide-h);
  transform: translate(-50%, -50%);
  transform-origin: center center;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 64px 86px;
  background:
    linear-gradient(180deg, rgba(27, 31, 40, 0.65), rgba(18, 21, 27, 0.9)),
    var(--bg);
  border: 1px solid var(--brd);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.slide.active { display: flex; animation: slide-in 0.5s ease both; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* top accent bar on every content slide */
.slide::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--acc), transparent 60%);
}

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

.kicker {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 18px;
}

h1 { font-family: var(--mono); font-weight: 800; }

h2 {
  font-size: 46px;
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
  max-width: 24ch;
}

.lead {
  font-size: 27px;
  line-height: 1.4;
  color: var(--fg);
  max-width: 40ch;
  margin-bottom: 10px;
}

.sub { font-size: 21px; color: var(--mut); line-height: 1.5; max-width: 52ch; }

.foot {
  position: absolute;
  left: 86px;
  bottom: 40px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--mut);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ lists */

ul.bul { list-style: none; margin-top: 10px; }

ul.bul li {
  position: relative;
  font-size: 25px;
  line-height: 1.45;
  padding: 10px 0 10px 40px;
  color: var(--fg);
}

ul.bul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 21px;
  width: 12px;
  height: 12px;
  background: var(--acc);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(76, 139, 245, 0.6);
}

ul.bul li .em { color: var(--acc); font-family: var(--mono); }

/* --------------------------------------------------------------- fragments */

.fragment {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--d, 0s);
}
.fragment.show { opacity: 1; transform: none; }

/* -------------------------------------------------------------- pillars/cards */

.grid {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 22px 22px;
}
.card .cn {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--acc);
  letter-spacing: 0.1em;
}
.card .ct { font-size: 22px; font-weight: 650; margin-top: 8px; line-height: 1.25; }
.card .cd { font-size: 16px; color: var(--mut); margin-top: 8px; line-height: 1.4; }
.card.accent { border-color: rgba(76, 139, 245, 0.5); box-shadow: 0 0 24px rgba(76, 139, 245, 0.15) inset; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; max-width: 58ch; }
.chip {
  font-family: var(--mono);
  font-size: 18px;
  padding: 10px 16px;
  background: var(--panel2);
  border: 1px solid var(--brd);
  border-radius: 999px;
  color: var(--fg);
}
.chip.ok   { border-color: rgba(63, 185, 80, 0.5); color: var(--ok); }
.chip.warn { border-color: rgba(210, 153, 34, 0.5); color: var(--warn); }
.chip.crit { border-color: rgba(248, 81, 73, 0.5); color: var(--crit); }

/* -------------------------------------------------------------- metric grid */

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 10px; }
.metric {
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 22px 20px;
  text-align: center;
}
.metric .num {
  font-family: var(--mono);
  font-size: 46px;
  font-weight: 800;
  color: var(--acc);
  line-height: 1;
  white-space: nowrap;
}
.metric .lab { font-size: 16px; color: var(--mut); margin-top: 10px; letter-spacing: 0.03em; }

/* ------------------------------------------------------------------ loop */

.loop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.loop .node {
  font-family: var(--mono);
  font-size: 20px;
  padding: 14px 20px;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
}
.loop .arrow { color: var(--acc); font-family: var(--mono); font-size: 26px; }

/* ------------------------------------------------------------------ timeline */

.timeline { display: flex; gap: 0; margin-top: 26px; align-items: stretch; }
.phase {
  flex: 1;
  position: relative;
  padding: 0 10px;
  text-align: center;
}
.phase .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--panel2); border: 2px solid var(--acc);
  margin: 0 auto 14px;
  box-shadow: 0 0 14px rgba(76, 139, 245, 0.5);
}
.phase::before {
  content: ""; position: absolute; top: 9px; left: -50%; width: 100%;
  height: 2px; background: var(--brd); z-index: -1;
}
.phase:first-child::before { display: none; }
.phase .pk { font-family: var(--mono); font-size: 16px; color: var(--acc); }
.phase .pt { font-size: 17px; margin-top: 6px; line-height: 1.25; color: var(--fg); }

/* ------------------------------------------------- four-surface / flow boxes */

.flow { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.box {
  font-family: var(--mono);
  font-size: 18px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
  text-align: center;
  min-width: 150px;
}
.box.store { border-color: var(--acc); background: rgba(76, 139, 245, 0.12); font-size: 20px; }
.box.out { border-color: rgba(63, 185, 80, 0.5); }
.col { display: flex; flex-direction: column; gap: 12px; }
.arrow-r { color: var(--acc); font-family: var(--mono); font-size: 30px; }

/* ------------------------------------------------------------- screenshots */

.shots { display: grid; gap: 16px; margin-top: 14px; }
.shots.quad { grid-template-columns: 1fr 1fr; }
.shots.duo  { grid-template-columns: 1fr 1fr; }

.shot {
  background: var(--panel);
  border: 1px solid var(--brd);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.shot img {
  width: 100%;
  height: 196px;
  object-fit: contain;
  object-position: center;
  background: #0d0f14;
  border: 1px solid var(--brd);
  border-radius: 6px;
  display: block;
}
.shots.duo .shot img { height: 432px; }
.shot figcaption {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mut);
  margin-top: 9px;
  text-align: center;
}
.shot figcaption b { color: var(--acc); font-weight: 700; }

/* Fullscreen screenshot tour (slides tagged .tour, s20-s22). After every shot
   is revealed, each step lifts one screenshot to fill the slide, one by one. */
.slide.tour .shot.fs {
  position: absolute;
  inset: 0;
  z-index: 40;
  margin: 0;
  padding: 40px 60px 56px;
  justify-content: center;
  border: none;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(13, 15, 20, 0.97), rgba(10, 12, 16, 0.985));
  animation: fs-in 0.35s ease both;
}
.slide.tour .shot.fs img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
}
.slide.tour .shot.fs figcaption {
  font-size: 18px;
  margin-top: 16px;
}
.slide.tour .shot.fs::after {
  content: attr(data-fsidx);
  position: absolute;
  right: 26px;
  bottom: 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mut);
}
@keyframes fs-in {
  from { opacity: 0; transform: scale(0.965); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------- shield */

.shield {
  width: 150px; height: 170px; margin: 10px auto 0;
  display: block;
}
.shield path { stroke: var(--acc); stroke-width: 3; fill: rgba(76, 139, 245, 0.1); }
.shield .draw {
  stroke-dasharray: 520; stroke-dashoffset: 520;
}
.active .shield .draw { animation: draw 1.3s ease forwards 0.3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------------------------------------------------------- title slide */

.title-slide { align-items: center; text-align: center; justify-content: center; }
.title-slide::before { background: none; }

.brand {
  font-size: 108px;
  letter-spacing: 0.16em;
  color: var(--fg);
  position: relative;
  text-shadow: 0 0 40px rgba(76, 139, 245, 0.35);
}
.active .brand { animation: fissure-in 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fissure-in {
  0%   { letter-spacing: 0.6em; opacity: 0; filter: blur(8px); }
  55%  { opacity: 1; }
  100% { letter-spacing: 0.16em; filter: blur(0); }
}
/* the crack */
.crackline { width: 560px; height: 26px; margin: 6px auto 0; display: block; }
.crackline path { stroke: var(--acc); stroke-width: 2.5; fill: none;
  stroke-dasharray: 700; stroke-dashoffset: 700; }
.active .crackline path { animation: draw 1.1s ease forwards 0.6s; }

.title-slide .subtitle { font-size: 34px; color: var(--fg); margin-top: 30px; font-weight: 600; }
.title-slide .meta { font-family: var(--mono); font-size: 18px; color: var(--mut); margin-top: 22px; letter-spacing: 0.06em; }

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

#ui { position: fixed; z-index: 10; inset: 0; pointer-events: none; }

#progress-wrap {
  position: fixed; left: 0; bottom: 0; height: 4px; width: 100%;
  background: rgba(255,255,255,0.05); z-index: 11;
}
#progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--ok)); transition: width 0.4s ease; }

#counter {
  position: fixed; right: 20px; bottom: 16px; z-index: 11;
  font-family: var(--mono); font-size: 14px; color: var(--mut);
}

#langbtn {
  position: fixed; right: 18px; top: 16px; z-index: 12;
  pointer-events: auto;
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  color: var(--fg); background: var(--panel2);
  border: 1px solid var(--brd); border-radius: 8px;
  padding: 8px 14px; cursor: pointer;
}
#langbtn:hover { border-color: var(--acc); color: var(--acc); }

#hint {
  position: fixed; left: 18px; bottom: 14px; z-index: 11;
  font-family: var(--mono); font-size: 13px; color: var(--mut);
}

/* hide the inactive-language text copies: handled by JS text swap, so nothing
   needed here. The .t elements carry both languages in data-* attributes. */

/* ------------------------------------------------------------------- PDF mode */

body.pdf { overflow: visible; height: auto; }
body.pdf::before { display: none; }
body.pdf #ui, body.pdf #progress-wrap, body.pdf #counter, body.pdf #langbtn, body.pdf #hint { display: none; }

body.pdf #stage {
  position: static;
  transform: none;
  width: var(--slide-w);
  height: auto;
}
body.pdf .slide {
  position: relative;
  inset: auto;
  display: flex !important;
  width: var(--slide-w);
  height: var(--slide-h);
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  page-break-after: always;
  break-after: page;
  animation: none;
}
body.pdf .fragment { opacity: 1; transform: none; }
body.pdf .shield .draw { stroke-dashoffset: 0; }
body.pdf .crackline path { stroke-dashoffset: 0; }

@page { size: 1280px 720px; margin: 0; }
