/* ============================================================
   HEADER / NAV
============================================================ */

.site-header {
  position: fixed;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;

  width: auto;

  /* PÔVODNÁ FARBA */
  background: rgba(18, 19, 22, 0.92);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* PÔVODNÁ VEĽKOSŤ / BORDER */
  border: 3px solid var(--ink);
  border-radius: 999px;

  /* Jemný GlassNav efekt */
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25);

  overflow: visible;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  max-width: none;

  /* PÔVODNÝ PADDING */
  padding: 12px 20px 12px 28px;
}


/* ============================================================
   LOGO
============================================================ */

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo__title-img {
  max-width: 150px;
  max-height: 150px;
}

.logo__mark {
  color: var(--text);
  font-size: 18px;
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 20px;
  color: var(--text);
}


/* ============================================================
   NAVIGATION
============================================================ */

.nav {
  position: relative;

  display: flex;
  align-items: center;

  /* Pôvodne 28px, zachované */
  gap: 28px;

  flex: 1;
  justify-content: flex-end;

  /*
   * Indikátor je umiestnený absolútne,
   * takže nav potrebuje byť positioning context.
   */
  isolation: isolate;
}


/* ============================================================
   GLASS NAV INDICATOR
============================================================ */

.nav-indicator {
  position: absolute;

  top: 50%;
  left: 0;

  /*
   * Výška sa prispôsobí existujúcemu navbaru.
   */
  height: 42px;

  transform: translateY(-50%);

  /*
   * PÔVODNÁ FARBA NAVBARU,
   * len mierne transparentnejšia pre rozlíšenie
   * pohyblivého panela.
   */
  background: rgba(18, 19, 22, 0.72);

  border: 1px solid rgba(255, 255, 255, 0.10);

  border-radius: 26px;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 14px rgba(0, 0, 0, 0.20);

  pointer-events: none;

  z-index: 0;

  will-change: transform, width;

  /*
   * PHASE 1
   * Natiahnutie počas presunu.
   */
  transition:
    transform 190ms cubic-bezier(0.32, 0.72, 0.24, 1),
    width 190ms cubic-bezier(0.32, 0.72, 0.24, 1);
}


/*
 * PHASE 2
 * Dopad + jemný overshoot.
 */
.nav-indicator[data-phase="settle"] {
  transition:
    transform 420ms cubic-bezier(0.28, 1.28, 0.36, 1),
    width 420ms cubic-bezier(0.24, 1.34, 0.38, 1);
}


/* ============================================================
   NAV LINKS
============================================================ */

.nav a {
  position: relative;

  z-index: 2;

  display: flex;
  align-items: center;

  gap: 6px;

  /*
   * Nedávame vlastný veľký padding,
   * aby navbar zostal približne rovnako veľký.
   */
  padding: 0;

  font-size: 14px;

  color: var(--text);

  white-space: nowrap;

  transition:
    color var(--transition),
    transform 180ms ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-active {
  color: var(--text);
}

.nav__index {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
}


/* ============================================================
   MOBILE TOGGLE
============================================================ */

.nav-toggle {
  display: none;

  flex-direction: column;
  gap: 5px;

  background: none;
  border: none;

  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;

  background: var(--text);

  display: block;
}


/* ============================================================
   RESPONSIVE NAV
============================================================ */

@media (max-width: 960px) {

  .nav {
    position: fixed;
    inset: 1px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    background: rgba(18, 19, 22, 0.84);
    border: 1px solid rgba(244, 242, 237, 0.10);
    border-radius: 22px;
    box-shadow:
      0 0 0 1px rgba(244, 242, 237, 0.035),
      0 5px 18px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 96px 28px 32px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px) scale(0.985);
    transform-origin: top center;
    transition:
      opacity 260ms ease,
      transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 320ms;
  }

  .nav.nav--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition:
      opacity 260ms ease,
      transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s;
  }

  /* Na mobile sa animovaný desktop indikátor nepoužíva */
  .nav-indicator {
    display: none;
  }

  .nav a {
    justify-content: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: clamp(20px, 5vw, 28px);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .nav__cta {
    display: none;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0 0 24px 24px;
    box-shadow: none;
  }

  .site-header__inner {
    position: relative;
  }
}

@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .nav,
  .nav.nav--open {
    transition: none;
    transform: none;
  }
}

@media (min-width: 961px) {
  .nav a {
    color: var(--text-dim);
  }

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