/* ============================================================
   milanknop.cz — statický osobní web
   Mobile-first, breakpointy 600 / 900 / 1200
   ============================================================ */

:root {
  /* Povrchy */
  --bg: #0a0a0f;
  --bg-elev: #12121a;
  --bg-elev-2: #1a1a28;
  --border: #1e1e2e;
  --border-strong: #2e2e44;

  /* Text */
  --text: #e4e4ef;
  --text-muted: #a0a0bd;

  /* Paleta pipeline — výplně, rámečky a ikony (práh kontrastu 3:1) */
  --accent: #6c5ce7;
  --accent-deep: #4c3fc4;
  --cyan: #00cec9;
  --blue: #4da6ff;
  --pink: #e84393;
  --green: #00d2a0;
  --orange: #f5a623;

  /* Textové varianty — POUZE tyto se smí použít na text a labely (AA 4.5:1) */
  --accent-text: #a99bff;
  --cyan-text: #5ce1dd;
  --pink-text: #ff79b0;

  /* Glowy */
  --accent-glow: rgba(108, 92, 231, .3);
  --cyan-glow: rgba(0, 206, 201, .2);
  --green-glow: rgba(0, 210, 160, .2);

  /* Gradienty — tři striktně oddělené role + rail ve dvou osách */
  --grad-text: linear-gradient(135deg, var(--accent-text), var(--cyan-text), var(--pink-text)); /* jen text, min 8.3:1 */
  --grad-btn: linear-gradient(135deg, var(--accent), var(--accent-deep));  /* jen s bílým textem */
  --grad-node: linear-gradient(135deg, var(--accent), var(--cyan));        /* jen s tmavým glyfem */
  --grad-rail: linear-gradient(90deg, var(--orange), var(--pink), var(--accent), var(--blue), var(--cyan), var(--green));
  --grad-rail-v: linear-gradient(180deg, var(--orange), var(--pink), var(--accent), var(--blue), var(--cyan), var(--green));

  --focus: #5ce1dd;

  /* Rozměry */
  --gutter: 20px;
  --header-h: 56px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Stíny */
  --sh-card: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-lift: 0 12px 40px rgba(0, 0, 0, .3);
  --glow-accent: 0 0 24px var(--accent-glow);

  /* Písma */
  --font-display: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (min-width: 600px) {
  :root { --gutter: 32px; --header-h: 64px; }
}

@media (min-width: 1200px) {
  :root { --gutter: 40px; }
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambientní záře — celá stránka „dýchá" pipeline */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 12% 6%, rgba(108, 92, 231, .1), transparent 60%),
    radial-gradient(ellipse 50% 40% at 88% 78%, rgba(0, 206, 201, .07), transparent 60%);
}

@media (min-width: 900px) { body { font-size: 1.0625rem; } }

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: inherit;
}

/* ---------- Utility ---------- */

.container {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--grad-btn);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible { top: 8px; }

/* Reveal — pojistka: skrývá se POUZE když běží JS */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s cubic-bezier(.2, .7, .3, 1), transform .5s cubic-bezier(.2, .7, .3, 1);
  transition-delay: calc(min(var(--i, 0), 6) * 60ms);
}

html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, .72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px -16px #000;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border-radius: var(--r-sm);
}

.brand__mark {
  display: block;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--grad-node);
}

.nav { display: flex; align-items: center; }

.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__list { display: flex; align-items: center; gap: 4px; }

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: .875rem;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.nav__link.is-active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--cyan-text);
}

.nav__cta { padding: 10px 18px; font-size: .875rem; }

/* Mobilní menu (< 900 px) */
@media (max-width: 899px) {
  .site-header__inner { position: relative; }

  .nav__panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--gutter);
    background: rgba(10, 10, 15, .97);
    border-bottom: 1px solid transparent;
    transition: max-height .25s ease, padding .25s ease, border-color .25s ease;
  }

  .nav__panel.is-open {
    max-height: 340px;
    padding: 8px var(--gutter) 16px;
    border-bottom-color: var(--border);
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav__link { min-height: 48px; font-size: 1rem; }

  .nav__cta { justify-content: center; margin-top: 8px; min-height: 48px; }
}

@media (min-width: 900px) {
  .nav__toggle { display: none; }
}

/* Bez JS: menu tlačítko nemá co dělat, odkazy se zalomí */
html:not(.js) .nav__toggle { display: none; }

html:not(.js) .nav__panel {
  position: static;
  max-height: none;
  overflow: visible;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0;
  background: none;
}

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn--primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 8px 28px -10px var(--accent-glow);
}

/* Gradientní rámeček přes padding-box / border-box */
.btn--secondary {
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    linear-gradient(135deg, rgba(108, 92, 231, .55), rgba(0, 206, 201, .45), rgba(232, 67, 147, .45)) border-box;
  color: var(--text);
}

.btn__icon { flex: none; }

.btn:active { transform: translateY(0); filter: brightness(.95); }

@media (hover: hover) and (pointer: fine) {
  /* výplň se při hoveru NESVĚTLÁ — jinak spadne kontrast bílého textu */
  .btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 34px -8px rgba(108, 92, 231, .75);
  }
  .btn--secondary:hover { box-shadow: var(--glow-accent); }
  .nav__link:hover { color: var(--text); background: var(--bg-elev); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 88svh, 900px);
  padding-block: clamp(48px, 9vw, 96px);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(108, 92, 231, .14), transparent 60%);
}

.hero::after {
  background:
    repeating-linear-gradient(0deg, rgba(108, 92, 231, .5) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(108, 92, 231, .5) 0 1px, transparent 1px 64px);
  opacity: .03;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.badge {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: .8125rem;
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 210, 160, .55); }
  70% { box-shadow: 0 0 0 10px rgba(0, 210, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 210, 160, 0); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
}

/* Fallback barva je deklarovaná PŘED -webkit-text-fill-color */
.hero__grad {
  color: var(--accent-text);
  background: var(--grad-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__subline {
  display: block;
  margin-top: .35em;
  font-size: .42em;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-muted);
}

.hero__role {
  font-family: var(--font-mono);
  font-size: clamp(.85rem, 2.1vw, 1rem);
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.4;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero__lead {
  max-width: 58ch;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

@media (max-width: 599px) {
  .hero__actions .btn { width: 100%; min-height: 48px; }
}

/* Sweep — pocta původnímu webu */
.sweep {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.sweep::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--accent);
  pointer-events: none;
}

.sweep--cyan::after { background: var(--cyan); }

html.js .sweep::after { animation: sweep 1.4s cubic-bezier(.74, .06, .4, .92) both; }
html.js .sweep__text { opacity: 0; animation: sweep-text .3s ease .85s forwards; }

@keyframes sweep {
  0% { width: 0; left: 0; }
  50% { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

@keyframes sweep-text {
  to { opacity: 1; }
}

/* ---------- Flowviz — vizuál toku úkolu v heru ---------- */

.flowviz {
  position: relative;
  margin-top: 6px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(108, 92, 231, .12), transparent 60%),
    var(--bg-elev);
  box-shadow: var(--sh-card);
  overflow: hidden;
}

.flowviz::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-rail);
}

.flowviz__label {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--accent-text);
}

.flowviz__rail {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding-left: 62px;
}

.flowviz__rail::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 22px;
  width: 2px;
  background: var(--grad-rail-v);
  opacity: .35;
}

/* „Kometa" putující railem */
.flowviz__rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 2px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--cyan), transparent);
  animation: comet 6s linear infinite;
}

@keyframes comet {
  0% { top: 0; opacity: 0; }
  8% { opacity: .9; }
  85% { opacity: .9; }
  100% { top: 100%; opacity: 0; }
}

.flowviz__node {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
}

/* Ztlumí se POUZE dekorativní dlaždice (aria-hidden), nikdy text —
   jinak by popisky uzlů po většinu cyklu spadly pod AA 4.5:1.
   Výchozí stav je „rozsvíceno", animace uzel naopak dočasně ztlumí. */
@keyframes tileDim {
  0% { opacity: .5; }
  8%, 22% { opacity: 1; }
  32%, 100% { opacity: .5; }
}

.flowviz__tile {
  position: absolute;
  left: -62px;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elev-2);
  color: var(--text-muted);
  transition: box-shadow .2s ease;
  animation: tileDim 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .9s - 6s);
}

.flowviz__node[data-tone="orange"] .flowviz__tile {
  background: rgba(245, 166, 35, .14);
  border-color: rgba(245, 166, 35, .35);
  color: var(--orange);
}

.flowviz__node[data-tone="pink"] .flowviz__tile {
  background: rgba(232, 67, 147, .14);
  border-color: rgba(232, 67, 147, .35);
  color: var(--pink-text);
}

.flowviz__node[data-tone="blue"] .flowviz__tile {
  background: rgba(77, 166, 255, .14);
  border-color: rgba(77, 166, 255, .35);
  color: var(--blue);
}

.flowviz__node[data-tone="green"] .flowviz__tile {
  background: rgba(0, 210, 160, .14);
  border-color: rgba(0, 210, 160, .35);
  color: var(--green);
}

/* Agentní uzel — gradientní výplň s TMAVÝM glyfem (bílý by měl 1.97:1) */
.flowviz__node[data-tone="agent"] .flowviz__tile {
  background: var(--grad-node);
  border-color: transparent;
  color: var(--bg);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.flowviz__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.flowviz__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.flowviz__meta {
  font-family: var(--font-mono);
  font-size: .7rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.flowviz__check {
  flex: none;
  opacity: 0;
  color: var(--green);
  animation: checkIn 6s ease infinite;
}

@keyframes checkIn {
  0%, 68% { opacity: 0; transform: scale(.6); }
  78%, 96% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.6); }
}

.flowviz__loop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 14px;
  border: 1px dashed rgba(255, 121, 176, .35);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .7rem;
  line-height: 1.5;
  color: var(--pink-text);
  animation: loopPulse 6s ease-in-out infinite;
}

@keyframes loopPulse {
  0%, 45%, 75%, 100% { border-color: rgba(255, 121, 176, .35); }
  55%, 65% { border-color: rgba(255, 121, 176, .6); }
}

@media (hover: hover) and (pointer: fine) {
  .flowviz__node:hover .flowviz__tile { box-shadow: 0 0 0 4px rgba(108, 92, 231, .12); }
}

@media (min-width: 900px) {
  .flowviz__rail { gap: 22px; }
}

/* ---------- Sekce ---------- */

.section {
  position: relative;
  padding-block: clamp(64px, 10vw, 128px);
}

.section--pipeline { background: radial-gradient(ellipse 60% 45% at 80% 40%, rgba(108, 92, 231, .06), transparent 60%); }

.section--agents { background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(232, 67, 147, .05), transparent 60%); }

.section--alt { background: linear-gradient(180deg, transparent, rgba(18, 18, 26, .75), transparent); }

.section--contact { background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(108, 92, 231, .1), transparent 65%); }

.section-header { margin-bottom: clamp(32px, 5vw, 56px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-text);
}

.section-header h2 {
  margin-top: 12px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

/* Sekce bez eyebrow (Kontakt) — nadpis nemá nad sebou co odsazovat. */
.section-header h2:first-child { margin-top: 0; }

.lead {
  max-width: 62ch;
  margin-top: 16px;
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- KPI ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kpis--hero {
  margin-top: clamp(8px, 2vw, 22px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.kpi { text-align: center; }

.kpi__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent-text);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kpi__label {
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpis__note {
  margin-top: 16px;
  text-align: center;
  font-size: .9375rem;
  color: var(--text-muted);
}

@media (max-width: 599px) {
  .kpis { gap: 10px; }
  .kpi__label { font-size: .72rem; }
}

/* ---------- Pipeline stepper ---------- */

.stepper {
  position: relative;
  display: grid;
  gap: 20px;
  margin-top: clamp(48px, 7vw, 72px);
  padding-left: 56px;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 23px;
  width: 2px;
  background: var(--grad-rail-v);
  opacity: .35;
}

.step { position: relative; }

.step__node {
  position: absolute;
  left: -56px;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.step:nth-child(1) .step__node { border-color: var(--orange); color: var(--orange); }
.step:nth-child(2) .step__node { border-color: var(--pink); color: var(--pink-text); }

/* Kroky 3 a 4 jsou agentní — gradientní výplň s bílým textem (4.86:1) */
.step:nth-child(3) .step__node,
.step:nth-child(4) .step__node {
  background: var(--grad-btn);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.step:nth-child(5) .step__node { border-color: var(--cyan); color: var(--cyan-text); }
.step:nth-child(6) .step__node { border-color: var(--green); color: var(--green); }

.step__card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  box-shadow: var(--sh-card);
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.step__title { font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }

.step__text { margin-top: 8px; font-size: .9375rem; color: var(--text-muted); }

@media (hover: hover) and (pointer: fine) {
  .step__card:hover { background: var(--bg-elev-2); border-color: rgba(108, 92, 231, .3); }
  .step:hover .step__node { box-shadow: var(--glow-accent); }
}

@media (min-width: 900px) {
  .stepper {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 24px;
    padding-left: 0;
  }
  .stepper::before { display: none; }
  .step { padding-top: 72px; }
  .step::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-rail);
    opacity: .35;
  }
  .step__node { left: 0; top: 0; width: 56px; height: 56px; }
  .step__card { padding: 24px; height: 100%; }
}

@media (min-width: 1200px) {
  .stepper { grid-template-columns: repeat(6, 1fr); }
  .step__card { padding: 20px; }
}

/* ---------- Pull quote ---------- */

.pull-quote {
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgba(108, 92, 231, .07);
  font-size: 1.05rem;
}

.pull-quote strong { font-weight: 700; color: var(--text); }

/* ---------- Karty ---------- */

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

@media (min-width: 900px) { .cards { gap: 24px; } }

@media (min-width: 1200px) {
  .cards--roles { grid-template-columns: repeat(4, 1fr); }
  .cards--features { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

/* Gradientní proužek nahoře — jiný pro každou kartu v řadě */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.cards > .card:nth-child(1)::after { background: linear-gradient(90deg, var(--orange), var(--pink)); }
.cards > .card:nth-child(2)::after { background: linear-gradient(90deg, var(--pink), var(--accent)); }
.cards > .card:nth-child(3)::after { background: linear-gradient(90deg, var(--accent), var(--blue)); }
.cards > .card:nth-child(4)::after { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.cards > .card:nth-child(5)::after { background: linear-gradient(90deg, var(--cyan), var(--green)); }
.cards > .card:nth-child(6)::after { background: linear-gradient(90deg, var(--green), var(--orange)); }
.cards > .card:nth-child(7)::after { background: linear-gradient(90deg, var(--accent), var(--pink)); }

@media (min-width: 600px) { .card { padding: 24px; } }

@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(108, 92, 231, .3);
    box-shadow: var(--sh-lift);
  }
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-md);
  background: rgba(77, 166, 255, .12);
  color: var(--blue);
  transition: transform .2s ease;
}

.card__icon--cyan { background: rgba(0, 206, 201, .12); color: var(--cyan-text); }
.card__icon--accent { background: rgba(108, 92, 231, .16); color: var(--accent-text); }
.card__icon--muted { background: rgba(160, 160, 189, .12); color: var(--text-muted); }

.card__title { margin-top: 16px; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.card__text { margin-top: 8px; font-size: .9375rem; color: var(--text-muted); }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .card__link:hover { text-decoration: underline; }
}

/* Rohový badge role */
.tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--bg-elev-2);
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.tag--req { background: rgba(0, 210, 160, .14); color: var(--green); }
.tag--cond { border-style: dashed; border-color: rgba(245, 166, 35, .5); color: var(--orange); }
.tag--more { color: var(--text-muted); }

@media (max-width: 599px) {
  .tag { font-size: .56rem; }
}

/* ---------- Chipy ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.chip--mono { font-size: .72rem; padding: 6px 11px; }
.chip--done { color: var(--green); border-color: rgba(0, 210, 160, .4); }

@media (hover: hover) and (pointer: fine) {
  .chip:hover { color: var(--text); border-color: var(--cyan-text); box-shadow: 0 0 18px var(--cyan-glow); }
}

.tools-label { margin-top: clamp(32px, 5vw, 48px); margin-bottom: 14px; }

.chips + .callout { margin-top: clamp(40px, 6vw, 64px); }

/* ---------- Smyčky ---------- */

.loops {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 5vw, 48px);
}

.loop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .78rem;
}

.loop:nth-child(1) { border-color: rgba(245, 166, 35, .45); }
.loop:nth-child(1) svg { color: var(--orange); }
.loop:nth-child(2) { border-color: rgba(232, 67, 147, .45); }
.loop:nth-child(2) svg { color: var(--pink-text); }
.loop:nth-child(3) { border-color: rgba(77, 166, 255, .45); }
.loop:nth-child(3) svg { color: var(--blue); }

@media (max-width: 599px) {
  .loops { flex-direction: column; }
  .loop { width: 100%; }
}

/* ---------- Callout ---------- */

.callout {
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(108, 92, 231, .12), rgba(0, 206, 201, .06));
}

.callout__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.callout__text { max-width: 52ch; font-size: 1.05rem; }
.callout__text strong { font-weight: 700; }
.callout__main > p:last-child { margin-top: 20px; }

.callout__art { flex: none; color: var(--cyan); opacity: .35; }

@media (max-width: 899px) {
  .callout__art { display: none; }
}

/* ---------- Kolofon ---------- */

/* Navazuje na Kontakt, proto bez horního odsazení sekce. */
.section--kolofon { padding-block: 0 clamp(48px, 8vw, 96px); }

.kolofon {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(108, 92, 231, .12), rgba(0, 206, 201, .06));
  box-shadow: var(--sh-card);
}

.kolofon__emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: none;
  border: 1px solid rgba(108, 92, 231, .35);
  border-radius: var(--r-lg);
  background: rgba(108, 92, 231, .16);
  color: var(--accent-text);
}

.kolofon__title {
  margin-top: 12px;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.kolofon__text {
  max-width: 62ch;
  margin-top: 12px;
  font-size: .9375rem;
  color: var(--text-muted);
}

.kolofon__text a { color: var(--cyan-text); }

.kolofon__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.kolofon__flow li + li::before {
  content: "→";
  margin-right: 8px;
  color: var(--text-muted);
}

.kolofon__flow .chip { gap: 6px; }

html.js .kolofon.is-visible .kolofon__flow li {
  animation: chip-in .4s ease both;
  animation-delay: calc(var(--i, 0) * 110ms);
}

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

@media (min-width: 900px) {
  .kolofon {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }
}

/* ---------- Pilulka „Vytvořeno pomocí pipeline" ---------- */

/* Pilulka stojí na předělu mezi hero sekcí a sekcí Pipeline — svislé odsazení
   vytváří spodní padding hero sekce a horní padding sekce Pipeline. */
.made-by-row {
  display: flex;
  justify-content: center;
  text-align: center;
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.made-by strong { font-weight: 600; color: var(--cyan-text); }
.made-by__text { min-width: 0; }
.made-by__icon { flex: none; color: var(--cyan-text); }
.made-by__arrow { flex: none; opacity: .6; }

/* Na úzkých displejích se text zalomí — pilulka pak drží tvar karty. */
@media (max-width: 599px) {
  .made-by { padding: 10px 14px; border-radius: var(--r-lg); font-size: .78rem; }
}

@media (hover: hover) and (pointer: fine) {
  .made-by:hover {
    color: var(--text);
    border-color: var(--cyan-text);
    box-shadow: 0 0 18px var(--cyan-glow);
  }
}

/* ---------- Kontakt ---------- */

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

.contact__card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  height: 100%;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, transform .1s ease;
}

.contact__card:active { transform: scale(.995); }

.contact__body { display: flex; flex-direction: column; }
.contact__primary { font-size: 1.05rem; font-weight: 600; }
.contact__primary .btn__icon { display: inline-block; vertical-align: -2px; margin-left: 4px; }
.contact__secondary { font-size: .8125rem; color: var(--text-muted); }

@media (hover: hover) and (pointer: fine) {
  .contact__card:hover { border-color: rgba(108, 92, 231, .3); background: var(--bg-elev-2); }
  .contact__card:hover .card__icon { transform: translateX(2px); }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  font-size: .82rem;
  color: var(--text-muted);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__links a:hover { color: var(--cyan-text); text-decoration: underline; }
}

@media (min-width: 600px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Hero grid (≥ 900 px) ---------- */

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    grid-template-areas:
      "badge viz"
      "title viz"
      "role  viz"
      "lead  viz"
      "cta   viz"
      "kpi   kpi"
      "note  note";
    column-gap: clamp(32px, 5vw, 64px);
    row-gap: 18px;
    align-items: start;
  }

  .badge { grid-area: badge; }
  .hero__title { grid-area: title; }
  .hero__role { grid-area: role; }
  .hero__lead { grid-area: lead; }
  .hero__actions { grid-area: cta; }
  .flowviz { grid-area: viz; align-self: center; margin-top: 0; }
  .kpis--hero { grid-area: kpi; }
  .kpis__note { grid-area: note; margin-top: 0; }
}

/* ---------- Tisk ---------- */

@media print {
  html { background: #fff; }
  body { background: #fff; color: #000; }
  body::before,
  .hero::before,
  .hero::after { display: none !important; }
  .site-header, .callout__art, .nav, .skip-link { display: none !important; }
  .reveal, html.js .reveal { opacity: 1 !important; transform: none !important; }
  .card, .step__card, .chip, .callout, .kolofon, .made-by { background: #fff !important; border-color: #999 !important; color: #000; }
  .kolofon__emblem { background: #fff !important; border-color: #999 !important; color: #000; }
  .kpi__num, .hero__grad { color: #000 !important; -webkit-text-fill-color: #000; background: none; }
  .flowviz { background: #fff !important; border-color: #999 !important; }
  .flowviz__tile { background: #fff !important; color: #000 !important; border: 1px solid #999 !important; box-shadow: none !important; }
  .flowviz__rail::before,
  .flowviz__rail::after { display: none; }
  .flowviz__tile { opacity: 1 !important; animation: none; }
  .flowviz__check { opacity: 1; animation: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* ---------- Omezený pohyb ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  html.js .sweep::after { display: none; }
  html.js .sweep__text { opacity: 1; }
  .hero__grad { animation: none; background-position: 0% 50%; }
  .flowviz__tile { animation: none; opacity: 1; }
  .flowviz__loop { animation: none; }
  .flowviz__rail::after { display: none; animation: none; }
  .flowviz__check { animation: none; opacity: 1; transform: none; }
  html.js .kolofon.is-visible .kolofon__flow li { animation: none; opacity: 1; transform: none; }
}
