
:root {
  --red:          #e8001d;
  --red-dark:     #b5001a;
  --black:        #0a0a0a;
  --charcoal:     #141414;
  --dark-grey:    #1e1e1e;
  --mid-grey:     #2e2e2e;
  --border:       rgba(255,255,255,0.07);
  --text-nav:     rgba(255,255,255,0.72);
  --text-nav-h:   #ffffff;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --nav-h:        68px;
  --ease-expo:    cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--black);
  width: 100%;
  border-bottom: 4px solid var(--red);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.45);
}

.navbar-bar {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 5%;
  gap: 32px;
  position: relative;
}

.navbar-bar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.brand-logo-img {
  height: 60px;
  width: auto;
  /* filter: invert(1) brightness(1); */
  transition: opacity 0.2s ease;
}
.brand:hover .brand-logo-img { opacity: 0.85; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  padding-left: 4px;
  border-left: 2px solid var(--red);
}

.brand-ashwa {
  font-family: 'Samarkan', serif;
  font-size: 26px;
  color: var(--red);
  letter-spacing: 1px;
  line-height: 1.05;
}

.brand-racing {
  font-family: 'Xenotron', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,1);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-nav);
  padding: 8px 12px;
  border-radius: 3px;
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 12px; right: 12px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease-expo);
}

.nav-link:hover { color: var(--text-nav-h); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active { color: var(--text-nav-h); }
.nav-link.active::after { transform: scaleX(1); }

/* ─── Dropdown ──────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-drop-btn::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.5;
  transition: transform 0.22s ease, opacity 0.22s ease;
  flex-shrink: 0;
  position: static;
  background: none;
}

.nav-drop-btn:hover::after,
.nav-dropdown.open .nav-drop-btn::after {
  opacity: 1;
}

.nav-dropdown.open .nav-drop-btn::after {
  transform: rotate(225deg) translateY(2px);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  min-width: 480px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.22s var(--ease-expo),
    transform 0.22s var(--ease-expo),
    visibility 0.22s;
  z-index: 1100;
  border-radius: 3px;
}

.nav-dropdown.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel--narrow {
  min-width: 220px;
  grid-template-columns: 1fr;
}

.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.18s ease, color 0.18s ease;
  border-left: 2px solid transparent;
}

.dropdown-panel a:hover {
  background: var(--mid-grey);
  color: var(--text-nav-h);
  border-left-color: var(--red);
}

.dd-num {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--red);
  opacity: 0.7;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  min-width: 20px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.hamburger:hover { border-color: rgba(255,255,255,0.25); }

.hamburger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text-nav);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-expo), opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  background: var(--charcoal);
  border-top: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-expo);
}

.mobile-menu.open {
  max-height: 87vh;
  overflow-y: auto;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 12px 5% 24px;
}

.mob-link {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.18s ease, padding-left 0.2s ease;
}

.mob-link:hover { color: var(--text-nav-h); padding-left: 6px; }

.mob-accordion-btn {
  justify-content: space-between;
}

.mob-accordion-btn::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.45;
  transition: transform 0.25s ease, opacity 0.25s ease;
  flex-shrink: 0;
}

.mob-accordion-btn.open::after {
  transform: rotate(225deg) translateY(-2px);
  opacity: 0.9;
}

.mob-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-expo);
  padding-left: 16px;
  border-left: 2px solid var(--red);
  margin: 0 0 4px 2px;
}
.mob-accordion.open { max-height: 600px; }

.mob-accordion a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.18s ease;
}
.mob-accordion a:hover { color: var(--text-nav-h); }
.mob-accordion a:last-child { border-bottom: none; }

.navbar.scrolled .navbar-bar { height: 56px; }
.navbar.scrolled .brand-logo-img { height: 36px; }
.navbar.scrolled .brand-ashwa { font-size: 22px; }
.navbar.scrolled .brand-racing { font-size: 11px; }
.navbar-bar,
.brand-logo-img,
.brand-ashwa,
.brand-racing {
  transition:
    height 0.3s var(--ease-expo),
    font-size 0.3s var(--ease-expo);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }
}

@media (max-width: 480px) {
  .navbar-bar { padding: 0 4%; }
  .brand-ashwa { font-size: 22px; }
  .brand-racing { font-size: 11px; }
  .brand-logo-img { height: 45px; }
}