/* AX Racing Tech - Main CSS (dark-only) v2.2 */
:root {
  --bg: #0a0a0a;
  --bg-2: #0c0c0d;
  --fg: #e9eef1;
  --muted: #9aa0a6;
  --border: rgba(255, 255, 255, .08);
  --card: #121214;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 16px;
  --container: 1200px;
  --brand: #ff2d55;
  --brand-2: #00e5ff;
  --ring: #7cfcff;
  --grad: linear-gradient(135deg, var(--brand), var(--brand-2));
  --glass: blur(14px) saturate(110%);
  font-family: 'Rubik', system-ui, -apple-system, Segoe UI, Roboto, Arial, 'Noto Sans';
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  background-image: radial-gradient(1200px 600px at 10% -10%, rgba(0, 229, 255, .06), transparent 40%), radial-gradient(1000px 500px at 100% 0%, rgba(255, 45, 85, .06), transparent 45%), linear-gradient(90deg, #141417 1px, transparent 1px), linear-gradient(0deg, #141417 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: rgba(10, 10, 10, .68);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, background-color .3s;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px; /* Adjusted height for a sleeker look */
  gap: 16px;
}
.brand img {
  height: 28px; /* Adjusted logo height */
  width: auto;
  display: block;
}
.menu {
  display: flex;
  gap: 10px;
  align-items: center;
}
.menu a, .menu button {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.menu a.active, .menu a:hover, .menu button:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, .06);
}

.cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-glow {
  position: sticky;
  top: 69px; /* Adjusted position */
  inset-inline: 0;
  height: 2px;
  z-index: 999;
  background: linear-gradient(90deg, transparent, var(--brand-2), var(--brand), transparent);
  filter: blur(.6px) drop-shadow(0 0 10px rgba(0, 229, 255, .25));
}

/* Buttons & Pills */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  background: var(--grad);
  color: #090909;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 229, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .25s, box-shadow .25s;
  font-size: 0.9rem;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(0, 229, 255, .33), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn--secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  box-shadow: none;
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, .06);
  transform: translateY(0);
  box-shadow: none;
}
.btn.small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.mode-switch, .unit-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  font-size: 0.9rem;
}
.pill input { display: none; }
.pill input:checked + b,
.pill input:checked {
    color: var(--fg);
}
input[name="unit"]:checked + * {
    background: var(--grad);
    color: #0a0a0a;
    border-color: transparent;
}


/* Content & Layout */
.section-header {
  text-align: center;
  margin: 20px 0 26px;
}
.h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.5px;
  font-family: 'Orbitron', sans-serif;
}
.h3 {
  margin: 28px 0 8px;
  font-size: 1.2rem;
  font-family: 'Orbitron', sans-serif;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: .92rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg);
}

/* Tabs & Panels */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
  transition: .2s;
}
.tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  color: var(--fg);
}
.panel {
  display: none;
}
.panel[aria-hidden="false"] {
  display: block;
}

/* Forms */
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.grid-form .span-2 {
  grid-column: 1/-1;
}
@media (max-width: 900px) {
  .grid-form {
    grid-template-columns: 1fr;
  }
}
.suffix-wrap {
  position: relative;
}
.form-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  color: var(--fg);
  padding: 12px 14px;
  transition: border-color .25s, box-shadow .25s, background .25s;
  font: inherit;
  font-size: 1rem;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .2);
}
.form-input.suffix {
  padding-right: 64px;
}
.suf {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 6px;
  height: calc(100% - 12px);
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  font-size: .9rem;
  color: var(--muted);
  pointer-events: none;
}

/* Cards & Misc */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01)), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.pad-responsive {
  padding: clamp(20px, 4vw, 44px);
}
.row-gap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.kp {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  color: var(--brand-2);
}
.hr-neon {
  height: 2px;
  border: 0;
  margin: 10px 0 14px;
  background: linear-gradient(90deg, transparent, var(--brand-2), var(--brand), transparent);
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, .25));
}
.rounded {
  border-radius: 6px;
}
.note {
  border-left: 3px solid var(--brand-2);
  padding: 10px 12px;
  background: rgba(0, 229, 255, .05);
  border-radius: 10px;
}
.gear-list {
    padding: 0;
    margin: 0;
    list-style: none;
    columns: 2;
}

/* Modal */
.modal[aria-hidden="true"] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: var(--glass);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  padding: 24px;
  animation: modalIn .2s ease-out;
}
.modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.preset-item:last-child {
    border-bottom: 0;
}
@keyframes modalIn {
  from {
    transform: translateY(8px);
    opacity: .6
  }
  to {
    transform: none;
    opacity: 1
  }
}
