:root {
  /* 5-Color Grayscale Palette */
  --color-1: #e4e2e2;
  --color-1-rgb: 228, 226, 226;
  --color-2: #c5c4c4;
  --color-2-rgb: 197, 196, 196;
  --color-3: #a4a1a0;
  --color-3-rgb: 164, 161, 160;
  --color-4: #2f2f31;
  --color-4-rgb: 47, 47, 49;
  --color-5: #0b0a0a;
  --color-5-rgb: 11, 10, 10;

  /* Semantic Mapping */
  --surface: var(--color-5);
  --surface-rgb: var(--color-5-rgb);
  --surface-dark: #000000;
  --surface-border: var(--color-4);
  
  --text: var(--color-1);
  --text-rgb: var(--color-1-rgb);
  --muted: var(--color-3);

  /* Accents */
  --primary: var(--color-1);
  --primary-glow: rgba(var(--color-1-rgb), 0.4);
  --secondary: var(--color-2);
  --secondary-glow: rgba(var(--color-2-rgb), 0.3);

  --glass-bg: rgba(var(--color-4-rgb), 0.4);
  --glass-shadow: 0 8px 32px rgba(var(--color-5-rgb), 0.6);
  --glass-border: 1px solid rgba(var(--color-3-rgb), 0.15);
}

/* LIGHT MODE OVERRIDES */
:root[data-theme="light"] {
  --surface: var(--color-1);
  --surface-rgb: var(--color-1-rgb);
  --surface-dark: #f5f5f5;
  --surface-border: var(--color-2);
  --text: var(--color-5);
  --text-rgb: var(--color-5-rgb);
  --muted: var(--color-4);
  
  --glass-bg: rgba(var(--color-1-rgb), 0.7);
  --glass-shadow: 0 8px 32px rgba(var(--color-5-rgb), 0.1);
  --glass-border: 1px solid rgba(var(--color-5-rgb), 0.1);

  --primary: var(--color-4);
  --primary-glow: rgba(var(--color-4-rgb), 0.3);
  --secondary: var(--color-3);
  --secondary-glow: rgba(var(--color-3-rgb), 0.3);
}

[data-theme="light"] .dark-logo { display: none !important; }
[data-theme="light"] .light-logo { display: block !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--surface-dark);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.orbitron { font-family: 'Orbitron', sans-serif; }

/* ── NAV ── */
nav {
  background: rgba(var(--surface-rgb), 0.85);
  border-bottom: 2px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
nav.scrolled {
  border-bottom-color: var(--primary);
  box-shadow: 0 4px 20px rgba(var(--surface-rgb), 0.8);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.nav-logo:hover { transform: scale(1.02); }

.nav-logo-dot {
  width: 10px; height: 10px;
  background: var(--secondary);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--secondary-glow);
  animation: pulse 2s infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.nav-links a::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(228, 226, 226, 0.15);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 8px;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::before, .nav-links a.active::before {
  transform: scaleY(1);
}
.nav-links a.active { color: var(--secondary); }

.nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--surface-border) 100%) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.nav-cta::before { display: none; }
.nav-cta:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-glow); }

/* Theme toggle button */
#theme-toggle {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  margin-right: 1rem;
  color: var(--text);
  padding: 0.4rem;
  border-radius: 8px;
  line-height: 1;
  transition: background 0.2s;
  flex-shrink: 0;
}
#theme-toggle:hover {
  background: rgba(var(--text-rgb), 0.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 28px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--secondary); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--secondary); }

.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: rgba(10, 0, 0, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 1.5rem;
  gap: 1rem;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid var(--primary);
  z-index: 999;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
  box-shadow: 0 10px 30px rgba(var(--surface-rgb),0.8);
}
.mobile-menu a {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(var(--text-rgb),0.05);
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--secondary); padding-left: 10px; border-bottom-color: rgba(197, 196, 196,0.3); }

/* ── MOBILE NAV: group theme toggle with hamburger ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Remove space-between so logo stays left, toggle+burger stay right */
  .nav-inner {
    justify-content: flex-start;
  }
  #theme-toggle {
    margin-left: auto; /* push toggle (and burger after it) to the right */
    margin-right: 0.25rem;
  }
}

/* ── LAYOUT ── */
main { flex: 1; padding: 4rem 1.25rem; }
.container { max-width: 1200px; margin: 0 auto; }

@media(max-width: 640px) {
  main { padding: 2rem 1rem; }
}

/* ── GLASS CARD ── */
.glass {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  background: linear-gradient(90deg, var(--text) 0%, var(--secondary) 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  word-break: break-word;
}
.section-sub {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 3rem;
  max-width: 600px;
  line-height: 1.6;
}
.red-bar {
  width: 80px; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(228, 226, 226, 0.4);
}

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--text-rgb),0.2), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn:hover::after { left: 150%; }

.btn-red {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
  color: var(--text);
  box-shadow: 0 4px 15px rgba(228, 226, 226,0.3);
}
.btn-red:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--primary-glow); background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%); }

.btn-yellow {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary) 100%);
  color: var(--surface-dark);
  box-shadow: 0 4px 15px rgba(197, 196, 196,0.2);
}
.btn-yellow:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--secondary-glow); background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary) 100%); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(var(--text-rgb),0.3);
}
.btn-outline:hover { border-color: var(--secondary); color: var(--secondary); box-shadow: 0 0 20px rgba(197, 196, 196,0.1) inset, 0 8px 25px rgba(197, 196, 196,0.2); transform: translateY(-3px); }

@media(max-width: 480px) {
  .btn { padding: 0.85rem 1.5rem; font-size: 1rem; }
}

/* ── FOOTER ── */
footer {
  background: var(--surface-dark);
  border-top: 2px solid var(--surface-border);
  padding: 4rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 10px var(--primary);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand .orbitron { font-size: 1.3rem; font-weight: 900; color: var(--text); letter-spacing: 2px; display: inline-block; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); font-size: 1rem; line-height: 1.8; max-width: 400px; }

.footer-col h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}
.footer-col a:hover { color: var(--text); transform: translateX(5px); }
.footer-col a svg { width: 16px; height: 16px; opacity: 0.7; }
.footer-col a:hover svg { stroke: var(--primary); opacity: 1; }

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--text-rgb),0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: var(--muted); font-size: 0.9rem; }
.footer-bottom span { color: var(--primary); }

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse { 
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--secondary-glow); } 
  50% { opacity: 0.5; transform: scale(0.9); box-shadow: 0 0 5px rgba(197, 196, 196,0.1); } 
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Base utility padding for sections */
section { padding: 6rem 1.25rem; }
@media(max-width: 640px) { section { padding: 3rem 1rem; } }

/* Force input legibility */
input, select, textarea {
  background-color: var(--surface-dark) !important;
  color: var(--text) !important;
  border: 1px solid var(--surface-border) !important;
  -webkit-appearance: none;
  font-size: 16px; /* prevent iOS zoom on focus */
}
input::placeholder, textarea::placeholder {
  color: var(--muted) !important;
}
/* Fix specific review quote opacity */
.review-quote {
  color: var(--surface-border) !important;
}
/* Make all text explicitly high contrast */
.review-text { color: var(--text) !important; }
.featured-review blockquote { color: var(--text) !important; }

.btn-primary, .btn-secondary, .btn-red, .btn-yellow, .btn {
  color: var(--surface-dark) !important;
  background: var(--text) !important;
}
.btn-outline {
  color: var(--text) !important;
  background: transparent !important;
  border: 1px solid var(--text) !important;
}
.btn:hover {
  background: var(--primary) !important;
  color: var(--surface-dark) !important;
}

/* ========================================= */
/* ULTIMATE LEGIBILITY & THEME CONFORMANCE   */
/* ========================================= */

body { background: var(--surface) !important; color: var(--text) !important; }
section[style*="background"] { background: var(--surface-dark) !important; }

/* 1. Services section icons & cards */
.service-card {
  background: var(--surface-dark) !important;
  border: 1px solid var(--surface-border) !important;
}
.service-icon {
  background: rgba(var(--primary-rgb), 0.1) !important; 
  color: var(--primary) !important;
}
.service-card h3 { color: var(--text) !important; }
.service-card p { color: var(--muted) !important; }
.service-card:hover {
  background: var(--surface) !important;
  border-color: var(--primary) !important;
}
.service-card:hover .service-icon {
  background: var(--primary) !important;
  color: var(--surface-dark) !important;
}

/* 2. Check your vehicle (inputs) */
input, select, textarea {
  background-color: var(--surface) !important;
  color: var(--text) !important;
  border: 2px solid var(--surface-border) !important;
}
input::placeholder, textarea::placeholder {
  color: var(--muted) !important;
}
input:focus, select:focus, textarea:focus {
  background-color: var(--surface-dark) !important;
  border-color: var(--primary) !important;
  color: var(--text) !important;
}
.form-group label { color: var(--text) !important; font-weight: bold; }

/* 3. About section text */
.about-hero, .about-split { background: transparent !important; }
.section-title { color: var(--text) !important; }
.timeline-item h4, .value-item h4 { color: var(--text) !important; }
.timeline-item p, .value-item p, .about-hero p, .about-split p { color: var(--muted) !important; }
.value-item { background: var(--surface-dark) !important; border: 1px solid var(--surface-border) !important; }

/* 4. Reviews Revamp */
.review-card {
  background: var(--surface-dark) !important;
  border: 1px solid var(--surface-border) !important;
}
.review-card:hover { border-color: var(--primary) !important; }
.review-text { color: var(--muted) !important; }
.review-name { color: var(--text) !important; }
.review-vehicle { color: var(--muted) !important; }

.featured-review {
  background: var(--primary) !important;
  color: var(--surface-dark) !important;
  border: 2px solid var(--primary) !important;
}
.featured-review blockquote, .featured-review .review-name, .featured-review .review-vehicle {
  color: var(--surface-dark) !important;
}
.featured-tag { 
  background: var(--surface-dark) !important; 
  color: var(--primary) !important; 
}

/* 5. Contact Enquiry Box */
.contact-method {
  background: var(--surface-dark) !important;
  border: 1px solid var(--surface-border) !important;
}
.contact-method-value { color: var(--text) !important; }
.contact-method-sub { color: var(--muted) !important; }
.contact-icon { color: var(--text) !important; }

/* Generic Button Cleanup */
.btn-primary, .btn-secondary, .btn-red, .btn-yellow, .btn {
  background: var(--text) !important;
  color: var(--surface) !important;
  border: none !important;
}
.btn-outline {
  background: transparent !important;
  color: var(--text) !important;
  border: 2px solid var(--text) !important;
}
.btn:hover {
  background: var(--primary) !important;
  color: var(--surface-dark) !important;
}

.featured-review .stars { color: var(--surface-dark) !important; }

.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  display: flex;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  margin-top: 5rem;
}
.marquee-content {
  display: flex;
  gap: 3rem;
  padding: 0 1.5rem;
  animation: scroll-left 40s linear infinite;
  min-width: max-content;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1.5rem)); }
}

/* Anchor offset for sticky nav */
*[id] {
  scroll-margin-top: 100px;
}


/* ======================================= */
/* CLEAN MOBILE HERO BUTTONS & TEXT COLORS */
/* ======================================= */

/* Force specific colors to dodge Safari inheritance bugs globally */
.btn-primary, .btn-secondary, .btn-red, .btn-yellow, .btn {
  background: var(--text) !important;
  color: var(--surface) !important;
  -webkit-text-fill-color: var(--surface) !important;
}

/* Ensure outline buttons are correct */
.btn-outline {
  background: transparent !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  border: 2px solid var(--text) !important;
}

/* Prevent Mobile Overflow X */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative;
}

/* Fix Mobile Menu Colors */
.mobile-menu {
  background: var(--surface-dark) !important;
  border-bottom: 1px solid var(--surface-border) !important;
}
.mobile-menu a {
  color: var(--text) !important;
}
.mobile-menu a:hover, .mobile-menu a.active {
  color: var(--primary) !important;
  background: var(--surface-dark) !important;
}

/* PERFECT HERO BUTTONS ON MOBILE */
@media (max-width: 768px) {
  .hero-btns {
    display: none !important; /* Removed completely on mobile per user request */
  }
}
