/* ==========================================================================
   Za Vyskeř — design system
   Bez závislostí, bez build kroku. Vše laděno tokeny níže.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokeny
   -------------------------------------------------------------------------- */
:root {
  /* Barvy — světlý režim je výchozí a definuje kompletní paletu */
  --bg:            #faf8f4;
  --bg-alt:        #f2eee6;
  --surface:       #ffffff;
  --surface-2:     #f6f3ec;
  --ink:           #16211d;
  --ink-soft:      #3d4c46;
  --muted:         #6b7a73;
  --line:          #e2ddd2;

  --brand:         #14503f;
  --brand-strong:  #0e3b2e;
  --brand-soft:    #e6f0eb;
  --brand-ink:     #ffffff;

  --accent:        #c2762b;
  --accent-soft:   #fbf0e2;

  --hill-1:        #14503f;
  --hill-2:        #2c6b55;
  --hill-3:        #4b8a72;
  --kaple:         #123f32;
  --sky-a:         #eef3ee;
  --sky-b:         #faf8f4;

  --shadow-sm: 0 1px 2px rgb(20 40 33 / .06), 0 2px 8px rgb(20 40 33 / .05);
  --shadow-md: 0 2px 6px rgb(20 40 33 / .07), 0 12px 30px -8px rgb(20 40 33 / .14);
  --shadow-lg: 0 4px 12px rgb(20 40 33 / .09), 0 30px 60px -18px rgb(20 40 33 / .26);

  /* Typografie */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Source Serif 4",
                  "Georgia", "Times New Roman", serif;

  --step--1: clamp(.82rem, .79rem + .14vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.09rem);
  --step-1:  clamp(1.18rem, 1.1rem + .38vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.28rem + .8vw, 2rem);
  --step-3:  clamp(1.9rem, 1.55rem + 1.7vw, 3rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 5rem);

  /* Rozměry */
  --shell: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --header-h: 68px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}

/* Tmavý režim — pouze přepis tokenů */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #0a1310;
    --bg-alt:       #0e1a16;
    --surface:      #12201b;
    --surface-2:    #172a23;
    --ink:          #e9f1ec;
    --ink-soft:     #c2d1ca;
    --muted:        #8ba398;
    --line:         #22362e;

    --brand:        #56d6a4;
    --brand-strong: #7ce3ba;
    --brand-soft:   #143027;
    --brand-ink:    #06211a;

    --accent:       #e9a459;
    --accent-soft:  #2a1f11;

    --hill-1:       #0f3529;
    --hill-2:       #144135;
    --hill-3:       #1b5243;
    --kaple:        #7fb79e;
    --sky-a:        #0d1c17;
    --sky-b:        #0a1310;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 2px 6px rgb(0 0 0 / .45), 0 14px 34px -10px rgb(0 0 0 / .6);
    --shadow-lg: 0 4px 12px rgb(0 0 0 / .5), 0 34px 64px -20px rgb(0 0 0 / .75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:           #0a1310;
  --bg-alt:       #0e1a16;
  --surface:      #12201b;
  --surface-2:    #172a23;
  --ink:          #e9f1ec;
  --ink-soft:     #c2d1ca;
  --muted:        #8ba398;
  --line:         #22362e;

  --brand:        #56d6a4;
  --brand-strong: #7ce3ba;
  --brand-soft:   #143027;
  --brand-ink:    #06211a;

  --accent:       #e9a459;
  --accent-soft:  #2a1f11;

  --hill-1:       #0f3529;
  --hill-2:       #144135;
  --hill-3:       #1b5243;
  --kaple:        #7fb79e;
  --sky-a:        #0d1c17;
  --sky-b:        #0a1310;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-md: 0 2px 6px rgb(0 0 0 / .45), 0 14px 34px -10px rgb(0 0 0 / .6);
  --shadow-lg: 0 4px 12px rgb(0 0 0 / .5), 0 34px 64px -20px rgb(0 0 0 / .75);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Základ
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
  /* Drží šířku i po zamčení scrollu při otevřeném dialogu */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

.skip-link {
  position: absolute;
  left: 50%;
  top: .6rem;
  translate: -50% -180%;
  z-index: 200;
  background: var(--brand);
  color: var(--brand-ink);
  padding: .7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: translate .2s var(--ease);
}
.skip-link:focus-visible { translate: -50% 0; color: var(--brand-ink); }

/* --------------------------------------------------------------------------
   3. Opakované prvky
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.eyebrow__dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent);
}

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.3rem;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-ink);
  --btn-bd: var(--brand);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  --btn-bg: var(--brand-strong);
  --btn-bd: var(--brand-strong);
  --btn-fg: var(--brand-ink);
  box-shadow: var(--shadow-md);
}

.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { --btn-bd: var(--brand); color: var(--brand); }

.btn--lg { padding: .95rem 1.8rem; font-size: var(--step-1); }

.btn__arrow { width: 1.15em; height: 1.15em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: translate .25s var(--ease); }
.btn:hover .btn__arrow { translate: .2em 0; }

.tag {
  display: inline-block;
  padding: .22rem .62rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: color-mix(in oklab, var(--brand) 85%, var(--ink));
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.5;
}

.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--cta { background: var(--bg-alt); border-top: 1px solid var(--line); }

.section__head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section__title { font-size: var(--step-3); }
.section__lead {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 54ch;
}

.note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   4. Hlavička
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -.015em;
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-ink);
}
.brand__mark svg { width: 78%; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.nav > a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: .01em;
  position: relative;
  padding-block: .35rem;
}
.nav > a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transition: right .25s var(--ease);
}
.nav > a:hover { color: var(--ink); }
.nav > a:hover::after { right: 0; }

.header-tools { display: flex; align-items: center; gap: .4rem; margin-left: .6rem; }

.icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--brand); }
.icon-btn svg {
  width: 1.15rem; height: 1.15rem;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

.nav-toggle { display: none; }
.nav-toggle__bars { display: grid; gap: 4px; width: 1.1rem; }
.nav-toggle__bars i {
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 1.6rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .35s var(--ease), opacity .25s var(--ease);
  }
  .nav.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav > a { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  /* Spodní odsazení musí být vyšší než silueta Vyskeře níž, jinak by text
     a tlačítka skončily na tmavé zeleni a ztratily kontrast. */
  padding-block: clamp(4rem, 11vw, 9rem) clamp(9rem, 24vw, 20rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80ch 50ch at 78% -10%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 65%),
    linear-gradient(180deg, var(--sky-a), var(--sky-b) 72%);
}
/* Vyskeř s kaplí. Výška je vždy menší než spodní odsazení hero sekce
   (viz .hero výše), takže silueta nikdy nevleze pod text. */
.hero__vysker {
  position: absolute;
  right: clamp(-1rem, 3vw, 6rem);
  bottom: -1px;
  height: clamp(110px, 20vw, 290px);
  width: auto;
}
.vysker__kopec { fill: var(--hill-2); }
.vysker__kaple { fill: var(--kaple); }

/* Bližší hřebeny — překrývají patu kopce, aby vznikla hloubka */
.hero__hills {
  position: absolute;
  inset: auto 0 -1px 0;
  width: 100%;
  height: clamp(26px, 3vw, 46px);
}
.hill--1 { fill: var(--hill-1); }
.hill--2 { fill: var(--hill-3); opacity: .55; }

.hero__inner { position: relative; }

.hero__title {
  font-size: var(--step-4);
  max-width: 14ch;
  margin-bottom: 1.6rem;
}
.hero__title em {
  font-style: italic;
  color: var(--brand);
  position: relative;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: -.04em; right: -.04em; bottom: .06em;
  height: .1em;
  background: color-mix(in oklab, var(--accent) 55%, transparent);
  border-radius: 999px;
  z-index: -1;
}

.hero__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.2rem;
}

/* --------------------------------------------------------------------------
   6. Karty kandidátů
   -------------------------------------------------------------------------- */
.candidates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.candidate { display: flex; }

.candidate__card {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.candidate__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg, color-mix(in oklab, var(--brand) 8%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity .35s var(--ease);
}

/* Zvednutí a podbarvení jen u karet, které se dají otevřít
   (tlačítko „Více“ doplňuje JS těm, které mají vyplněné data-bio). */
.candidate:has(.candidate__more) .candidate__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in oklab, var(--brand) 45%, var(--line));
}
.candidate:has(.candidate__more) .candidate__card:hover::before { opacity: 1; }
.candidate:has(.candidate__more:focus-visible) .candidate__card {
  border-color: color-mix(in oklab, var(--brand) 45%, var(--line));
}

.candidate__badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  min-width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.candidate:has(.candidate__more) .candidate__card:hover .candidate__badge {
  background: var(--accent);
  color: #fff;
}

.candidate__avatar {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 20%,
      color-mix(in oklab, var(--brand) 26%, var(--surface-2)),
      var(--surface-2));
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .01em;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.candidate__avatar::after {
  content: attr(data-initials);
  line-height: 1;
}
/* Až doplníte fotky: <span class="candidate__avatar"><img src="..." alt=""></span> */
.candidate__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate__body { display: flex; flex-direction: column; gap: .3rem; }

.candidate__name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--ink);
}
.candidate__meta { color: var(--muted); font-size: var(--step--1); }
.candidate__quote {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
}
.candidate__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }

/* Tlačítko „Více o kandidátovi“ — doplňuje ho JS jen kartám s životopisem.
   Pseudoprvek roztažený přes celou kartu dělá klikatelnou celou plochu,
   ale přístupné jméno i fokus zůstávají na skutečném <button>. */
.candidate__more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  padding: .4rem 0 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.candidate__more::after { content: ""; position: absolute; inset: 0; }
.candidate__more svg {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: translate .25s var(--ease);
}
.candidate__card:hover .candidate__more svg { translate: .25em 0; }

/* --------------------------------------------------------------------------
   7. Kontakt
   -------------------------------------------------------------------------- */
.cta {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .cta { grid-template-columns: 1fr 1fr; } }

.cta__card {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cta__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .2s var(--ease), padding-left .2s var(--ease);
}
/* Posun při najetí patří jen řádkům, na které se dá kliknout */
a.cta__row:hover { background: var(--surface-2); color: var(--ink); padding-left: 1.7rem; }
.cta__row strong { display: block; font-size: var(--step-0); }
.cta__row small { color: var(--muted); font-size: var(--step--1); }
.cta__icon {
  width: 2.6rem; height: 2.6rem;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.cta__icon svg {
  width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   8. Patička
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--brand-strong);
  color: color-mix(in oklab, #ffffff 88%, var(--brand));
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
/* Patička je vždy tmavá — dělící linky proto počítáme z bílé, ne z tokenu --line */
.site-footer { --line: color-mix(in oklab, #ffffff 16%, transparent); }

.site-footer__inner {
  display: grid;
  gap: 1.8rem;
  align-items: start;
}
@media (min-width: 800px) {
  .site-footer__inner { grid-template-columns: 1fr auto; }
  .site-footer__legal { grid-column: 1 / -1; }
}

.brand--footer { color: #fff; margin-right: 0; }
.brand--footer:hover { color: #fff; }
.brand--footer .brand__mark { background: rgb(255 255 255 / .14); color: #fff; }

.site-footer__note { margin-top: .7rem; opacity: .78; font-size: var(--step--1); max-width: 40ch; }

.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.site-footer__nav a { color: inherit; text-decoration: none; font-size: var(--step--1); opacity: .82; }
.site-footer__nav a:hover { color: #fff; opacity: 1; text-decoration: underline; }

.site-footer__legal {
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  opacity: .68;
}

/* --------------------------------------------------------------------------
   9. Modální detail
   -------------------------------------------------------------------------- */
.modal {
  width: min(100% - 2rem, 620px);
  max-height: min(88svh, 900px);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal::backdrop {
  background: rgb(8 20 16 / .55);
  backdrop-filter: blur(4px);
}
.modal[open] { animation: modal-in .32s var(--ease); }
.modal[open]::backdrop { animation: fade-in .32s var(--ease); }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

.modal__close {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .2s var(--ease), rotate .3s var(--ease);
}
.modal__close:hover { background: var(--surface-2); rotate: 90deg; }
.modal__close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.modal__head { display: flex; align-items: center; gap: 1.1rem; padding-right: 2.5rem; }
.modal__avatar {
  width: 4.2rem; height: 4.2rem;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in oklab, var(--brand) 26%, var(--surface-2)), var(--surface-2));
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}
.modal__order { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.modal__name { font-size: var(--step-2); margin-top: .1rem; }

.modal__quote {
  margin: 1.6rem 0 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}
.modal__bio { margin-top: 1.3rem; color: var(--ink-soft); }

.modal__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  margin: 1.8rem 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.modal__facts > div { background: var(--surface-2); padding: .85rem 1rem; }
.modal__facts-wide { grid-column: 1 / -1; }
.modal__facts dt { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.modal__facts dd { margin: .2rem 0 0; font-weight: 600; font-size: var(--step--1); }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   10. Animace při scrollu
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* --------------------------------------------------------------------------
   11. Tisk
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .hero__bg, .candidate__more, .modal, .site-footer__nav { display: none !important; }
  body { background: #fff; color: #000; }
  .candidate__card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .reveal { opacity: 1; transform: none; }
}
