@font-face {
  font-family: "Insula";
  src: url("../fonts/INSULA__.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Charter";
  src: url("../fonts/Charter.ttc");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #9c1f1f;
  --red-dark: #741717;
  --blue: #1100df;
  --white: #ffffff;
  --text: #5f1717;
  --content-width: 980px;
  --wide-width: 1200px;
  --focus: #ffcf33;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Charter", Georgia, "Times New Roman", serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--red);
}

a:hover {
  color: var(--red-dark);
}

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

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed !important;
  top: 12px;
  left: 12px;
  z-index: 100000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  clip: auto;
  background: var(--white);
  color: var(--red);
  font-weight: 700;
  white-space: normal;
}

.site-header-shell {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--white);
  box-shadow: 0 3px 12px rgba(54, 12, 12, 0.12);
}

.site-header {
  width: 100%;
  background: var(--red);
}

.header-inner {
  width: min(100% - 32px, var(--wide-width));
  min-height: 52px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.4vw, 6px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: 40px;
  max-height: 40px;
}

.site-nav {
  min-width: 0;
}

.main-menu,
.site-nav .menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 1.9vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu a,
.site-nav .menu a {
  font-family: "Insula", Georgia, "Times New Roman", serif;
  color: var(--white);
  text-decoration: none;
  font-size: clamp(0.86rem, 1.15vw, 1.05rem);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
}

.main-menu a:hover,
.main-menu .current-menu-item > a,
.site-nav .menu a:hover,
.site-nav .current_page_item > a {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.ornament {
  width: 100%;
  height: 32px;
  background-image: url("../images/graphics/vysivka.svg");
  background-repeat: repeat-x;
  background-position: left top;
  background-size: 36px 32px;
}

.ornament-top {
  margin-bottom: 0;
}

.ornament-bottom {
  margin-top: 0;
}

.page-content {
  width: min(100% - 48px, var(--content-width));
  margin: 0 auto;
  padding-top: clamp(28px, 4vw, 48px);
  text-align: center;
}

.page-title,
.red-title,
.contact-title,
.obrady-title,
.ritual-title,
.god-panel h2,
.cosmo-text h2 {
  font-family: "Insula", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.035em;
}

.page-title,
.red-title {
  margin: 0 0 36px;
  color: var(--red);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.15;
}

.blue-text {
  color: var(--blue);
  font-size: 1.08rem;
  line-height: 1.55;
}

.red-text {
  color: var(--red);
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.75;
}

.button-link {
  display: inline-block;
  padding: 11px 18px;
  border: 2px solid var(--red);
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}

.button-link:hover {
  background: var(--red);
  color: var(--white);
}

.home-logo {
  display: block;
  width: min(340px, 82vw);
  margin: 0 auto clamp(12px, 2vw, 24px);
}

/*
 * Logo na úvodní stránce už obsahuje název spolku. Nadpis H1 zůstává
 * v dokumentu pro správnou strukturu stránky, ale vizuálně se nezobrazuje.
 */
.home-page .home-hero .red-title {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-intro {
  max-width: 820px;
  margin: 0 auto clamp(34px, 4vw, 48px);
}

.home-red-text {
  max-width: 760px;
  margin: 0 auto clamp(32px, 4vw, 48px);
}

.wide-photo {
  display: block;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  aspect-ratio: 21 / 9;
  object-fit: cover;
}


/*
 * Úvodní fotografie a patička přes fotografii.
 * Původní fotografie vložená v obsahu úvodní stránky se skrývá, protože
 * její nová verze je součástí šablony těsně nad spodní výšivkou.
 */
.home-page .wide-photo,
.home-page img[src*="home-hero.jpg"] {
  display: none;
}

.home-page figure:has(> .wide-photo),
.home-page .wp-block-image:has(img[src*="home-hero.jpg"]) {
  display: none;
}

.home-photo-footer {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(460px, 64.6vw, 1000px);
  margin-top: clamp(28px, 4vw, 54px);
  overflow: hidden;
  background: #162016;
}

.home-photo-picture,
.home-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.home-photo {
  object-fit: cover;
  object-position: center 52%;
}

.home-photo-footer::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(7, 13, 8, 0) 48%,
    rgba(7, 13, 8, 0.15) 67%,
    rgba(7, 13, 8, 0.78) 100%
  );
}

.home-photo-overlay {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  padding: 72px clamp(18px, 3.5vw, 56px) 18px;
  color: var(--white);
}

.site-footer-photo {
  grid-column: 2;
  min-width: min(100%, 360px);
  margin: 0;
  padding: 0;
  color: var(--white);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.home-photo-credit {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  line-height: 1.2;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.content-list,
.error-page {
  min-height: 45vh;
  text-align: left;
}

.content-card {
  padding: 24px 0;
  border-bottom: 1px solid rgba(156, 31, 31, 0.25);
}

.content-card h2 {
  margin-top: 0;
}

.site-footer {
  margin-top: clamp(42px, 5vw, 70px);
  padding: 18px 20px 20px;
  color: var(--red);
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.home-photo-overlay .site-footer-photo {
  margin: 0;
  padding: 0;
  color: var(--white);
}

@media (max-width: 900px) {
  .header-inner {
    padding: 5px 0 6px;
    flex-direction: column;
    gap: 2px;
  }

  .site-logo img {
    width: 38px;
  }
}

@media (max-width: 760px) {
  .page-content {
    width: min(100% - 32px, var(--content-width));
  }

  .ornament {
    height: 26px;
    background-size: 30px 26px;
    background-position: left top;
  }

  .main-menu,
  .site-nav .menu {
    gap: 7px 13px;
  }

  .wide-photo {
    aspect-ratio: 4 / 3;
  }
}


@media (max-width: 640px) {
  .page-content {
    padding-top: 24px;
  }

  .home-photo-footer {
    height: 500px;
    margin-top: 24px;
  }

  .home-photo {
    object-position: 54% center;
  }

  .home-photo-overlay {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 92px 16px 14px;
  }

  .site-footer-photo,
  .home-photo-credit {
    grid-column: 1;
  }

  .site-footer-photo {
    justify-self: center;
  }

  .home-photo-credit {
    justify-self: end;
  }
}

/*
 * Omezení pohybu řešíme cíleně, nikoli plošným vypnutím všech animací.
 * Běžné přechody a záměrné animace webu zůstávají funkční.
 * Třídy níže lze použít u budoucích výrazných efektů, které mají být
 * při nastavení prefers-reduced-motion potlačeny.
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .motion-parallax,
  .motion-large-travel,
  .motion-flash,
  .motion-decorative-loop {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
