:root {
  --tm-white: #ffffff;
  --tm-pale: #dffbfe;
  --tm-aqua: #58d5e1;
  --tm-cyan: #42bed3;
  --tm-sky: #258fc5;
  --tm-blue: #176fba;
  --tm-deep: #0756b0;
  --tm-ink: #034187;
  --tm-navy: #022b5e;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 11px 15px;
  border-radius: 999px;
  color: var(--tm-navy);
  background: var(--tm-white);
  font-weight: 900;
  transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}
:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--tm-aqua);
  outline-offset: 4px;
}
/* --------------------------------------------------------------------------
   Shared premium footer
   -------------------------------------------------------------------------- */
.tm-site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--tm-white);
  background:     radial-gradient(circle at 82% 12%, rgba(88, 213, 225, .16), transparent 24rem),     radial-gradient(circle at 10% 100%, rgba(37, 143, 197, .18), transparent 30rem),     linear-gradient(145deg, #011f43 0%, var(--tm-navy) 42%, var(--tm-ink) 100%);
  border-top: 1px solid rgba(223, 251, 254, .14);
}
.tm-site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .13;
  background-image:     linear-gradient(rgba(255, 255, 255, .11) 1px, transparent 1px),     linear-gradient(90deg, rgba(255, 255, 255, .11) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.tm-footer-orbit {
  position: absolute;
  top: 90px;
  right: -170px;
  z-index: -1;
  width: 480px;
  aspect-ratio: 1;
  border: 1px solid rgba(88, 213, 225, .22);
  border-radius: 50%;
}
.tm-footer-orbit::before, .tm-footer-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(88, 213, 225, .15);
  border-radius: 50%;
  inset: 15%;
}
.tm-footer-orbit::after {
  inset: 31%;
}
.tm-footer-orbit span {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--tm-aqua);
  box-shadow: 0 0 28px rgba(88, 213, 225, .9);
}
.tm-footer-orbit span:nth-child(1) {
  top: 12%;
  left: 18%;
}
.tm-footer-orbit span:nth-child(2) {
  right: 13%;
  bottom: 25%;
}
.tm-footer-orbit span:nth-child(3) {
  left: 29%;
  bottom: 8%;
}
.tm-footer-cta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding-top: clamp(64px, 8vw, 110px);
  padding-bottom: clamp(42px, 5vw, 72px);
  border-bottom: 1px solid rgba(223, 251, 254, .14);
}
.tm-footer-eyebrow {
  margin: 0 0 13px;
  color: var(--tm-aqua);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.tm-footer-cta h2 {
  max-width: 760px;
  margin: 0;
  color: var(--tm-white);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2.3rem, 5vw, 5.6rem);
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.065em;
}
.tm-footer-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 245px;
  min-height: 64px;
  padding: 0 20px 0 24px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  color: var(--tm-navy);
  background: linear-gradient(120deg, var(--tm-aqua), var(--tm-pale));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(0, 20, 54, .28);
  transition: transform .28s ease, box-shadow .28s ease;
}
.tm-footer-action b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--tm-white);
  background: var(--tm-ink);
}
.tm-footer-action:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 70px rgba(0, 20, 54, .38);
}
.tm-footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(150px, .62fr));
  gap: clamp(28px, 5vw, 72px);
  padding-top: 58px;
  padding-bottom: 58px;
}
.tm-footer-brand > a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--tm-white);
  font: 900 20px "Montserrat", sans-serif;
  letter-spacing: -.04em;
}
.tm-footer-brand > a img {
  border-radius: 17px;
  box-shadow: 0 14px 34px rgba(88, 213, 225, .20);
}
.tm-footer-brand > a strong {
  color: var(--tm-aqua);
}
.tm-footer-brand p {
  max-width: 430px;
  margin: 22px 0 0;
  color: rgba(223, 251, 254, .66);
  font-size: 13px;
  line-height: 1.8;
}
.tm-footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}
.tm-footer-column h3 {
  margin: 0 0 8px;
  color: var(--tm-aqua);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tm-footer-column a, .tm-footer-column span {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  line-height: 1.55;
}
.tm-footer-column a {
  transition: color .2s ease, transform .2s ease;
}
.tm-footer-column a:hover {
  color: var(--tm-white);
  transform: translateX(4px);
}
.tm-footer-bottom {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid rgba(223, 251, 254, .14);
  text-align: center;
}
.tm-footer-bottom > p {
  margin: 0;
  color: rgba(223, 251, 254, .56);
  font-size: 11px;
}
.tm-eshaar-credit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 228px;
  padding: 7px 13px 7px 7px;
  border: 1px solid rgba(223, 251, 254, .18);
  border-radius: 999px;
  color: var(--tm-white);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 14px 36px rgba(0, 20, 54, .20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.tm-eshaar-credit:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 213, 225, .58);
  background: rgba(255, 255, 255, .12);
}
.tm-eshaar-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  border: 2px solid rgba(88, 213, 225, .75);
  border-radius: 50%;
  background: var(--tm-white);
  box-shadow: 0 9px 26px rgba(0, 0, 0, .20);
}
.tm-eshaar-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.tm-eshaar-credit > span:nth-child(2) {
  display: grid;
  line-height: 1.05;
}
.tm-eshaar-credit small {
  color: rgba(223, 251, 254, .58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.tm-eshaar-credit strong {
  margin-top: 5px;
  color: var(--tm-white);
  font: 900 15px "Montserrat", sans-serif;
  letter-spacing: -.03em;
}
.tm-eshaar-credit > b {
  margin-left: auto;
  color: var(--tm-aqua);
  font-size: 18px;
}
@media (max-width: 900px) {
  .tm-footer-cta {
    align-items: flex-start;
    flex-direction: column;
  }
  .tm-footer-grid {
    grid-template-columns: 1.25fr 1fr 1fr;
  }
  .tm-footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .tm-footer-cta {
    padding-top: 62px;
  }
  .tm-footer-cta h2 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }
  .tm-footer-action {
    width: 100%;
    min-width: 0;
  }
  .tm-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px 22px;
    padding-top: 46px;
    padding-bottom: 46px;
  }
  .tm-footer-brand {
    grid-column: 1 / -1;
  }
  .tm-footer-column:last-child {
    grid-column: 1 / -1;
  }
  .tm-footer-bottom {
    justify-items: center;
    text-align: center;
  }
  .tm-eshaar-credit {
    width: 100%;
    max-width: 330px;
  }
  .tm-footer-orbit {
    right: -290px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm-footer-action,   .tm-eshaar-credit,   .tm-footer-column a {
    transition: none;
  }
}


/* V21 — Tripoli Motion Instagram footer link */
.tm-footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(223,251,254,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}
.tm-instagram-mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f9c15e, #d6508e 48%, #4c5fd7);
}
.tm-instagram-mark svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}
.tm-footer-column a.tm-footer-instagram:hover {
  color: #fff;
  transform: translateX(0) translateY(-2px);
  border-color: rgba(88,213,225,.48);
  background: rgba(255,255,255,.11);
}


/* Shared event navigation dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.nav-dropdown-toggle span {
  display: inline-block;
  font-size: 13px;
  transition: transform .22s ease;
}
.nav-dropdown.open .nav-dropdown-toggle span,
.nav-dropdown:hover .nav-dropdown-toggle span,
.nav-dropdown:focus-within .nav-dropdown-toggle span {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 17px);
  left: 50%;
  z-index: 120;
  display: grid;
  width: min(310px, 82vw);
  padding: 9px;
  border: 1px solid rgba(223, 251, 254, .18);
  border-radius: 20px;
  color: #fff;
  background: rgba(2, 43, 94, .97);
  box-shadow: 0 24px 70px rgba(0, 20, 54, .34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-dropdown-menu a {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, .82) !important;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav-dropdown-menu a::after {
  display: none !important;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  color: #fff !important;
  background: rgba(88, 213, 225, .13);
  transform: translateX(3px);
}
.nav-dropdown-menu strong {
  font-size: 13px;
}
.nav-dropdown-menu small {
  color: rgba(223, 251, 254, .58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
}


/* Shared responsive event dropdowns */
@media (max-width: 1050px) {
  body.home-page .nav-dropdown { display: block; width: 100%; }
  body.home-page .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
  body.home-page .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 7px;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    box-shadow: none;
  }
  body.home-page .nav-dropdown.open .nav-dropdown-menu { display: grid; transform: none; }
}
@media (max-width: 800px) {
  body.race-page .nav-dropdown { display: block; width: 100%; }
  body.race-page .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
  body.race-page .nav-dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    margin-top: 10px;
    padding: 7px;
    opacity: 1;
    visibility: visible;
    transform: none;
    color: var(--tm-ink);
    border-color: var(--tm-pale);
    border-radius: 16px;
    background: #eef8fd;
    box-shadow: none;
  }
  body.race-page .nav-dropdown.open .nav-dropdown-menu { display: grid; transform: none; }
  body.race-page .nav-dropdown-menu a { color: var(--tm-ink) !important; }
  body.race-page .nav-dropdown-menu a:hover,
  body.race-page .nav-dropdown-menu a[aria-current="page"] {
    color: var(--tm-ink) !important;
    background: rgba(88,213,225,.18);
  }
  body.race-page .nav-dropdown-menu small { color: #5c7fa8; }
}

/* Keep the footer brand mark compact on every page. */
.tm-footer-brand > a img {
  width: 64px;
  height: 64px;
  max-width: 64px;
  flex: 0 0 64px;
  object-fit: cover;
}
@media (max-width: 700px) {
  .tm-footer-brand > a img {
    width: 54px;
    height: 54px;
    max-width: 54px;
    flex-basis: 54px;
    border-radius: 14px;
  }
}
