/* ==========================================================================
   Heda Digital — dark canvas + jediný limetkový akcent
   Inter Tight (display/UI) + Chivo Mono (štítky, čísla — čistá nula)
   Pravidlo: limetka jen tam, kde něco znamená — signál, stav, akce.
   ========================================================================== */

:root {
  /* plochy — neutrály s nepatrným zeleným nádechem, aby seděly k limetce */
  --bg:        oklch(0.147 0.008 145);
  --bg-1:      oklch(0.176 0.009 145);
  --bg-2:      oklch(0.205 0.010 145);
  --bg-3:      oklch(0.238 0.011 145);
  --line:      oklch(0.288 0.012 145);
  --line-soft: oklch(0.238 0.010 145);

  --fg:        oklch(0.975 0.004 145);
  --fg-mut:    oklch(0.745 0.010 145);
  --fg-dim:    oklch(0.585 0.010 145);

  --lime:      oklch(0.872 0.196 128);
  --lime-2:    oklch(0.780 0.176 128);
  --lime-ink:  oklch(0.205 0.055 128);

  /* barvy převzaté z cizích rozhraní (Google mock) — mimo brand paletu */
  --g-blue:    oklch(0.72 0.155 255);
  --g-green:   oklch(0.74 0.155 150);

  --font-ui:   'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Chivo Mono', ui-monospace, 'SFMono-Regular', monospace;

  --fs-h1:   clamp(2.75rem, 1.75rem + 4.4vw, 5.125rem);
  --fs-h2:   clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  --fs-h3:   1.25rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.42vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-sm:   0.9375rem;
  --fs-xs:   0.8125rem;
  --fs-mono: 0.75rem;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;

  --pad-section: clamp(56px, 6.5vw, 100px);
  --nav-h: 110px;          /* skutecna vyska lepive hlavicky — .header-inner */
  --nav-offset: 128px;
  --wrap: 1200px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --shadow-1: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-2: 0 18px 40px -22px oklch(0 0 0 / 0.85);
  --shadow-3: 0 40px 90px -40px oklch(0 0 0 / 0.9);
  --glow: 0 0 0 1px color-mix(in oklch, var(--lime) 32%, transparent),
          0 12px 44px -18px color-mix(in oklch, var(--lime) 45%, transparent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-offset); -webkit-text-size-adjust: 100%; }
/* JS plynuly scroll si rizeni bere na sebe — nativni smooth by se s nim pral */
html.js-smooth { scroll-behavior: auto; }

body {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--fg-mut);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* jemné zrno — brání pruhování gradientů na tmavém pozadí */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.042em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.018em; }

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--lime); color: var(--lime-ink); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: var(--sp-4); top: var(--sp-4);
  z-index: 200; padding: var(--sp-3) var(--sp-5);
  background: var(--lime); color: var(--lime-ink);
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.only-sm { display: none; }
@media (max-width: 460px) { .only-sm { display: inline; } }

code {
  font-family: var(--font-mono); font-size: 0.86em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--fg-mut);
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-6); }
.section { position: relative; padding-block: var(--pad-section); }
.section + .section { padding-top: 0; }
.section--split { border-top: 1px solid var(--line-soft); padding-top: var(--pad-section); }

.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.is-center { margin-inline: auto; text-align: center; }
/* Uvnitř vycentrované hlavičky musí i lead sedět na střed — jinak stojí
   svým 62ch blokem u levého okraje a text vypadá posunutý. */
.section-head.is-center .lead { margin-inline: auto; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--fg-mut); margin-top: var(--sp-6); max-width: 62ch; }

.accent { color: var(--lime); }
.caret {
  display: inline-block; width: 0.055em; height: 0.82em;
  background: var(--lime); margin-left: 0.1em;
  vertical-align: baseline; translate: 0 0.04em;
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1 } 50.01%, 100% { opacity: 0 } }

/* ---------- tlačítka ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 13px var(--sp-6);
  font-size: var(--fs-sm); font-weight: 550; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-line); border-radius: 999px;
  transition: background 220ms var(--ease), color 220ms var(--ease),
              border-color 220ms var(--ease), transform 220ms var(--ease),
              box-shadow 260ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--lime); --btn-fg: var(--lime-ink); --btn-line: var(--lime); font-weight: 600; }
.btn--primary:hover { box-shadow: 0 14px 34px -14px color-mix(in oklch, var(--lime) 70%, transparent); }
.btn--ghost:hover { --btn-line: var(--fg-dim); background: var(--bg-1); }
.btn--sm { padding: 9px var(--sp-5); font-size: var(--fs-xs); }
.btn .arrow { transition: transform 260ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.site-header.is-stuck {
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); min-height: 110px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 46px; height: 46px; flex: none; border-radius: 12px; }
.brand-mark .bm-tile { transition: fill 260ms var(--ease); }
.brand:hover .bm-dot { fill: var(--fg); }
.brand-word { font-size: 1.4375rem; font-weight: 500; letter-spacing: -0.034em; }
.brand-word b { font-weight: 700; }
.brand-word .dim { color: var(--fg-dim); }

.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
/* :not(.btn) — jinak by selektor navigace přebil barvy tlačítka */
.site-nav a:not(.btn) {
  position: relative; padding: 12px 18px;
  font-size: 1.125rem; font-weight: 500; color: var(--fg-mut);
  text-decoration: none; border-radius: 999px;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--fg); background: var(--bg-1); }
.site-nav .nav-sep { width: 1px; height: 28px; background: var(--line); margin-inline: var(--sp-4); }
/* prepinac jazyku — tri jazyky v jednom pouzdru, aktivni je zvyrazneny */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--line); border-radius: 999px;
}
.site-nav .lang-switch a.lang {
  font-family: var(--font-mono); font-size: var(--fs-sm);
  padding: 7px 11px; border: 0; border-radius: 999px;
}
.site-nav .lang-switch a.lang.is-current { color: var(--fg); background: var(--bg-1); }
.site-nav .btn { margin-left: var(--sp-2); }

.nav-toggle {
  display: none; width: 54px; height: 54px; flex: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform 260ms var(--ease), opacity 200ms; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- ukazatel scrollování ---------- */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: color-mix(in oklch, var(--fg) 8%, transparent);
  opacity: 0; transition: opacity 300ms var(--ease);
}
.site-header.is-stuck .scroll-progress { opacity: 1; }
.scroll-progress i {
  display: block; height: 100%; width: 0;
  background: var(--lime); box-shadow: 0 0 12px var(--lime);
  transform-origin: left center;
}

/* ==========================================================================
   HERO — scrollem řízená sekvence
   Bez JS (nebo s prefers-reduced-motion) zůstane jen vycentrovaný claim;
   třídu .is-live přidává skript, teprve ta zapne pinnutí a animaci.
   ========================================================================== */
.reveal { position: relative; }
.reveal.is-live { height: 300vh; }


.reveal-stage {
  --claim: 1; --rise: 0; --mask: 0;
  --side: 0;                   /* jak daleko uz planeta ustoupila doprava */
  --f1: 0; --f2: 0; --f3: 0;   /* pritomnost faktu */
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  min-height: 64vh; padding-block: clamp(72px, 9vw, 128px);
  overflow: hidden;
}
.reveal.is-live .reveal-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  min-height: 0; padding-block: 0;
}
.reveal-stage > * { grid-area: 1 / 1; }

/* pozadí — mřížka mizí, jak se scéna zaplňuje */
.reveal-grid { place-self: stretch; z-index: 0; pointer-events: none; opacity: calc(0.35 + 0.65 * var(--claim)); }
.reveal-grid::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 76%);
}
.reveal-grid::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 62% 48% at 50% 42%, color-mix(in oklch, var(--lime) 8%, transparent), transparent 70%);
}

/* 1. beat — claim.
   Sedí v horní třetině, ne uprostřed — jinak mezi hlavičkou a textem zeje díra. */
.reveal-claim {
  z-index: 2; text-align: center; padding-inline: var(--sp-6);
  align-self: start; padding-top: clamp(116px, 18vh, 232px);
  opacity: var(--claim);
  transform: scale(calc(0.93 + 0.07 * var(--claim)));
  filter: blur(calc((1 - var(--claim)) * 12px));
  will-change: opacity, transform, filter;
}
.reveal-claim h1 {
  font-size: clamp(3rem, 1.35rem + 6.6vw, 7rem);
  letter-spacing: -0.048em; line-height: 1.0;
}

/* 2. beat — planeta se síťovým provozem (canvas, ne video).
   Nezačíná na nule: i na první obrazovce zůstává slabá rozostřená koule
   za claimem (z-index 1), aby scéna nebyla mrtvá. Scrollem se doostří.

   Choreografie: pod claimem stojí uprostřed. Jakmile má scéna začít vypisovat
   údaje, ustoupí doprava (--side) a uvolní levý sloupec číslům. Před
   wordmarkem se --side vrátí na nulu, takže planeta dosedne zpátky doprostřed
   a odejde do pozadí — nafoukne se, rozostří a ztlumí (--mask). */
.reveal-globe {
  --shift: min(21vw, 240px);
  z-index: 1; width: min(700px, 74vw, 74vh); aspect-ratio: 1;
  opacity: calc((0.62 + 0.38 * var(--rise)) * (1 - 0.42 * var(--mask)));
  transform: translate3d(calc(var(--side) * var(--shift)), calc((1 - var(--rise)) * 9vh), 0)
             scale(calc(0.74 + 0.26 * var(--rise) + 0.28 * var(--mask)));
  filter: blur(calc((1 - var(--rise)) * 5px + var(--mask) * 3px));
  will-change: opacity, transform, filter;
}
.reveal-globe canvas { width: 100%; height: 100%; display: block; }

/* 3. beat — fakta v levém sloupci: obří dopočítávané číslo, pod ním se dokreslí
   linka a popisek se sráží ze vzduchu slovo po slovu. Planeta mezitím stojí
   vpravo, takže si text a obraz nelezou do zelí.

   Jakmile je fakt jednou napsaný, ZŮSTÁVÁ v plné síle — netmavne ani neustoupí
   dozadu. Původní stupňování (--d) vypadalo při scrollu jako by údaje mizely;
   všechna tři čísla mají být čitelná naráz a odejít společně až před
   wordmarkem. */
.reveal-facts { z-index: 5; place-self: stretch; position: relative; pointer-events: none; }
.reveal.is-live .reveal-facts {
  /* center + gap, ne space-between: to tri fakta rozhodilo k okrajum a mezi
     ne nasypalo 170 px prazdna. Vsechny tri sloty stoji v layoutu porad,
     takze se sloupec pri nabalovani nehne. */
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: clamp(26px, 4.6vh, 60px);
  /* Hlavička je lepivá a 110 px vysoká — sloupec se od ní musí odrazit, jinak
     první číslo leze na nižších obrazovkách přímo pod navigaci. */
  padding: calc(var(--nav-h) + clamp(16px, 3vh, 40px)) clamp(24px, 6vw, 104px) clamp(52px, 9vh, 100px);
}
.fact {
  position: relative; width: min(560px, 54vw);
  opacity: var(--f, 0);
  transform: translate3d(calc((1 - var(--f, 0)) * -30px), 0, 0);
  will-change: opacity, transform;
}
/* měkký podklad — text nad planetou musí zůstat čitelný, ale bez rámečku */
.fact::before {
  content: ''; position: absolute; inset: -16% -10%; z-index: -1;
  background: radial-gradient(58% 62% at 34% 46%, color-mix(in oklch, var(--bg) 82%, transparent), transparent 74%);
  filter: blur(14px);
}
.fact b {
  display: block;
  font-family: var(--font-mono); font-weight: 700;
  /* strop ve vh, ne jen ve vw — na nizkem displeji se jinak tri cisla
     pod sebou do sloupce nevejdou a posledni vypadne pod okraj */
  font-size: min(clamp(3rem, 1.7rem + 6.4vw, 6.5rem), 13vh);
  line-height: 0.9; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  /* Obe zastavky kryci. Driv koncil gradient na 66 % pruhlednosti, takze
     se cislice dole rozpoustely do pozadi a cely udaj pusobil vymyte. */
  background: linear-gradient(178deg,
    var(--lime) 0%, var(--lime) 52%, var(--lime-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* záře jen naznačená — číslo má svítit, ne se rozpouštět do pozadí */
  filter: drop-shadow(0 0 16px color-mix(in oklch, var(--lime) 12%, transparent));
}
.fact .digits { display: inline-block; }
/* Hodnota je jeden celek v jedne velikosti. Zmensena pripona delala z
   "1 in 3" jednicku o pulku vetsi nez trojka a z procenta drobecek. */
.fact .suf { margin-left: 0.28em; }
/* přetáčení — mikro chvění, dokud číslo nedosedne */
.fact.is-rolling b { filter: blur(0.4px) drop-shadow(0 0 18px color-mix(in oklch, var(--lime) 16%, transparent)); }
.fact.is-rolling .digits { animation: rollShake 110ms linear infinite; }
@keyframes rollShake { 0%, 100% { transform: translateY(-0.014em) } 50% { transform: translateY(0.014em) } }
.fact.is-set .digits { animation: snap 300ms var(--ease) both; }
@keyframes snap { 0% { transform: scale(1.05) } 100% { transform: scale(1) } }
.fact figcaption {
  /* Tesne pod cislem a na sirsi mire — 25ch delalo z vety uzkou nudli
     na tri radky, ve ktere se souvislost s cislem ztratila. */
  margin-top: clamp(6px, 1vh, 12px);
  font-size: clamp(1.125rem, 1rem + 0.52vw, 1.4375rem);
  line-height: 1.38; letter-spacing: -0.008em; color: var(--fg);
  max-width: 34ch;
}
.fact .w {
  display: inline-block;
  opacity: 0; filter: blur(9px);
  transform: translateY(0.3em) scale(1.04);
  letter-spacing: 0.22em;
}
/* Kratsi nabeh i kratsi prodleva mezi slovy — cela veta je precteni schopna
   za zlomek sekundy misto driveji skoro pul druhe. */
.fact.is-writing .w {
  animation: ghostair 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--wi) * 26ms + 90ms);
}
@keyframes ghostair {
  0%   { opacity: 0;    filter: blur(10px); transform: translateY(0.3em) scale(1.04); letter-spacing: 0.24em }
  45%  { opacity: 0.5;  filter: blur(3px);  transform: translateY(0.1em) scale(1.01); letter-spacing: 0.09em }
  100% { opacity: 1;    filter: blur(0);    transform: translateY(0) scale(1);        letter-spacing: 0em }
}
.fact cite {
  display: block; margin-top: clamp(9px, 1.3vh, 15px);
  font-style: normal; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-dim);
  opacity: 0; transition: opacity 380ms var(--ease);
}
.fact.is-writing cite { opacity: 1; transition-delay: 420ms; }

/* Ze tri modifikatoru zbyla jen vazba na vlastni beat — pozice uz drzi sloupec. */
.fact--a { --f: var(--f1); }
.fact--b { --f: var(--f2); }
.fact--c { --f: var(--f3); }

/* 4. beat — čistý wordmark nad rozostřenou planetou */
.reveal-word {
  z-index: 4; text-align: center; padding-inline: var(--sp-4);
  font-size: clamp(3rem, 0.6rem + 13.4vw, 14rem);
  font-weight: 700; letter-spacing: -0.06em;
  line-height: 1.26; padding-block: 0.06em;
  color: var(--fg);
  opacity: var(--mask);
  transform: scale(calc(0.95 + 0.05 * var(--mask)));
  will-change: opacity, transform;
}
.reveal-word .dot { color: var(--lime); }

.reveal-hint {
  z-index: 6; align-self: end;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  margin-bottom: clamp(20px, 4vh, 40px);
  opacity: calc(var(--claim) * 0.85);
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-dim);
}
.reveal-hint i { width: 1px; height: 34px; background: linear-gradient(to bottom, var(--fg-dim), transparent); animation: hint 2.1s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: 0.25; transform: scaleY(0.5); transform-origin: top } 50% { opacity: 1; transform: scaleY(1); transform-origin: top } }

/* Statická varianta — bez JS i při omezeném pohybu.
   Stage přepneme na blok, aby claim a čísla stály pod sebou; čísla jsou
   skutečný obsah, tak je na rozdíl od dekorace neschováváme. */
.reveal:not(.is-live) .reveal-globe,
.reveal:not(.is-live) .reveal-word,
.reveal:not(.is-live) .reveal-hint { display: none; }
.reveal:not(.is-live) .reveal-stage { display: block; text-align: center; }
.reveal:not(.is-live) .reveal-stage > * { grid-area: auto; }
.reveal:not(.is-live) .reveal-claim { opacity: 1; filter: none; transform: none; padding-top: 0; }
.reveal:not(.is-live) .reveal-facts {
  position: static; display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(28px, 4vw, 48px); margin: var(--sp-12) auto 0; max-width: 1040px;
}
.reveal:not(.is-live) .fact {
  position: relative; width: min(300px, 100%);
  opacity: 1; transform: none; text-align: left;
}
.reveal:not(.is-live) .fact::before { display: none; }
.reveal:not(.is-live) .fact b { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); filter: none; }
.reveal:not(.is-live) .fact figcaption { max-width: none; }
.reveal:not(.is-live) .fact cite { opacity: 1; }
.reveal:not(.is-live) .reveal-grid { position: absolute; inset: 0; }

/* ==========================================================================
   ÚVOD pod sekvencí
   ========================================================================== */
.intro-inner {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 4.5vw, 72px); align-items: start;
}
.intro h2 {
  font-size: clamp(1.5rem, 1rem + 2.1vw, 2.5rem);
  letter-spacing: -0.03em; line-height: 1.14;
}
.intro .lead { margin-top: 0; }
.intro-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
/* tři pilíře — čím se ten web liší */
.pillars {
  list-style: none; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 52px);
  margin-top: clamp(48px, 6vw, 88px);
}
.pillars li { position: relative; padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.pillars li::after {
  content: ''; position: absolute; left: 0; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 14px var(--lime);
  opacity: 0; transform: scale(0.4);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + 180ms);
}
.pillars li.is-visible::after { opacity: 1; transform: none; }
.pillars h3 { font-size: 1.1875rem; margin-bottom: var(--sp-3); }
.pillars p { font-size: var(--fs-sm); }

/* ==========================================================================
   ROZHRANÍ — sdílený rám pro AI chat i Google (okno aplikace)
   ========================================================================== */
.ui-window {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.ui-window::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--fg) 8%, transparent);
}
.ui-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 13px var(--sp-5);
  background: var(--bg-2); border-bottom: 1px solid var(--line-soft);
}
.ui-dots { display: flex; gap: 6px; flex: none; }
.ui-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); }
.ui-title {
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.08em; color: var(--fg-dim);
}
.ui-badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-dim); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.ui-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }

.demo-note {
  margin-top: var(--sp-4);
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.06em; color: var(--fg-dim); text-align: center;
}

/* ---------- dvousloupcová sekce s ukázkou ---------- */
.demo-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 5vw, 80px); align-items: center;
}
.demo-grid.is-flipped { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.demo-grid.is-flipped .demo-copy { order: 2; }
.demo-list { list-style: none; margin-top: var(--sp-8); display: grid; gap: var(--sp-4); }
.demo-list li { position: relative; padding-left: 30px; font-size: var(--fs-sm); color: var(--fg-mut); }
.demo-list li::before {
  content: ''; position: absolute; left: 0; top: 0.5em;
  width: 16px; height: 1px; background: var(--lime);
}
.demo-list li b { color: var(--fg); font-weight: 600; }

/* ==========================================================================
   AI CHAT
   ========================================================================== */
.chat { min-height: 440px; display: flex; flex-direction: column; }
.chat-thread {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  overflow-y: auto; max-height: 400px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.chat-thread::-webkit-scrollbar { width: 6px; }
.chat-thread::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.msg { display: flex; gap: var(--sp-3); max-width: 92%; animation: msg-in 480ms var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.msg--user { margin-left: auto; flex-direction: row-reverse; }
.msg--user .msg-body {
  background: var(--bg-3); color: var(--fg);
  border-radius: 16px 16px 4px 16px; padding: 11px var(--sp-4);
  font-size: var(--fs-sm);
}
.msg-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
}
.msg--user .msg-avatar { background: var(--bg-3); color: var(--fg-mut); }
.msg--bot .msg-body { font-size: var(--fs-sm); line-height: 1.62; color: var(--fg-mut); padding-top: 4px; }
.msg--bot .msg-body strong { color: var(--fg); font-weight: 600; }
.msg--bot .msg-body .mark {
  color: var(--lime); font-weight: 600;
  border-bottom: 1px solid color-mix(in oklch, var(--lime) 40%, transparent);
}

.msg-source {
  display: flex; width: fit-content; align-items: center; gap: 7px; margin-top: var(--sp-4);
  padding: 6px 12px 6px 8px;
  font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--fg-mut);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none;
  transition: border-color 220ms var(--ease), color 220ms var(--ease);
  opacity: 0; animation: msg-in 400ms var(--ease) 200ms both;
}
.msg-source:hover { border-color: var(--lime); color: var(--fg); }
.msg-source .favi { width: 16px; height: 16px; border-radius: 5px; flex: none; }

.typing { display: inline-flex; gap: 5px; padding: 12px 2px; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--fg-dim);
  animation: bounce 1.25s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.16s }
.typing span:nth-child(3) { animation-delay: 0.32s }
@keyframes bounce { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0) } 30% { opacity: 1; transform: translateY(-4px) } }

.chat-foot { border-top: 1px solid var(--line-soft); padding: var(--sp-4) var(--sp-5) var(--sp-5); background: var(--bg-1); }
.chat-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.chip {
  padding: 7px 13px; font-size: var(--fs-xs); font-weight: 500; color: var(--fg-mut);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.chip:hover:not(:disabled) { color: var(--fg); border-color: var(--fg-dim); background: var(--bg-3); transform: translateY(-1px); }
.chip:disabled { opacity: 0.4; cursor: default; }
.chip.is-used { opacity: 0.35; }

.chat-input { display: flex; align-items: center; gap: var(--sp-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 5px 5px 5px var(--sp-4); transition: border-color 220ms var(--ease); }
.chat-input:focus-within { border-color: color-mix(in oklch, var(--lime) 55%, transparent); }
.chat-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: var(--fs-sm); padding: 9px 0; }
.chat-input input::placeholder { color: var(--fg-dim); }
.chat-send {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink); border: 0; border-radius: 10px; cursor: pointer;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.chat-send:hover { transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.35; cursor: default; transform: none; }

/* ==========================================================================
   GOOGLE SERP
   ========================================================================== */
.serp { background: var(--bg-1); }
.serp-search {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-6) var(--sp-6) var(--sp-5);
  padding: 11px var(--sp-5);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
}
.serp-g { flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: -0.05em; }
.serp-g .b { color: var(--g-blue) } .serp-g .r { color: oklch(0.68 0.19 27) }
.serp-g .y { color: oklch(0.85 0.16 92) } .serp-g .g { color: var(--g-green) }
.serp-q { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--fg); white-space: nowrap; overflow: hidden; }
.serp-q .caret { background: var(--fg); }
.serp-icon { flex: none; color: var(--fg-dim); }

.serp-tabs { display: flex; gap: var(--sp-6); padding: 0 var(--sp-6); border-bottom: 1px solid var(--line-soft); }
.serp-tabs span { padding-bottom: 11px; font-size: var(--fs-xs); color: var(--fg-dim); border-bottom: 2px solid transparent; }
.serp-tabs span.on { color: var(--fg); border-bottom-color: var(--lime); }

.serp-body { padding: var(--sp-6); display: grid; gap: var(--sp-5); }

.serp-ai {
  padding: var(--sp-5); border-radius: var(--r-lg);
  border: 1px solid color-mix(in oklch, var(--lime) 26%, transparent);
  background: linear-gradient(150deg, color-mix(in oklch, var(--lime) 7%, transparent), transparent 62%), var(--bg-2);
}
.serp-ai-head {
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3);
  font-family: var(--font-mono); font-size: var(--fs-mono);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--lime);
}
.serp-ai p { font-size: var(--fs-sm); line-height: 1.6; color: var(--fg-mut); transition: opacity 340ms var(--ease); }
.serp-ai p b { color: var(--fg); font-weight: 600; }

.serp-results { display: grid; gap: var(--sp-2); }
.serp-item {
  position: relative; padding: var(--sp-4); border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background 400ms var(--ease), border-color 400ms var(--ease), opacity 400ms var(--ease);
}
.serp-item .url { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--fg-dim); margin-bottom: 5px; }
.serp-item .url .favi { width: 18px; height: 18px; border-radius: 6px; flex: none; background: var(--bg-3); }
.serp-item .title { font-size: 1.0625rem; font-weight: 500; color: var(--g-blue); letter-spacing: -0.015em; margin-bottom: 3px; }
.serp-item .desc { font-size: var(--fs-xs); line-height: 1.55; color: var(--fg-dim); }
.serp-item--mine { background: var(--bg-2); border-color: color-mix(in oklch, var(--lime) 45%, transparent); box-shadow: var(--glow); }
.serp-item--mine .title { color: var(--fg); }
.serp-item--mine .desc { color: var(--fg-mut); }
.serp-item--mine .url .favi { background: var(--lime); }
.serp-rank {
  position: absolute; right: var(--sp-4); top: var(--sp-4);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--lime); opacity: 0; transition: opacity 400ms var(--ease) 260ms;
}
.serp-item--mine .serp-rank { opacity: 1; }
.serp-results.is-shuffling .serp-item { opacity: 0.25; }

/* ==========================================================================
   SHOWCASE — plovoucí pásy
   ========================================================================== */
.showcase { padding-block: var(--pad-section); overflow: hidden; }
.showcase .section-head { padding-inline: var(--sp-6); margin-inline: auto; max-width: calc(var(--wrap) - var(--sp-12)); }

.marquee {
  position: relative; display: grid; gap: var(--sp-5);
  padding-block: 14px;
  /* okraje odplouvají do pozadí — maska je spolehlivější než překryv */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

.mq-row { display: flex; width: max-content; }
.mq-track {
  display: flex; gap: var(--sp-5); padding-right: var(--sp-5);
  animation: slide var(--dur, 72s) linear infinite;
  animation-direction: var(--dir, normal);
  will-change: transform;
}
@keyframes slide { from { transform: translateX(0) } to { transform: translateX(-100%) } }
.mq-row:hover .mq-track, .mq-row:focus-within .mq-track { animation-play-state: paused; }

.mq-card {
  position: relative; flex: none;
  width: clamp(276px, 28vw, 404px);
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--line-soft);
  cursor: pointer; text-decoration: none;
  transition: transform 520ms var(--ease), box-shadow 520ms var(--ease),
              border-color 420ms var(--ease), opacity 420ms var(--ease);
}
/* okenní lišta — aby karta četla jako web, ne jako obrázek */
.mq-chrome {
  display: flex; align-items: center; gap: 5px;
  padding: 9px var(--sp-4);
  background: var(--bg-2); border-bottom: 1px solid var(--line-soft);
}
.mq-chrome i { width: 7px; height: 7px; border-radius: 50%; background: var(--bg-3); flex: none; }

/* Karta ukazuje celou stranku; pri najeti se pred divakem projede az dolu. */
.mq-shot { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.mq-shot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0%;
  filter: saturate(0.85) brightness(0.88);
  transition: object-position 700ms var(--ease), filter 520ms var(--ease);
}
.mq-card:hover .mq-shot img, .mq-card:focus-visible .mq-shot img {
  object-position: 50% 100%;
  transition: object-position 9s linear, filter 400ms var(--ease);
}
.mq-row:hover .mq-card { opacity: 0.42; }
.mq-card:hover, .mq-card:focus-visible {
  opacity: 1 !important;
  transform: scale(1.06) translateY(-6px);
  z-index: 4;
  border-color: color-mix(in oklch, var(--lime) 40%, transparent);
  box-shadow: var(--shadow-3), 0 0 0 1px color-mix(in oklch, var(--lime) 22%, transparent);
}
.mq-card:hover img, .mq-card:focus-visible img { filter: none; }

/* ukazatel projizdeni — nabehne pri najeti */
.mq-scan {
  position: absolute; inset: auto 0 0; z-index: 3;
  height: 2px; background: color-mix(in oklch, var(--fg) 12%, transparent);
  opacity: 0; transition: opacity 300ms var(--ease);
}
.mq-scan::after {
  content: ''; display: block; height: 100%; width: 0;
  background: var(--lime); box-shadow: 0 0 10px var(--lime);
  transition: width 700ms var(--ease);
}
.mq-card:hover .mq-scan, .mq-card:focus-visible .mq-scan { opacity: 1; }
.mq-card:hover .mq-scan::after, .mq-card:focus-visible .mq-scan::after { width: 100%; transition: width 9s linear; }

.mq-meta {
  position: absolute; inset: auto 0 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-8) var(--sp-4) var(--sp-4);
  background: linear-gradient(to top, oklch(0.12 0.008 145 / 0.94) 22%, transparent);
  opacity: 0; transform: translateY(8px);
  transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}
.mq-card:hover .mq-meta, .mq-card:focus-visible .mq-meta { opacity: 1; transform: none; }
/* jmeno je vnorene ve spanu s uppercase — musi se explicitne vratit */
.mq-meta b {
  display: block; color: var(--fg);
  font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: -0.015em; text-transform: none;
}
.mq-meta span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }
.mq-tag { flex: none; font-family: var(--font-mono); font-size: 10px; color: var(--lime); border: 1px solid color-mix(in oklch, var(--lime) 40%, transparent); border-radius: 999px; padding: 3px 9px; }

.showcase-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-4);
  margin-top: clamp(40px, 5vw, 64px); padding-inline: var(--sp-6);
  font-size: var(--fs-sm); color: var(--fg-dim); text-align: center;
}

/* ==========================================================================
   SLUŽBY
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.card {
  position: relative; isolation: isolate;
  padding: var(--sp-8);
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  transition: border-color 340ms var(--ease), transform 340ms var(--ease), background 340ms var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(420px circle at var(--cx, 50%) var(--cy, 0%),
              color-mix(in oklch, var(--lime) 9%, transparent), transparent 62%);
  opacity: 0; transition: opacity 380ms var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card:hover::before { opacity: 1; }
.card-num {
  display: block; font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.14em; color: var(--lime); margin-bottom: var(--sp-6);
}
.card h3 { margin-bottom: var(--sp-3); }
.card p { font-size: var(--fs-sm); }
.card-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-5);
  font-size: var(--fs-xs); font-family: var(--font-mono); letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.card:hover .card-more { color: var(--lime); }

/* ==========================================================================
   LIGHTHOUSE
   ========================================================================== */
.quality {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 5vw, 72px); align-items: center;
  padding: clamp(36px, 4.5vw, 64px);
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--r-xl);
}
.quality .section-head { margin-bottom: 0; }
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.gauge { text-align: center; }
.gauge-ring { position: relative; width: 100%; max-width: 108px; margin-inline: auto; aspect-ratio: 1; }
/* overflow: visible — jinak SVG uřízne záři drop-shadow a je vidět čtverec */
.gauge-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge-ring circle { fill: none; stroke-width: 5; }
.g-track { stroke: var(--bg-3); }
.g-fill {
  stroke: var(--lime); stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  transition: stroke-dashoffset 1500ms var(--ease-io);
  filter: drop-shadow(0 0 8px color-mix(in oklch, var(--lime) 45%, transparent));
}
.gauge.is-on .g-fill { stroke-dashoffset: 0; }
.g-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 1.375rem; font-weight: 500;
  color: var(--fg); font-variant-numeric: tabular-nums;
}
.gauge figcaption { margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--fg-dim); }

/* ==========================================================================
   PROCES
   ========================================================================== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); counter-reset: s; }
.steps li { position: relative; padding-top: var(--sp-8); }
.steps li::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--line);
}
.steps li::after {
  content: ''; position: absolute; left: 0; top: -3px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime);
  opacity: 0; transform: scale(0.4);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + 180ms);
}
.steps li.is-visible::after { opacity: 1; transform: none; }
.step-num { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.14em; color: var(--fg-dim); }
.steps h3 { margin: var(--sp-4) 0 var(--sp-3); font-size: 1.125rem; }
.steps p { font-size: var(--fs-sm); }

/* ==========================================================================
   O MNĚ
   ========================================================================== */
.about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.about p + p { margin-top: var(--sp-5); }
.about .lead { margin-top: var(--sp-6); }
.about-stats { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid var(--line-soft); }
.about-stats div { min-width: 92px; }
.about-stats b { display: block; font-family: var(--font-mono); font-size: 1.75rem; font-weight: 500; color: var(--fg); letter-spacing: -0.03em; }
.about-stats span { font-size: var(--fs-xs); color: var(--fg-dim); }

.dots { position: relative; }
/* Busta stojí volně v sekci — žádné pouzdro, které by ji svíralo. */
.dots-stage { position: relative; aspect-ratio: 1; cursor: crosshair; }
.dots-stage canvas { display: block; width: 100%; height: 100%; }
.dots-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-5); padding: 0 var(--sp-1); }
.dots-foot p { font-size: var(--fs-xs); color: var(--fg-dim); }
.dots-weight { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); white-space: nowrap; }

/* ==========================================================================
   KONTAKT
   ========================================================================== */
.contact { position: relative; isolation: isolate; text-align: center; padding-block: clamp(72px, 8.5vw, 118px); overflow: hidden; }
.contact::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, color-mix(in oklch, var(--lime) 11%, transparent), transparent 70%);
}
.contact h2 { max-width: 16ch; margin-inline: auto; }
.contact .lead { margin-inline: auto; text-align: center; }
.contact-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-10); }
.contact-mail {
  display: inline-block; margin-top: var(--sp-8);
  font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--fg-dim); text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.contact-mail:hover { color: var(--lime); border-color: var(--lime); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding-block: var(--sp-10); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--fg-dim); }
.footer-inner a { text-decoration: none; transition: color 200ms var(--ease); }
.footer-inner a:hover { color: var(--lime); }
.footer-links { display: flex; gap: var(--sp-5); }

/* ==========================================================================
   REVEAL
   ========================================================================== */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 760ms var(--ease), transform 760ms var(--ease);
  transition-delay: calc(var(--i, 0) * 85ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONZIVITA
   ========================================================================== */
@media (max-width: 1040px) {
  .intro-inner { grid-template-columns: 1fr; gap: var(--sp-10); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-grid, .demo-grid.is-flipped, .about, .quality { grid-template-columns: 1fr; }
  .demo-grid.is-flipped .demo-copy { order: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8) var(--sp-6); }
}

@media (max-width: 820px) {
  .site-nav {
    position: fixed; inset: 110px 0 auto; z-index: 90;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--sp-4) var(--sp-6) var(--sp-8);
    background: color-mix(in oklch, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-soft);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a:not(.btn) { padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a:not(.btn):hover { background: none; }
  .site-nav .nav-sep { display: none; }
  .site-nav .lang-switch { align-self: flex-start; margin-top: var(--sp-5); }
  .site-nav .lang-switch a.lang { padding: 8px 14px; border-bottom: 0; }
  .site-nav .btn { margin: var(--sp-5) 0 0; }
  .nav-toggle { display: flex; }
}

/* Uzke obrazovky — tri obri cisla se vedle sebe neuzivi, tak stoji ve sloupci.
   Zustava vsechno ostatni: dopocet, linka i psani po slovech. */
/* Nizke displeje (1366x768 a spol.) — jakmile se od vysky odecte 110px
   navigace, tri fakta naraz uz se do sloupce nevejdou a treti vypadne pod
   okraj. Cislo proto ustoupi a popisek se roztahne na sirsi miru, aby zlomil
   na dva radky misto tri. */
@media (min-width: 861px) and (max-height: 820px) {
  .reveal.is-live .reveal-facts {
    padding-top: calc(var(--nav-h) + 10px); padding-bottom: 24px;
  }
  .fact { width: min(620px, 58vw); }
  .fact b { font-size: min(clamp(2.5rem, 1.2rem + 5vw, 4.5rem), 10.5vh); }
  .fact figcaption { font-size: 1rem; line-height: 1.34; max-width: 40ch; }
  .fact cite { margin-top: 5px; }
  .reveal-globe { width: min(560px, 58vw, 76vh); }
}

@media (max-width: 860px) {
  .reveal.is-live { height: 340vh; }
  .reveal.is-live .reveal-facts {
    justify-content: center; align-items: stretch;
    gap: clamp(18px, 3.4vh, 34px);
    padding: calc(var(--nav-h) + 3vh) clamp(20px, 7vw, 44px) 12vh;
  }
  /* Na mobilu neni kam planetu odsunout — zustava uprostred za textem. */
  .reveal-globe { --shift: 0px; }
  .fact {
    width: 100%;
    transform: translate3d(0, calc((1 - var(--f, 0)) * 16px), 0);
  }
  .fact::before { inset: -12% -8%; }
  .fact b { font-size: min(clamp(2.75rem, 1.4rem + 8.6vw, 4.75rem), 13vh); }
  .fact figcaption { font-size: clamp(0.9375rem, 0.88rem + 0.34vw, 1.0625rem); max-width: none; }
  .fact cite { margin-top: var(--sp-3); }
}

@media (max-width: 640px) {
  :root { --fs-body: 1rem; }
  .cards, .steps, .pillars { grid-template-columns: 1fr; }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-4); }
  .chat-thread { max-height: 340px; padding: var(--sp-5) var(--sp-4); }
  .msg { max-width: 100%; }
  .serp-search { margin-inline: var(--sp-4); }
  .serp-body, .serp-tabs { padding-inline: var(--sp-4); }
  .about-stats { gap: var(--sp-6); }
  .dots-stage { aspect-ratio: 4 / 3; }
  .quality { padding: var(--sp-6); }
}

/* ==========================================================================
   OMEZENÝ POHYB
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .mq-track { animation: none; }
  .marquee { overflow-x: auto; }
  .mq-row { width: auto; }
  .caret { animation: none; opacity: 1; }
}
