/*
  Site header — the one from the home page (index.html), shared by every page so it looks
  the same everywhere. Selectors are scoped to #nav so a page's own older .nav rules can't
  override them, and all values are written out (no dependence on a page's CSS variables).
  Markup:
    <header class="nav" id="nav"><div class="nav__inner container"> logo · nav.nav__links · a.nav__cta · button#burger.nav__burger </div></header>
  Pages need ~64px of space at the top (the header is fixed).

  iPhone status bar: pages use viewport-fit=cover, so the page runs up under the status bar
  (clock, battery). The header then also covers that strip (its height grows by
  env(safe-area-inset-top), which is 0 on desktop and Android) and the whole document is
  pushed down by the same amount, so no page needs its own change.
*/
html { padding-top: env(safe-area-inset-top, 0px); }

/* Some pages (home, about, player, landing) lay a faint full-screen grain texture over
   everything (body::before, fixed, z-index 9999). On iPhone Safari that transparent layer
   was the topmost thing at the top of the screen, so Safari didn't treat the header as the
   page's top bar and let the page show through behind the status bar. The texture now
   starts below the header and stays underneath it; the header is solid, so it looks the same. */
body::before { top: calc(64px + env(safe-area-inset-top, 0px)) !important; z-index: 99 !important; }
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;700;800&display=swap');

#nav.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  /* The home page's 82% glass looks black over its dark page; over light pages (team
     tournament, marathon) it turned grey. Near-solid keeps the same near-black everywhere. */
  background: rgba(8, 9, 13, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  height: calc(64px + env(safe-area-inset-top, 0px)); margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 0;
  font-family: 'Outfit', system-ui, sans-serif;
  box-sizing: border-box;
}
#nav.nav *, #nav.nav *::before, #nav.nav *::after { box-sizing: border-box; }
#nav .nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1320px; margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
}
#nav a { color: inherit; text-decoration: none; }
#nav .nav__logo { display: flex; align-items: center; gap: 10px; }
#nav .nav__logo img { display: block; height: 36px; width: auto; }
#nav .nav__links { display: flex; gap: 4px; margin: 0; padding: 0; background: none; }
#nav .nav__links a {
  padding: 8px 16px; border-radius: 6px;
  font-weight: 500; font-size: 14px; letter-spacing: 0.3px; line-height: normal;   /* px, not rem: pages use different base sizes */
  color: #9ca4b5; background: none;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#nav .nav__links a:hover, #nav .nav__links a.active { color: #f2f3f6; background: rgba(0, 230, 118, 0.15); }
#nav .nav__links a.active { color: #00e676; }
/* Mosconi Cup game: team-colour pill (Europe blue | USA red) with a trophy and a "Jauns" badge.
   Once the Cup starts site-header.js adds .is-cup: live dot + name + the Cup score. */
#nav .nav__links a.nav__hot, #nav .nav__hot-m {
  position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 4px 16px 4px 4px; border-radius: 999px; border: 0;
  background: linear-gradient(90deg, #3e5ee3 0 50%, #c8473a 50% 100%); color: #fff; font-weight: 700;
}
#nav .nav__links a.nav__hot:hover, #nav .nav__hot-m:hover { background: linear-gradient(90deg, #3e5ee3 0 50%, #c8473a 50% 100%); color: #fff; filter: brightness(1.12); }
#nav .nav__links a.nav__hot.active, #nav .nav__hot-m[aria-current="page"] { box-shadow: 0 0 0 2px #f0c43f; color: #fff; }
#nav .mc-ico { width: 26px; height: 26px; border-radius: 50%; background: #08090d; color: #f0c43f; display: grid; place-items: center; flex: none; }
#nav .mc-new { position: absolute; top: -9px; right: -8px; background: #f0c43f; color: #111; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 999px; }
#nav .mc-dot, #nav .mc-score { display: none; }
/* During the Cup */
#nav.is-cup .nav__links a.nav__hot, #nav.is-cup .nav__hot-m {
  background: #14161d; border: 1.5px solid #2a2e38; padding: 0 0 0 12px; overflow: hidden; gap: 10px;
}
#nav.is-cup .nav__links a.nav__hot:hover, #nav.is-cup .nav__hot-m:hover { background: #1c1f28; }
#nav.is-cup .mc-ico, #nav.is-cup .mc-new { display: none; }
#nav.is-cup .mc-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #8a8f9b; flex: none; }
#nav.is-live .mc-dot { background: #ef4444; animation: mcLive 1.6s ease-in-out infinite; }
#nav.is-cup .mc-score { display: inline-flex; align-self: stretch; }
#nav .mc-score b { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
#nav .mc-score .mc-eu { background: #3e5ee3; } #nav .mc-score .mc-us { background: #c8473a; }
#nav .mc-score i { font-style: normal; }
@keyframes mcLive { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #nav.is-live .mc-dot { animation: none; } }
#nav .nav__hot-m { display: none; font-size: 13px; padding: 3px 12px 3px 3px; margin-left: auto; margin-right: 10px; }
#nav .nav__hot-m .mc-ico { width: 24px; height: 24px; }
#nav.is-cup .nav__hot-m { padding-left: 10px; }
#nav.is-cup .nav__hot-m .mc-cup { display: none; }
#nav .nav__hot-m .mc-score b { padding: 0 8px; }
/* Narrower laptops: tighter menu so everything fits on one line. */
@media (min-width: 921px) and (max-width: 1150px) {
  #nav .nav__links a { padding: 8px 10px; }
  #nav .nav__links a.nav__hot { padding: 4px 13px 4px 4px; margin-right: 6px; }
  #nav.is-cup .nav__links a.nav__hot { padding: 0 0 0 10px; }
}
#nav .nav__cta {
  padding: 8px 20px; border-radius: 999px; border: 0;
  background: #00e676; color: #050507;
  font-weight: 700; font-size: 13.6px; line-height: normal;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#nav .nav__cta:hover { box-shadow: 0 0 20px rgba(0, 230, 118, 0.3); transform: translateY(-1px); }
#nav .nav__burger {
  display: none; width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
#nav .nav__burger span { display: block; width: 22px; height: 2px; background: #f2f3f6; border-radius: 2px; transition: 0.3s; }

@media (max-width: 920px) {
  #nav .nav__inner { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  #nav .nav__links, #nav .nav__cta { display: none; }
  #nav .nav__hot-m { display: inline-flex; }
  #nav .nav__burger { display: flex; }
  #nav.nav.open { background: #08090d; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #nav.nav.open .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0; bottom: 0;
    background: #08090d; padding: 16px; z-index: 200;
  }
  #nav.nav.open .nav__links a { padding: 16px; font-size: 17.6px; border-radius: 8px; }
  #nav.nav.open .nav__links a.nav__hot { align-self: flex-start; margin-bottom: 8px; padding: 6px 18px 6px 6px; }
  #nav.is-cup.nav.open .nav__links a.nav__hot { padding: 0 0 0 14px; }
}
