:root {
  --noc-0: #04060d;
  --noc-1: #0a1226;
  --noc-2: #16254f;
  --mesic: #f7efbf;
  --mesic-2: #f4dd6f;
  --text: #f3f4f8;
  --tlum: #aab2c8;
  --linka: rgba(247, 239, 191, 0.22);
  --sirka: 1120px;
  --pismo: "Sora", "Segoe UI", system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--pismo);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--noc-0);
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--noc-0) 0%, var(--noc-1) 45%, var(--noc-2) 100%);
}
#obloha { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
#mesic {
  position: fixed;
  right: 7vw;
  top: 72vh;
  width: clamp(120px, 26vmin, 300px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(244, 221, 111, 0.35));
  will-change: transform;
}
@media (max-width: 760px) { #mesic { display: none; } }

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 300; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.velky { font-size: clamp(1.15rem, 1.6vw, 1.4rem); max-width: 60ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preskocit { position: absolute; left: -999px; top: 8px; background: var(--mesic); color: var(--noc-0); padding: 8px 14px; z-index: 50; }
.preskocit:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--mesic-2); outline-offset: 3px; }

/* hlavička */
.hlavicka {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(4, 6, 13, 0.85), rgba(4, 6, 13, 0));
  transition: background-color 0.3s, box-shadow 0.3s;
}
.hlavicka.plna {
  background: rgba(4, 6, 13, 0.88);
  box-shadow: 0 1px 0 var(--linka);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.znacka img { width: 64px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 2.4vw, 34px); }
.menu a { text-decoration: none; font-size: 0.95rem; letter-spacing: 0.01em; opacity: 0.85; padding: 6px 0; border-bottom: 1px solid transparent; transition: opacity 0.2s, border-color 0.2s; }
.menu a:hover { opacity: 1; border-color: var(--mesic-2); }
.menu-prepinac { display: none; }
@media (max-width: 860px) {
  .menu-prepinac { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 1px solid var(--linka); border-radius: 50%; color: var(--text); cursor: pointer; position: relative; }
  .menu-prepinac span:first-child, .menu-prepinac span:first-child::before, .menu-prepinac span:first-child::after { display: block; width: 18px; height: 1.5px; background: currentColor; content: ""; position: absolute; left: 12px; }
  .menu-prepinac span:first-child { position: static; }
  .menu-prepinac span:first-child::before { top: 15px; }
  .menu-prepinac span:first-child::after { top: 26px; }
  .menu ul { position: absolute; right: 16px; top: 68px; flex-direction: column; gap: 0; background: rgba(10, 18, 38, 0.96); border: 1px solid var(--linka); border-radius: 12px; padding: 8px 0; min-width: 220px; display: none; }
  .menu ul a { display: block; padding: 10px 20px; border: 0; }
  .menu-otevrene .menu ul { display: flex; }
}

/* tlačítka */
.tlacitko {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border-radius: 999px;
  background: var(--mesic); color: var(--noc-0);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  box-shadow: 0 0 0 0 rgba(244, 221, 111, 0.4);
  transition: box-shadow 0.3s, transform 0.2s;
}
.tlacitko:hover { box-shadow: 0 0 34px 2px rgba(244, 221, 111, 0.35); transform: translateY(-1px); }
.tlacitko svg { width: 18px; height: 18px; }
.tlacitko.druhotne { background: transparent; color: var(--text); border: 1px solid var(--linka); }
.tlacitko.druhotne:hover { border-color: var(--mesic); box-shadow: none; }

/* úvod */
.uvod {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0 clamp(16px, 4vw, 48px) 6vh;
  position: relative; z-index: 1;
}
.znak { display: block; width: clamp(250px, 44vw, 600px); height: auto; overflow: visible; color: var(--text); margin-bottom: clamp(18px, 3vh, 34px); }
.mesic-o { filter: drop-shadow(0 0 36px rgba(244, 221, 111, 0.35)); animation: dych 7s ease-in-out infinite; }
.mesic-o + .mesic-o { animation-delay: -3.5s; }
@keyframes dych { 50% { filter: drop-shadow(0 0 80px rgba(244, 221, 111, 0.6)); } }
.uvod h1 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 300; letter-spacing: 0.02em; margin-bottom: 0.4em; }
.uvod-kdy { color: var(--mesic); font-weight: 400; font-size: 1.05rem; }
.uvod-text { max-width: 52ch; color: var(--tlum); margin: 0.5em auto 1.8em; }
.uvod-akce { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.dolu { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; color: var(--tlum); animation: kyv 2.6s ease-in-out infinite; }
.dolu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
@keyframes kyv { 50% { translate: -50% 8px; } }

/* bloky */
main { position: relative; z-index: 1; }
.blok { max-width: var(--sirka); margin: 0 auto; padding: clamp(56px, 9vh, 110px) clamp(16px, 4vw, 48px); }
.blok-hlava { margin-bottom: clamp(28px, 4vw, 48px); }
.blok-hlava.stred { text-align: center; }
.blok-hlava.stred .velky { margin-inline: auto; }
.sloupce { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 800px) { .sloupce { grid-template-columns: 1fr; } }
.foto-ramecek { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); position: relative; }
.foto-ramecek::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--linka); border-radius: inherit; pointer-events: none; }

.jak { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--linka); padding-top: 40px; }
@media (min-width: 1000px) { .jak { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .jak { grid-template-columns: 1fr; } }
.jak h3 { font-size: 1.05rem; color: var(--mesic); }
.jak p { color: var(--tlum); font-size: 0.98rem; }

/* program */
.program-sloupec { max-width: 760px; }
.program { list-style: none; margin: 0; padding: 0; position: relative; }
.program::before { content: ""; position: absolute; left: 19px; top: 24px; bottom: 24px; border-left: 1px dashed var(--linka); }
.program-polozka { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 0 0 36px; position: relative; }
.program-polozka:last-child { padding-bottom: 0; }
.hodiny { width: 40px; height: 40px; fill: var(--noc-1); stroke: var(--mesic); stroke-width: 1.2; stroke-linecap: round; }
.program .cas { display: block; color: var(--mesic); font-weight: 400; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.program h3 { font-size: 1.3rem; margin-bottom: 0.2em; }
.program .tema { margin-bottom: 0.3em; }
.program .kratce { color: var(--tlum); font-size: 0.95rem; margin: 0; }
.program details { margin-top: 8px; font-size: 0.95rem; color: var(--tlum); }
.program summary { cursor: pointer; color: var(--mesic); font-size: 0.88rem; }
.program details p { margin: 8px 0 0; }

/* ročníky */
.zalozky { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.zalozky [role="tab"] { font: inherit; font-weight: 400; font-size: 1.05rem; background: none; border: 1px solid var(--linka); color: var(--tlum); border-radius: 999px; padding: 8px 20px; cursor: pointer; transition: 0.2s; }
.zalozky [role="tab"][aria-selected="true"] { background: var(--mesic); color: var(--noc-0); border-color: var(--mesic); }
.zalozky [role="tab"]:hover:not([aria-selected="true"]) { border-color: var(--mesic); color: var(--text); }
.rocnik-hlava { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: 20px; }
.rocnik-hlava h3 { font-size: 1.6rem; font-weight: 300; margin: 0; }
.rocnik-datum { color: var(--tlum); margin: 0; }
.rocnik-foto { float: right; width: min(38%, 340px); margin: 0 0 24px 32px; border-radius: 14px; }
@media (max-width: 700px) { .rocnik-foto { float: none; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 0 24px; } }
.osoby { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 36px; }
.panely::after { content: ""; display: table; clear: both; }
.osoba { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.osoba .portret { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--linka); }
.osoba .portret + .portret { margin-top: -24px; }
.osoba h4 { margin-bottom: 0.15em; }
.osoba .tema { margin: 0 0 0.25em; font-weight: 400; }
.osoba .popis { color: var(--tlum); font-size: 0.93rem; margin: 0; }
.osoba .obor { display: inline-block; font-size: 0.75rem; color: var(--tlum); margin-top: 6px; padding-left: 12px; position: relative; }
.osoba .obor::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; border-radius: 50%; translate: 0 -50%; background: #8fb7ff; }
.osoba.obor-p .obor::before { background: var(--mesic-2); }
.osoba details { margin-top: 6px; font-size: 0.93rem; color: var(--tlum); }
.osoba summary { cursor: pointer; color: var(--mesic); font-size: 0.85rem; }
.osoba details p { margin: 8px 0 0; }

.historie { list-style: none; margin: clamp(56px, 8vw, 96px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; border-top: 1px solid var(--linka); padding-top: 36px; }
.historie .rok { color: var(--mesic); font-weight: 400; font-size: 1.6rem; display: block; margin-bottom: 4px; }
.historie h3 { font-size: 1.05rem; }
.historie p { color: var(--tlum); font-size: 0.95rem; margin: 0; }
.reference { margin: clamp(56px, 8vw, 96px) auto 0; max-width: 62ch; text-align: center; }
.reference p { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.5; font-weight: 300; }
.reference p::before { content: "„"; color: var(--mesic); }
.reference p::after { content: "“"; color: var(--mesic); }
.reference footer { color: var(--tlum); font-size: 0.95rem; }

/* média */
.media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
@media (max-width: 640px) { .media { grid-template-columns: 1fr; } }
.clanek .zdroj { color: var(--tlum); font-size: 0.85rem; margin-bottom: 8px; }
.clanek h3 { font-size: 1.1rem; }
.clanek h3 a { text-decoration: none; background: linear-gradient(var(--mesic), var(--mesic)) no-repeat 0 100% / 0 1px; transition: background-size 0.3s; }
.clanek h3 a:hover { background-size: 100% 1px; }
.clanek p:last-child { color: var(--tlum); font-size: 0.95rem; margin: 0; }

/* instagram */
.ig-mrizka { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.6vw, 18px); }
.ig-mrizka:empty { display: none; }
@media (max-width: 640px) { .ig-mrizka { grid-template-columns: repeat(2, 1fr); } }
.ig-post { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--linka); background: var(--noc-1); }
.ig-post img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.4s, opacity 0.3s; }
.ig-post:hover img { transform: scale(1.03); }
.ig-odkaz { margin-top: 28px; text-align: center; }

/* tým */
.tym { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 24px; }
.tym li { text-align: center; width: 180px; }
.tym img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: 0 0 0 1px var(--linka), 0 0 40px -10px rgba(244, 221, 111, 0.35); }
.tym h3 { font-size: 1.05rem; margin-bottom: 0.15em; }
.tym .role { color: var(--mesic); font-size: 0.9rem; margin: 0; }
.tym .skola { color: var(--tlum); font-size: 0.85rem; margin: 0; }
@media (max-width: 480px) {
  .tym { gap: 28px 12px; }
  .tym li { width: calc(50% - 6px); }
  .tym img { width: 96px; height: 96px; }
}

/* partneři: jeden světlý panel, aby barevná loga nezanikla na noční obloze */
.partneri {
  list-style: none; margin: 0 auto; padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 40px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 3.5vw, 44px) clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, #fbf7e4, var(--mesic));
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 30px 90px -40px rgba(244, 221, 111, 0.45);
  color: #1b2340;
}
.partneri li { width: 200px; text-align: center; }
.partneri a { display: block; text-decoration: none; border-radius: 12px; transition: transform 0.2s; }
.partneri a:hover { transform: translateY(-2px); }
.partneri a:focus-visible { outline-color: #1b2340; }
.partneri .logo { position: relative; height: 84px; margin-bottom: 12px; display: grid; place-items: center; }
.partneri .logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.partneri .logo-text { color: #1b2a55; font-weight: 600; font-size: 1.15rem; }
.partneri p { font-size: 0.88rem; line-height: 1.4; margin: 0; color: #2a3254; }
.partneri small { color: #5b6280; }
@media (max-width: 520px) {
  .partneri { gap: 28px 12px; }
  .partneri li { width: calc(50% - 6px); }
  .partneri .logo { height: 64px; }
}
.osoba .portrety { display: flex; flex-direction: column; align-items: center; }

/* kontakt */
.kontakt { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .kontakt { grid-template-columns: 1fr; } }
.kontakt-hlavni .tlacitko { margin: 6px 0 18px; }
.socialni { display: flex; gap: 20px; }
.socialni a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--tlum); }
.socialni a:hover { color: var(--text); }
.socialni svg { width: 20px; height: 20px; }
.lide { list-style: none; margin: 0; padding: 0; }
.lide li { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; padding: 14px 0; border-top: 1px solid var(--linka); }
.lide strong { font-weight: 600; }
.lide span { color: var(--tlum); font-size: 0.9rem; grid-column: 1; }
.lide a { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--mesic); text-decoration: none; font-size: 0.95rem; }
@media (max-width: 480px) { .lide li { grid-template-columns: 1fr; } .lide a { grid-column: 1; grid-row: auto; } }

.paticka { text-align: center; padding: 48px 16px 40px; color: var(--tlum); font-size: 0.9rem; border-top: 1px solid var(--linka); max-width: var(--sirka); margin: 40px auto 0; position: relative; z-index: 1; }
.paticka p { margin: 4px 0; }
.paticka .autor { margin-top: 14px; font-size: 0.8rem; }
.paticka a { text-underline-offset: 3px; }

/* podstránky */
.podstranka .zpet { color: var(--tlum); text-decoration: none; font-size: 0.95rem; }
.podstranka .zpet:hover { color: var(--text); }
.text-stranka { max-width: 760px; min-height: 60vh; }
.text-stranka h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 300; margin-bottom: 0.6em; }
.text-stranka h2 { font-size: 1.3rem; font-weight: 600; margin: 2em 0 0.5em; }
.text-stranka p { color: var(--tlum); }
.text-stranka p.velky { color: var(--text); }
.text-stranka a:not(.tlacitko) { color: var(--mesic); }
.text-stranka .aktualizace { margin-top: 3em; font-size: 0.9rem; }

/* odhalení při scrollu (jen kde to prohlížeč umí, bez pohybu při reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes odhal { from { opacity: 0; translate: 0 28px; } }
    .odhal { animation: odhal 0.8s ease-out both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .mesic-o, .dolu { animation: none; }
  .ig-post img, .hlavicka { transition: none; }
}
