/* ══════════════════════════════════════════════════════════════
   WINBOX RACING — CORE
   The shared shell only: design tokens, reset, nav, mobile drawer.
   Extracted from winbox-racing.css so the news pages don't have to
   download the whole 46KB landing-page stylesheet.

   about-us.php still loads winbox-racing.css in full — it needs the
   hero, mosaic, carousel and FAQ rules that live there.
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   PAGE TRANSITIONS
   Cross-document View Transitions: the browser snapshots the old page,
   loads the new one, and cross-fades between them — so navigating feels
   instant instead of flashing white.

   Pure CSS. No JS, no SPA router, no change to how pages are served, so
   the server-rendered HTML (and the SEO that depends on it) is untouched.
   Browsers without support simply navigate the normal way.
   ══════════════════════════════════════════════════════════════ */
@view-transition { navigation: auto; }

/* Naming an element opts it out of the page-wide fade, so the header and
   ticker hold still while only the content beneath them changes. */
#nav      { view-transition-name: site-nav; }
.breaking { view-transition-name: site-breaking; }

::view-transition-old(root) { animation: vt-out 130ms ease-in  both; }
::view-transition-new(root) { animation: vt-in  260ms ease-out both; }

/* Hold the chrome steady rather than cross-fading it */
::view-transition-old(site-nav),      ::view-transition-new(site-nav),
::view-transition-old(site-breaking), ::view-transition-new(site-breaking) {
  animation: none;
  mix-blend-mode: normal;
}

@keyframes vt-out { to   { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; } }

/* Browsers without view transitions get a plain fade-in instead */
@supports not (view-transition-name: none) {
  body { animation: vt-in 240ms ease-out both; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  body { animation: none; }
}

/* ══ TOKENS ══ */
:root {
  --cyan:    #00c8f0;
  --cyan2:   #00a8cc;
  --navy:    #050d1a;
  --navy2:   #070f20;
  --navy3:   #0a1628;
  --blue:    #0d1f3c;
  --white:   #ffffff;
  --gray:    #aab4c0;
  --fd: 'Bebas Neue', sans-serif;
  --fc: 'Barlow Condensed', sans-serif;
  --fb: 'Barlow', sans-serif;
}

/* ══ RESET ══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--fb);
  overflow-x: hidden;
}

/* ══ NAV ══ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(to bottom, rgba(5,13,26,.92) 0%, transparent 100%);
  transition: background .4s, backdrop-filter .4s;
}
#nav.sc {
  background: rgba(6, 5, 4, 0.32);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0,200,240,.08);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-img { height: 38px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-family: var(--fc); font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.75); text-decoration: none;
  position: relative; transition: color .3s;
  cursor: pointer;
}
.nav-link:hover { color: var(--cyan); }

.nav-dropdown { position: relative; padding-bottom: 14px; margin-bottom: -14px; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: rgba(5,13,26,.97); border: 1px solid rgba(0,200,240,.15);
  backdrop-filter: blur(12px); min-width: 160px;
  padding: 8px 0; opacity: 0; pointer-events: none;
  transform: translateY(-8px); transition: opacity .25s, transform .25s;
}
/* focus-within so the menus are reachable by keyboard, not mouse only */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-dropdown-item {
  display: block; font-family: var(--fc); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.6); text-decoration: none;
  padding: 9px 18px; transition: color .2s, background .2s;
}
.nav-dropdown-item:hover { color: var(--cyan); background: rgba(0,200,240,.06); }
.nav-dropdown-item.active { color: var(--cyan); }

/* The nav track and language switcher live in assets/nav-extras.css,
   which about-us.php also loads. */

/* ── HAMBURGER ── */
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  background: transparent; border: none; padding: 0;
  cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; position: relative; z-index: 510;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--cyan); border-radius: 2px;
  transition: transform .35s ease, opacity .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* The news pages use the .mnav drawer defined in news.css.
   about-us.php keeps its own .m-menu drawer from winbox-racing.css. */
body.m-menu-locked { overflow: hidden; }

/* ══ BUTTONS ══ */
.btn-cyan-solid {
  display: inline-block; font-family: var(--fc); font-weight: 700;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--navy); text-decoration: none;
  padding: 13px 32px; background: var(--cyan);
  border-radius: 10px; transition: box-shadow .3s;
}
.btn-cyan-solid:hover { box-shadow: 0 0 24px rgba(0,200,240,.5); }

/* ══ RESPONSIVE ══ */
/* Mobile: backdrop-filter is GPU-expensive and janks scrolling */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  #nav.sc, .nav-dropdown-menu, .m-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #nav.sc  { background: rgba(5,13,26,.85); }
  .m-menu  { background: rgba(5,13,26,.98); }
}

@media (max-width: 900px) {
  #nav { padding: 14px 18px; }
  .nav-logo-img { height: 28px; }
  .nav-links { gap: 18px; }
  .nav-link { font-size: 11px; letter-spacing: .12em; }
}

/* Swap the inline links for the hamburger. The original stylesheet hides
   .nav-links at ≤560px but never shows .nav-toggle, which left small
   screens with no navigation at all. */
@media (max-width: 760px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  #nav { padding: 12px 16px; }
}
