/* ============================================================
   YGGDRASIL VALGARD V2 - zaklad (paleta, reset, header, paticka)
   Stavba podle strukturalniho vzoru baldursgate3.game
   ============================================================ */

:root {
  --color-bg: #000000;
  --color-bg-alt: #000000;
  --color-surface: rgba(19, 26, 29, 0.55);
  --color-surface-solid: #10161a;
  --color-border: rgba(160, 215, 225, 0.25);
  --color-ice: #bfe6f0;
  --color-ice-bright: #e6f6fb;
  --color-aurora: #2f8f66;
  --color-aurora-bright: #5fe0a8;
  --color-text: #e6f0ee;
  --color-text-muted: #9bb0ac;
  --font-heading: 'Cinzel', serif;
  --font-body: 'EB Garamond', serif;
  --header-height: 76px;
  --header-height-scrolled: 56px;
  --max-width: 1240px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-ice);
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---- Ornate box: nahrada za stare zlate ramecky s plameny ---- */
.ygg-box {
  position: relative;
  box-sizing: border-box;
  background-color: rgba(5, 8, 10, 0.00);
  border-style: solid;
  border-color: transparent;
  border-width: 90px 70px 60px 70px;
  border-image-source: var(--ygg-box-corner-img);
  border-image-slice: 300 340 210 340;
  border-image-width: 90px 70px 60px 70px;
  border-image-outset: 0;
  border-radius: 0;
  padding: 24px 16px;
}

/* ============================================================
   HEADER - tenka sticky lista, logo vlevo, nav vpravo (BG3)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: transparent;
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height 0.3s ease;
}

.site-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.site-logo { position: absolute; left: 16px; top: 0; z-index: 2; }
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-ice-bright);
  white-space: nowrap;
}
.site-logo-img { height: 120px; width: auto; display: block; }

.site-nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  margin-left: 90px;
}
.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
}
.site-nav-menu li { position: relative; }
.site-nav-menu li a {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav-menu li a:hover,
.site-nav-menu li.current-menu-item > a {
  color: var(--color-ice-bright);
  border-bottom-color: var(--color-aurora);
}
.site-nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  margin-top: 0;
  background: var(--color-surface-solid);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 20px 0 8px;
  min-width: 180px;
  display: none;
}
.site-nav-menu li:hover .sub-menu { display: block; }
.site-nav-menu .sub-menu li a { padding: 8px 18px; border-bottom: none; }

.site-header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-ice);
}

/* STEAM_MOBILE_ORDER_FIXED */
.site-steam-login-mobile {
  display: none;
}

@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    inset: var(--header-height-scrolled) 0 0 0;
    background: rgba(7, 11, 13, 0.97);
    flex-direction: column;
    padding: 32px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    justify-content: flex-start;
    margin-left: 0;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .site-nav-menu .sub-menu {
    position: static;
    margin-top: 10px;
    margin-left: 12px;
  }
  .nav-toggle { display: flex; }
  .site-header-actions {
    margin-left: auto;
  }
  /* MOBILE_LOGO_STEAM_SIZE */
  .site-logo-img {
    height: 64px;
  }
  .ygg-steam-btn {
    width: 120px;
    height: 40px;
  }
  .site-header-actions .site-steam-login {
    display: none;
  }
  .site-steam-login-mobile {
    display: block;
    margin: 0 auto 16px;
  }
}

/* ============================================================
   PATICKA - sloupce, partneri, legal radek (BG3)
   ============================================================ */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-top: 56px;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col-title {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ice);
  margin-bottom: 16px;
}
.footer-menu, .footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-menu a, .footer-links a {
  color: var(--color-text-muted);
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-menu a:hover, .footer-links a:hover { color: var(--color-ice-bright); }

.footer-partners {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.footer-partners .footer-columns { grid-template-columns: repeat(2, 1fr); align-items: center; }
.footer-partners-logos { display: flex; align-items: center; gap: 20px; }
.footer-partner-logo { max-height: 42px; width: auto; opacity: 0.85; transition: opacity 0.2s ease; }
.footer-partner-logo:hover { opacity: 1; }

.footer-bottom {
  margin-top: 40px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.footer-privacy-link { color: var(--color-ice); }
.footer-motto { font-family: var(--font-heading); letter-spacing: 0.08em; color: var(--color-text-muted); }

@media (max-width: 800px) {
  .footer-columns,
  .footer-partners .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ============================================================
   HERO SEKCE - video na pozadi, BG3-style
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin-top: calc(-1 * var(--header-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,11,13,0.15) 0%, rgba(7,11,13,0.55) 70%, rgba(7,11,13,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 120px;
  padding-bottom: 60px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 68px);
  color: var(--color-ice-bright);
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 8px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--color-aurora);
  color: #06120d;
  border-color: var(--color-aurora);
}
.btn-primary:hover { background: var(--color-aurora-bright); border-color: var(--color-aurora-bright); }
.btn-discord {
  background: transparent;
  color: var(--color-ice-bright);
  margin-top: 20px;
}
.btn-discord:hover { background: rgba(191,230,240,0.1); border-color: var(--color-ice); }

.hero-sound-toggle {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(7,11,13,0.6);
  border: 1px solid var(--color-border);
  color: var(--color-ice);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.hero-sound-toggle:hover { background: rgba(7,11,13,0.85); }

/* ============================================================
   HOME STATS - boxy se stavem serveru / novinkami / odkazy
   ============================================================ */
.home-stats {
  position: relative;
  z-index: 2;
  margin-top: -80px;
  margin-bottom: 72px;
}
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.home-stat-box h3 { margin-bottom: 14px; }
.home-news-list li,
.home-quicklinks-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.home-news-list li:last-child,
.home-quicklinks-list li:last-child { border-bottom: none; }
.home-news-list a,
.home-quicklinks-list a {
  color: var(--color-text);
  transition: color 0.2s ease;
}
.home-news-list a:hover,
.home-quicklinks-list a:hover { color: var(--color-ice-bright); }
.home-stat-empty { color: var(--color-text-muted); font-size: 14px; }

/* ============================================================
   HOME WELCOME - uvitaci sekce
   ============================================================ */
.home-welcome {
  position: relative;
  z-index: 2;
  margin-top: -350px;
  margin-bottom: 72px;
}
.home-welcome-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px;
}
.home-welcome-box h2 { font-size: 32px; margin-bottom: 20px; }
.home-welcome-box p { margin-bottom: 14px; }
.home-welcome-quote {
  font-style: italic;
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .home-stats-grid { grid-template-columns: 1fr; }
  .home-stats { margin-top: -40px; }
  .home-welcome { margin-top: -80px; }
  .home-welcome-box { padding: 16px 12px; }
  .ygg-box { border-width: 56px 42px 38px 42px; border-image-width: 56px 42px 38px 42px; }
}



/* Padajici listi ve welcome boxu */
.home-welcome-box {
  position: relative;
  overflow: hidden;
}

.ygg-leaves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.ygg-leaf {
  position: absolute;
  top: -10%;
  width: 26px;
  height: 20px;
  background-image: var(--ygg-leaf-img);
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  animation-name: ygg-leaf-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ygg-leaf:nth-child(1) { left: 4%;  width: 20px; height: 16px; animation-duration: 12s; animation-delay: 0s; }
.ygg-leaf:nth-child(2) { left: 16%; width: 30px; height: 24px; animation-duration: 16s; animation-delay: -4s; }
.ygg-leaf:nth-child(3) { left: 28%; width: 22px; height: 18px; animation-duration: 10s; animation-delay: -7s; }
.ygg-leaf:nth-child(4) { left: 42%; width: 28px; height: 22px; animation-duration: 15s; animation-delay: -2s; }
.ygg-leaf:nth-child(5) { left: 58%; width: 18px; height: 14px; animation-duration: 11s; animation-delay: -9s; }
.ygg-leaf:nth-child(6) { left: 72%; width: 26px; height: 20px; animation-duration: 14s; animation-delay: -5s; }
.ygg-leaf:nth-child(7) { left: 85%; width: 22px; height: 18px; animation-duration: 13s; animation-delay: -1s; }
.ygg-leaf:nth-child(8) { left: 94%; width: 24px; height: 19px; animation-duration: 17s; animation-delay: -11s; }

@keyframes ygg-leaf-fall {
  0% { top: -10%; transform: translateX(0) rotate(0deg); opacity: 0; }
  6% { opacity: 0.85; }
  20% { transform: translateX(16px) rotate(70deg); }
  40% { top: 45%; transform: translateX(-14px) rotate(160deg); }
  60% { transform: translateX(12px) rotate(230deg); }
  70% { top: 92%; transform: translateX(0) rotate(270deg); opacity: 0.9; }
  88% { top: 92%; transform: translateX(0) rotate(270deg); opacity: 0.9; }
  96% { top: 92%; opacity: 0; }
  100% { top: -10%; opacity: 0; transform: translateX(0) rotate(0deg); }
}

@media (max-width: 900px) {
  .ygg-leaf { width: 18px; height: 14px; }
}

/* Barevne varianty listu (zluta/cervena) - stejna grafika, jen jiny odstin */
.ygg-leaf:nth-child(2),
.ygg-leaf:nth-child(6) {
  filter: hue-rotate(-110deg) saturate(1.4) brightness(1.05);
}

.ygg-leaf:nth-child(4),
.ygg-leaf:nth-child(7) {
  filter: hue-rotate(-160deg) saturate(1.4) brightness(1.05);
}

/* Tlacitko prihlaseni pres Steam (styl jako BUY NOW z Baldur's Gate reference) */
.ygg-steam-btn {
  display: inline-block;
  width: 168px;
  height: 56px;
  background-image: url('https://yggdrasilvalgard.com/wp-content/uploads/2026/10/Stribrne-tlacitko-Prihlasit-se-pres-Steam.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.ygg-steam-btn:hover {
  filter: brightness(1.2);
  transform: scale(1.03);
}

/* Schovat automaticky generovany nazev stranky (H1 nahoe nad obsahem) */
.page-title {
  display: none;
}
