/* ===== Studio Fresh — barevné schéma podle loga ===== */
:root {
  --blue: #2CB2EC;          /* modrá z loga (o něco jasnější pro lepší kontrast) */
  --blue-light: #8AD8F6;
  --blue-pale: #C8E9FA;
  --blue-deep: #103450;
  --bg-darkest: #02050B;
  --bg-dark: #05090F;
  --bg-mid: #0A101C;
  --bg-card: #0F1826;
  --border: #1F2C44;
  --border-light: #36465F;
  --silver: #CFD8E2;
  --silver-bright: #F4F8FB;
  --silver-dark: #93A1B1;
  --text-white: #FFFFFF;
  --text-light: #E6ECF2;
  --text-gray: #AAB7C3;
  --text-muted: #8B99A7;
  --radius: 12px;
  --font: "Trebuchet MS", "Segoe UI", Tahoma, Helvetica, Arial, sans-serif; /* font jako na studiofresh.cz */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-mid);
  color: var(--text-light);
  line-height: 1.6;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font); color: var(--text-white); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 36px; }

a { color: var(--blue); text-decoration: none; }

.section { padding: 90px 0; }
.section-dark { background: var(--bg-dark); }

.section-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
  font-weight: 500;
}

/* ===== Tlačítka ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--blue); color: var(--bg-darkest); }
.btn-primary:hover { background: var(--blue-light); transform: translateY(-2px); }
.btn-outline {
  border: 1px solid var(--silver-dark);
  color: var(--silver-bright);
  background: linear-gradient(115deg, rgba(201,210,220,0.10), rgba(201,210,220,0.02));
}
.btn-outline:hover { border-color: var(--silver-bright); box-shadow: 0 0 24px rgba(201, 210, 220, 0.2); }

/* ===== Navigace ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(12, 17, 22, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo img { width: 74px; height: 42px; display: block; padding: 8px; box-sizing: content-box; }
.nav-logo-text { font-size: 20px; font-weight: 700; color: var(--blue); }
.nav-logo-text small { color: var(--text-white); font-size: 12px; letter-spacing: 0.2em; font-weight: 400; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-gray); font-size: 15px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-white); }
.nav-cta { padding: 9px 20px; font-size: 14px; }
.nav-burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--text-white); transition: 0.3s; }

/* Přepínač jazyka (vlaječky CZ / EN) */
.lang-switch { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid transparent; border-radius: 8px;
  color: var(--text-gray); font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  padding: 4px 8px; line-height: 1; cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.lang-btn:hover { color: var(--text-white); }
.lang-btn.is-active { color: var(--text-white); background: rgba(41, 171, 226, 0.14); border-color: rgba(41, 171, 226, 0.5); }
.lang-flag { width: 20px; height: 14px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }

/* ===== Hero ===== */
.hero {
  background: var(--bg-dark);
  padding: 180px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -10%; top: -30%;
  width: 60%; height: 120%;
  background: radial-gradient(ellipse at center, rgba(41, 171, 226, 0.20) 0%, transparent 65%);
  animation: glow 7s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  left: -15%; bottom: -50%;
  width: 55%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(201, 210, 220, 0.07) 0%, transparent 60%);
  animation: glow 9s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}
@keyframes glow {
  from { opacity: 0.6; transform: scale(1); }
  to { opacity: 1; transform: scale(1.12); }
}
.hero-content { max-width: 700px; position: relative; z-index: 2; }
.hero-tag {
  display: inline-block;
  font-size: 13px;
  background: var(--blue-deep);
  color: var(--blue-light);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5.6vw, 50px);
  margin-bottom: 26px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  background: linear-gradient(115deg, var(--silver-bright) 0%, var(--silver) 30%, #7E8BA0 50%, var(--silver-bright) 70%, var(--silver) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 6s linear infinite;
}
.hero h1 em {
  font-style: normal; /* stejné (bezpatkové) písmo jako zbytek nadpisu, jen modrý přechod */
  background: linear-gradient(110deg, var(--blue) 20%, var(--blue-pale) 50%, var(--blue) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero-sub { font-size: 19px; color: var(--text-gray); max-width: 540px; margin-bottom: 40px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Animovatelná intenzita neonové záře (musí být registrovaná, aby šla plynule animovat) */
@property --glow {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

/* Logo Studio Fresh v hero sekci — samokreslící se neonová animace (kontura → výplň), cca 10 s */
.hero-logo { position: absolute; right: 5%; top: 50%; transform: translateY(-50%); z-index: 2; width: clamp(420px, 51vw, 660px); max-width: 66%; }
.hero-logo svg { display: block; width: 100%; height: auto; overflow: visible; }

/* barvy jednotlivých elementů (výplň se objeví až v animaci); color = barva neonové záře */
.hero-logo .st0 { fill: #00b1eb; stroke: #00b1eb; color: #00b1eb; }
.hero-logo .st1 { fill: #009fe3; stroke: #009fe3; color: #009fe3; }
.hero-logo .st2 { fill: #e7eef4; stroke: #e7eef4; color: #e7eef4; stroke-width: 0.6; } /* "studio" — světlé kvůli tmavému pozadí; tenčí čára, aby drobná písmenka nebyla "okousaná" */
.hero-logo .st3 { fill: #bce4fa; stroke: #bce4fa; color: #bce4fa; }
.hero-logo .st4 { fill: #5bc5f2; stroke: #5bc5f2; color: #5bc5f2; }
.hero-logo .st5 { fill: #93d5f6; stroke: #93d5f6; color: #93d5f6; }

.hero-logo path {
  fill-opacity: 0;
  stroke-opacity: 0;                 /* na začátku úplně neviditelné */
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  --glow: 0px;
  filter: drop-shadow(0 0 var(--glow) currentColor) drop-shadow(0 0 calc(var(--glow) * 2) currentColor);
  animation: logoDraw 1.68s ease both;   /* "both" = před startem drží 0% snímek → nulová viditelnost */
  animation-delay: calc(var(--o) * 0.385s);
}

/* 0–60 %: rozsvícená neonová kontura se kreslí; 60–85 %: element se plynule vyplní; pak záře zhasne */
@keyframes logoDraw {
  0%   { stroke-opacity: 0; stroke-dashoffset: 1; fill-opacity: 0; --glow: 0px; }
  6%   { stroke-opacity: 1; --glow: 5px; }              /* neon se "rozsvítí" */
  60%  { stroke-opacity: 1; stroke-dashoffset: 0; fill-opacity: 0; --glow: 6px; }  /* kontura hotová, svítí */
  85%  { stroke-opacity: 1; stroke-dashoffset: 0; fill-opacity: 1; --glow: 3px; }  /* vyplní se barvou */
  100% { stroke-opacity: 0; stroke-dashoffset: 0; fill-opacity: 1; --glow: 0px; }  /* obrys zhasne → zůstane jen čistá vyhlazená výplň */
}

/* "Kapky" (dekorativní značka) — po vykreslení loga se jemně vlní a pulsují (každá s mírně jiným časem) */
.hero-logo .drop {
  transform-box: fill-box;
  transform-origin: center;
  animation:
    logoDraw 1.68s ease calc(var(--o) * 0.385s) both,
    dropPulse 3.6s ease-in-out calc(7s + var(--o) * 0.25s) infinite;
}
@keyframes dropPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-1.8px) scale(1.05); }
}

/* uživatel s omezením pohybu — rovnou hotové logo bez animace (ani pulsování kapek) */
@media (prefers-reduced-motion: reduce) {
  .hero-logo path,
  .hero-logo .drop { animation: none; fill-opacity: 1; stroke-opacity: 0; stroke-dashoffset: 0; --glow: 0px; filter: none; transform: none; }
}

/* ===== Síťové pozadí přes celou stránku (propojené body) ===== */
.bg-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* ===== Čísla ===== */
.stats { background: var(--bg-mid); padding: 26px 0; }

/* ===== Čísla — kinetické střídání faktů (obří číslo vlevo, sdělení vpravo) ===== */
.statv4 { max-width: 1040px; margin: 0 auto; }
.statv4-stage { display: grid; }                 /* slidy se překrývají v jedné buňce → výška podle nejvyššího */
.statv4-slide {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 56px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.statv4-slide.is-active { opacity: 1; transform: none; }
.statv4-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
  font-size: clamp(45px, 7.7vw, 105px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(115deg, var(--silver-bright) 10%, var(--silver-dark) 50%, var(--silver-bright) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.statv4-num::before { content: '+'; -webkit-text-fill-color: var(--blue); font-size: 0.8em; margin-right: 0.04em; }
.statv4-body {
  flex: 0 1 560px;
  text-align: left;
  border-left: 1px solid var(--border);
  padding-left: clamp(24px, 4vw, 48px);
}
.statv4-lead {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-white);
}
.statv4-detail {
  margin: 0;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.5;
  color: var(--text-gray);
}

/* Ukazatel přes celou šířku — aktivní segment se plní za 3,4 s, pak přepne na další */
.statv4-bars { display: flex; gap: 8px; margin-top: 40px; }
.statv4-bar {
  flex: 1;
  height: 4px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
}
.statv4-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
}
.statv4-bar.is-active > i { animation: statv4fill 3360ms linear forwards; }
.statv4.paused .statv4-bar.is-active > i { animation-play-state: paused; }
@keyframes statv4fill { from { width: 0; } to { width: 100%; } }

/* ===== Služby ===== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s, border-color 0.25s;
}
.service-card { position: relative; overflow: hidden; }
.service-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-pale));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}
.service-card:hover { transform: translateY(-8px); border-color: var(--blue); box-shadow: 0 14px 40px rgba(41, 171, 226, 0.15); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon { color: var(--blue); margin-bottom: 16px; transition: transform 0.3s, filter 0.3s; }
.service-icon svg { width: 38px; height: 38px; display: block; }
.service-card:hover .service-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 10px rgba(41, 171, 226, 0.7));
}
.service-card h3 { font-size: 20px; margin-bottom: 10px; }
.service-card p { font-size: 14px; color: var(--text-gray); }

/* ===== Reference — posuvný pás ===== */
.cases-strip {
  overflow: hidden;
  padding: 8px 0;                 /* prostor pro nadzvednutí karty při najetí myší */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;            /* svisle se stránka scrolluje, vodorovně táhneme pás */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.cases-strip.is-dragging { cursor: grabbing; }
.cases-track { display: flex; gap: 18px; width: max-content; will-change: transform; }
.case-card {
  flex: 0 0 245px;                /* karty cca o 30 % menší než dříve */
  width: 245px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.case-card:hover { transform: translateY(-6px); border-color: var(--blue); }
.case-img { position: relative; aspect-ratio: 16 / 10; background: var(--bg-card); overflow: hidden; padding: 10px 10px 6px; box-sizing: border-box; }
/* Ikona přehrávání u referencí s videem */
.case-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 39px; height: 39px;
  border-radius: 50%;
  background: var(--blue-deep);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: transform 0.3s, background 0.3s;
}
.case-play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}
.case-card:hover .case-play { transform: translate(-50%, -50%) scale(1.1); }
.case-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.4s; cursor: zoom-in; -webkit-user-drag: none; }
.case-card:hover .case-img img { transform: scale(1.05); }
.case-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--border-light); font-size: 13px; }
.case-body { padding: 14px 16px 16px; }
.case-client { font-size: 12px; color: var(--blue); font-weight: 500; letter-spacing: 0.08em; margin-bottom: 6px; }
.case-title { font-size: 15px; font-weight: 600; color: var(--text-white); margin-bottom: 6px; }
.case-subtitle { font-size: 12px; color: var(--text-gray); margin-bottom: 12px; }
.case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; background: var(--bg-card); color: var(--text-gray); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-light); }

/* ===== Klienti — běžící pás ===== */
.clients-logos {
  display: flex;
  gap: 14px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;            /* svisle se stránka scrolluje, vodorovně táhneme pás */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.clients-logos.is-dragging { cursor: grabbing; }
.clients-track { display: flex; gap: 14px; flex-shrink: 0; width: max-content; will-change: transform; }
.clients-track img { -webkit-user-drag: none; user-select: none; }
.logo-pill {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-light);
  padding: 12px 26px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  transition: border-color 0.42s, color 0.42s;
}
.logo-pill:hover { border-color: var(--blue); color: var(--blue); }
.logo-pill.is-open { border-color: var(--blue); color: var(--blue); }

/* Ovál se zaměnitelným logem (text se na hover plynule prolne do loga značky) */
.logo-pill .pill-text { transition: opacity 0.42s ease; }
.pill-logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;   /* logo nikdy širší než ovál, který zmizí */
  max-height: 100%;  /* ani vyšší — čtvercová loga se tak nahoře/dole neořežou (poměr drží object-fit: contain) */
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.42s ease;
  pointer-events: none;
}
.pill-logo.tint-silver { filter: brightness(0) invert(0.92); } /* stříbrný nádech jen u Weledy (šedé logo); ostatní loga zůstávají v originále */
/* Hlavní loga zůstávají barevná (podznačky ve flyoutu také) */
.logo-pill.has-flyout .pill-logo { filter: none; }
/* Najetí myší (desktop) i klepnutí (mobil, .is-open) odkryje logo */
.logo-pill.has-logo:hover,
.logo-pill.has-logo.is-open { border-color: transparent; color: var(--text-light); } /* ovál (rámeček) zmizí, zůstane jen logo */
.logo-pill.has-logo:hover .pill-text,
.logo-pill.has-logo.is-open .pill-text { opacity: 0; }
.logo-pill.has-logo:hover .pill-logo,
.logo-pill.has-logo.is-open .pill-logo { opacity: 1; }

/* === Flyout — rodičovská značka s podznačkami === */
.logo-pill.has-flyout { cursor: pointer; }
/* flyout je fixed — uniká overflow:hidden kontejneru; polohu nastavuje JS */
.pill-flyout {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition: opacity 0.42s ease, visibility 0.42s, transform 0.42s ease;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  white-space: nowrap;
}
.pill-flyout.flyout-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
/* šipka nahoru — vodorovná pozice odpovídá středu oválu */
.pill-flyout::before {
  content: '';
  position: absolute;
  top: -7px;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
}
/* podznačky — 2–3 v řadě, zalamují se */
.flyout-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 380px;
}
.flyout-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E8EBEF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  height: 72px;
  min-width: 130px;
  flex: 1 1 130px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.flyout-brand:hover { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(41,171,226,0.25); }
.flyout-brand img {
  max-height: 48px;
  max-width: 150px;
  width: auto;
  object-fit: contain;
  display: block;
}
/* Skoro čtvercová loga (např. Ferrero Rocher) — větší výška, ať zaberou víc místa v dlaždici */
.flyout-brand img.is-square { max-height: 62px; max-width: 120px; }
/* Drobnější loga (např. Dettol, Veet) — o něco větší, ať nepůsobí maličká */
.flyout-brand img.is-bigger { max-height: 60px; max-width: 160px; }

/* ===== O nás ===== */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about-text { font-size: 17px; color: var(--text-gray); }
.about-text strong { color: var(--text-white); }
.about-points { display: grid; gap: 16px; }
.about-point {
  background: var(--bg-card);
  border-left: 3px solid var(--blue);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.about-point-text { display: flex; flex-direction: column; gap: 2px; }
.about-point strong { color: var(--text-white); font-size: 15px; }
.about-point span { font-size: 13px; color: var(--text-gray); }

/* Tematická animace vpravo v kartě — objeví se po najetí myši, tenká modrá linka */
.about-point-anim { color: var(--blue); flex-shrink: 0; opacity: 0.25; transition: opacity 0.3s; }
.about-point-anim svg { width: 40px; height: 40px; display: block; }
.about-point:hover .about-point-anim { opacity: 1; }

/* Rychlost — ručička se rozjede zdola na maximum a pak tam jemně kmitá */
.anim-speed-rise { transform-box: view-box; transform-origin: 20px 27px; transform: rotate(-72deg); }
.anim-speed-needle { transform-box: view-box; transform-origin: 20px 27px; }
.about-point:hover .anim-speed-rise { animation: speedRise 0.9s cubic-bezier(.2,.7,.3,1) forwards; }
.about-point:hover .anim-speed-needle { animation: speedJitter 0.17s ease-in-out infinite alternate; }
@keyframes speedRise {
  0%   { transform: rotate(-72deg); }
  100% { transform: rotate(66deg); }
}
@keyframes speedJitter {
  0%   { transform: rotate(-4deg); }
  100% { transform: rotate(6deg); }
}

/* Spolehlivost — fajfka se opakovaně vykreslí */
.anim-check { stroke-dasharray: 21; stroke-dashoffset: 0; }
.about-point:hover .anim-check { animation: drawCheck 1.9s ease-in-out infinite; }
@keyframes drawCheck {
  0%   { stroke-dashoffset: 21; }   /* schovaná */
  45%  { stroke-dashoffset: 0; }    /* vykreslená */
  80%  { stroke-dashoffset: 0; }    /* chvíli drží */
  81%  { stroke-dashoffset: 21; }   /* okamžitě zmizí */
  100% { stroke-dashoffset: 21; }   /* a kreslí se zase od začátku */
}

/* Komplexnost — ozubená kola se točí proti sobě */
.anim-gear { transform-box: view-box; }
.anim-gear-1 { transform-origin: 16px 16px; }
.anim-gear-2 { transform-origin: 27px 26px; }
.anim-gear-3 { transform-origin: 29px 12px; }
.about-point:hover .anim-gear-1 { animation: gearSpin 4.5s linear infinite; }
.about-point:hover .anim-gear-2 { animation: gearSpinRev 3.2s linear infinite; }
.about-point:hover .anim-gear-3 { animation: gearSpin 3.8s linear infinite; }
@keyframes gearSpin { to { transform: rotate(360deg); } }
@keyframes gearSpinRev { to { transform: rotate(-360deg); } }

/* Stabilita — váhy se rozhoupou a ustálí do rovnováhy */
.anim-scale-beam { transform-box: view-box; transform-origin: 20px 12px; }
.about-point:hover .anim-scale-beam { animation: scaleTip 2.4s ease-in-out infinite; }
@keyframes scaleTip {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(12deg); }
  42%  { transform: rotate(-8deg); }
  62%  { transform: rotate(5deg); }
  80%  { transform: rotate(-3deg); }
  92%  { transform: rotate(1deg); }
  100% { transform: rotate(0deg); }
}

/* ===== Vedoucí pracovníci ===== */
.team-subheading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 48px 0 0;
}
.team {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.team-member { text-align: center; }
.team-photo {
  width: 100%;
  max-width: 154px;
  aspect-ratio: 177 / 237;
  object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s;
}
.team-member:hover .team-photo { border-color: var(--blue); }
.team-name { color: var(--text-white); font-size: 17px; font-weight: 600; }
.team-role { color: var(--blue); font-size: 13px; margin-bottom: 10px; }
.team-contact { display: block; color: var(--text-gray); font-size: 14px; text-decoration: none; }
.team-contact:hover { color: var(--blue); }

/* ===== Pohyblivý pás zaměstnanců ===== */
.team-strip {
  margin-top: 52px;
  display: flex;
  gap: 22px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;            /* svisle se stránka scrolluje, vodorovně táhneme pás */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.team-strip.is-dragging { cursor: grabbing; }
.team-strip-track {
  display: flex;
  gap: 22px;
  flex-shrink: 0;
  width: max-content;
  will-change: transform;
}
.team-strip-track img { -webkit-user-drag: none; user-select: none; }
.team-emp { width: 136px; flex-shrink: 0; text-align: center; }
.team-emp-photo {
  width: 136px;
  height: 184px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  margin-bottom: 12px;
  transition: border-color 0.3s;
}
.team-emp:hover .team-emp-photo { border-color: var(--blue); }
.team-emp-name { color: var(--text-white); font-size: 15px; font-weight: 600; }
.team-emp-role { color: var(--text-muted); font-size: 12px; margin-top: 2px; line-height: 1.35; }

/* ===== CTA + Kontakt ===== */
.cta { background: var(--blue-deep); padding: 90px 0; }
.cta h2 { margin-bottom: 48px; }
.cta-sub { color: var(--blue-pale); font-size: 17px; margin-bottom: 48px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info h3 { font-size: 20px; margin-bottom: 16px; }
.contact-info p { margin-bottom: 16px; color: var(--blue-pale); }
.contact-legal { font-size: 12px; opacity: 0.7; }
.contact-privacy { margin-top: 28px; }
.contact-privacy a { color: inherit; text-decoration: underline; }
.contact-form { display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; color: var(--blue-pale); }
.contact-form input, .contact-form textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-white);
  font-family: inherit;
  font-size: 15px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form button { justify-self: start; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* past na spamboty */
.form-status { font-size: 14px; color: var(--blue-pale); }
.form-status:empty { display: none; }
.form-status.ok { color: #8FE3A8; }
.form-status.err { color: #F2978D; }

/* ===== Patička ===== */
.footer { background: var(--bg-darkest); }
.footer-bottom { padding: 22px 24px; font-size: 13px; color: var(--text-muted); text-align: center; }
.footer-legal-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 24px; margin-bottom: 18px; }
.footer-legal { font-size: 12px; opacity: 0.7; line-height: 1.5; position: relative; }
.footer-legal + .footer-legal::before { content: "|"; position: absolute; left: -13px; opacity: 0.5; }
a.footer-legal { color: inherit; text-decoration: underline; }
a.footer-legal:hover { color: var(--blue); }

/* ===== Lightbox (plná velikost obrázku) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
/* U videa vypneme rozmazání pozadí — to jinak nutí prohlížeč překreslovat
   celou plochu každý snímek a způsobuje cukání přehrávání. */
.lightbox.video-mode { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(6, 10, 20, 0.97); }
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.3s;
}
.lightbox.open img { transform: scale(1); }
.lightbox-video {
  display: none;
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  background: #000;
  cursor: default;
}
.lightbox-caption { color: var(--text-gray); font-size: 14px; }
.lightbox-close {
  position: absolute;
  top: 18px; right: 26px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--blue); }

/* ===== Animace při scrollu ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Ukazatel průběhu scrollování ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--blue-pale));
  z-index: 200;
}

/* Vypnutí animací pro uživatele, kteří si je nepřejí */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Responzivita ===== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-logo { display: none; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg-darkest);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .lang-switch { margin-left: auto; margin-right: 4px; }
  .statv4-slide { flex-direction: column; align-items: flex-start; gap: 14px; }
  .statv4-body { flex-basis: auto; border-left: none; padding-left: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .case-card { flex-basis: 210px; width: 210px; }
  .team { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 130px 0 70px; }
}

/* ===== Okno s detailem služby ===== */
.service-card[data-detail] { cursor: pointer; }
.service-card[data-detail]::before {
  content: 'Detail →';
  position: absolute;
  bottom: 16px; right: 22px;
  font-size: 13px; font-weight: 500;
  color: var(--blue);
  opacity: 0; transform: translateX(-4px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1;
}
.service-card[data-detail]:hover::before { opacity: 1; transform: none; }

.svc-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 5, 11, 0.6); /* pozadí stránky zůstane vidět, jen ztmavne o ~60 % */
  cursor: pointer; /* kliknutí kamkoliv okno zavře */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.svc-modal.open { opacity: 1; visibility: visible; }
.svc-modal-box {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  width: min(980px, 100%);
  height: 480px;        /* pevná výška — všechna okna stejně velká, orientace na šířku */
  max-height: 86vh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}
.svc-modal.open .svc-modal-box { transform: none; opacity: 1; }
.svc-modal-img { min-height: 0; background: var(--bg-mid); }
.svc-modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-modal-body {
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: safe center; /* svislé vystředění; při delším obsahu se zarovná nahoru (bez ořezu) */
  gap: 13px;
  overflow-y: auto;
}
.svc-modal-body h3 { font-size: 24px; margin-bottom: 4px; }
.svc-modal-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.svc-modal-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text-light);
}
.svc-modal-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(44, 178, 236, 0.7);
}
.svc-modal-sublist { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.svc-modal-sublist li { padding-left: 20px; font-size: 14px; color: var(--text-gray); }
.svc-modal-sublist li::before {
  left: 2px; top: 7px;
  width: 5px; height: 5px;
  background: transparent;
  border: 1.5px solid var(--blue);
  box-shadow: none;
}
.svc-modal-note { font-size: 14px; color: var(--text-gray); line-height: 1.65; margin-top: 6px; }
@media (max-width: 760px) {
  .svc-modal-box { grid-template-columns: 1fr; height: auto; max-height: 90vh; }
  .svc-modal-img { height: 200px; }
  .svc-modal-body { padding: 26px 22px; }
}
