/* Hradov — základ stránky */
:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101d2e;
  color: #f5e4c0;
  font: 14px Georgia, "Times New Roman", serif;
}

/* Scéna a sedm hloubkových vrstev */
#world {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1672px;
  height: 941px;
  transform: translate(-50%, -50%);
  transform-origin: center;
  isolation: isolate;
}

.moving,
.moving>img,
canvas {
  position: absolute;
  inset: 0;
  width: 1672px;
  height: 941px;
  pointer-events: none;
  user-select: none;
}

.moving {
  will-change: transform;
}

.moving>img {
  z-index: 0;
}

.moving>canvas {
  z-index: 1;
}

#sky {
  z-index: 0;
}

#distance {
  z-index: 1;
}

#distant-castles {
  z-index: 2;
}

#mist-back {
  z-index: 3;
}

#castle {
  z-index: 4;
}

#settlement {
  z-index: 5;
}

#fence-mill {
  z-index: 6;
}

/* Vrba zakrývá boční lopatky i přes plátno s pohybem výpletu. */
#mill-willow {
  inset: 578px auto auto 224px;
  width: 113px;
  height: 147px;
  z-index: 2;
}

#mist-front {
  z-index: 7;
}

#foreground {
  z-index: 8;
}

#air {
  z-index: 2;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, #060b16a6, transparent 15%, transparent 85%, #08102033),
    radial-gradient(ellipse at 50% 50%, transparent 50%, #030a1838 100%);
}

/* Samostatné logo a jeho světelný průjezd */
#brand {
  position: absolute;
  top: 3%;
  left: 16%;
  z-index: 7;
  width: min(46vw, 720px);
  aspect-ratio: 2.65;
  pointer-events: none;
  filter: drop-shadow(0 8px 8px #0008);
}

#logo-art {
  position: relative;
  width: 100%;
  height: 100%;
  background: none;
}

#logo-shine {
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.75;
}

/* Pozastavení animací a celá obrazovka */
.controls {
  position: absolute;
  right: 22px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  gap: 7px;
  opacity: 0.76;
}

.controls:hover,
.controls:focus-within {
  opacity: 1;
}

button {
  padding: 9px 13px;
  border: 1px solid #a58a5466;
  border-radius: 5px;
  background: #101a23d9;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

button:hover {
  border-color: #d1b57e;
  background: #293242;
}

button:focus-visible {
  outline: 2px solid #e6c68d;
  outline-offset: 4px;
}

/* Patička je vždy ve středu okna. */
footer {
  position: absolute;
  right: 0;
  bottom: 30px;
  left: 0;
  z-index: 8;
  padding: 0 12px;
  color: #e9d9b8b0;
  font: 18px Arial, sans-serif;
  text-align: center;
  text-shadow: 0 2px 4px #000;
  pointer-events: none;
}

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

noscript {
  position: absolute;
  bottom: 65px;
  left: 25px;
  z-index: 10;
}

@media (max-width: 700px) {
  .controls {
    right: 14px;
    bottom: 18px;
  }

  .controls button {
    padding: 8px;
    font-size: 12px;
  }

  footer {
    bottom: 65px;
    font-size: 15px;
  }
}

/* Původní název, erb i postranní zlaté linky zůstávají beze změny.
   V cizích jazycích se překryje jen obdélník původního sloganu. */
.logo-base {
  position: absolute;
  inset: 0;
  background: url("../img/logo.webp") center / contain no-repeat;
}
#logo-art[data-localized-slogan="true"] .logo-base,
#logo-art[data-localized-slogan="true"] #logo-shine {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 84.8% 100%, 84.8% 84%, 15.6% 84%, 15.6% 100%, 0 100%);
}
#logo-tagline {
  position: absolute;
  left: 16.4%;
  top: 84%;
  width: 67.7%;
  height: 12.2%;
  overflow: visible;
}
