/* ==========================================================================
   Software Engineer Starter Pack - štýly prezentácie

   Strohý vizuál v duchu Cisco prezentácií: tmavomodré pozadie, jedna akcentová
   farba, ľahké veľké nadpisy, tenké linky, žiadne prechody ani tiene.
   ========================================================================== */

:root {
  --bg: #07182d;
  --surface: #0d274d;
  --fg: #ffffff;
  --muted: #9fb3c8;
  --faint: #5c7591;
  --rule: rgba(255, 255, 255, 0.16);
  --accent: #00bceb;
  --on-accent: #07182d;

  --map-line: rgba(255, 255, 255, 0.28);
  --map-node: rgba(255, 255, 255, 0.5);

  --font: 'CiscoSansTT', 'CiscoSans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.6, 0, 0.2, 1);

  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #ffffff;
  --surface: #f0f4f8;
  --fg: #07182d;
  --muted: #4b5f78;
  --faint: #8a9bb0;
  --rule: rgba(7, 24, 45, 0.14);
  --accent: #0a74da;
  --on-accent: #ffffff;

  --map-line: rgba(7, 24, 45, 0.25);
  --map-node: rgba(7, 24, 45, 0.45);

  color-scheme: light;
}

/* 1rem = 1/100 šírky plátna 16:9 - slajd vyzerá rovnako na notebooku aj projektore. */
html {
  font-size: calc(min(1vw, 1.7778vh));
  height: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Plátno
   -------------------------------------------------------------------------- */

#stage {
  position: fixed;
  inset: 0;
  background: var(--bg);
  user-select: none;
  transition: background-color 0.4s;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: opacity 0.8s var(--ease);
}
#stage[data-map='bg'] #map { opacity: 0.07; }
#stage[data-map='off'] #map { opacity: 0; }

/* --------------------------------------------------------------------------
   Myšlienková mapa
   -------------------------------------------------------------------------- */

.mm-link {
  fill: none;
  stroke: var(--map-line);
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s var(--ease), stroke 0.5s, opacity 0.5s;
}
.mm-link--thick { stroke-width: 2.5; }
.mm-link--thin { stroke-width: 1.5; transition-delay: calc(var(--li) * 45ms); }
.is-hidden .mm-link { stroke-dashoffset: 1; opacity: 0; transition-delay: 0s; }
.is-focus .mm-link { stroke: var(--accent); }

.mm-root,
.mm-branch,
.mm-branch-link,
.mm-leaf-links,
.mm-leaves {
  transition: opacity 0.6s var(--ease);
}
.is-dim { opacity: 0.18; }
.mm-root.is-hidden,
.mm-branch.is-hidden { opacity: 0; }

.mm-root-box { fill: var(--fg); }
.mm-root-label {
  fill: var(--bg);
  font: 600 44px var(--font);
  text-anchor: middle;
  dominant-baseline: central;
}

.mm-branch-box {
  fill: var(--bg);
  stroke: var(--map-node);
  stroke-width: 1.5;
  transition: fill 0.5s, stroke 0.5s;
}
.mm-branch-label {
  fill: var(--fg);
  font: 500 38px var(--font);
  text-anchor: middle;
  dominant-baseline: central;
  transition: fill 0.5s;
}
.mm-branch.is-focus .mm-branch-box { fill: var(--accent); stroke: var(--accent); }
.mm-branch.is-focus .mm-branch-label { fill: var(--on-accent); }

.mm-leaf {
  transition: opacity 0.45s var(--ease);
  transition-delay: calc(0.25s + var(--li) * 60ms);
}
.mm-leaves.is-hidden .mm-leaf { opacity: 0; transition-delay: 0s; }
.mm-leaves.has-hot .mm-leaf:not(.is-hot) { opacity: 0.4; transition-delay: 0s; }

.mm-leaf-dot { fill: var(--map-node); transition: fill 0.4s; }
.mm-leaf-label {
  fill: var(--muted);
  font: 400 22px var(--font);
  dominant-baseline: central;
  transition: fill 0.4s;
}
.mm-leaves.is-focus .mm-leaf-label { fill: var(--fg); }
.mm-leaf.is-hot .mm-leaf-dot { fill: var(--accent); }
.mm-leaf.is-hot .mm-leaf-label { fill: var(--fg); font-weight: 600; }

/* --------------------------------------------------------------------------
   Slajdy - spoločné
   -------------------------------------------------------------------------- */

#slide {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.s {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 8rem 7rem;
  animation: s-in 0.6s var(--ease) both;
}
.s.is-leaving { animation: s-out 0.3s var(--ease) both; }
.s[data-dir='back'] { animation-name: s-in-back; }

@keyframes s-in      { from { opacity: 0; transform: translateX(1.5rem); } }
@keyframes s-in-back { from { opacity: 0; transform: translateX(-1.5rem); } }
@keyframes s-out     { to   { opacity: 0; } }

.s a, .s button { pointer-events: auto; }

.eyebrow {
  margin: 0 0 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 em, h2 em { font-style: normal; color: var(--accent); font-weight: 400; }

.lead {
  margin: 2rem 0 0;
  max-width: 48ch;
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--fg);
}

.stagger > * {
  animation: s-in 0.5s var(--ease) both;
  animation-delay: calc(0.3s + var(--k, 0) * 0.08s);
}

/* --- Titulný slajd ------------------------------------------------------- */

.s--title h1 {
  font-size: 7.6rem;
  font-weight: 300;
}
.s--title .lead {
  margin-top: 2.4rem;
  font-size: 2.8rem;
  color: var(--accent);
}
.byline {
  position: absolute;
  left: 8rem;
  right: 8rem;
  bottom: 5rem;
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 1.5rem;
  color: var(--muted);
}
.byline strong { color: var(--fg); font-weight: 500; }

/* --- Výrok ---------------------------------------------------------------- */

.s--statement h2 {
  font-size: 5.8rem;
  max-width: 18ch;
}

/* --- Mapa s popiskom ------------------------------------------------------ */

.s--map { justify-content: flex-end; padding-bottom: 5.5rem; }
.s--map .caption {
  margin: 0;
  max-width: 50ch;
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--muted);
}
.s--map .caption strong { color: var(--fg); font-weight: 500; }

/* --- Jedno slovo / ukážka kódu ------------------------------------------ */

.s--word,
.s--code { align-items: center; text-align: center; }
.s--word h2 { font-size: 7rem; max-width: 20ch; }
.sub {
  margin: 2.4rem 0 0;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--muted);
}

.code {
  margin: 0;
  text-align: left;
  font: 400 2.5rem/1.6 var(--mono);
  color: var(--muted);
  white-space: pre;
}
.code .line.is-hl { color: var(--accent); }
.code .line.is-hl::selection { background: var(--accent); }

/* --- Otázka pre publikum ------------------------------------------------- */

.s--poll h2 { font-size: 6rem; max-width: 16ch; }
.poll-hint {
  margin: 3rem 0 0;
  font-size: 1.6rem;
  color: var(--muted);
}

/* --- Checklist ----------------------------------------------------------- */

.s--list h2 { font-size: 4.6rem; }
.checklist {
  list-style: none;
  counter-reset: item;
  margin: 3.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5rem;
  max-width: 86rem;
}
.checklist li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--muted);
}
.checklist li::before {
  content: counter(item, decimal-leading-zero);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.checklist strong { display: block; color: var(--fg); font-weight: 500; font-size: 1.7rem; }

/* --- Záver --------------------------------------------------------------- */

.s--end h2 { font-size: 8rem; }
.contacts {
  margin: 4rem 0 0;
  display: flex;
  gap: 5rem;
  font-size: 1.8rem;
  font-weight: 300;
}
.contacts span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   HUD, poznámky, nápoveda
   -------------------------------------------------------------------------- */

.notes,
.help {
  position: absolute;
  padding: 1.8rem 2.2rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--fg);
}

.notes {
  left: 2rem;
  right: 2rem;
  bottom: 3.4rem;
  max-height: 40%;
  overflow: auto;
  font-size: 1.4rem;
  line-height: 1.5;
  user-select: text;
}
.notes p { margin: 0 0 0.6em; }
.notes p:last-child { margin: 0; }
.notes strong { color: var(--accent); }
.notes em { color: var(--muted); }

.help {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
}
.help h3 { font-size: 2rem; font-weight: 400; margin-bottom: 1.4rem; }
.help dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 2rem;
  margin: 0;
}
.help dt { text-align: right; }
.help dd { margin: 0; color: var(--muted); }
kbd {
  display: inline-block;
  min-width: 2em;
  padding: 0.1em 0.5em;
  border-radius: 3px;
  border: 1px solid var(--rule);
  font: 500 0.9em/1.4 var(--mono);
  text-align: center;
}

[hidden] { display: none !important; }

.blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
#stage.is-black .blackout { opacity: 1; pointer-events: auto; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

#stage.is-instant *,
#stage.is-instant #map { transition: none !important; }
