/* ==========================================================================
   i99 s.r.o. — tmavý tech web
   Základ psán bez CSS nestingu (Safari < 17.2 by nested pravidla zahodilo);
   nesting se používá jen pro hover/enhancement stavy.
   ========================================================================== */

/* ── Fonty (self-hosted, GDPR) ──────────────────────────────────────────── */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/grotesk-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/grotesk-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metricky sladěný fallback — nadpis nepřeskočí, až se font načte. */
@font-face {
  font-family: 'Grotesk fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 97%;
  ascent-override: 98%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ── Tokeny ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Podklad */
  --bg:      #0b0e14;
  --bg-2:    #10141d;
  --bg-3:    #151a25;
  --line:    #222836;
  --line-2:  #2e3648;

  /* Text */
  --fg:      #e9eef7;
  --fg-2:    #a7b2c4;
  --fg-3:    #7b8698;

  /* Akcent — tyrkysová do modré, ostře odlišné od emore i primego */
  --acc:     #2ee6c4;
  --acc-2:   #38bdf8;
  --acc-3:   #7c8cff;
  --acc-ink: #04211c;

  /* Terminál zůstává tmavý vždy — konzole prostě tmavá je. */
  --surface-dark: #10141d;
  --surface-dark-2: #0b0e14;
  --dark-line: #2e3648;
  --dark-fg: #e9eef7;
  --dark-fg-2: #a7b2c4;
  --dark-fg-3: #7b8698;

  /* Plocha administrace v mockupu — ta motiv naopak sleduje */
  --app-bg:    #10141d;
  --app-bg-2:  #0b0e14;
  --app-line:  #2e3648;
  --app-fg:    #e9eef7;
  --app-fg-2:  #a7b2c4;
  --app-fg-3:  #7b8698;
  --app-grid:  rgba(255, 255, 255, .055);
  --app-well:  rgba(0, 0, 0, .24);

  /* Motivově závislé drobnosti */
  --grid-line: rgba(255, 255, 255, .028);
  --hdr-bg: rgba(11, 14, 20, .72);

  --radius: 14px;
  --radius-s: 9px;

  --wrap: 1240px;

  --f-display: 'Space Grotesk', 'Grotesk fallback', system-ui, sans-serif;
  --f-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;

  /* Easing — bezier fallback první, linear() spring hned za ním */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring-soft: cubic-bezier(.22, .61, .36, 1);
  --spring-snap: cubic-bezier(.16, 1, .3, 1);
  --spring-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring-soft:   linear(0, .06 4%, .24 9%, .55 16%, .83 24%, .98 32%, 1.06 41%, 1.08 48%, 1.06 56%, 1.02 66%, .99 77%, 1);
    --spring-snap:   linear(0, .4 9%, .7 17%, .87 27%, .95 38%, .985 52%, 1);
    --spring-bounce: linear(0, .3 6%, .72 13%, 1.02 21%, 1.12 28%, 1.1 34%, 1.03 44%, .98 53%, .995 65%, 1.002 78%, 1);
  }
}

/* Odvozené odstíny přes relative color syntax, s hex fallbackem výše. */
@supports (color: oklch(from red l c h)) {
  :root {
    --acc-dim: oklch(from var(--acc) l c h / .14);
    --acc-hi:  oklch(from var(--acc) calc(l + .08) c h);
  }
}
:root {
  --acc-dim: rgba(46, 230, 196, .14);
  --acc-hi:  #5cf0d4;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* `clip`, ne `hidden`: hidden by z body udělalo scroll kontejner
     a tím rozbilo scroll-driven animace (animation-timeline: view()). */
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--fg);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 1.25rem + 2.9vw, 3.2rem); }
h3 { font-size: 1.24rem; letter-spacing: -.02em; }
h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }

p { text-wrap: pretty; }
a { color: var(--acc); text-decoration: none; }

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

::selection { background: var(--acc); color: var(--acc-ink); }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--acc);
  color: var(--acc-ink);
  border-radius: var(--radius-s);
  font-weight: 600;
}
.skip:focus { left: 16px; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.sec { padding: clamp(72px, 8vw, 128px) 0; }
.sec-alt { background: var(--bg-2); border-block: 1px solid var(--line); }

/* Sekce pod ohybem se nerenderují, dokud nejsou potřeba. */
#network, #product, #process, #engagement, #work, #faq, #contact, .sec-tech {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}

.sh { max-width: 720px; margin-bottom: clamp(44px, 5vw, 68px); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--f-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--acc);
}

.lead {
  margin-top: 20px;
  font-size: clamp(1.03rem, .98rem + .3vw, 1.19rem);
  line-height: 1.62;
  color: var(--fg-2);
  max-width: 62ch;
}

.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 0 var(--acc);
  flex: none;
}

/* ── Tlačítka ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .97rem;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  background: transparent;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-p { background: var(--acc); color: var(--acc-ink); }
.btn-p:hover { background: var(--acc-hi); box-shadow: 0 0 28px -6px var(--acc); }

.btn-g { border-color: var(--line-2); color: var(--fg); }
.btn-g:hover { border-color: var(--acc); color: var(--acc); }

.btn-t { color: var(--fg-2); border-color: var(--line); }
.btn-t:hover { color: var(--fg); border-color: var(--line-2); }

.btn-sm { min-height: 40px; padding: 9px 18px; font-size: .89rem; }
.btn-block { width: 100%; }

/* Magnetické tlačítko posouvá JS přes --mx/--my (jen desktop). */
.mag { transform: translate(var(--mx, 0), var(--my, 0)); }

/* ── Scroll progress ────────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 90;
  background: linear-gradient(90deg, var(--acc), var(--acc-2), var(--acc-3));
  transform-origin: left;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progress linear;
    animation-timeline: scroll(root block);
  }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ── Hlavička ───────────────────────────────────────────────────────────── */
.hdr {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  view-transition-name: hdr;
}
.hdr.stuck {
  background: var(--hdr-bg);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 78px;
  transition: min-height .3s var(--ease);
}
.hdr.stuck .hdr-in { min-height: 62px; }

.logo { display: inline-flex; align-items: baseline; gap: 4px; }
.logo-mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.06em;
  color: var(--fg);
}
.logo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
  transition: box-shadow .3s var(--ease);
}
.logo:hover .logo-dot { box-shadow: 0 0 14px 2px var(--acc); }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  position: relative;
  padding: 9px 14px;
  font-size: .94rem;
  font-weight: 500;
  color: var(--fg-2);
  transition: color .2s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background-image: linear-gradient(var(--acc), var(--acc));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size .24s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after, .nav a.cur::after { background-size: 100% 100%; }
.nav a.cur { color: var(--fg); }

.hdr-act { display: flex; align-items: center; gap: 12px; }

.lang {
  display: inline-flex;
  gap: 2px;
  font-family: var(--f-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
}
.lang a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-3);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang a:hover { color: var(--fg); background: var(--bg-3); }
.lang a.on { color: var(--acc); background: var(--acc-dim); }

.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: transparent;
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 18px; height: 2px;
  background: var(--fg);
  transition: transform .26s var(--spring-snap), opacity .2s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ── Mobilní navigace (popover, top-layer) ──────────────────────────────── */
.mnav {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  max-height: 80svh;
  margin: 0;
  padding: 22px 24px calc(24px + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  background: var(--bg-2);
  color: var(--fg-2);
  overflow: auto;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.mnav:not(:popover-open):not(.open) { display: none; }
.mnav.open { display: block; }
.mnav nav { display: grid; gap: 2px; margin-bottom: 18px; }
.mnav nav a {
  padding: 15px 12px;
  border-radius: var(--radius-s);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  transition: background .18s var(--ease);
}
.mnav nav a:active { background: var(--bg-3); }
.mnav::backdrop { background: rgba(4, 6, 10, .64); backdrop-filter: blur(3px); }

@media (prefers-reduced-motion: no-preference) {
  .mnav {
    transition: translate .32s var(--spring-snap), opacity .28s var(--ease), overlay .32s allow-discrete, display .32s allow-discrete;
    translate: 0 0;
    opacity: 1;
  }
  .mnav:not(:popover-open) { translate: 0 100%; opacity: 0; }
  @starting-style {
    .mnav:popover-open { translate: 0 100%; opacity: 0; }
  }
  .mnav::backdrop { transition: opacity .3s var(--ease), display .3s allow-discrete, overlay .3s allow-discrete; opacity: 1; }
  .mnav:not(:popover-open)::backdrop { opacity: 0; }
  @starting-style { .mnav:popover-open::backdrop { opacity: 0; } }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-bottom: clamp(48px, 6vw, 80px);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: .55;
}
.hero-aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: -2;
  background:
    radial-gradient(48% 42% at 20% 18%, rgba(46, 230, 196, .16), transparent 68%),
    radial-gradient(46% 40% at 82% 12%, rgba(56, 189, 248, .15), transparent 66%),
    radial-gradient(52% 46% at 62% 78%, rgba(124, 140, 255, .13), transparent 70%);
  filter: blur(12px);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
  pointer-events: none;
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(36px, 5vw, 70px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 100px) clamp(52px, 6vw, 84px);
}
.hero-copy { view-transition-name: hero; }

h1 .ln { display: block; overflow: hidden; }
h1 .ln > span { display: block; }
h1 .grad > span {
  background: linear-gradient(96deg, var(--acc), var(--acc-2) 52%, var(--acc-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead { margin-top: 24px; max-width: 54ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 36px; }

/* ── Terminál ───────────────────────────────────────────────────────────── */
.term {
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-dark), var(--surface-dark-2));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(46, 230, 196, .06);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, .02);
}
.tl { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.tl.r { background: #ff5f57; }
.tl.y { background: #febc2e; }
.tl.g { background: #28c840; }
.term-title {
  margin-inline-start: 10px;
  font-family: var(--f-mono);
  font-size: .76rem;
  color: var(--dark-fg-3);
}
.mock-url {
  margin-inline-start: 10px;
  font-family: var(--f-mono);
  font-size: .76rem;
  color: var(--app-fg-3);
}
.term-body {
  margin: 0;
  padding: 18px 20px 22px;
  min-height: 246px;
  font-family: var(--f-mono);
  font-size: .84rem;
  line-height: 1.75;
  color: var(--dark-fg-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .p { color: var(--acc); }
.term-body .c { color: var(--fg-3); }
.term-body .k { color: var(--acc-2); }
.term-body .s { color: var(--acc-3); }
.term-body .ok { color: #4ade80; }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--acc);
}

/* ── Proof bar ──────────────────────────────────────────────────────────── */
.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.proof-i { padding: 24px 26px; background: var(--bg-2); }
.proof-v {
  display: flex;
  align-items: baseline;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem);
  line-height: 1;
  letter-spacing: -.045em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.proof-v .suf { color: var(--acc); }
.proof-l { margin-top: 9px; font-size: .87rem; color: var(--fg-3); line-height: 1.4; }

/* ── Karty služeb ───────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color .25s var(--ease), transform .5s var(--spring-soft);
}
.card::before {
  /* Světelná stopa kurzoru (desktop) */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(240px circle at var(--px, 50%) var(--py, 0%), var(--acc-dim), transparent 70%);
  transition: opacity .25s var(--ease);
  pointer-events: none;
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }

/* Vnitřek karty sdílí řádky s ostatními kartami v mřížce. */
.card-in {
  display: grid;
  gap: 14px;
  padding: 30px;
  position: relative;
  z-index: 1;
}
@supports (grid-template-rows: subgrid) {
  .cards { grid-template-rows: repeat(2, auto); }
  .card { grid-row: span 1; }
  .card-in { grid-template-rows: auto auto 1fr; height: 100%; }
}

.card-ico {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--acc);
  background: var(--bg-3);
  transition: border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.card-ico svg { width: 24px; height: 24px; }
.card:hover .card-ico { border-color: var(--acc); box-shadow: 0 0 22px -8px var(--acc); }

.card p { font-size: .95rem; color: var(--fg-2); }
.card-n {
  position: absolute;
  top: 22px; right: 26px;
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--fg-3);
  opacity: .5;
}

/* ── Opeo ───────────────────────────────────────────────────────────────── */
.prod {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(38px, 5vw, 72px);
  align-items: center;
}
.mods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  margin-top: 30px;
}
.mods li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .94rem;
  color: var(--fg);
}
.mods svg { width: 17px; height: 17px; color: var(--acc); flex: none; }

.prod-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 34px; }
.prod-note { display: inline-flex; align-items: center; gap: 8px; font-size: .87rem; color: var(--fg-3); }
.prod-note svg { width: 16px; height: 16px; color: var(--acc); flex: none; }

/* Mockup administrace — čistě CSS, žádné screenshoty */
.mock {
  border: 1px solid var(--app-line);
  border-radius: var(--radius);
  background: var(--app-bg);
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--app-line);
  background: var(--app-well);
}
.mock-body { display: grid; grid-template-columns: 62px 1fr; height: 330px; }
.mock-side {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 16px 0;
  border-inline-end: 1px solid var(--app-line);
  justify-items: center;
  background: var(--app-well);
}
.mk-logo {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--acc);
  opacity: .9;
  margin-bottom: 6px;
}
.mk-i {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--app-fg-3);
  background: transparent;
}
.mk-i svg { width: 15px; height: 15px; }
.mk-i.on {
  color: var(--acc);
  background: color-mix(in oklab, var(--acc) 14%, transparent);
}
@supports not (background: color-mix(in oklab, red 14%, transparent)) {
  .mk-i.on { background: rgba(46, 230, 196, .14); }
}
/* Proužek u aktivní položky */
.mk-i.on::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  width: 2px; height: 16px;
  border-radius: 0 2px 2px 0;
  background: var(--acc);
  transform: translateY(-50%);
}

.mock-main { padding: 14px 16px 16px; display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.mk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-t { width: 42%; height: 11px; border-radius: 6px; background: var(--dark-line); }
.mk-pill { width: 76px; height: 24px; border-radius: 20px; background: var(--acc); opacity: .8; }

/* ══ MODUL: kalendář ════════════════════════════════════════════════════════
   Samostatná komponenta — nepotřebuje okolní mockup, jde vložit kamkoliv.
   Pozice rezervací jsou v CSS (třídy .e1–.e10), protože CSP webu zahazuje
   inline style atributy. Časová osa 8:00–18:00, 1 hodina = 10 %.
   ========================================================================== */
.cal {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  height: 100%;
  min-height: 0;
  font-family: var(--f-body);
}

/* Záhlaví s datem a upozorněním na novou rezervaci */
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-date {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .68rem;
  color: var(--app-fg);
  letter-spacing: -.01em;
}
.cal-toast {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(46, 230, 196, .35);
  background: rgba(46, 230, 196, .1);
  font-size: .55rem;
  color: var(--acc);
  white-space: nowrap;
}
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); flex: none; }

/* Jména pracovníků nad sloupci */
.cal-names {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-inline-start: 26px;
}
.cal-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .58rem;
  color: var(--app-fg-2);
  min-width: 0;
}
.cal-av {
  display: grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  font-family: var(--f-display);
  font-size: .5rem;
  font-weight: 700;
  color: #06131f;
  flex: none;
}
.cal-av.a1 { background: #2ee6c4; }
.cal-av.a2 { background: #38bdf8; }
.cal-av.a3 { background: #7c8cff; }

/* Mřížka: časová osa + sloupce */
.cal-grid { display: grid; grid-template-columns: 22px 1fr; gap: 4px; min-height: 0; }

.cal-times {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: .55rem;
  line-height: 1;
  color: var(--app-fg-3);
  opacity: .5;
  text-align: end;
}

.cal-cols {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  min-height: 0;
  border-radius: 7px;
  /* Šest popisků → pět intervalů → čáry po 20 % */
  background:
    repeating-linear-gradient(
      to bottom,
      var(--app-grid) 0 1px,
      transparent 1px 20%
    ),
    var(--app-well);
}

.cal-col { position: relative; min-width: 0; }

/* ── Rezervace ── */
.cal-ev {
  position: absolute;
  inset-inline: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 3px 5px;
  border-radius: 4px;
  border-inline-start: 2px solid var(--ev);
  background: color-mix(in oklab, var(--ev) 22%, transparent);
  overflow: hidden;
}
@supports not (background: color-mix(in oklab, red 20%, transparent)) {
  .cal-ev { background: rgba(46, 230, 196, .2); }
}
.cal-ev.k1 { --ev: #2ee6c4; }
.cal-ev.k2 { --ev: #38bdf8; }
.cal-ev.k3 { --ev: #7c8cff; }

.cal-ev-top { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.cal-ev-t {
  font-family: var(--f-mono);
  font-size: .52rem;
  color: var(--ev);
  flex: none;
}
.cal-ev-n {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .57rem;
  color: var(--app-fg);
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-ev-s {
  font-size: .53rem;
  line-height: 1.2;
  color: var(--app-fg-2);
  opacity: .8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rozvrh dne — 8:00 = 0 %, 18:00 = 100 % */
.cal-ev.e1  { top: 10%; height: 13%; }
.cal-ev.e2  { top: 30%; height: 18%; }
.cal-ev.e3  { top: 65%; height: 13%; }
.cal-ev.e4  { top:  5%; height: 15%; }
.cal-ev.e5  { top: 40%; height: 12%; }
.cal-ev.e6  { top: 70%; height: 13%; }
.cal-ev.e7  { top: 15%; height: 12%; }
.cal-ev.e8  { top: 35%; height: 14%; }
.cal-ev.e9  { top: 55%; height: 13%; }
.cal-ev.e10 { top: 80%; height: 13%; }

/* Ukazatel aktuálního času — plná výška, čára v pseudo-elementu,
   aby šel posouvat transformem (procenta = podíl výšky mřížky). */
.cal-now {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform: translateY(46%);
}
.cal-now::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: #ff7a6b;
  opacity: .9;
}
.cal-now::before {
  content: '';
  position: absolute;
  left: -3px; top: -2.5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ff7a6b;
}

/* ── Technologie ────────────────────────────────────────────────────────── */
.sec-tech { padding: clamp(48px, 5vw, 72px) 0; border-block: 1px solid var(--line); }
.tech-title {
  font-family: var(--f-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 26px;
}
.marq {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marq-track { display: flex; gap: 12px; width: max-content; }
.chip {
  padding: 10px 20px;
  border: 1px solid var(--line-2);
  border-radius: 30px;
  font-family: var(--f-mono);
  font-size: .84rem;
  color: var(--fg-2);
  white-space: nowrap;
  background: var(--bg-2);
}

/* ── Postup ─────────────────────────────────────────────────────────────── */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.steps-line {
  position: absolute;
  top: 7px; left: 0; right: 0;
  height: 1px;
  background: var(--line-2);
}
.steps-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  transform-origin: left;
  transform: scaleX(0);
}
@supports (animation-timeline: view()) {
  .steps-line::after {
    animation: progress linear;
    animation-timeline: view();
    animation-range: entry 30% cover 62%;
  }
}
.step { position: relative; padding-top: 34px; }
.step-dot {
  position: absolute;
  top: 2px; left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 4px var(--bg);
}
.step-n {
  display: block;
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--acc);
  margin-bottom: 12px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 9px; }
.step p { font-size: .93rem; }

/* ── Modely spolupráce ──────────────────────────────────────────────────── */
.engs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.eng {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .25s var(--ease), transform .3s var(--ease);
}
.eng:hover { border-color: var(--line-2); transform: translateY(-3px); }
.eng h3 { margin-bottom: 11px; }
.eng > p { font-size: .94rem; }
.eng ul { display: grid; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.eng li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--fg-2); }
.eng svg { width: 16px; height: 16px; color: var(--acc); flex: none; margin-top: 3px; }

/* ── Reference ──────────────────────────────────────────────────────────── */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.work {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg-2);
  color: var(--fg);
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.work:hover { border-color: var(--acc); background: var(--bg-3); transform: translateX(3px); }
.work-n { font-family: var(--f-display); font-weight: 600; font-size: 1rem; }
.work-d { font-size: .85rem; color: var(--fg-3); margin-inline-start: auto; text-align: right; }
.work-i { width: 16px; height: 16px; color: var(--fg-3); flex: none; transition: color .22s var(--ease); }
.work:hover .work-i { color: var(--acc); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.faq-wrap .sh { margin-bottom: 0; }
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg);
  overflow: hidden;
  transition: border-color .22s var(--ease);
}
.faq details[open] { border-color: var(--line-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.01rem;
  color: var(--fg);
}
.faq summary::-webkit-details-marker { display: none; }
.chev {
  position: relative;
  width: 12px; height: 12px;
  flex: none;
  transition: transform .3s var(--spring-snap);
}
.chev::before, .chev::after {
  content: '';
  position: absolute;
  top: 5px; left: 0;
  width: 12px; height: 2px;
  border-radius: 2px;
  background: var(--acc);
}
.chev::after { transform: rotate(90deg); transition: opacity .3s var(--ease); }
.faq details[open] .chev { transform: rotate(180deg); }
.faq details[open] .chev::after { opacity: 0; }
.faq-a { padding: 0 22px 20px; }
.faq-a p { font-size: .94rem; color: var(--fg-2); max-width: 68ch; }

/* Animovaná výška obsahu (Chromium; jinde se otevře skokem) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content {
    height: 0;
    overflow: hidden;
    transition: height .32s var(--spring-snap), content-visibility .32s allow-discrete;
  }
  .faq details[open]::details-content { height: auto; }
}

/* ── Kontakt ────────────────────────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(36px, 4.5vw, 68px);
  align-items: start;
}
.cdet { display: grid; gap: 22px; margin-top: 38px; }
.cdet dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 7px;
}
.cdet dt svg { width: 15px; height: 15px; color: var(--acc); flex: none; }
.cdet dd { font-family: var(--f-display); font-weight: 600; font-size: 1.06rem; color: var(--fg); line-height: 1.45; }
.cdet dd a { color: inherit; transition: color .2s var(--ease); }
.cdet dd a:hover { color: var(--acc); }
.cdet .sub { font-family: var(--f-body); font-weight: 400; font-size: .92rem; color: var(--fg-3); }
.cdet .mono { font-family: var(--f-mono); font-size: .98rem; letter-spacing: -.01em; }

.qform {
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.f { display: grid; gap: 8px; }
.f-wide { grid-column: 1 / -1; }
.f label {
  font-family: var(--f-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.f input, .f select, .f textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--fg);
  font-size: .97rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.f textarea { min-height: 118px; resize: vertical; font-family: inherit; field-sizing: content; }
.f input::placeholder, .f textarea::placeholder { color: var(--fg-3); opacity: .7; }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--acc-dim);
}
.f select { appearance: none; cursor: pointer; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.fact { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.fnote { margin-top: 16px; font-size: .87rem; color: var(--fg-3); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 120;
  translate: -50% 0;
  max-width: min(92vw, 460px);
  padding: 14px 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: var(--bg-3);
  color: var(--fg);
  font-size: .92rem;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s var(--ease), translate .3s var(--spring-snap), visibility .26s;
}
.toast.on { opacity: 1; visibility: visible; translate: -50% -6px; }

/* ── Patička ────────────────────────────────────────────────────────────── */
.ftr {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(52px, 6vw, 78px);
  font-size: .92rem;
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.2fr 1fr;
  gap: clamp(26px, 3.5vw, 54px);
  padding-bottom: 46px;
}
.ftr-logo { font-size: 1.6rem; }
.ftr-tag { margin-top: 16px; max-width: 34ch; color: var(--fg-3); }
.ftr h4 { margin-bottom: 18px; }
.ftr ul { display: grid; gap: 11px; }
.ftr a { color: var(--fg-2); transition: color .2s var(--ease); }
.ftr a:hover { color: var(--acc); }
.ftr .sub { color: var(--fg-3); line-height: 1.5; }
.ftr-lang { flex-wrap: wrap; gap: 6px; }

.ftr-bot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 26px;
  padding-block: 22px 30px;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--fg-3);
}

/* ══ POHYB — vše, co se hýbe, jen když uživatel pohyb nezakázal ══════════ */
@media (prefers-reduced-motion: no-preference) {

  /* Nástup nadpisu — čistě CSS, nečeká na JS (kvůli LCP) */
  h1 .ln > span { animation: line-rise .68s var(--spring-snap) both; }
  h1 .ln:nth-child(1) > span { animation-delay: .05s; }
  h1 .ln:nth-child(2) > span { animation-delay: .14s; }
  h1 .ln:nth-child(3) > span { animation-delay: .23s; }
  @keyframes line-rise {
    from { transform: translateY(105%); }
    to   { transform: translateY(0); }
  }

  .hero .kicker, .hero .lead, .hero-cta { animation: fade-up .7s var(--ease) both; }
  .hero .kicker { animation-delay: .02s; }
  .hero .lead { animation-delay: .3s; }
  .hero-cta { animation-delay: .38s; }
  .term { animation: fade-up .8s var(--spring-soft) .3s both; }
  .proof { animation: fade-up .7s var(--ease) .5s both; }

  @keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }

  .pulse { animation: pulse 2.6s ease-out infinite; }
  @keyframes pulse {
    0%       { box-shadow: 0 0 0 0 rgba(46, 230, 196, .55); }
    70%,100% { box-shadow: 0 0 0 9px rgba(46, 230, 196, 0); }
  }

  .caret { animation: blink 1.05s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* ── Modul kalendáře ── */

  /* Rezervace naskakují po sloupcích zleva doprava */
  .cal-ev { animation: cal-in .5s var(--spring-snap) both; }
  .cal-col:nth-child(1) .cal-ev { animation-delay: .10s; }
  .cal-col:nth-child(2) .cal-ev { animation-delay: .20s; }
  .cal-col:nth-child(3) .cal-ev { animation-delay: .30s; }
  @keyframes cal-in {
    from { opacity: 0; transform: translateY(7px) scaleY(.7); }
    to   { opacity: 1; transform: none; }
  }

  /* Jména pracovníků a datum přijedou shora */
  .cal-top, .cal-names { animation: cal-fade .5s var(--ease) both; }
  .cal-names { animation-delay: .06s; }
  @keyframes cal-fade {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: none; }
  }

  /* Čas plyne — ukazatel putuje dnem a začíná znovu */
  .cal-now { animation: cal-now 34s linear infinite; }
  @keyframes cal-now {
    from { transform: translateY(12%); }
    to   { transform: translateY(90%); }
  }

  /* „Novost" nese jen prstenec a upozornění v záhlaví. Vlastní zpožděná
     animace se uvnitř `content-visibility: auto` zasekávala na čase 0
     a rezervace pak zůstala neviditelná — proto ji tu záměrně nemá. */

  /* Prstenec kolem nové rezervace. Dělá ho box-shadow, ne pseudo-element —
     ten by `overflow: hidden` na rezervaci ořízl a nebyl by vidět.
     Zpoždění je ve zkratce, aby ho nepřebilo pravidlo sloupce výše. */
  .cal-col .cal-ev.is-new {
    animation: cal-in .5s var(--spring-snap) .2s both,
               cal-ping 7s var(--ease) 1.6s infinite;
  }
  @keyframes cal-ping {
    0%        { box-shadow: 0 0 0 0 var(--ev); }
    24%, 100% { box-shadow: 0 0 0 5px transparent; }
  }

  /* Sidebar mockupu — ikony naskočí po sobě shora dolů */
  .mock-side .mk-logo, .mock-side .mk-i { animation: cal-fade .45s var(--ease) both; }
  .mock-side .mk-i:nth-of-type(1) { animation-delay: .05s; }
  .mock-side .mk-i:nth-of-type(2) { animation-delay: .10s; }
  .mock-side .mk-i:nth-of-type(3) { animation-delay: .15s; }
  .mock-side .mk-i:nth-of-type(4) { animation-delay: .20s; }
  .mock-side .mk-i:nth-of-type(5) { animation-delay: .25s; }

  /* Aktivní položka jemně dýchá, ať sidebar nepůsobí mrtvě */
  .mk-i.on::before { animation: side-glow 3.4s ease-in-out infinite; }
  @keyframes side-glow {
    0%, 100% { opacity: .55; }
    50%      { opacity: 1; }
  }

  /* Upozornění o nové rezervaci přijede spolu s ní */
  .cal-toast { animation: cal-toast .5s var(--spring-bounce) 1.25s both; }
  @keyframes cal-toast {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: none; }
  }
  .cal-dot { animation: cal-blink 2.4s ease-out 1.8s infinite; }
  @keyframes cal-blink {
    0%       { box-shadow: 0 0 0 0 rgba(46, 230, 196, .6); }
    60%, 100% { box-shadow: 0 0 0 6px rgba(46, 230, 196, 0); }
  }

  .marq-track { animation: marq 34s linear infinite; }
  .marq:hover .marq-track { animation-play-state: paused; }
  @keyframes marq { to { transform: translateX(-50%); } }

  /* Odhalování sekcí — nativní scroll-driven, s IO fallbackem */
  .reveal { opacity: 0; transform: translateY(24px); }
  .reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--spring-soft); }

  @supports (animation-timeline: view()) {
    .reveal {
      opacity: 1;
      transform: none;
      animation: fade-up .8s var(--spring-soft) both;
      animation-timeline: view();
      animation-range: entry 6% entry 46%;
    }
    /* Hero prvky mají vlastní nástup, scroll timeline na ně nesmí */
    .hero .reveal { animation-timeline: auto; }
  }

  /* Dotykový ekvivalent kurzorového světla: přejezd při scrollu */
  @supports (animation-timeline: view()) {
    @media (hover: none) {
      .card::before {
        opacity: 1;
        background: linear-gradient(100deg, transparent 32%, var(--acc-dim) 50%, transparent 68%);
        background-size: 280% 100%;
        animation: sweep linear both;
        animation-timeline: view();
        animation-range: entry 18% cover 62%;
      }
      @keyframes sweep {
        from { background-position: 130% 0; }
        to   { background-position: -30% 0; }
      }
    }
  }
}

/* Dotyk: stisk místo hoveru */
@media (hover: none) {
  .card:active, .eng:active { transform: scale(.985); }
  .btn:active { transform: scale(.97); }
}

/* ── Responzivita ───────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr; }
  .term { order: 2; }
  .cards, .engs { grid-template-columns: repeat(2, 1fr); }
  .prod, .contact, .faq-wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps-line { display: none; }
  .proof { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  html { scroll-padding-top: 78px; }
  .nav, .hdr-cta { display: none; }
  .burger { display: block; }
  .hdr-in { min-height: 66px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .hero-in { padding-block: 34px 40px; }
  .cards, .engs, .works { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  /* Čtyři čísla pod sebou dělají na mobilu zbytečně dlouhý pás. */
  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof-i { padding: 20px 18px; }
  .mods { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn, .fact .btn { flex: 1 1 100%; }
  .work-d { display: none; }
  .term-body { font-size: .78rem; min-height: 210px; }
  .mock-body { min-height: 240px; }
}

@media (max-width: 430px) {
  .ftr-grid { grid-template-columns: 1fr; }
}

/* ── Přepnutí jazyka jako plynulý přechod dokumentu ─────────────────────── */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ══ SVĚTLÝ MOTIV ═══════════════════════════════════════════════════════════
   Základ je tmavý. Světlé hodnoty se použijí, když si je přeje systém
   (a uživatel nevynutil tmavý), nebo když je vybere přepínačem.
   Terminál a mockup zůstávají tmavé záměrně — konzole prostě tmavá je.     */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg:      #ffffff;
    --bg-2:    #f5f8fc;
    --bg-3:    #e9eff7;
    --line:    #e2e8f1;
    --line-2:  #c6d0de;

    --fg:      #0c111c;
    --fg-2:    #4a5568;
    --fg-3:    #68758c;

    --acc:     #0d8f80;
    --acc-2:   #0369a1;
    --acc-3:   #4f46e5;
    --acc-ink: #ffffff;
    --acc-dim: rgba(13, 143, 128, .12);
    --acc-hi:  #0a7669;

    --grid-line: rgba(12, 17, 28, .05);
    --hdr-bg:    rgba(255, 255, 255, .8);

    /* Administrace v mockupu ve světlém motivu */
    --app-bg:   #ffffff;
    --app-bg-2: #f5f8fc;
    --app-line: #e2e8f1;
    --app-fg:   #0c111c;
    --app-fg-2: #4a5568;
    --app-fg-3: #7c8ba3;
    --app-grid: rgba(12, 17, 28, .07);
    --app-well: rgba(12, 17, 28, .035);
  }
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:      #ffffff;
  --bg-2:    #f5f8fc;
  --bg-3:    #e9eff7;
  --line:    #e2e8f1;
  --line-2:  #c6d0de;

  --fg:      #0c111c;
  --fg-2:    #4a5568;
  --fg-3:    #68758c;

  --acc:     #0d8f80;
  --acc-2:   #0369a1;
  --acc-3:   #4f46e5;
  --acc-ink: #ffffff;
  --acc-dim: rgba(13, 143, 128, .12);
  --acc-hi:  #0a7669;

  --grid-line: rgba(12, 17, 28, .05);
  --hdr-bg:    rgba(255, 255, 255, .8);

  /* Administrace v mockupu ve světlém motivu */
  --app-bg:   #ffffff;
  --app-bg-2: #f5f8fc;
  --app-line: #e2e8f1;
  --app-fg:   #0c111c;
  --app-fg-2: #4a5568;
  --app-fg-3: #7c8ba3;
  --app-grid: rgba(12, 17, 28, .07);
  --app-well: rgba(12, 17, 28, .035);
}

/* Světelné skvrny v heru musí být na bílé jemnější, jinak vypadají špinavě. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-aurora { opacity: .5; }
  :root:not([data-theme="dark"]) .hero-canvas { opacity: .38; }
}
:root[data-theme="light"] .hero-aurora { opacity: .5; }
:root[data-theme="light"] .hero-canvas { opacity: .38; }

/* ── Přepínač motivu ────────────────────────────────────────────────────── */
.theme {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.theme:hover { color: var(--acc); border-color: var(--acc); }
.theme svg { width: 19px; height: 19px; }

/* Zobrazí se vždy jen ikona odpovídající aktuálnímu stavu. */
.theme .i-auto, .theme .i-sun, .theme .i-moon { display: none; }
.theme[data-state="auto"]  .i-auto { display: block; }
.theme[data-state="light"] .i-sun  { display: block; }
.theme[data-state="dark"]  .i-moon { display: block; }

/* Jednotný styl ovládacích prvků v hlavičce: stejná výška a rámeček
   pro přepínač motivu, jazyky i burger. */
.hdr-act .lang {
  height: 44px;
  align-items: center;
  padding-inline: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
}

/* Krátký přechod barev při přepnutí motivu — jen po dobu přepnutí,
   aby transitions nezdržovaly běžnou interakci. */
@media (prefers-reduced-motion: no-preference) {
  .theming, .theming body,
  .theming .sec-alt, .theming .card, .theming .eng, .theming .work,
  .theming .qform, .theming .faq details, .theming .hdr, .theming .ftr,
  .theming .proof-i, .theming .chip, .theming .f input, .theming .f select, .theming .f textarea {
    transition: background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease);
  }
}

/* ── Srovnání: modem od providera vs. síť od i99 ────────────────────────── */
.cmp {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.cmp-head, .cmp-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 20px;
  padding: 16px 24px;
  align-items: center;
}
.cmp-head {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cmp-head .cmp-a { color: var(--fg-3); }
.cmp-head .cmp-b { display: flex; align-items: center; gap: 9px; color: var(--acc); }
.cmp-head .cmp-b svg { width: 17px; height: 17px; flex: none; }

.cmp-row { border-bottom: 1px solid var(--line); font-size: .93rem; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-k { font-family: var(--f-display); font-weight: 700; color: var(--fg); font-size: .97rem; }
.cmp-row .cmp-a { color: var(--fg-3); }
.cmp-row .cmp-b { display: flex; align-items: flex-start; gap: 9px; color: var(--fg); }
.cmp-row .cmp-b svg { width: 17px; height: 17px; color: var(--acc); flex: none; margin-top: 3px; }
.cmp-lbl { display: none; }

.net-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
  margin-top: 34px;
}
.net-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--fg-3);
  max-width: 56ch;
}
.net-note svg { width: 18px; height: 18px; color: var(--acc); flex: none; }

/* Na mobilu se z tabulky stanou karty — sloupce vedle sebe by byly nečitelné. */
@media (max-width: 760px) {
  .cmp-head { display: none; }
  .cmp-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
  }
  .cmp-lbl {
    display: block;
    margin-bottom: 3px;
    font-family: var(--f-display);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--fg-3);
  }
  .cmp-row .cmp-b { display: block; }
  .cmp-row .cmp-b svg { display: none; }
  .cmp-row .cmp-b .cmp-lbl { color: var(--acc); }
}
