/* =========================================================================
   GEN Praha 1 — volební program
   Barevné tokeny jsou soustředěné v :root. Pro sladění s gen2025.cz
   stačí přepsat --c-brand / --c-brand-deep / --c-brand-soft.
   ========================================================================= */

/* ---------- Fonty (self-hosted, žádný externí požadavek) ---------------- */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-latin-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;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/bricolage-latin.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+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("../fonts/instrument-latin-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;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("../fonts/instrument-latin.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+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokeny ------------------------------------------------------ */

:root {
  /* Značka — fialová odečtená přímo z loga GEN (#69509C) */
  --c-brand: #69509c;
  --c-brand-deep: #2c2251;
  --c-brand-soft: #9f8ec3;
  --c-brand-pale: #ede9f3;

  /* Cedule — červená českých uličních tabulek */
  --c-sign: #c21f2e;
  --c-sign-deep: #9a1723;
  --c-steel: #e3d9d6;

  /* Plocha a text */
  --c-bg: #f5f3f8;
  --c-surface: #ffffff;
  --c-ink: #1e1830;
  --c-ink-mute: #574e6b;
  --c-line: #e2dcec;

  /* Typografie */
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, sans-serif;

  --t-h1: clamp(2.6rem, 1.4rem + 5.4vw, 6rem);
  --t-h2: clamp(1.55rem, 1.15rem + 1.6vw, 2.35rem);
  --t-lead: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.115rem);

  /* Rytmus */
  --s-gut: clamp(1.25rem, 0.7rem + 2.4vw, 3rem);
  --w-max: 76rem;
  --r: 4px;
  --r-plate: 14px;
}

/* ---------- Základ ------------------------------------------------------ */

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.62;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--c-sign);
  outline-offset: 3px;
}
/* na tmavých plochách musí být rámeček světlý */
.hero :focus-visible,
.foot :focus-visible,
.close :focus-visible {
  outline-color: #fff;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--c-brand-deep);
  color: #fff;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- Signature: česká smaltovaná cedule -------------------------
   Červené pole, bílý vnitřní rám, zaoblené rohy, nýty v rozích.
   ---------------------------------------------------------------------- */

.plate {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--c-sign);
  color: #fff;
  border-radius: var(--r-plate);
  box-shadow: inset 0 0 0 3px var(--c-sign),
              inset 0 0 0 5px rgba(255, 255, 255, 0.95),
              inset 0 0 0 8px var(--c-sign);
  font-family: var(--f-display);
  text-align: center;
}

/* nýty v rozích */
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  top: 0.78rem;
  bottom: 0.78rem;
  width: 6px;
  background:
    radial-gradient(circle at 50% 0, var(--c-steel) 3px, transparent 3.1px) top center / 6px 6px no-repeat,
    radial-gradient(circle at 50% 100%, var(--c-steel) 3px, transparent 3.1px) bottom center / 6px 6px no-repeat;
}
.plate::before { left: 0.78rem; }
.plate::after { right: 0.78rem; }

.plate--hero {
  padding: 1.5rem clamp(2.25rem, 6vw, 4.75rem);
  margin: clamp(1.75rem, 4vw, 2.75rem) 0;
  transform: rotate(-0.9deg);
}
.plate--hero .plate__kicker,
.plate--hero .plate__sub {
  font-size: clamp(0.66rem, 0.5rem + 0.4vw, 0.82rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
}
.plate--hero .plate__name {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0.3rem 0 0.35rem;
  font-variation-settings: "wdth" 92;
}

.plate--num {
  width: 3.6rem;
  height: 3.6rem;
  font-size: 1.45rem;
  font-weight: 800;
  font-variation-settings: "wdth" 88;
  border-radius: 11px;
  box-shadow: inset 0 0 0 2px var(--c-sign),
              inset 0 0 0 4px rgba(255, 255, 255, 0.95),
              inset 0 0 0 6px var(--c-sign);
  flex: none;
}
.plate--num::before,
.plate--num::after {
  top: 0.5rem;
  bottom: 0.5rem;
  width: 4px;
  background:
    radial-gradient(circle at 50% 0, var(--c-steel) 2px, transparent 2.1px) top center / 4px 4px no-repeat,
    radial-gradient(circle at 50% 100%, var(--c-steel) 2px, transparent 2.1px) bottom center / 4px 4px no-repeat;
}
.plate--num::before { left: 0.5rem; }
.plate--num::after { right: 0.5rem; }

/* ---------- Lišta ------------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f4f1f7;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.bar__in {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 0.85rem var(--s-gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.mark__logo {
  display: block;
  width: auto;
  height: clamp(1.55rem, 1.2rem + 1vw, 1.95rem);
}
.mark__sep {
  width: 1px;
  height: 1.1em;
  background: var(--c-line);
}
.mark__loc {
  font-weight: 500;
  color: var(--c-ink-mute);
  font-variation-settings: "wdth" 92;
}

.bar__nav {
  display: flex;
  gap: clamp(0.9rem, 2vw, 1.75rem);
  font-size: 0.92rem;
  font-weight: 600;
}
.bar__nav a {
  text-decoration: none;
  color: var(--c-ink-mute);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.bar__nav a:hover {
  color: var(--c-brand);
  border-bottom-color: var(--c-brand);
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  background: var(--c-brand-deep);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6.5rem);
  position: relative;
  overflow: hidden;
}
/* tichá atmosféra: měkký nádech značky, ne gradientní tapeta */
.hero::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -55%;
  width: 46rem;
  height: 46rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-brand-soft) 45%, transparent) 0%, transparent 62%);
  pointer-events: none;
}
.hero__in {
  position: relative;
  z-index: 1;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--s-gut);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 600;
  color: #cbb6e6;
  color: color-mix(in srgb, #fff 68%, var(--c-brand-soft));
  margin-bottom: 1.1rem;
}

.hero__h1 {
  font-size: var(--t-h1);
  font-weight: 800;
  font-variation-settings: "wdth" 88, "opsz" 72;
  max-width: 14ch;
}
.hero__h1 em {
  font-style: normal;
  color: #fff;
}
.hero__rule {
  width: clamp(4.5rem, 10vw, 7rem);
  height: 7px;
  border-radius: 4px;
  background: var(--c-sign);
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.hero__lead {
  font-size: var(--t-lead);
  max-width: 46ch;
  color: #e0d4f0;
  color: color-mix(in srgb, #fff 84%, var(--c-brand-soft));
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: var(--c-sign);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--r);
  transition: transform 0.18s, background 0.18s;
}
.btn:hover {
  background: var(--c-sign-deep);
  transform: translateY(-2px);
}

/* ---------- Program ----------------------------------------------------- */

.program {
  padding: clamp(3rem, 7vw, 6rem) 0;
}
.program__in {
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--s-gut);
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.rail { display: none; }

.rail__title {
  font-family: var(--f-display);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-ink-mute);
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--c-line);
}
.rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.rail__list li + li { margin-top: 0.55rem; }
.rail__list a {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.4rem;
  align-items: baseline;
  text-decoration: none;
  color: var(--c-ink-mute);
  padding: 0.3rem 0.4rem 0.3rem 0;
  border-radius: var(--r);
  transition: color 0.18s;
}
.rail__list a:hover { color: var(--c-brand); }
.rail__num {
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--c-brand-soft);
  font-variant-numeric: tabular-nums;
}
.rail__list a[aria-current="true"] {
  color: var(--c-brand);
  font-weight: 600;
}
.rail__list a[aria-current="true"] .rail__num { color: var(--c-sign); }

.points {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.point {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 6px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "plate head"
    "text  text";
  column-gap: 1.15rem;
  row-gap: 1rem;
  align-items: center;
  scroll-margin-top: 6rem;
}
.point > .plate--num { grid-area: plate; }
.point__h {
  grid-area: head;
  font-size: var(--t-h2);
  font-variation-settings: "wdth" 94, "opsz" 32;
}
.point > p {
  grid-area: text;
  color: var(--c-ink-mute);
  max-width: 68ch;
}

.karta {
  color: var(--c-brand);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Závěr ------------------------------------------------------- */

.close {
  background: var(--c-brand);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 7rem) var(--s-gut);
}
.close__q {
  margin: 0 auto;
  max-width: var(--w-max);
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 1rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-variation-settings: "wdth" 90, "opsz" 60;
  text-wrap: balance;
}
.close__q p { margin: 0; }
.close__q p:first-child {
  color: rgba(255, 255, 255, 0.74);
}
.close__q em {
  font-style: normal;
  color: #fff;
}

/* ---------- Patička ----------------------------------------------------- */

.foot {
  background: var(--c-brand-deep);
  color: #d3c2e8;
  color: color-mix(in srgb, #fff 72%, var(--c-brand-soft));
  padding: clamp(2.5rem, 5vw, 4rem) var(--s-gut);
  font-size: 0.9rem;
}
.foot__in {
  max-width: var(--w-max);
  margin-inline: auto;
  display: grid;
  gap: 1.1rem;
}
.foot__mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
  margin: 0;
}
.foot__logo {
  display: block;
  width: auto;
  height: 1.7rem;
}
.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.foot__nav a {
  text-decoration: none;
  border-bottom: 1px solid #6b45a3;
  border-bottom-color: color-mix(in srgb, var(--c-brand-soft) 70%, transparent);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.foot__nav a:hover {
  color: #fff;
  border-bottom-color: var(--c-sign);
}
.foot__legal {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
  max-width: 60ch;
}

/* ---------- Rozvržení od tabletu výš ------------------------------------ */

@media (min-width: 62rem) {
  .program__in {
    grid-template-columns: 17rem 1fr;
    align-items: start;
  }
  .rail {
    display: block;
    position: sticky;
    top: 6rem;
  }
  .point {
    grid-template-areas:
      "plate head"
      ".     text";
    column-gap: 1.6rem;
    align-items: start;
  }
  .point > .plate--num { margin-top: 0.15rem; }
}

/* ---------- Vstupní animace (jemná, respektuje reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .point {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .js .point.is-in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Tisk (program jako leták) ----------------------------------- */

@media print {
  :root { --c-bg: #fff; }
  .bar, .rail, .btn, .skip, .foot__nav, .hero__rule { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .hero, .close, .foot {
    background: #fff !important;
    color: #000 !important;
    padding: 0 0 1.5rem;
  }
  .hero::after { display: none; }
  .hero__lead, .foot { color: #000 !important; }
  .plate { box-shadow: inset 0 0 0 2px #000; background: #fff; color: #000; }
  .plate::before, .plate::after { display: none; }
  .point {
    border: 0;
    border-top: 1pt solid #999;
    border-radius: 0;
    padding: 0.6rem 0;
    break-inside: avoid;
    background: #fff;
  }
  .points { gap: 0; }
  .hero__h1 em, .close__q em, .close__q p:first-child { color: #000; }
}
