/* =========================================================
   DIGITALIZUJEM.CZ — AI KVÍZ
   Design tokens, glassmorphism, particle bg, parallax
   ========================================================= */

:root {
  /* Barvy — odvozené z digitalizujem.cz */
  --bg-deepest: #050807;
  --bg-base: #0a0e0d;
  --bg-surface: #10161a;
  --bg-card: #131a1f;
  --bg-card-hover: #182127;
  --border-subtle: #1f2a30;
  --border-glow: rgba(46, 232, 200, 0.35);

  --teal: #2EE8C8;
  --teal-bright: #4FFAE0;
  --teal-deep: #14b09a;
  --teal-glow: rgba(46, 232, 200, 0.45);
  --teal-soft: rgba(46, 232, 200, 0.08);

  /* Fialové akcenty — podle loga digitalizujem.cz */
  --purple: #6B4EFF;
  --purple-bright: #8B6FFF;
  --purple-deep: #3F2FBF;
  --purple-glow: rgba(107, 78, 255, 0.45);
  --purple-soft: rgba(107, 78, 255, 0.10);
  --lila: #B19BFF;
  --lila-soft: rgba(177, 155, 255, 0.08);

  /* Gradienty využívající obě hlavní barvy */
  --grad-brand: linear-gradient(135deg, var(--teal) 0%, var(--purple) 100%);
  --grad-brand-soft: linear-gradient(135deg, var(--teal-soft) 0%, var(--purple-soft) 100%);

  --text-primary: #ffffff;
  --text-secondary: #a8b3bb;
  --text-muted: #6c7a82;
  --text-faded: #4a5560;

  --gold: #f5c842;
  --warn: #ff7a5c;

  /* Typografie */
  --font-display: 'Space Grotesk', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(46, 232, 200, 0.25);
  --shadow-glow-strong: 0 0 60px rgba(46, 232, 200, 0.5);
  --shadow-glow-purple: 0 0 40px rgba(107, 78, 255, 0.30);

  /* Layout */
  --max-w: 1100px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg-deepest);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Globální safety net — žádný button/input nesmí být nečitelný */
button, input, select, textarea {
  color: inherit;
  font-family: inherit;
}
button {
  color: var(--text-primary);
}
input, textarea, select {
  color: var(--text-primary);
}

/* Selection */
::selection {
  background: var(--teal);
  color: var(--bg-deepest);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-deep); }

/* =========================================================
   PARTICLE CANVAS
   ========================================================= */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* =========================================================
   AMBIENT GLOW BACKGROUND (parallax orbs)
   ========================================================= */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  will-change: transform;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation: drift1 24s ease-in-out infinite;
}
.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  bottom: -10%;
  right: -5%;
  opacity: 0.45;
  animation: drift2 30s ease-in-out infinite;
}
.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--lila) 0%, transparent 70%);
  top: 35%;
  right: 25%;
  opacity: 0.28;
  animation: drift3 26s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.1); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(0.95); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -50px) scale(1.05); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 232, 200, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 232, 200, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  backdrop-filter: blur(12px);
  background: rgba(5, 8, 7, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--purple) 100%);
  position: relative;
  box-shadow: 0 0 20px rgba(107, 78, 255, 0.35);
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: var(--bg-deepest);
}
.logo-text { font-size: 16px; }
.logo-text .dot { color: var(--teal); }

.badge-mini {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--teal);
  padding: 6px 12px;
  border: 1px solid var(--border-glow);
  border-radius: 100px;
  background: var(--teal-soft);
}

/* =========================================================
   SCREENS — wrapper
   ========================================================= */
.screen {
  display: none;
  min-height: 100vh;
  padding: 100px var(--gutter) 60px;
  position: relative;
  z-index: 1;
}
.screen.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.6s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   INTRO SCREEN
   ========================================================= */
.intro-inner {
  max-width: 720px;
  text-align: center;
}

.intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 10px 18px;
  border: 1px solid var(--border-glow);
  border-radius: 100px;
  background: var(--teal-soft);
  margin-bottom: 32px;
  animation: pulseSoft 3s ease-in-out infinite;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 var(--teal-soft); }
  50% { box-shadow: 0 0 30px 4px var(--teal-soft); }
}

.intro-title {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.grad {
  background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal) 35%, var(--purple-bright) 75%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.intro-lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--bg-deepest);
  background: var(--teal);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 0 0 var(--teal-glow), var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px var(--teal-glow), var(--shadow-lg);
  background: var(--teal-bright);
}
.cta-primary:hover::before { transform: translateX(100%); }
.cta-primary:active { transform: translateY(0); }
.cta-primary svg { width: 20px; height: 20px; }

.intro-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.trust-item strong {
  font-size: 24px;
  font-weight: 600;
  color: var(--teal);
  font-feature-settings: 'tnum';
}
.trust-item span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.trust-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* =========================================================
   QUIZ SCREEN
   ========================================================= */
.quiz-shell {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.quiz-header { display: flex; flex-direction: column; gap: 12px; }

.progress-bars {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.progress-bars .bar {
  flex: 1;
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress-bars .bar.is-done::after,
.progress-bars .bar.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  animation: fillBar 0.5s cubic-bezier(.2,.8,.2,1) forwards;
  transform-origin: left;
}
.progress-bars .bar.is-done::after { animation-fill-mode: forwards; }
.progress-bars .bar.is-active::after {
  background: linear-gradient(90deg, var(--teal) 0%, var(--purple-bright) 100%);
}
@keyframes fillBar {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.quiz-section { color: var(--teal); }

.quiz-card {
  background: linear-gradient(180deg, rgba(19, 26, 31, 0.85) 0%, rgba(15, 21, 25, 0.85) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.quiz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-glow), transparent);
}

.q-number {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.q-number::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--teal);
}

.q-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.q-help {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

/* Options grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.options-grid.cols-1 { grid-template-columns: 1fr; }
.options-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 640px) {
  .options-grid,
  .options-grid.cols-1,
  .options-grid.cols-2 { grid-template-columns: 1fr; }
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.2,.8,.2,1);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.opt:hover {
  background: var(--bg-card-hover);
  border-color: var(--teal-deep);
  transform: translateY(-1px);
}
.opt.is-selected {
  border-color: var(--teal);
  background: linear-gradient(180deg, rgba(46, 232, 200, 0.06) 0%, rgba(46, 232, 200, 0.02) 100%);
  box-shadow: 0 0 0 1px var(--teal), 0 0 30px rgba(46, 232, 200, 0.15);
}
.opt.is-selected::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(46, 232, 200, 0.08), transparent 70%);
  pointer-events: none;
}

.opt-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(.2,.8,.2,1);
}
/* Pokud je ikona delší než 3 znaky (např. "10-25", "<500"), zmenši písmo */
.opt-icon[data-len="4"] { font-size: 11px; }
.opt-icon[data-len="5"] { font-size: 10px; }
.opt-icon[data-len="6"] { font-size: 9px; }
.opt-icon[data-len="7"] { font-size: 9px; letter-spacing: -0.05em; }

.opt.is-selected .opt-icon {
  background: var(--purple-soft);
  border-color: var(--purple);
  color: var(--purple-bright);
  box-shadow: 0 0 16px rgba(107, 78, 255, 0.25);
}

/* Centered varianta — ikona je samotný highlight, text pod ní */
.opt-center .opt-icon {
  width: 64px;
  height: 64px;
  font-size: 16px;
  border-radius: 14px;
}
.opt-center .opt-icon[data-len="4"] { font-size: 14px; }
.opt-center .opt-icon[data-len="5"] { font-size: 13px; }
.opt-center .opt-icon[data-len="6"] { font-size: 12px; }
.opt-center .opt-icon[data-len="7"] { font-size: 11px; }

.opt-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.opt-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}
.opt-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.opt-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-subtle);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.opt.is-selected .opt-check {
  background: var(--teal);
  border-color: var(--teal);
}
.opt-check svg {
  width: 14px;
  height: 14px;
  color: var(--bg-deepest);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.opt.is-selected .opt-check svg {
  opacity: 1;
  transform: scale(1);
}

/* Radio variant for single-select */
.opt[data-variant="radio"] .opt-check { border-radius: 50%; }

/* Centered option (for 6-7) */
.opt-center {
  flex-direction: column;
  text-align: center;
  padding: 28px 20px;
  gap: 10px;
}
.opt-center .opt-icon { font-size: 28px; }
.opt-center .opt-check { display: none; }
.opt-center.is-selected {
  background: linear-gradient(180deg, rgba(46, 232, 200, 0.10) 0%, rgba(46, 232, 200, 0.03) 100%);
}

/* Pill option (Q8 obrat) */
.opt-pill {
  display: inline-flex;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-display);
  color: var(--text-primary);
  transition: all 0.2s;
  margin: 4px;
}
.opt-pill:hover {
  border-color: var(--teal-deep);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.opt-pill.is-selected {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-bright);
  box-shadow: 0 0 20px rgba(46, 232, 200, 0.2);
}

/* Combined card (q8 dvojotázka) */
.subgroup {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.subgroup-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 16px;
}
.subgroup-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--purple-soft);
  border: 1px solid var(--purple);
  display: grid;
  place-items: center;
  color: var(--purple-bright);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}

/* Text input (otázka 1 — name + role) */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.input-group label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
}
.input-group input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  transition: all 0.2s;
}
.input-group input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 232, 200, 0.15);
}

.q-hint {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--teal-soft);
  border: 1px solid var(--border-glow);
  border-left: 3px solid var(--teal);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  display: none;
}
.q-hint.is-visible { display: block; animation: hintPop 0.3s ease both; }
.q-hint strong { color: var(--teal); display: block; margin-bottom: 4px; }
@keyframes hintPop {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.q-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 122, 92, 0.1);
  border: 1px solid rgba(255, 122, 92, 0.3);
  border-radius: var(--r-md);
  color: #ffb29c;
  font-size: 14px;
  display: none;
}
.q-error.is-visible { display: block; }

/* Footer */
.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-back, .btn-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-back {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.btn-back:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.btn-back svg { width: 16px; height: 16px; }

.btn-next {
  background: var(--teal);
  color: var(--bg-deepest);
  font-weight: 600;
  box-shadow: 0 0 0 0 var(--teal-glow);
}
.btn-next:hover {
  background: var(--teal-bright);
  box-shadow: 0 0 30px var(--teal-glow);
  transform: translateY(-1px);
}
.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-next svg { width: 18px; height: 18px; }

/* =========================================================
   LOADING SCREEN
   ========================================================= */
.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.loader-ring {
  position: relative;
  width: 180px;
  height: 180px;
}
.loader-ring .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.loader-ring .r1 {
  border-top-color: var(--purple);
  animation: spin 1.4s linear infinite;
  box-shadow: 0 0 20px var(--purple-glow);
}
.loader-ring .r2 {
  inset: 18px;
  border-right-color: var(--purple-bright);
  animation: spin 2s linear infinite reverse;
}
.loader-ring .r3 {
  inset: 36px;
  border-bottom-color: var(--lila);
  animation: spin 2.6s linear infinite;
}
.loader-core {
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  filter: blur(8px);
  animation: pulseCore 1.5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseCore {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.loader-text {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
}
.loader-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.loader-steps .step {
  opacity: 0;
  animation: stepFade 0.5s ease both;
}
.loader-steps .step:nth-child(1) { animation-delay: 0.3s; }
.loader-steps .step:nth-child(2) { animation-delay: 1.0s; }
.loader-steps .step:nth-child(3) { animation-delay: 1.7s; }
.loader-steps .step:nth-child(4) { animation-delay: 2.4s; color: var(--purple-bright); }
@keyframes stepFade {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* =========================================================
   RESULT SCREEN
   ========================================================= */
.result-inner {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.result-header {
  text-align: center;
  margin-bottom: 8px;
}
.result-header .dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.result-header .dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
}
.result-header .dots .line {
  width: 24px;
  height: 1px;
  background: var(--teal-deep);
  border-radius: 0;
  box-shadow: none;
}
.result-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--teal);
}
.result-title .firma {
  display: block;
  color: var(--text-primary);
  margin-top: 6px;
}

/* AIOS potenciál — hero stats */
.hero-stats {
  background: linear-gradient(135deg, rgba(46, 232, 200, 0.05) 0%, rgba(15, 21, 25, 0.6) 50%, rgba(107, 78, 255, 0.06) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow), 0 0 60px rgba(107, 78, 255, 0.12);
}
.hero-stats::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--teal-glow) 15%, transparent 30%, transparent 60%, var(--purple-glow) 75%, transparent 90%);
  animation: rotateGlow 14s linear infinite;
  opacity: 0.55;
  pointer-events: none;
}
.hero-stats > * { position: relative; z-index: 1; }
@keyframes rotateGlow { to { transform: rotate(360deg); } }

.hero-stats .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  align-items: end;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.hero-stat .num {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -0.03em;
  font-feature-settings: 'tnum';
}
/* Druhý sloupec (peníze za rok) — fialová pro vizuální balanc */
.hero-stats-grid .hero-stat:nth-child(2) .num {
  background: linear-gradient(135deg, var(--purple-bright) 0%, var(--lila) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stat .desc {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Section blocks */
.section-block {
  background: rgba(19, 26, 31, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 40px);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}
.section-block.highlight .section-label { color: var(--teal); }

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.kv-row:last-child { border-bottom: none; }
.kv-key {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 15px;
}
.kv-key .ico {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-bright);
  letter-spacing: -0.02em;
}
.kv-val {
  font-weight: 600;
  font-feature-settings: 'tnum';
  color: var(--text-primary);
}
.kv-val.highlight { color: var(--teal); font-size: 17px; }

.kv-row.totale {
  border-top: 1px solid var(--border-glow);
  border-bottom: none;
  padding-top: 18px;
  margin-top: 8px;
}
.kv-row.totale .kv-key { color: var(--text-primary); font-weight: 600; }
.kv-row.totale .kv-val { color: var(--teal); font-size: 22px; }

.section-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.section-footer strong { color: var(--teal); font-feature-settings: 'tnum'; }

/* CTA banner — konverzně optimalizovaný */
.cta-banner {
  background: linear-gradient(135deg, rgba(46, 232, 200, 0.06) 0%, rgba(15, 21, 25, 0.7) 50%, rgba(107, 78, 255, 0.10) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -2px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--teal), transparent);
  opacity: 0.7;
}
.cta-banner::after {
  content: '';
  position: absolute;
  top: 50%; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-bright);
  padding: 8px 16px;
  border: 1px solid rgba(107, 78, 255, 0.3);
  border-radius: 100px;
  background: var(--purple-soft);
  margin-bottom: 24px;
}
.cta-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-glow);
  animation: blink 1.4s ease-in-out infinite;
}

.cta-headline {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.cta-firma { color: var(--teal); }
.cta-num {
  background: linear-gradient(135deg, var(--purple-bright) 0%, var(--lila) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-feature-settings: 'tnum';
  white-space: nowrap;
}

.cta-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 32px;
  text-align: left;
}
.cta-bullets li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(15, 21, 25, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-primary);
}
.bullet-mark {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 6px;
  background: var(--purple-soft);
  border: 1px solid rgba(107, 78, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-bright);
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cta-result-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.2,.8,.2,1);
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.cta-result-btn.primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--purple-bright) 100%);
  color: var(--bg-deepest);
  box-shadow: 0 8px 24px rgba(107, 78, 255, 0.3), 0 0 0 0 var(--purple-glow);
}
.cta-result-btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.cta-result-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(107, 78, 255, 0.4), 0 0 60px var(--purple-glow);
}
.cta-result-btn.primary:hover::before { transform: translateX(100%); }
.cta-result-btn.secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.cta-result-btn.secondary:hover {
  background: var(--bg-card);
  border-color: var(--purple);
  color: var(--purple-bright);
}

.cta-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.trust-marks {
  color: #f5c842;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .cta-actions { flex-direction: column; }
  .cta-actions .cta-result-btn { width: 100%; justify-content: center; }
}

/* Top 3 systems */
.top3-section h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.top3-section h2 .firma { color: var(--teal); }

.top3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.system-card {
  background: rgba(19, 26, 31, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(.2,.8,.2,1);
  position: relative;
  overflow: hidden;
}
.system-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.6;
}
.system-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-deep);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px rgba(46, 232, 200, 0.1);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-num {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--teal);
}
.card-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--teal);
  color: var(--bg-deepest);
  border-radius: 100px;
}
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  width: fit-content;
}
.card-tag.setri { background: var(--teal-soft); color: var(--teal); border: 1px solid var(--border-glow); }
.card-tag.vydelava { background: white; color: var(--bg-deepest); }

.card-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.card-stats {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.card-stat-row span:first-child { color: var(--text-muted); }
.card-stat-row span:last-child { color: var(--text-primary); font-weight: 600; font-feature-settings: 'tnum'; }

/* Email gate */
.email-gate {
  margin-top: 16px;
}
.email-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.email-form input {
  flex: 1;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 14px 22px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  transition: all 0.2s;
}
.email-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 232, 200, 0.15);
}

.cta-result-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--bg-deepest);
  background: var(--teal);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}
.cta-result-btn:hover {
  background: var(--teal-bright);
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--teal-glow);
}

/* Footer disclaimer */
.result-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 24px;
  letter-spacing: 0.05em;
}

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 100px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-size: 14px;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--shadow-md);
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }

/* =========================================================
   ANIMATIONS — entry stagger
   ========================================================= */
.stagger > * {
  opacity: 0;
  animation: staggerIn 0.5s cubic-bezier(.2,.8,.2,1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.40s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
@keyframes staggerIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .orb { animation: none !important; }
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .topbar { padding: 14px 20px; }
  .badge-mini { display: none; }
  .quiz-footer { flex-direction: row; }
  .btn-back, .btn-next { padding: 12px 20px; font-size: 14px; }
  .btn-next { flex: 1; justify-content: center; }
  .intro-trust { gap: 16px; }
  .trust-divider { display: none; }
}
