/* ==========================================================================
   Sdružení občanů pro Senohraby — sos-senohraby.cz
   Vizuál „Plakát“ — přímé pokračování tištěného letáku:
   červený pruh, těžké verzálky, program jako barevné pruhy.
   ========================================================================== */

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

:root {
  color-scheme: light;

  /* Značka — barvy odečtené z tištěného letáku */
  --red: #cc071d;
  --red-dark: #a20517;
  --red-wash: #fdf0f1;
  --blue: #03578e;
  --blue-dark: #023f69;

  /* Neutrály; --paper-2 je novinový papír, leták vyšel jako vklad
     do obecního zpravodaje */
  --ink: #14181e;
  --ink-2: #4b535d;
  --ink-3: #6f7883;
  --paper: #ffffff;
  --paper-2: #efeee9;
  --paper-3: #e5ebf1;
  --line: #d8dfe7;

  /* Jedenáct pilířů programu — barvy přesně podle letáku */
  --p1: #fecc00;
  --p2: #5ba028;
  --p3: #532513;
  --p4: #0f91b6;
  --p5: #003382;
  --p6: #95261b;
  --p7: #622180;
  --p8: #cc071d;
  --p9: #007237;
  --p10: #f08b00;
  --p11: #03578e;

  --font-body:
    "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-poster:
    "Archivo Black", "Source Sans 3", Impact, system-ui, sans-serif;

  --measure: 62ch;
  --radius-sm: 6px;

  --step--1: clamp(0.86rem, 0.83rem + 0.14vw, 0.94rem);
  --step-0: clamp(1.05rem, 1.01rem + 0.19vw, 1.16rem);
  --step-1: clamp(1.24rem, 1.16rem + 0.36vw, 1.46rem);
  --step-2: clamp(1.5rem, 1.34rem + 0.72vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.35vw, 2.7rem);
  --step-4: clamp(2.25rem, 1.66rem + 2.65vw, 3.9rem);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-poster);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
h3 {
  font-size: var(--step-1);
}

p {
  margin: 0;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--blue-dark);
}

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

.wrap {
  width: min(100% - 2.5rem, 66rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus {
  left: 0;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 1.05em;
}
.prose p {
  max-width: var(--measure);
  color: var(--ink-2);
}

/* --- Hlavička ------------------------------------------------------------ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--red);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: 0.7rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #fff;
  margin-inline-end: auto;
}
.brand__logo {
  width: 42px;
  flex: none;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
}
.brand__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step--1);
  line-height: 1.2;
  letter-spacing: -0.005em;
  max-width: 15ch;
  color: #fff;
}
.brand__name b {
  display: block;
  color: #ffd9dd;
  letter-spacing: 0.06em;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tlačítka na červeném pruhu — obrácená barevnost */
.masthead .btn {
  --btn-bg: #fff;
  --btn-fg: var(--red);
  --btn-bd: #fff;
}
.masthead .btn:hover {
  --btn-bg: #ffe4e7;
  --btn-bd: #ffe4e7;
  color: var(--red-dark);
}
.masthead .btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.55);
}
.masthead .btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.14);
  --btn-bd: #fff;
  color: #fff;
}

@media (max-width: 47.99rem) {
  .masthead {
    position: static;
  }
  .masthead__inner {
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }
  .brand {
    margin-inline-end: 0;
  }
  .masthead__nav {
    width: 100%;
  }
  .masthead__nav .btn {
    flex: 1 1 0;
  }
}

/* --- Tlačítka ------------------------------------------------------------ */

.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  --btn-bd: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72em 1.35em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-bd);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}
.btn:hover {
  --btn-bg: var(--red-dark);
  --btn-bd: var(--red-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
}
.btn--ghost:hover {
  --btn-bg: var(--paper-2);
  --btn-bd: var(--ink-3);
  color: var(--ink);
}
.btn--sm {
  padding: 0.5em 0.95em;
  font-size: var(--step--1);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.hero {
  padding-top: clamp(2.75rem, 6vw, 5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  background: var(--red);
  color: #fff;
}
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
}
.hero__text h1 {
  max-width: 12ch;
  color: #fff;
}
.hero .eyebrow {
  color: #ffc9cf;
}
.hero .lead {
  color: #ffe4e7;
}
.hero__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
}
.hero__logo {
  width: min(210px, 42vw);
  background: #fff;
  border-radius: 50%;
  padding: 1.2rem;
}
.hero .btn {
  --btn-bg: #fff;
  --btn-fg: var(--red);
  --btn-bd: #fff;
}
.hero .btn:hover {
  --btn-bg: #ffe4e7;
  --btn-bd: #ffe4e7;
  color: var(--red-dark);
}
.hero .btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.6);
}
.hero .btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.15);
  --btn-bd: #fff;
  color: #fff;
}

.ballot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}
.ballot__num {
  display: grid;
  place-items: center;
  width: 3.6em;
  height: 3.6em;
  font-family: var(--font-poster);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--red);
  background: #fff;
  border-radius: 50%;
}
.ballot__label {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc9cf;
  max-width: 9ch;
  line-height: 1.25;
}

/* --- Sekce --------------------------------------------------------------- */

.section {
  padding-block: clamp(2.75rem, 6vw, 4.75rem);
}
.section--tint {
  background: var(--paper-2);
}
.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

/* --- Kandidáti ----------------------------------------------------------- */

.team {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
@media (min-width: 56rem) {
  .team {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.team__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.team__figure img {
  width: 100%;
  box-shadow: 0 0 0 1px var(--line);
}
.team__figure figcaption {
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* --- Kandidáti: profily -------------------------------------------------- */

.cands {
  margin-top: clamp(2.25rem, 5vw, 3.25rem);
  padding-top: clamp(2rem, 4.5vw, 3rem);
  border-top: 3px solid var(--red);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4.5vw, 3rem);
}

/* Fotka vlevo, jméno vpravo od ní, text pod tím; na širokém displeji
   fotka drží celý levý sloupec. */
.cand {
  display: grid;
  grid-template-columns: clamp(7rem, 31vw, 9.5rem) minmax(0, 1fr);
  grid-template-areas:
    "photo head"
    "body  body";
  gap: 1rem 1.15rem;
  align-items: start;
  scroll-margin-top: 5.5rem;
}
@media (min-width: 48rem) {
  .cand {
    grid-template-columns: clamp(10rem, 19vw, 12.5rem) minmax(0, 1fr);
    /* Fotka drží oba řádky; přebytek výšky bere spodní řádek, aby se
       mezera mezi jménem a textem neroztahovala u kratších profilů. */
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "photo head"
      "photo body";
    column-gap: clamp(1.5rem, 3.5vw, 2.25rem);
    row-gap: 0.85rem;
  }
}
.cand + .cand {
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4.5vw, 3rem);
}

.cand__photo {
  grid-area: photo;
  position: relative;
  margin: 0;
}
.cand__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 12%;
  background: var(--paper-3);
  box-shadow: 0 0 0 1px var(--line);
}
/* Pořadí na kandidátce — kolečko jako číslo 2 na letáku */
.cand__num {
  position: absolute;
  top: -0.6rem;
  left: -0.6rem;
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-poster);
  font-size: var(--step--1);
  line-height: 1;
  box-shadow: 0 0 0 3px var(--paper-2);
}

.cand__head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-self: center;
}
@media (min-width: 48rem) {
  .cand__head {
    align-self: start;
  }
}
.cand__name {
  font-size: var(--step-1);
  text-wrap: balance;
}
.cand__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  font-size: var(--step--1);
  line-height: 1.35;
}
.cand__role {
  font-weight: 700;
  color: var(--red);
}
.cand__age {
  color: var(--ink-3);
}

.cand__body {
  grid-area: body;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cand__lead {
  max-width: var(--measure);
  color: var(--ink-2);
}

/* Zbytek profilu se rozbaluje na místě — všechno zůstává na jedné stránce. */
.cand__more {
  align-self: flex-start;
}
.cand__more > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35em 0;
  list-style: none;
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--blue);
}
.cand__more > summary::-webkit-details-marker {
  display: none;
}
.cand__more > summary::after {
  content: "";
  width: 0.46em;
  height: 0.46em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(45deg);
  transition: transform 0.16s ease;
}
.cand__more[open] > summary::after {
  transform: translateY(0.12em) rotate(-135deg);
}
.cand__more > summary:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}
.cand__more-close,
.cand__more[open] .cand__more-open {
  display: none;
}
.cand__more[open] .cand__more-close {
  display: inline;
}
.cand__bio {
  margin-top: 0.55rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--line);
}

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

/* --- Program: jedenáct pilířů jako barevné pruhy z letáku ---------------- */

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.pillars li {
  --c: var(--ink);
  display: inline-flex;
  align-items: center;
  padding: 0.45em 1.1em;
  background: var(--c);
  color: #fff;
  font-family: var(--font-poster);
  font-weight: 400;
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-align: center;
}
/* Na žluté a oranžové by bílý text v tisku držel obtah, na displeji ne — píšeme tmavě. */
.pillars li.is-light {
  color: var(--ink);
}

/* --- Poznámka „připravujeme“ --------------------------------------------- */

.note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
  padding: 1rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  color: var(--ink-2);
  font-size: var(--step--1);
  max-width: 68ch;
}
.note__tag {
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
  font-size: 0.86em;
  white-space: nowrap;
}

/* --- Sousedské setkání --------------------------------------------------- */

.meet {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .meet {
    grid-template-columns: auto minmax(0, 1fr);
  }
}
.meet__stamp {
  display: grid;
  place-content: center;
  justify-self: center;
  gap: 0.15rem;
  text-align: center;
  width: clamp(11rem, 26vw, 13.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  padding: 1rem;
}
.meet__day {
  font-family: var(--font-poster);
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 400;
  line-height: 0.95;
}
.meet__month {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--step--1);
}
.meet__year {
  font-size: var(--step--1);
  opacity: 0.82;
}
.meet__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.meet__body p {
  max-width: var(--measure);
  color: var(--ink-2);
}
.meet__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-weight: 600;
  color: var(--ink);
}
.meet__facts li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.meet__facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}

/* --- Kontakt ------------------------------------------------------------- */

.contact {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}
@media (min-width: 56rem) {
  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  }
}
.mailto {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--red);
  text-decoration: none;
  word-break: break-word;
}
.mailto:hover {
  color: var(--red-dark);
  text-decoration: underline;
}
.leaflet {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
}
.leaflet img {
  width: min(220px, 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

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

.footer {
  padding-block: 2.25rem;
  background: var(--ink);
  color: #c9d0d9;
  font-size: var(--step--1);
}
.footer a {
  color: #fff;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.footer__mark {
  width: 34px;
  flex: none;
}
.footer__left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
