/*
Theme Name: FSKLT Western
Theme URI:
Author: FSKLT
Description: Jednostránkový dramatický web FSKLT s glitch hero sekcí.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fsklt
*/

/* =========================================================
   CSS PROMĚNNÉ
   ========================================================= */
:root {
  --color-bg:       #e2d3b5;
  --color-illus:    #1b3822;
  --color-text:     #fa3178;
  --color-accent:   #f6c844;
  --color-white:    #ffffff;
  --color-muted:    rgba(246, 200, 68, 0.55);

  --font-headline:  'Protest Revolution', serif;
  --font-ui:        'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:      system-ui, -apple-system, 'Segoe UI', sans-serif;

  --nav-height:     4rem;
  --footer-bg:      #1b3822;
  --footer-text:    #f6c844;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--color-bg);
  color: var(--color-illus);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Vinětace – fixní překryv přes celou stránku, neklikovatelný */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 45%,
    rgba(120, 85, 40, 0.35) 100%
  );
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-illus);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* =========================================================
   NAVIGACE
   ========================================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3vw 3vw;
}

.site-nav__logo {
  font-family: var(--font-ui);
  font-size: 2.2rem;
  color: var(--color-illus);
}

.site-nav__logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* WP menu */
.site-nav .menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav .menu a {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-illus);
  transition: color 0.2s;
}

.site-nav .menu a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* =========================================================
   HERO SEKCE
   ========================================================= */
.hero {
  position: relative;
  width: 100vw;
  height: 100dvh;       /* dynamic viewport height – iOS Safari fix */
  min-height: 500px;
  overflow: hidden;
  background: var(--color-bg);
  cursor: pointer;      /* naznačí, že klik spustí audio */
}

/* ---- Slidy -------------------------------------------- */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  will-change: opacity, transform, filter;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  filter: saturate(0.4);
  object-position: center;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

/* ---- Text vrstva --------------------------------------- */
.hero__text {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 8vw;
  pointer-events: none;
  user-select: none;
  /* mix-blend-mode: difference;   /* blend vůči slidům (sdílený stacking context) */
}

.hero__text--top {
  align-items: flex-start;
  padding-top: calc(var(--nav-height) + 8vh);
}

.hero__text--bottom {
  align-items: flex-end;
  padding-bottom: 10vh;
}

/* Wrapper, do kterého JS vkládá slova – teče inline */
.hero__text-inner {
  text-align: center;
  max-width: min(88vw, 1100px);
  line-height: 1.1;
}

.hero__word {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: clamp(2rem, 9vw, 6.5rem);
  color: var(--color-text);               /* bílá = základ pro difference */
  line-height: 1.2;
  margin: 0 0.18em 0.1em 0;
  opacity: 0;
}

/* ---- Audio tlačítko ----------------------------------- */
.hero__audio-btn {
  position: absolute;
  bottom: 1.8rem;
  right: 2rem;
  z-index: 20;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.hero__audio-btn:hover {
  background: rgba(246, 200, 68, 0.2);
  transform: scale(1.08);
}

.hero__audio-btn .material-symbols-outlined {
  font-size: 1.4rem;
  line-height: 1;
}

/* Výchozí stav: přehrávání (volume_up viditelný, volume_off skrytý) */
.hero__audio-icon--off { display: none; }

/* Ztlumený stav */
.hero__audio-btn[data-muted="true"] .hero__audio-icon--on  { display: none; }
.hero__audio-btn[data-muted="true"] .hero__audio-icon--off { display: block; opacity: 0.55; }

/* ---- Scroll hint --------------------------------------- */
.hero__scroll-hint {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-illus);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
  pointer-events: none;
}

.hero__scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 2.5rem;
  background: var(--color-muted);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* =========================================================
   PATIČKA
   ========================================================= */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3rem;
  padding: 3rem 3vw 3rem;
  background: var(--color-text);
  color: var(--color-illus);
}

.footer__col-title {
  font-family: var(--font-illus);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--color-illus);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer__col p,
.footer__col address {
  font-size: 1.22rem;
  line-height: 1.4;
  font-style: normal;
}

.footer__col .menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col .menu a {
  font-size: 0.92rem;
  transition: color 0.2s;
}

.footer__col .menu a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer__bottom {
  grid-column: 1 / -1;
  padding-top: 2rem;
  text-align: end;
  font-size: 0.78rem;
  color: rgba(246, 200, 68, 0.4);
  letter-spacing: 0.05em;
}

/* =========================================================
   PODSTRÁNKA
   ========================================================= */
.page-wrap {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 5vw;
}

.page-content h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-illus);
  margin-bottom: 1.5rem;
}

.page-content h2, .page-content h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-accent);
  margin: 2rem 0 0.8rem;
}

.page-content p {
  margin-bottom: 1rem;
}

/* =========================================================
   RESPONSIVITA
   ========================================================= */
@media (max-width: 768px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 5vw 2rem;
  }

  .site-nav .menu {
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  .site-nav .menu a {
    font-size: 0.9rem;
  }

  .hero__audio-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.95rem;
  }
}

/* =========================================================
   REDUCED MOTION – přístupnost
   glitch nahrazen plynulým crossfade
   (JS čte tuto hodnotu přes matchMedia)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-hint {
    animation: none;
  }
}
