/* ==========================================================================
   COLEMAN A.I. — design system
   Martin Krajíček · statický web (HTML + CSS + vanilla JS)
   Paleta a motiv: coleman.cz — červená / černá / ocel / pozink,
   jediný dekorativní motiv = diagonála sklonu střechy.
   ========================================================================== */

:root {
  --red: #E2001A;
  --red-deep: #B80015;
  --black: #151517;
  --ink: #1A1A1A;
  --steel: #4A4F54;
  --steel-2: #6A7076;
  --zinc: #E9EBEC;
  --zinc-2: #F4F5F6;
  --white: #FFFFFF;
  --broken: #B0B4B8;
  --line: #D6D9DC;

  --font-display: 'Archivo', 'Arial Black', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --pitch: -3.2deg;            /* sklon střechy — jediný úhel na celém webu */
  --cut-h: clamp(42px, 6vw, 84px);
  --header-h: 66px;
  --container: 1180px;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --shadow-card: -10px 10px 0 rgba(21, 21, 23, .06);
  --shadow-card-hover: -14px 14px 0 rgba(226, 0, 26, .10);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

::selection { background: var(--red); color: var(--white); }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

.display-xl {
  font-size: clamp(2.35rem, 6.2vw, 4.6rem);
  font-weight: 900;
}

.display-l { font-size: clamp(1.9rem, 4.4vw, 3.2rem); font-weight: 900; }
.display-m { font-size: clamp(1.5rem, 3vw, 2.2rem); }

p { margin: 0 0 1.1em; }

.lead {
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--steel);
  max-width: 46em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--red);
  transform: skewY(var(--pitch));
  flex: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
}

/* zvýraznění v nadpisu — diagonální podtržení */
.mark {
  position: relative;
  white-space: nowrap;
}
.mark::after {
  content: "";
  position: absolute;
  left: -0.06em; right: -0.06em; bottom: 0.02em;
  height: .16em;
  background: var(--red);
  transform: skewY(var(--pitch));
  z-index: -1;
}

.strong { font-weight: 600; color: var(--ink); }

/* ---------- layout ---------- */

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

@media (max-width: 560px) {
  .container { width: calc(100% - 2.2rem); }
}

.section { padding: clamp(3.6rem, 8vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.6rem, 5vw, 4rem) 0; }

.sec-zinc { background: var(--zinc-2); }
.sec-zinc-d { background: var(--zinc); }
.sec-black { background: var(--black); color: var(--zinc); }
.sec-red { background: var(--red); color: var(--white); }

.sec-black .lead, .sec-black p { color: #C9CDD1; }
.sec-black h2, .sec-black h3 { color: var(--white); }
.sec-red .eyebrow { color: var(--white); }
.sec-red .eyebrow::before { background: var(--black); }
.sec-black .eyebrow { color: var(--red); }

/* diagonální řez mezi sekcemi */
.cut {
  height: var(--cut-h);
  background: var(--cut-from, var(--white));
  position: relative;
  z-index: 1;
}
.cut::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cut-to, var(--zinc-2));
  clip-path: polygon(0 100%, 100% 0, 100% 101%, 0 101%);
}
.cut--flip::after {
  clip-path: polygon(0 0, 100% 100%, 100% 101%, 0 101%);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(21, 21, 23, .05);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.18rem;
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand .brand-ai { color: var(--red); }
.brand .brand-by {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--steel-2);
  text-transform: uppercase;
}
@media (max-width: 760px) { .brand .brand-by { display: none; } }

.site-nav { display: flex; align-items: center; gap: .25rem; }

.site-nav a {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  color: var(--steel);
  padding: .55rem .8rem;
  position: relative;
  transition: color .2s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .25rem;
  height: 3px;
  background: var(--red);
  transform: skewY(var(--pitch));
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { top: -7px; left: 0; right: 0; }
.nav-toggle span::after { top: 7px; left: 0; right: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: .8rem 1.1rem 1.2rem;
    gap: .15rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s var(--ease-out), opacity .25s, visibility .25s;
    box-shadow: 0 24px 40px rgba(21, 21, 23, .08);
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--zinc); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a.is-active::after { display: none; }
  .site-nav a.is-active { color: var(--red); }
}

body { padding-top: var(--header-h); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: none;
  padding: 1em 1.5em;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s, border-color .2s;
}
.btn .arr { transition: transform .2s var(--ease-out); }
.btn:hover, .btn:focus-visible {
  transform: translate(4px, -4px);
  box-shadow: -6px 6px 0 rgba(21, 21, 23, .18);
}
.btn:hover .arr { transform: translateX(4px); }

.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover, .btn--red:focus-visible { box-shadow: -6px 6px 0 rgba(226, 0, 26, .25); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { box-shadow: -6px 6px 0 rgba(21, 21, 23, .12); }

.btn--on-dark { border-color: var(--white); background: var(--white); color: var(--ink); }
.btn--on-dark:hover, .btn--on-dark:focus-visible { box-shadow: -6px 6px 0 rgba(255, 255, 255, .25); }

/* ---------- karty ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  padding: 1.5rem 1.6rem 1.4rem;
  position: relative;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s;
}
.card:hover {
  transform: translate(5px, -5px);
  box-shadow: var(--shadow-card-hover);
}

.card h3, .card h4 {
  font-size: 1.06rem;
  font-weight: 800;
  margin-bottom: .45rem;
}

.card p { margin: 0; font-size: .93rem; color: var(--steel); }

.card .tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: .55rem;
}

/* špatná cesta — vybledlé, „rozbité" karty */
.card--broken {
  background: var(--zinc-2);
  border: 1px dashed var(--broken);
  border-left: 4px solid var(--broken);
}
.card--broken .tag { color: var(--steel-2); }
.card--broken h3, .card--broken h4 { color: var(--steel); }
.card--broken:hover {
  transform: translate(-4px, 3px);
  box-shadow: 6px -6px 0 rgba(21, 21, 23, .04);
}

/* ---------- grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- pull-quote ---------- */

.pull {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  padding-left: 1.4rem;
  border-left: 6px solid var(--red);
  max-width: 30em;
  text-wrap: balance;
}
.pull--muted { border-left-color: var(--broken); color: var(--steel); }
.pull--on-red, .sec-red .pull { border-left-color: var(--black); color: var(--white); }

.shot-note {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--steel-2);
  display: inline-block;
  margin-top: .45rem;
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0s);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--black);
  color: var(--zinc);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid #2A2A2E;
  margin-bottom: 1.6rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: .4rem;
}
.footer-role { color: var(--broken); font-size: .95rem; max-width: 34em; }

.footer-contacts { display: flex; flex-wrap: wrap; gap: .7rem; }
.footer-contacts a {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--zinc);
  border: 1px solid #3A3A40;
  padding: .7em 1.1em;
  transition: border-color .2s, color .2s, transform .2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: .55em;
}
.footer-contacts a:hover {
  border-color: var(--red);
  color: var(--white);
  transform: translate(3px, -3px);
}

.footer-note {
  font-size: .85rem;
  color: var(--steel-2);
  max-width: 62em;
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  margin-bottom: 1.6rem;
  line-height: 1.6;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--steel-2);
  text-transform: uppercase;
}

/* ---------- lightbox ---------- */

/* fullscreen náhled — obrázek na celou šířku obrazovky, svisle scrolluje */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0C0C0E;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-content { width: 100%; }
.lightbox-content img, .lightbox-content svg { width: 100%; height: auto; display: block; cursor: zoom-out; }
.lightbox-close {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 210;
  width: 52px; height: 52px;
  background: var(--red);
  color: var(--white);
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.lightbox-close:hover { background: var(--red-deep); }

/* ==========================================================================
   HOMEPAGE
   ========================================================================== */

/* ---------- hero ---------- */

.hero {
  padding: clamp(3.2rem, 7vw, 6rem) 0 0;
  position: relative;
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 1.2rem; }

.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-visual-label {
  color: var(--steel-2);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 .8rem;
  display: flex;
  align-items: center;
  gap: .7em;
}
.hero-visual-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* jemná technická mřížka v pozadí hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--zinc) 1px, transparent 1px),
    linear-gradient(90deg, var(--zinc) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(115deg, rgba(0,0,0,.55), transparent 55%);
  -webkit-mask-image: linear-gradient(115deg, rgba(0,0,0,.55), transparent 55%);
  pointer-events: none;
}
.hero > .container { position: relative; }

/* ---------- vrstvy střechy (interaktivní ilustrace) ---------- */

.roof-legend {
  list-style: none;
  margin: clamp(2rem, 4vw, 3.2rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .7rem;
}
@media (max-width: 980px) { .roof-legend { grid-template-columns: 1fr; gap: .35rem; } }

.roof-legend button {
  width: 100%;
  height: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-left: 3px solid var(--line);
  padding: .7rem .95rem .75rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .2s, background .2s, transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
  display: block;
}
.roof-legend .rl-key {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel-2);
  display: block;
  margin-bottom: .3rem;
}
.roof-legend .rl-val { font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.35; display: block; }

.roof-legend li.is-active button,
.roof-legend button:hover {
  border-left-color: var(--red);
  background: var(--white);
  transform: translate(2px, -3px);
  box-shadow: -6px 6px 0 rgba(21, 21, 23, .05);
}
.roof-legend li.is-active .rl-key { color: var(--red); }

@media (max-width: 980px) {
  .roof-legend li.is-active button, .roof-legend button:hover { transform: translateX(4px); box-shadow: none; }
}

#roofSvg .layer { transition: opacity .35s; }
#roofSvg.has-focus .layer { opacity: .18; }
#roofSvg.has-focus .layer.is-hot { opacity: 1; }

/* ---------- signature: dvě cesty ---------- */

.duel-head { max-width: 46em; }

.duel-stage {
  background: var(--white);
  border: 1px solid var(--line);
  position: relative;
  margin-top: 2rem;
}

.duel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.duel-switch {
  display: inline-flex;
  border: 2px solid var(--ink);
  background: var(--white);
}
.duel-switch button {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  border: 0;
  background: transparent;
  color: var(--steel);
  padding: .75em 1.3em;
  cursor: pointer;
  transition: background .25s, color .25s;
  display: inline-flex;
  align-items: center;
  gap: .5em;
}
.duel-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.duel-switch button[data-state="system"][aria-pressed="true"] { background: var(--red); }

.duel-status {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel-2);
}

.duel-canvas {
  padding: .5rem .5rem 0;
  background-image:
    linear-gradient(rgba(74, 79, 84, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 79, 84, .055) 1px, transparent 1px);
  background-size: 46px 46px;
}
#duelSvg { width: 100%; height: auto; display: block; }
#duelSvg .duel-node { cursor: pointer; }

#duelSvg text {
  font-family: var(--font-mono);
  letter-spacing: .05em;
}

.duel-caption {
  padding: .9rem 1.2rem 1.1rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--steel-2);
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* dvě cesty — sloupce karet */
.paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 3.5vw, 3rem);
  margin-top: clamp(2.4rem, 5vw, 4rem);
}
@media (max-width: 900px) { .paths { grid-template-columns: 1fr; } }

.path-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .4rem;
}
.path-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  width: 2.3rem; height: 2.3rem;
  display: grid;
  place-items: center;
  flex: none;
}
.path--bad .path-mark { background: var(--zinc); color: var(--steel-2); }
.path--good .path-mark { background: var(--red); color: var(--white); }
.path-head h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.path--bad .path-head h3 { color: var(--steel); }

.path-intro { color: var(--steel); font-size: .98rem; max-width: 36em; }

.path-cards { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.3rem; }

.path-quote { margin-top: 1.6rem; }

/* ---------- MCP sekce ---------- */

.mcp-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: start;
}
@media (max-width: 940px) { .mcp-grid { grid-template-columns: 1fr; } }

.mcp-abilities { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-direction: column; gap: .8rem; }
.mcp-abilities li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: baseline;
  background: var(--white);
  border: 1px solid var(--line);
  padding: .95rem 1.15rem;
}
.mcp-abilities .ab {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3em .7em;
  min-width: 5.4em;
  text-align: center;
}
.ab--see { background: var(--zinc); color: var(--steel); }
.ab--do { background: var(--red); color: var(--white); }
.ab--not { background: var(--black); color: var(--white); }
.mcp-abilities p { margin: 0; font-size: .95rem; color: var(--steel); }
.mcp-abilities p strong { color: var(--ink); }

/* chat vs kolega */
.cvk { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 640px) { .cvk { grid-template-columns: 1fr; } }
.cvk figure { margin: 0; border: 1px solid var(--line); background: var(--white); }
.cvk figcaption {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .8rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--steel);
}
.cvk .is-work figcaption { color: var(--red); }

/* šipky a fajfky v pravém panelu se „odškrtnou" po revealu */
.cvk .pop { opacity: 0; transform: scale(.5); transform-origin: center; transform-box: fill-box; }
.is-in .cvk .pop, .cvk.is-in .pop {
  animation: popIn .45s var(--ease-out) forwards;
}
.cvk .pop:nth-of-type(1), .cvk .pop[data-i="1"] { animation-delay: .5s; }
.cvk .pop[data-i="2"] { animation-delay: .85s; }
.cvk .pop[data-i="3"] { animation-delay: 1.2s; }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }

/* „píše…" indikátor v levém panelu */
.cvk .typing circle { animation: typingBlink 1.25s infinite; }
.cvk .typing circle:nth-child(2) { animation-delay: .18s; }
.cvk .typing circle:nth-child(3) { animation-delay: .36s; }
@keyframes typingBlink {
  0%, 55%, 100% { opacity: .3; }
  25% { opacity: 1; }
}

/* ---------- bezpečnost (červená sekce) ---------- */

.sec-red .display-l { color: var(--white); }
.sec-red .lead { color: rgba(255, 255, 255, .88); }
.sec-red p { color: rgba(255, 255, 255, .88); }
.sec-red strong { color: var(--white); }

.vision-quote {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: .95;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: clamp(1.6rem, 4vw, 2.8rem) 0;
  text-wrap: balance;
}

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr; } }

.rule {
  background: rgba(21, 21, 23, .22);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 1.5rem 1.5rem 1.4rem;
  transition: transform .25s var(--ease-out), background .25s;
}
.rule:hover { transform: translate(4px, -4px); background: rgba(21, 21, 23, .34); }
.rule .num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--white);
  background: var(--black);
  display: inline-block;
  padding: .3em .7em;
  margin-bottom: .9rem;
}
.rule h3 { color: var(--white); font-size: 1.08rem; }
.rule p { margin: 0; font-size: .93rem; color: rgba(255, 255, 255, .85); }

.stat-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
  margin-top: clamp(2rem, 5vw, 3.4rem);
  padding-top: clamp(1.6rem, 4vw, 2.6rem);
  border-top: 1px solid rgba(255, 255, 255, .3);
}
@media (max-width: 700px) { .stat-strip { grid-template-columns: 1fr; } }

.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.4rem, 11vw, 8.5rem);
  line-height: .9;
  color: var(--white);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.stat-num sup { font-size: .35em; font-weight: 800; }
.stat-side .mono-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  display: inline-block;
  padding: .3em .8em;
  margin-bottom: .8rem;
}
.stat-side p { max-width: 34em; margin: 0; }

/* ---------- zkušenost (černá sekce) ---------- */

.proof-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 2rem; }
.proof-badges span {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--zinc);
  border: 1px solid #3A3A40;
  padding: .55em 1em;
}
.proof-badges span b { color: var(--red); font-weight: 600; }

.shot-frame {
  position: relative;
  border: 1px solid #33333A;
  background: #0E0E10;
  cursor: zoom-in;
  display: block;
  width: 100%;
  padding: 0;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.shot-frame:hover { transform: translate(6px, -6px); box-shadow: -12px 12px 0 rgba(226, 0, 26, .28); }
.shot-frame img, .shot-frame svg { width: 100%; height: auto; display: block; }
/* náhled ukazuje horní část systému, plná verze v lightboxu */
.shot-frame img {
  aspect-ratio: 16 / 8.4;
  object-fit: cover;
  object-position: top center;
}

.shot-zoom {
  position: absolute;
  right: 14px; bottom: 14px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .6em 1em;
  pointer-events: none;
}

.shot-caption {
  font-size: .88rem;
  color: var(--broken);
  margin-top: 1.1rem;
  max-width: 56em;
  border-left: 3px solid var(--red);
  padding-left: 1rem;
}

.exp-quote {
  border-left-color: var(--red);
  color: var(--zinc);
  margin: 2.4rem 0 0;
}

/* ---------- CTA sekce ---------- */

.cta-final { text-align: center; }
.cta-final .lead { margin-inline: auto; }
.cta-final .btn { margin-top: 1.8rem; }

/* ==========================================================================
   PODSTRÁNKY (návrhy / skills / tech-stack)
   ========================================================================== */

.page-hero {
  padding: clamp(2.8rem, 6vw, 4.6rem) 0 clamp(2.2rem, 5vw, 3.6rem);
  background: var(--black);
  color: var(--zinc);
  position: relative;
  overflow: clip;
}
.page-hero h1 { color: var(--white); margin-bottom: .6rem; }
.page-hero .lead { color: #B9BEC3; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: var(--red);
  transform: skewY(calc(var(--pitch) * .4));
  transform-origin: left;
}
.page-hero .eyebrow { color: var(--red); }

/* filtr / chips — záměrně nenápadné, hlavní je obsah */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--steel-2);
  border: 1px solid #DCDFE2;
  padding: .5em .85em;
  cursor: pointer;
  transition: all .2s var(--ease-out);
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); background: var(--white); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.chips--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 0 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--broken) transparent;
}
.chips--scroll .chip { flex: none; }
.chips--scroll::-webkit-scrollbar { height: 5px; }
.chips--scroll::-webkit-scrollbar-thumb { background: #D3D6D9; }

.toolbar .count-note { margin-left: auto; white-space: nowrap; }

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(244, 245, 246, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: .55rem 0 .65rem;
}
.toolbar-inner { display: flex; flex-direction: column; gap: .5rem; }

.toolbar-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.search-box { position: relative; flex: 0 1 320px; max-width: 320px; min-width: 200px; }
.search-box input {
  width: 100%;
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .55em .9em .55em 2.7em;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: -4px 4px 0 rgba(226, 0, 26, .1);
}
.search-box .si {
  position: absolute;
  left: .95em; top: 50%;
  transform: translateY(-50%);
  color: var(--steel-2);
  pointer-events: none;
  display: flex;
}

.count-note {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--steel-2);
}

/* sekce kategorií na podstránkách */
.cat-title {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin: clamp(2.2rem, 5vw, 3.2rem) 0 1.2rem;
}
.cat-title h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin: 0;
  position: relative;
  padding-bottom: .35rem;
}
.cat-title h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 3.2em;
  height: 4px;
  background: var(--red);
  transform: skewY(var(--pitch));
}
.cat-title .cnt {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--steel-2);
}
.cat-sub { color: var(--steel); font-size: .95rem; margin: -0.5rem 0 1.3rem; font-style: italic; }

/* level badge (skills) */
.lvl {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: inline-block;
  padding: .35em .8em;
  margin-bottom: .7rem;
}

.skill-card { cursor: pointer; }
.skill-card .desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* legenda úrovní */
.legend-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .6rem;
}
@media (max-width: 1020px) { .legend-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .legend-grid { grid-template-columns: 1fr 1fr; } }

.legend-cell { border: 1px solid var(--line); background: var(--white); }
.legend-cell .lh {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .55em .8em;
}
.legend-cell .lb { font-size: .74rem; color: var(--steel); padding: .6em .8em .8em; line-height: 1.45; }

/* tech karty */
.tech-card { display: flex; flex-direction: column; }
.tech-card .use {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
  font-size: .85rem;
  color: var(--steel);
  margin-bottom: 0;
}
.tech-card .use b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: .25rem;
}
.tech-card p.desc { margin-bottom: 1rem; }

/* návrhy */
.prop-card h3 { color: var(--ink); }
.prop-card .benefit {
  font-weight: 600;
  color: var(--ink);
  font-size: .93rem;
  margin-bottom: .4rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--steel-2);
}
.empty-state .big { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--steel); margin-bottom: .4rem; }

/* ---------- modal (detail dovednosti) ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background: rgba(15, 15, 17, .6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--white);
  border-top: 6px solid var(--red);
  max-width: 680px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
  padding: 2rem 2.2rem 2.2rem;
  transform: translateY(14px);
  transition: transform .25s var(--ease-out);
  position: relative;
}
.modal.is-open .modal-box { transform: none; }
.modal-box .tag { font-family: var(--font-mono); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-2); }
.modal-box h2 { font-size: 1.5rem; margin: .5rem 0 .8rem; }
.modal-box p { color: var(--steel); font-size: 1rem; margin-bottom: 0; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--red); color: var(--white); border-color: var(--red); }

@media (max-width: 560px) {
  .modal-box { padding: 1.5rem 1.3rem 1.6rem; }
}

/* ---------- velké monitory ---------- */

@media (min-width: 1500px) {
  :root { --container: 1280px; }
  body { font-size: 18px; }
  .display-xl { font-size: 5.2rem; }
  .display-l { font-size: 3.5rem; }
  .vision-quote { font-size: 7.6rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cvk .pop { opacity: 1; transform: none; animation: none; }
}
