/* LRŠ Polaris – nočná obloha.
   Jeden spoločný prvok: hviezdy, ktoré zablysnú a spoja sa do súhvezdia.
   Hĺbku dáva 3D obloha (WebGL), zrnitosť filmu a obsah, ktorý pri scrollovaní prilieta z diaľky. */

:root {
  --night: #030816;
  --navy: #08374f;
  --orange: #f0810f;
  --accent-rgb: 240, 129, 15;   /* tá istá farba po zložkách – pre priesvitné odtiene */
  --heading-rgb: 205, 220, 255; /* nádych nadpisov z hviezd */
  --bg-top: #050d22;
  --starlight: #eef3ff;
  --warm: #ffc78f;
  --text: #dfe6f3;
  --muted: #9fb0cf;
  --faint: rgba(173, 196, 255, 0.18);
  --line: rgba(200, 216, 255, 0.5);
  --star: #fff1d6;
  --font: 'Jost', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 400;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(8, 55, 79, 0.6), transparent 70%),
    radial-gradient(ellipse 70% 55% at 0% 100%, rgba(40, 26, 84, 0.35), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--night) 55%, #01030a 100%);
  background-attachment: fixed;
}

/* Lenis – plynulé scrollovanie */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 4px; }

/* preskočenie na obsah: ukáže sa až pri ovládaní klávesnicou */
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  color: #1c0d00; background: var(--orange); transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

#sky { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.7s ease; }
/* obloha sa plynulo rozsvieti, keď je nakreslená – žiadne preblesknutie pri načítaní */
.sky-ready #sky { opacity: 1; }

/* zrnitosť ako na fotke oblohy s dlhou expozíciou – ruší „plochý“ digitálny dojem */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: calc(0.03 * var(--grain-k, 1));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

mark.todo {
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--warm);
  border-bottom: 1px dashed rgba(var(--accent-rgb), 0.7);
  border-radius: 2px;
  padding: 0 3px;
}

/* ---------- Hviezda a súhvezdie (spoločný prvok) ---------- */
/* bez mix-blend-mode: na tmavej oblohe vyzerá rovnako, ale prehliadač nemusí každú hviezdu skladať zvlášť */
.cs image { pointer-events: none; }
/* záblesk svieti len počas animácie; po prekreslení (napr. otočenie telefónu) ostane skrytý */
.cs-flare { opacity: 0; }
/* spojnice jemne žiaria, ako svetelná stopa */
/* (bez filtra drop-shadow: pri kreslení čiar ho prehliadač musel každý snímok prepočítať – čiary sú namiesto toho o niečo jasnejšie) */
.cs-line {
  fill: none;
  opacity: var(--line-k, 1);
  stroke: var(--line);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.cs-host { position: relative; isolation: isolate; }
.cs-overlay {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.cs-overlay .cs-line { stroke: rgba(200, 216, 255, 0.32); stroke-width: 1; }
.cs-anchor { display: block; width: 12px; height: 12px; }

/* nápis sa ukáže až ako súhvezdie – obyčajný text pred vykreslením neprebleskne */
[data-star-text]:not(.st) { visibility: hidden; }

/* ---------- Písmo-súhvezdie ---------- */
.st { line-height: 1.5; margin: 0; font-weight: normal; }
.st-word { overflow: visible; max-width: 100%; } /* dlhé slovo sa na úzkom displeji zmenší, nevytečie zo stránky */
.st-word:not(:last-child) { margin-right: 0.42em; }
.st-lines .cs-line { stroke: rgba(var(--heading-rgb), 0.72); }
/* logo z hviezd v nadpise – farby loga */
.st-lines .cs-line--orange { stroke: rgba(var(--accent-rgb), 0.85); }
.st-lines .cs-line--white { stroke: rgba(255, 255, 255, 0.8); }
.st-fill { stroke: none; pointer-events: none; }
.st-fill--orange { fill: rgba(var(--accent-rgb), 0.3); }
.st-fill--white { fill: rgba(255, 255, 255, 0.2); }

/* teplé (oranžové) nápisy: LRŠ a krédo */
.st-lrs .cs-line, .st-motto .cs-line, .st-footer-motto .cs-line, .st-menu-motto .cs-line, .st-dir .cs-line {
  stroke: rgba(var(--accent-rgb), 0.9);
}

/* ---------- Úvodná stránka ---------- */
.home { overflow: hidden; height: 100vh; height: 100dvh; }

.logo-corner {
  position: fixed; top: 20px; left: 24px; z-index: 4;
  border-radius: 50%;
}
.logo-corner img {
  display: block; width: 52px; height: 52px; border-radius: 50%;
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.28);
}

/* Facebook, Instagram, mail – pod sebou pozdĺž ľavej hrany, pod logom */
.socials {
  position: fixed; top: 92px; left: 24px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 52px;
  animation: fadeIn 0.75s ease 0.9s both;
}
.socials a {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #dbe3f3;
  background: rgba(3, 8, 22, 0.45);
  box-shadow: 0 0 0 1px rgba(200, 216, 255, 0.22);
  transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.socials a:hover, .socials a:focus-visible {
  color: var(--orange);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.7), 0 0 22px rgba(var(--accent-rgb), 0.35);
  transform: translateY(-1px);
}
.socials svg { width: 20px; height: 20px; }

.home-title {
  position: fixed; z-index: 3; left: 0; right: 0;
  top: clamp(36px, 5.5vh, 68px);
  text-align: center;
  pointer-events: none;
  padding: 0 84px; /* vľavo sú ikonky sociálnych sietí */
}
.home-title h1 {
  --cap: calc(min(calc((100vw - 190px) / 6.95), 12vh, 108px) * var(--title-k, 1));
  margin: 0; font-weight: normal;
}
.st-lrs { display: block; font-size: calc(var(--cap) * 0.42); }
.st-polaris { display: block; font-size: var(--cap); line-height: 1.4; }
.st-motto { font-size: clamp(22px, 2.8vw, 34px); margin-top: 0.1em; }
#constellation {
  position: fixed; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  overflow: visible;
  transform-origin: var(--warp-x, 50%) var(--warp-y, 50%);
  transition: transform calc(0.52s * var(--warp-k, 1)) cubic-bezier(.6, 0, .9, .4), opacity calc(0.45s * var(--warp-k, 1)) ease;
}
.umi-lines .cs-line { stroke: rgba(var(--heading-rgb), 0.62); stroke-width: 1.3; }

.star { cursor: pointer; outline: none; }
.star .hit { fill: transparent; }
.star .label {
  fill: var(--label, #e6ecf7);
  font-family: var(--font);
  font-size: calc(25px * var(--label-k, 1));
  font-weight: 500;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: rgba(3, 8, 22, 0.85);
  stroke-width: 4px;
  transition: fill 0.25s ease;
}
.star--polaris .label { font-size: calc(30px * var(--label-k, 1)); font-weight: 600; }
.star--polaris .cs { color: #fff6e4; }
.star:hover .label, .star:focus-visible .label { fill: var(--orange); }
.star:focus-visible .hit { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 4; }

/* malá obrazovka: súhvezdie vľavo, vpravo zoznam veľkých odkazov spojených čiarou so svojou hviezdou */
#constellation .star-row .label { font-size: calc(21px * var(--label-k, 1)); font-weight: 600; }
.row-dot { fill: var(--orange); }
.leader { fill: none; stroke: rgba(var(--heading-rgb), 0.42); stroke-width: 1; stroke-dasharray: 2 5; stroke-linecap: round; }
.star-row:active .label { fill: var(--orange); }
.star-row:active .hit { fill: rgba(var(--accent-rgb), 0.12); }

body.warp #constellation { transform: scale(6); opacity: 0; }
body.warp #sky { transition: transform calc(0.6s * var(--warp-k, 1)) cubic-bezier(.6, 0, .9, .4), opacity calc(0.45s * var(--warp-k, 1)) ease 0.08s; transform: scale(1.4); opacity: 0; }
body.warp .socials, body.warp .home-title, body.warp .logo-corner, body.warp .menu-btn {
  transition: opacity 0.3s ease; opacity: 0;
}

/* ---------- Menu ---------- */
.menu-btn {
  position: fixed; top: 24px; right: 24px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 4px 8px 12px;
  font: italic 1.05rem var(--font);
  color: var(--text);
  background: none; border: 0;
  cursor: pointer;
}
.menu-btn:hover { color: var(--orange); }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 1.5px; background: currentColor;
  transition: transform 0.25s ease;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 20;
  display: flex; justify-content: flex-end;
  background: linear-gradient(90deg, rgba(1, 4, 12, 0.35), rgba(2, 6, 18, 0.97) 62%);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease;
}
.lite .menu {
  backdrop-filter: none; /* rozmazanie živej oblohy je na slabších zariadeniach drahé */
  background: linear-gradient(90deg, rgba(1, 4, 12, 0.55), rgba(2, 6, 18, 0.98) 58%);
}
.menu[hidden] { display: none; }
.menu-inner {
  width: min(440px, 100%);
  overflow-y: auto;
  padding: 110px 48px 40px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.menu-list a {
  display: flex; align-items: center; gap: 22px;
  padding: 6px 0;
  font-size: 1.65rem; line-height: 1.2;
  text-decoration: none;
  color: #cfd8ea;
  transition: color 0.2s ease;
}
.menu-list a:hover, .menu-list a:focus-visible { color: #fff; }
.menu-list a[aria-current] { color: var(--orange); }
.menu-list .cs-anchor { flex-shrink: 0; }
.menu-foot { display: flex; align-items: center; gap: 16px; }
.menu-foot img { width: 46px; height: 46px; border-radius: 50%; }
.st-menu-motto { font-size: 22px; }
/* nenápadný odkaz do redakcie */
.menu-login { display: inline-block; margin-top: 22px; font-size: 0.8rem; color: var(--muted); opacity: 0.55; text-decoration: none; }
.menu-login:hover, .menu-login:focus-visible { opacity: 1; color: var(--text); text-decoration: underline; }

/* ---------- Podstránka ---------- */
.detail { overflow-x: hidden; }

/* jemné stmavenie oblohy za textom, bez ostrých hrán */
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--veil-k, 1);
  background: linear-gradient(90deg, rgba(3, 8, 22, 0.78) 0%, rgba(3, 8, 22, 0.55) 55%, rgba(3, 8, 22, 0.15) 100%);
}

.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 28px;
  padding: 16px var(--gutter);
  background: linear-gradient(180deg, rgba(3, 8, 22, 0.96) 0%, rgba(3, 8, 22, 0.85) 70%, rgba(3, 8, 22, 0));
}
.topbar .menu-btn { position: static; }
.brand {
  display: flex; align-items: center; gap: 12px; margin-right: auto;
  text-decoration: none; font-weight: 600; font-size: 1.1rem;
}
.brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.25); }
.back { font-style: italic; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

/* obsah využíva celú šírku monitora (do 1680 px), po stranách ostáva len okraj */
.topbar, .page { --gutter: max(clamp(20px, 4.5vw, 96px), calc((100% - var(--page-w, 1680px)) / 2)); }
.page {
  position: relative; z-index: 3;
  padding: 0 var(--gutter) 40px;
}

/* úvod podstránky: výšku určuje obsah – keď chýba úvodný text, neostáva po ňom prázdne miesto */
.hero { padding-top: clamp(48px, 11vh, 130px); }
.st-h1 { font-size: calc(clamp(36px, 5.6vw, 78px) * var(--h1-k, 1)); line-height: 1.6; }
.lead { margin: 20px 0 0; font-size: 1.3rem; line-height: 1.6; max-width: 44em; color: var(--text); }
/* bloky – bez rámčekov, len text na oblohe */
.block { margin-top: calc(clamp(64px, 8vw, 120px) * var(--gap-k, 1)); }
.st-h2 { font-size: calc(clamp(30px, 3.4vw, 42px) * var(--h2-k, 1)); line-height: 1.6; margin-bottom: 0.7em; }
.block p { margin: 0 0 1em; max-width: 78ch; line-height: 1.8; color: var(--text); }
.block p:last-child { margin-bottom: 0; }
/* dlhé slovo či adresa bez medzier sa zalomí, nevytečie zo svojho miesta (napr. poza fotku vedľa) */
.block p, .block li, .block h3, .block dd, .block dt, .block summary, .block blockquote, .lead { overflow-wrap: anywhere; }
.team-text, .team li > *, .points li, .timeline li, .news li, .facts > div { min-width: 0; }
.block strong { color: var(--strong, #fff); font-weight: 600; }
.block h3 { margin: 0 0 0.35em; font-size: 1.2rem; font-weight: 600; color: var(--strong, #fff); line-height: 1.35; }

.points {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 52px 64px;
}
.points li { padding-left: 0; }
.points p { font-size: 1rem; line-height: 1.7; }

.trail { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: n; }
.trail li { position: relative; padding-left: 30px; line-height: 1.7; }
.trail:not(.trail--num) li::before {
  content: '✦'; position: absolute; left: 0; top: 0.05em;
  color: var(--orange); font-size: 0.9rem;
}
.trail--num li { counter-increment: n; padding-left: 34px; }
.trail--num li::before {
  content: counter(n); position: absolute; left: 0; top: 0;
  color: var(--orange); font-style: italic; font-weight: 600; font-size: 1.15rem; line-height: 1.5;
}

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 40px 56px; }
.timeline li { position: relative; padding-left: 22px; border-left: 2px solid rgba(var(--accent-rgb), 0.45); }
.timeline h3 { font-size: 1.35rem; }
.tl-date { margin-left: 10px; font-weight: 400; font-style: italic; font-size: 1rem; color: var(--orange); }

.facts { margin: 0; display: flex; flex-wrap: wrap; gap: 28px 64px; }
.facts > div { padding-left: 16px; border-left: 2px solid rgba(var(--accent-rgb), 0.45); }
.facts dt { font-size: 0.9rem; font-style: italic; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--strong, #fff); }

/* tím: fotka vľavo, text vpravo – každý člen v novom riadku */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px; }
.team li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 32px; align-items: center; }
.avatar {
  width: 168px; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(30, 90, 120, 0.95), rgba(4, 12, 28, 0.98) 70%);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.45), 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 199, 143, 0.12);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-img--empty { width: 44%; height: auto; opacity: 0.5; border-radius: 50%; }
.team h3 { font-size: 1.35rem; }
.block .role { margin: -0.2em 0 0.6em; font-style: italic; color: var(--orange); }
.team p { font-size: 1.05rem; line-height: 1.7; }

/* galéria */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px;
}
.gallery li {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px;
  background: rgba(8, 20, 44, 0.6);
  box-shadow: 0 0 0 1px rgba(200, 216, 255, 0.14);
}
.gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery li:hover .gallery-img:not(.gallery-img--empty) { transform: scale(1.04); }
.gallery-empty { display: grid; place-items: center; border: 1px dashed rgba(var(--accent-rgb), 0.5); }
.gallery-img--empty { width: 56px; height: 56px; opacity: 0.35; border-radius: 50%; }

.text-link { color: var(--warm); text-decoration-color: rgba(var(--accent-rgb), 0.6); text-underline-offset: 3px; }
.text-link:hover { color: var(--orange); }
.text-link mark.todo { background: none; border: 0; padding: 0; }

/* citáty */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 56px; }
.quotes figure { margin: 0; }
.quotes blockquote { margin: 0 0 14px; font-style: italic; font-size: 1.3rem; line-height: 1.55; color: var(--strong, #fff); }
.quotes blockquote::before { content: '„'; color: var(--orange); }
.quotes figcaption { color: var(--muted); font-size: 0.95rem; }

/* tlačidlo */
.btn {
  position: relative;
  display: inline-block; margin-top: 22px;
  padding: 13px 28px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  color: #1c0d00; background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 78%, #fff), var(--orange));
  box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.btn:hover, .btn:focus-visible { box-shadow: 0 0 56px rgba(var(--accent-rgb), 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.btn--todo { background: none; color: var(--warm); border: 1px dashed var(--orange); box-shadow: none; cursor: help; }
.btn--todo:hover { box-shadow: none; transform: none; }


/* video a mapa – načítajú sa až po kliknutí */
.embed { position: relative; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(20, 60, 100, 0.55), rgba(4, 10, 26, 0.92)); box-shadow: 0 0 0 1px rgba(200, 216, 255, 0.16); }
.embed--map { aspect-ratio: 16 / 10; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-load { position: absolute; inset: 0; width: 100%; display: grid; place-content: center; justify-items: center; gap: 6px;
  font: 600 1.15rem var(--font); color: #fff; background: none; border: 0; cursor: pointer; }
.embed-load small { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.embed-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 6px; border-radius: 50%; font-size: 1.6rem; color: #1c0d00;
  background: var(--orange); box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.45); transition: transform 0.2s ease; }
.embed-load:hover .embed-icon, .embed-load:focus-visible .embed-icon { transform: scale(1.08); }
.block .embed-caption { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.block--center .embed { margin-left: auto; margin-right: auto; }
.block--right .embed { margin-left: auto; }

/* časté otázky */
.faq { display: grid; gap: 10px; max-width: 78ch; }
.faq details { padding: 14px 18px; border-radius: 12px; background: rgba(6, 16, 36, 0.6); box-shadow: 0 0 0 1px rgba(200, 216, 255, 0.14); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; color: var(--strong, #fff); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; }
.block--center .faq { margin-left: auto; margin-right: auto; text-align: left; }

/* novinky */
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.news li { padding-left: 22px; border-left: 2px solid rgba(var(--accent-rgb), 0.45); }
.news time { display: block; margin-bottom: 4px; font-size: 0.9rem; font-style: italic; color: var(--orange); }
.block--cols .news { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
@media (max-width: 700px) { .block--cols .news { grid-template-columns: 1fr; } }

/* samostatný obrázok a prázdne miesto */
.figure { margin: 0; }
.figure img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px rgba(200, 216, 255, 0.14), 0 14px 50px rgba(0, 0, 0, 0.45); }
.figure--small { max-width: 360px; }
.figure--medium { max-width: 680px; }
.figure figcaption { margin-top: 10px; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.space { width: 100%; }

/* zarovnanie obsahu bloku (nastavuje sa v redakcii) */
.block--center { text-align: center; }
.block--center p, .block--center .figure, .block--center .trail { margin-left: auto; margin-right: auto; }
.block--center .facts, .block--center .team li { justify-content: center; }
.block--center .trail { width: fit-content; text-align: left; }
.block--right { text-align: right; }
.block--right p, .block--right .figure { margin-left: auto; }
.block--right .facts { justify-content: flex-end; }
.block--right .trail { width: fit-content; margin-left: auto; text-align: left; }

/* zarovnanie nadpisu bloku */
.block--head-center > .st-h2 { text-align: center; }
.block--head-right > .st-h2 { text-align: right; }
/* počet stĺpcov položiek (kartičky, termíny, tím, galéria, citáty, údaje) */
.block--cols .points, .block--cols .timeline, .block--cols .team, .block--cols .gallery, .block--cols .quotes, .block--cols .facts {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
/* tím: fotka vpravo od textu */
.block--media-right .team li { grid-template-columns: minmax(0, 1fr) 168px; }
.block--media-right .avatar { order: 2; }
.block--media-right .team-text { text-align: right; }
@media (max-width: 700px) {
  .block--cols .points, .block--cols .timeline, .block--cols .team, .block--cols .quotes, .block--cols .facts { grid-template-columns: 1fr; }
  .block--cols .gallery { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); }
  .block--media-right .team li { grid-template-columns: minmax(0, 1fr) 96px; }
}

/* široký monitor: nadpis bloku vľavo, obsah vpravo – stránka je roztiahnutá na celú plochu */
@media (min-width: 1100px) {
  .block {
    display: grid; grid-template-columns: minmax(240px, 28%) minmax(0, 1fr);
    column-gap: clamp(40px, 5vw, 96px); align-items: start;
  }
  .block > * { grid-column: 2; }
  .block > .st-h2 { grid-column: 1; grid-row: 1 / span 20; margin-bottom: 0; position: sticky; top: 96px; }
  .block > .btn { justify-self: start; }
  .block--center > .btn { justify-self: center; }
  .block--right > .btn { justify-self: end; }
  /* nadpis nad obsahom: blok ide na celú šírku */
  .block--top { display: block; }
  .block--top > .st-h2 { position: static; margin-bottom: 0.7em; }
  /* nadpis vpravo od obsahu */
  .block--headright { grid-template-columns: minmax(0, 1fr) minmax(240px, 28%); }
  .block--headright > * { grid-column: 1; }
  .block--headright > .st-h2 { grid-column: 2; }
}

/* predošlá / ďalšia časť – šípky */
.pager {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: calc(clamp(64px, 8vw, 120px) * var(--gap-k, 1));
}
.pager-link {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px; border-radius: 999px;
  text-decoration: none;
  background: rgba(6, 16, 36, 0.7);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.5), 0 0 24px rgba(var(--accent-rgb), 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pager-link--next { margin-left: auto; text-align: right; padding: 10px 10px 10px 22px; }
.pager-arrow {
  flex-shrink: 0; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: #1c0d00; background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 78%, #fff), var(--orange));
}
.pager-arrow svg { width: 22px; height: 22px; }
.pager-link--prev .pager-arrow svg { transform: rotate(180deg); }
.pager-text { display: flex; flex-direction: column; gap: 1px; }
.pager-link small { font-size: 0.85rem; font-style: italic; color: var(--muted); }
.pager-link .pager-text span { font-size: 1.2rem; font-weight: 600; color: #fff; transition: color 0.2s ease; }
.pager-link:hover, .pager-link:focus-visible {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.9), 0 0 36px rgba(var(--accent-rgb), 0.35);
  transform: translateY(-1px);
}
.pager-link:hover .pager-text span { color: var(--warm); }

/* pätička */
.site-footer {
  position: relative; z-index: 3;
  padding: 100px 24px 120px;
  text-align: center;
}
.footer-logo { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.3); }
.st-footer-motto { font-size: 30px; margin-top: 10px; }
.footer-name { margin: 6px 0 0; color: var(--muted); font-style: italic; }
.footer-contact { margin: 18px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; font-size: 0.98rem; }
.footer-contact a { color: var(--muted); }
.footer-contact a:hover { color: var(--orange); }
.footer-copy { margin: 32px auto 0; max-width: 60ch; font-size: 0.85rem; color: var(--muted); opacity: 0.7; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Tablet / mobil ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 24px; }
  .veil { background: rgba(3, 8, 22, 0.6); }
}

@media (max-width: 700px) {
  .logo-corner { top: 14px; left: 16px; }
  .logo-corner img { width: 44px; height: 44px; }
  .menu-btn { top: 16px; right: 12px; }
  .home-title { top: 74px; padding: 0 60px; }
  .home-title h1 { --cap: calc(min(calc((100vw - 120px) / 6.1), 12vh, 108px) * var(--title-k, 1)); }
  .star .label { font-size: calc(19px * var(--label-k, 1)); }
  .star--polaris .label { font-size: calc(23px * var(--label-k, 1)); }
  .socials { top: 70px; left: 16px; width: 44px; gap: 10px; }
  .socials a { width: 36px; height: 36px; }
  .socials svg { width: 18px; height: 18px; }

  .topbar { padding: 10px 16px; gap: 16px; }
  .topbar .back { display: none; }
  .page { padding: 0 20px 24px; }
  .st-h1 { font-size: calc(clamp(26px, 8.4vw, 44px) * var(--h1-k, 1)); }
  .st-h2 { font-size: calc(clamp(22px, 6.6vw, 32px) * var(--h2-k, 1)); }
  .lead { font-size: 1.15rem; }
  .menu { background: rgba(2, 6, 18, 0.97); }
  .menu-inner { padding: 90px 32px 32px; }
  .menu-list a { font-size: 1.45rem; }
  .pager-link .pager-text span { font-size: 1.05rem; }
  .pager-link { padding-right: 16px; gap: 10px; }
  .pager-link--next { padding: 10px 10px 10px 16px; }
  .pager-arrow { width: 38px; height: 38px; }
  .team li { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; }
  .avatar { width: 96px; }
}

/* telefón na šírku – málo výšky */
@media (max-height: 520px) and (orientation: landscape) {
  .logo-corner { top: 12px; left: 16px; }
  .logo-corner img { width: 40px; height: 40px; }
  .socials { top: 62px; left: 16px; width: 40px; gap: 8px; }
  .socials a { width: 34px; height: 34px; }
  .socials svg { width: 17px; height: 17px; }
  .menu-btn { top: 12px; right: 12px; }
  .home-title { top: 10px; }
  .home-title h1 { --cap: calc(min(13vh, 60px) * var(--title-k, 1)); }
  .st-polaris { line-height: 1.25; }
  .st-motto { font-size: clamp(15px, 5.5vh, 24px); margin-top: 0; }
  .star .label { font-size: calc(17px * var(--label-k, 1)); }
  .star--polaris .label { font-size: calc(20px * var(--label-k, 1)); }
  .topbar { padding: 8px 16px; }
}

/* ---------- 404 – stratený na oblohe ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; }
.lost-page {
  position: relative; z-index: 3;
  max-width: 560px; padding: 40px 24px;
  text-align: center;
}
.lost-logo { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.3); }
.lost-page .st-h1 { margin: 18px 0 8px; }
.lost-page p { line-height: 1.7; color: #d5ddec; }

.star--decor { cursor: default; pointer-events: none; }
