/* Společně Strakonice — styles follow the SPOLEČNĚ design system:
   sky ground, Amateur Naked all caps, ink text, three dots, no boxes. */

@font-face {
  font-family: "Amateur Naked";
  src: url("../fonts/AmateurNaked.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../fonts/MyriadPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../fonts/MyriadPro-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Myriad Pro";
  src: url("../fonts/MyriadPro-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #242322;
  --ink-k100: #2b2b2a;
  --sky-100: #aadcef;
  --sky-50: #d9eef8;
  --sky-25: #e9f5fb;
  --paper: #ffffff;
  --dot-cyan: #00a1e4;
  --dot-yellow: #ffed00;
  --dot-magenta: #e60c80;

  --text-halo: 0 1px 6px rgba(36, 35, 34, 0.45);
  --gutter: clamp(24px, 5.6vw, 80px);

  --font-display: "Amateur Naked", "Arial Black", sans-serif;
  --font-text: "Myriad Pro", "Segoe UI", system-ui, sans-serif;

  /* Torn top edge of the white cloud band. Vertical values are px on purpose: the band grows
     with its content, the tearing must not. */
  --torn: polygon(0 4.3px, 4% 1.4px, 9% 5px, 15% 1.1px, 22% 4.7px, 29% 1.8px, 36% 5.4px, 43% 1.4px, 50% 4.3px, 57% 1.1px, 64% 5px, 71% 1.8px, 78% 4.7px, 85% 1.4px, 92% 5px, 100% 2.2px, 100% 100%, 0 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--sky-25);
}

strong { font-weight: 600; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
}

.light { font-weight: 300; margin: 0; }

.dots {
  display: flex;
  gap: 1em;
  font-size: clamp(16px, 1.6vw, 22px);
}
.dots span {
  display: block;
  width: 1em;
  height: 1em;
  border-radius: 50%;
}
.dots span:nth-child(1) { background: var(--dot-cyan); }
.dots span:nth-child(2) { background: var(--dot-yellow); }
.dots span:nth-child(3) { background: var(--dot-magenta); }

.section-title {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
}

/* ---------- Header + hero share one sky ---------- */

.sky {
  background: linear-gradient(to bottom, var(--sky-100) 0%, var(--sky-50) 100%);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 72px;
  padding-block: 8px;
}

.logo { display: flex; }
.logo img {
  display: block;
  height: clamp(48px, 4.5vw, 64px);
  width: auto;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 40px;
}
.nav a {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1;
  padding: 14px 0;
}

.social { display: flex; gap: 8px; }
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.social svg { width: 26px; height: 26px; }

@media (max-width: 800px) {
  .nav { display: none; }
  .social { margin-left: auto; }
  .site-header .wrap { gap: 16px; }
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(24px, 2.2vw, 32px);
  padding-block: clamp(56px, 10vw, 136px) clamp(64px, 11vw, 152px);
}

.hero-headline {
  max-width: 1080px;
  font-size: clamp(38px, 5.6vw, 80px);
  line-height: 1.08;
  color: var(--paper);
  text-shadow: var(--text-halo);
  text-wrap: balance;
}

/* The election line under the statements: date and number, one line (two on phones). */
.hero-facts {
  font-size: clamp(26px, 3.1vw, 44px);
  line-height: 1.15;
  text-wrap: balance;
}
.hero-facts span:not(.hero-sep) { white-space: nowrap; }
@media (max-width: 600px) {
  .hero-facts span:not(.hero-sep) { display: block; }
  .hero-sep { display: none; }
}

/* All slides sit in the same grid cell, so the hero is as tall as the tallest one. */
.hero-slides {
  display: grid;
  width: 100%;
  justify-items: center;
}
.hero-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 2.2vw, 32px);
}

/* Cycling (two or more slides): pure CSS. The @keyframes hero-slide are generated by
   layouts/home.html; --dur (whole cycle), --step (time per slide) and --i (slide number) are
   set inline. Only the visible slide is exposed to assistive technology (visibility). */
@media (prefers-reduced-motion: no-preference) {
  .hero-slides[data-rotating] .hero-slide {
    opacity: 0;
    visibility: hidden;
    animation-name: hero-slide;
    animation-duration: var(--dur);
    animation-timing-function: linear;
    animation-delay: calc(var(--i) * var(--step));
    animation-iteration-count: infinite;
  }
  /* Pause while pointing at the text. */
  .hero-slides[data-rotating]:hover .hero-slide {
    animation-play-state: paused;
  }
}

/* Reduced motion: show the first pair only, no toggle. */
@media (prefers-reduced-motion: reduce) {
  .hero-slides[data-rotating] .hero-slide:not(:first-child) { display: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Slogan ---------- */

.priority .wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 80px;
  row-gap: 40px;
  align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}

.slogan {
  display: flex;
  flex-direction: column;
  gap: 0.02em;
  font-size: clamp(96px, 12.2vw, 176px);
  line-height: 0.9;
  color: var(--ink-k100);
}
.slogan-zit { display: flex; align-items: center; }
.slogan-zit .dots {
  font-size: 0.25em;
  gap: 1em;
  margin-left: 1.1em;
  margin-top: 1.28em;
}

.priority-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 520px;
}
.lead {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.3;
}
.coalition {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1;
}
/* One button style for every text link that acts as a button: underlined display type, 44px target. */
.priority-link,
.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(22px, 1.95vw, 28px);
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.priority-link { align-self: flex-start; }

@media (max-width: 900px) {
  .priority .wrap { grid-template-columns: 1fr; }
}

.placeholder {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.4;
}

/* ---------- Candidates ---------- */

/* The three leaders side by side (all equal, in list order): figures stand on the sky and end in a
   white, torn cloud band that carries their names. Everyone else follows in a fixed grid on white.
   Every candidate is figure + number + name. */

.candidates {
  --lead-w: clamp(72px, 10vw, 144px);
  background: var(--sky-50);
  padding-top: clamp(40px, 4vw, 56px);
  overflow: hidden;
}
.candidates-head { display: flex; flex-direction: column; gap: 12px; }
.leaders-title {
  margin-top: clamp(12px, 1.7vw, 24px);
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1;
}

.figure {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  fill: var(--sky-100);
}
.figure.photo { object-fit: contain; }

.leaders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(8px, 1.7vw, 24px);
  align-items: start;
  justify-items: center;
  max-width: 600px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}
.leaders-figures { align-items: end; margin-top: clamp(8px, 0.9vw, 12px); }
.leaders .figure { width: var(--lead-w); }

.band {
  position: relative;
  margin-top: -28px;
  padding-block: 34px 20px;
  background: var(--paper);
  clip-path: var(--torn);
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink-k100);
}
.person-num {
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1;
}
.person-name {
  margin-top: 2px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.2;
}

/* The rest: 6 per row (3 on narrower screens). */
.rest {
  --fig-w: clamp(60px, 6.7vw, 96px);
  margin-top: -1px; /* overlaps the torn band's last pixel row: no hairline of sky between them */
  position: relative;
  background: var(--paper);
  padding-block: clamp(20px, 2vw, 28px) clamp(32px, 4vw, 56px);
}
.rest-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: clamp(8px, 1.7vw, 24px);
  row-gap: clamp(16px, 1.4vw, 20px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.rest-item .figure-box { display: block; width: var(--fig-w); }
.rest-item .person-num { margin-top: 10px; font-size: clamp(16px, 1.25vw, 18px); }
.rest-item .person-name {
  margin-bottom: 2px;
  font-size: clamp(13px, 1.05vw, 15px);
}

@media (max-width: 900px) {
  .rest { --fig-w: clamp(60px, 12vw, 100px); }
  .rest-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .band { margin-top: -20px; padding-top: 26px; }
}

/* ---------- Contact ---------- */

.contact .wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(64px, 8vw, 100px);
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 48px;
  row-gap: 4px;
}
.contact-links a { gap: 12px; }
.contact-links svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sky-100);
  padding: 48px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.site-footer .dots { font-size: 16px; }
.site-footer .coalition { font-size: clamp(22px, 1.7vw, 24px); }
.site-footer p { margin: 0; }
.site-url { font-size: 16px; }

/* ---------- Page head (subpages) ---------- */

.page-head > .wrap { padding-block: clamp(32px, 5vw, 64px) clamp(40px, 6vw, 80px); }

/* ---------- Priorities page ---------- */

/* Each priority is a sky scene: a white stripe (straight edges) carries the word, its dots and the lead
   sentence; the text below sits on the sky, deeper at both ends so scenes join without a seam
   (the first one starts on the sky-50 the page head fades into). */
.priority-item {
  --fade: clamp(200px, 25vw, 360px);
  --prio-gap: clamp(32px, 4.4vw, 64px);
  --prio-top: clamp(48px, 6.7vw, 96px);
  --prio-bottom: clamp(64px, 7.8vw, 112px);
  --prio-row: clamp(48px, 4.4vw, 64px);
  --prio-pre-close: clamp(64px, 5.6vw, 80px);
  background: linear-gradient(to bottom, var(--sky-100) 0, var(--sky-50) var(--fade), var(--sky-50) calc(100% - var(--fade)), var(--sky-100) 100%);
}
.priority-item:first-of-type {
  background: linear-gradient(to bottom, var(--sky-50) 0, var(--sky-50) calc(100% - var(--fade)), var(--sky-100) 100%);
}

.prio-strip {
  background: var(--paper);
  padding-block: clamp(48px, 5.6vw, 80px);
}

/* font-size here is the size of the word; the dots are sized from it (0.175em) */
.prio-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "word lead" "dots .";
  column-gap: var(--prio-gap);
  align-items: end;
  font-size: clamp(100px, 11.1vw, 160px);
}
.prio-word {
  grid-area: word;
  font-size: 1em; /* an h2 is 1.5em by default */
  line-height: 0.9;
  color: var(--ink-k100);
}
.prio-lead-strip {
  grid-area: lead;
  margin-bottom: 4px;
  font-size: clamp(24px, 2.36vw, 34px);
  line-height: 1.25;
}
.prio-dots {
  grid-area: dots;
  align-self: start;
  font-size: 0.175em;
  margin: 0.97em 0 0 0.57em;
}
.prio-lead-body {
  display: none;
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.prio-body {
  display: flex;
  flex-direction: column;
  padding-block: var(--prio-top) var(--prio-bottom);
}
.prio-flow {
  display: flex;
  flex-direction: column;
  gap: var(--prio-row);
  margin-bottom: var(--prio-pre-close);
}
.prio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--prio-gap);
  align-items: start;
}
.prio-pledge {
  margin: 0;
  font-size: clamp(28px, 2.64vw, 38px);
  line-height: 1.1;
}
.prio-text {
  padding-top: 5px;
  font-size: clamp(17px, 1.39vw, 20px);
  line-height: 1.6;
}
.prio-text p { margin: 0; }
.prio-text p + p { margin-top: 1em; }
.prio-closing {
  max-width: 880px;
  margin: 0;
  font-size: clamp(36px, 3.61vw, 52px);
  line-height: 1.1;
  color: var(--ink-k100);
  text-wrap: balance;
}

@media (max-width: 900px) {
  .prio-strip-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "word" "dots";
    font-size: min(24.6vw, 104px);
  }
  .prio-lead-strip { display: none; }
  .prio-lead-body { display: block; }
  .prio-row { grid-template-columns: 1fr; row-gap: 16px; }
  .prio-text { padding-top: 0; }
}

/* ---------- Candidate page ---------- */

.person-link { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; }
/* Candidates with a page: the name is underlined (same cue as the other links), thicker on hover. */
.person-link .person-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.person-link:hover .person-name,
.person-link:focus-visible .person-name { text-decoration-thickness: 3px; }
.leaders-figures .person-link { display: block; }

/* The figure stands on the sky and ends at the top of the white text section. */
.cand-head { padding-bottom: 0; }
.cand-grid {
  display: grid;
  grid-template-columns: minmax(140px, 300px) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-top: clamp(24px, 4vw, 56px);
}
.cand-figure .figure { width: 100%; }
.cand-intro { padding-bottom: clamp(24px, 3vw, 48px); }
.cand-num { font-size: clamp(28px, 3.5vw, 48px); line-height: 1; }
.cand-name { font-size: clamp(36px, 6vw, 88px); line-height: 1; margin-top: 4px; }
.cand-facts { margin-top: 16px; font-size: clamp(18px, 1.6vw, 22px); }

.cand-body { background: var(--paper); padding-block: clamp(40px, 5vw, 72px) clamp(56px, 6vw, 96px); }
.cand-text { max-width: 40rem; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
.cand-text p, .cand-text ul { margin: 0 0 1.1em; }
.cand-text ul { padding-left: 1.2em; }
.cand-back { margin-top: clamp(32px, 4vw, 56px); font-size: clamp(20px, 2vw, 26px); }
.cand-back a { text-decoration: underline; text-underline-offset: 0.18em; }

@media (max-width: 700px) {
  .cand-grid { grid-template-columns: 1fr; row-gap: 0; }
  .cand-figure { width: min(60vw, 240px); }
}

.cand-empty { color: var(--ink-k100); font-style: italic; }
