:root {
  --text: #fff;
  --muted: rgba(255, 255, 255, .8);
  --line: rgba(255, 255, 255, .15);

  /* farby LSTME */
  --green: #00953f;
  --lime: #8eb820;
  --orange: #e58d00;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.4;
  color: var(--text);
  background: linear-gradient(160deg, #f29b05 0%, #0667e7 55%, #0c4a26 100%);
  /* čistejšie miešanie farieb (bez šedého bahna v prechodoch) */
  background: linear-gradient(160deg in oklch, #f29b05 0%, #0667e7 55%, #0c4a26 100%);
  background-size: 250% 250%;
  animation: bgShift 18s ease-in-out infinite;
}

a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* ---------- Hlavička ---------- */

/* plávajúca priesvitná navigácia */
.nav {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  min-height: 10vh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
  animation: navIn .8s cubic-bezier(.2, .8, .2, 1) backwards;
}

.nav-logo img,
.hero-logo img {
  display: block;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}

.nav-logo {
  padding: 4px 6px;
  transition: transform .4s cubic-bezier(.3, 1.6, .5, 1);
  animation: logoIn .7s cubic-bezier(.3, 1.4, .5, 1) .15s backwards;
}

.nav-logo:hover,
.nav-logo:focus-visible {
  transform: scale(1.08) rotate(-3deg);
  outline: none;
}

.nav-logo:active {
  transform: scale(.95);
}

.nav-logo img {
  height: clamp(34px, 5vw, 48px);
}

.nav-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  list-style: none;
}

/* položky sa pri načítaní postupne objavia */
.nav-list li:not(.nav-indicator) {
  animation: navItemIn .55s cubic-bezier(.2, .8, .2, 1) backwards;
}

.nav-list li:nth-child(1) { animation-delay: .30s; }
.nav-list li:nth-child(2) { animation-delay: .38s; }
.nav-list li:nth-child(3) { animation-delay: .46s; }
.nav-list li:nth-child(4) { animation-delay: .54s; }
.nav-list li:nth-child(5) { animation-delay: .62s; }

.nav-list a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.2rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  font-family: "Jaro", sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  transition: color .25s ease, transform .15s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a.active {
  color: var(--text);
  outline: none;
}

.nav-list a:active {
  transform: scale(.95);
}

/* zvýraznenie, ktoré sa plynulo presúva pod položku (hover = biele, aktívna = oranžové) */
.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 12px;
  background: rgba(229, 141, 0, .24);
  box-shadow: inset 0 0 0 1px rgba(229, 141, 0, .6), 0 4px 14px rgba(229, 141, 0, .2);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.3, 1.25, .5, 1),
              width .4s cubic-bezier(.3, 1.25, .5, 1),
              height .4s cubic-bezier(.3, 1.25, .5, 1),
              background-color .25s ease,
              box-shadow .25s ease,
              opacity .25s ease;
}

.nav-indicator.is-hover {
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 4px 14px rgba(0, 0, 0, .12);
}

/* prvé umiestnenie bez cestovania z rohu */
.nav-indicator.no-transition {
  transition: none;
}

/* ---------- Obsah ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(10vh + 60px) 16px 24px; /* miesto pre fixnú navigáciu */
}

.hero-logo img {
  height: clamp(64px, 12vw, 96px);
}

h1 {
  margin-top: 20px;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: .5px;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
  animation: titleIn 1s cubic-bezier(.2, .8, .2, 1) both;
}

.subtitle {
  margin: 10px 0 36px;
  color: var(--muted);
  letter-spacing: .03em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .25);
  text-align: center;
  font-size: clamp(.95rem, 2.5vw, 1.1rem);
  animation: fadeUp .8s cubic-bezier(.2, .8, .2, 1) .3s backwards;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1000px;
}

.single {
  display: none;
  width: 100%;
  max-width: 560px;
}

.box {
  padding: 22px 10px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
  animation:
    boxIn .8s cubic-bezier(.2, .8, .2, 1) backwards,
    float 6s ease-in-out 1.6s infinite;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1),
              border-color .25s ease,
              box-shadow .25s ease,
              background-color .25s ease;
}

/* postupné objavovanie */
.box:nth-child(1) { animation-delay: .45s, 1.6s; }
.box:nth-child(2) { animation-delay: .60s, 2.2s; }
.box:nth-child(3) { animation-delay: .75s, 2.8s; }
.box:nth-child(4) { animation-delay: .90s, 3.4s; }
.box:nth-child(5) { animation-delay: 1.05s, 4.0s; }
.box:nth-child(6) { animation-delay: 1.20s, 4.6s; }

.box:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(142, 184, 32, .6);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 26px rgba(142, 184, 32, .4),
              inset 0 1px 0 rgba(255, 255, 255, .3);
}

.value {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--orange);
  background: linear-gradient(90deg, #e58d00 0%, #ffd48a 50%, #e58d00 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
  animation: shimmer 4s linear infinite;
}

.label {
  margin-top: 10px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  opacity: .85;
}

.single .box {
  padding: 40px 16px;
}

.single .value {
  font-size: clamp(2.6rem, 11vw, 6rem);
  overflow-wrap: anywhere;
}

.single .label {
  font-size: clamp(.9rem, 2.5vw, 1.2rem);
  letter-spacing: 3px;
}

.message {
  display: none;
  color: var(--orange);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  text-align: center;
  animation: pop .9s cubic-bezier(.3, 1.4, .5, 1) backwards;
}

/* ---------- Pätička ---------- */

/* podpis autora: takmer neviditeľný, naplno sa ukáže až pri hoveri */
.site-footer {
  position: fixed;
  right: 12px;
  bottom: 8px;
  font-size: .75rem;
}

.site-footer a {
  color: rgba(255, 255, 255, .1);
  text-decoration: none;
  transition: color .3s ease;
}

.site-footer a:hover {
  color: rgba(255, 255, 255, .7);
}

/* ---------- Animácie ---------- */

@keyframes bgShift {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}

@keyframes navIn {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes navItemIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(.5) rotate(-12deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes titleIn {
  from { opacity: 0; transform: translateY(-28px) scale(.92); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes boxIn {
  from { opacity: 0; transform: perspective(600px) rotateX(-35deg) translateY(30px) scale(.9); }
  to   { opacity: 1; transform: none; }
}

/* vznášanie cez "translate", aby nekolidovalo s hover transformom */
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(.4) rotate(-6deg); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Mobily ---------- */

@media (max-width: 768px) {
  main {
    padding: calc(10vh + 90px) 14px 24px; /* menu sa zalamuje, je vyššie */
  }

  .nav {
    gap: 4px;
    padding: 8px 10px;
  }

  .nav-list a {
    padding: .4rem .8rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 560px) {
  main {
    padding: calc(10vh + 120px) 12px 20px;
  }

  .nav {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 6px 8px;
    border-radius: 12px;
  }

  .nav-list a {
    padding: .35rem .6rem;
    font-size: .95rem;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .box {
    padding: 16px 6px;
    border-radius: 12px;
  }

  .label {
    font-size: .7rem;
    letter-spacing: 1px;
  }
}

/* nízke obrazovky (mobil na šírku) */
@media (max-height: 520px) {
  main {
    justify-content: flex-start;
    padding-top: calc(10vh + 80px);
  }
}

/* ---------- Prístupnosť ---------- */

@media (prefers-reduced-motion: reduce) {
  body, h1, .subtitle, .box, .value, .message,
  .nav, .nav-logo, .nav-list li:not(.nav-indicator) {
    animation: none;
  }

  .nav-list a, .nav-logo, .nav-indicator, .box { transition: none; }
  .nav-logo:hover, .nav-logo:focus-visible { transform: none; }

  .value {
    background: none;
    -webkit-text-fill-color: var(--orange);
  }
}
