/* ======================================================================
   NILGIRI · Premium EV Design System
   ====================================================================== */

:root {
  /* Typography */
  --font-body: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-head: var(--font-display);

  /* Core palette - deep premium futuristic */
  --bg-0: #05060a;
  --bg-1: #0a0c14;
  --bg-2: #0f1320;
  --bg-3: #161a2b;

  --surface-0: rgba(255, 255, 255, 0.03);
  --surface-1: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);

  --border-soft: rgba(255, 255, 255, 0.06);
  --border-1: rgba(255, 255, 255, 0.1);
  --border-2: rgba(255, 255, 255, 0.16);

  /* Accent - electric cyan + brand blue gradient */
  --accent-1: #22d3ee;
  --accent-2: #3b82f6;
  --accent-3: #8b5cf6;
  --accent-glow: rgba(34, 211, 238, 0.45);
  --accent-soft: rgba(34, 211, 238, 0.12);

  --grad-accent: linear-gradient(135deg, #22d3ee 0%, #3b82f6 60%, #8b5cf6 100%);
  --grad-accent-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.18));
  --grad-radial-accent: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.35), transparent 60%);

  /* Text */
  --text-100: #ffffff;
  --text-90: rgba(255, 255, 255, 0.92);
  --text-70: rgba(255, 255, 255, 0.7);
  --text-50: rgba(255, 255, 255, 0.5);
  --text-30: rgba(255, 255, 255, 0.3);

  /* Legacy aliases (kept so existing class names work) */
  --brand-primary: var(--accent-2);
  --brand-accent: var(--accent-1);
  --brand-dark: var(--bg-0);
  --brand-bg: var(--bg-1);
  --brand-surface: #ffffff;
  --brand-silver: #c9d1e0;
  --green: var(--accent-1);
  --green-soft: rgba(34, 211, 238, 0.12);
  --ink: var(--text-90);
  --ink-soft: var(--text-70);
  --blue: var(--accent-2);
  --white: #ffffff;
  --muted: var(--text-50);
  --surface: rgba(255, 255, 255, 0.04);
  --bg: var(--bg-0);
  --primary: var(--accent-2);
  --accent: var(--accent-1);
  --line: var(--border-1);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 60px rgba(34, 211, 238, 0.25);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-90);
  background: var(--bg-0);
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.6;
}

/* Subtle ambient grid background for the entire site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(34, 211, 238, 0.08), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(139, 92, 246, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, section, header, footer { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text-100);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.1;
}

a { color: inherit; }

/* ======================================================================
   Header — premium glass nav
   ====================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 6, 10, 0.5);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid transparent;
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    padding 0.4s ease;
}

.top-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.35) 30%,
    rgba(139, 92, 246, 0.35) 70%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.top-header.scrolled {
  background: rgba(5, 6, 10, 0.85);
  border-bottom-color: var(--border-soft);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

.top-header.scrolled::after { opacity: 0.6; }

.main-nav {
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
  transition: padding 0.4s ease;
}

.top-header.scrolled .main-nav {
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

/* ---------- Brand ---------- */
.brand-wrap {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 0.55rem;
  width: auto !important;
  position: relative;
  /* compensate for the logo's transparent black padding */
  margin: -10px -8px;
}

.brand-logo {
  width: auto;
  height: 70px;
  display: block;
  /* Drop the logo's baked-in black background so only the metallic mark shows */
  mix-blend-mode: screen;
  transition: height 0.4s ease, transform 0.4s ease, filter 0.3s ease;
  transform: scale(1.8);
}

.brand-wrap:hover .brand-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 18px rgba(34, 211, 238, 0.35));
}

.top-header.scrolled .brand-logo { height: 64px; }

/* ---------- Desktop nav (≥ lg) ---------- */
.main-nav .navbar-nav {
  align-items: center;
  gap: 0.1rem;
}

@media (min-width: 992px) {
  .main-nav .navbar-nav {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 0.3rem;
    backdrop-filter: blur(12px);
  }
}

@media (max-width: 500px) {
    .brand-logo {
        transform: scale(1);
    }
}
.main-nav .nav-link {
  position: relative;
  color: var(--text-70) !important;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.005em;
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.main-nav .nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

.main-nav .nav-link:hover {
  color: var(--grad-accent) !important;
}
.main-nav .nav-link:hover::before { opacity: 1; }

.main-nav .nav-link.active {
  color: var(--grad-accent) !important;
}
.main-nav .nav-link.active::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.1), rgba(34, 211, 238, 0.05));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.25);
}

/* ---------- CTA ---------- */
.main-nav .nav-cta {
  margin-left: 0.4rem;
  background: var(--grad-accent);
  color: #04111f !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 999px;
  box-shadow:
    0 6px 20px rgba(34, 211, 238, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  position: relative;
  overflow: hidden;
}

.main-nav .nav-cta::before {
  display: none;
}

.main-nav .nav-cta:hover {
  color: #04111f !important;
  transform: translateY(-1px);
  box-shadow:
    0 12px 28px rgba(34, 211, 238, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  filter: brightness(1.05);
}

.main-nav .nav-cta::after { display: none !important; }

/* ---------- Dropdown caret + menu ---------- */

.main-nav .dropdown-toggle::after {
  margin-left: 0.35rem;
  vertical-align: 0.16em;
  border-top-color: currentColor;
  opacity: 0.55;
  border-width: 4px 4px 0 4px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.main-nav .dropdown-toggle:hover::after,
.main-nav .dropdown-toggle[aria-expanded="true"]::after {
  opacity: 1;
}

.main-nav .dropdown-menu {
  background: rgba(10, 12, 20, 0.92);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 0.4rem;
  margin-top: 0.6rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.05);
  min-width: 400px;
  animation: dropFade 0.2s ease;
  right: -100%;
  left: auto;
}

@keyframes dropFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-nav .dropdown-item {
  color: var(--text-70);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
  background: var(--grad-accent); /*rgba(34, 211, 238, 0.08); */
  color: var(--text-100);
  padding-left: 1rem;
}

.main-nav .dropdown-item-text {
  color: var(--text-70);
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
}

/* ---------- Mobile toggler ---------- */
.main-nav .navbar-toggler {
  border: 1px solid var(--border-1);
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: var(--surface-0);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.main-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2);
}

.main-nav .navbar-toggler:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: var(--surface-1);
}

.navbar-toggler-icon { filter: invert(1) brightness(1.5); }

/* ======================================================================
   Footer
   ====================================================================== */
.site-footer {
  background: var(--bg-0);
  color: var(--text-70);
  border-top: 1px solid var(--border-soft);
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 360px at 80% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(700px 320px at 10% 100%, rgba(34, 211, 238, 0.08), transparent 60%);
  pointer-events: none;
}

.footer-top { padding: 0; position: relative; z-index: 1; }

.footer-col {
  padding: 1.8rem 1.6rem;
  height: 100%;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
  color: var(--text-100);
  font-weight: 600;
}

.footer-col h5::after {
  content: "";
  width: 38px;
  height: 2px;
  display: block;
  margin-top: 0.55rem;
  background: var(--grad-accent);
  border-radius: 2px;
}

.footer-col p,
.footer-col li,
.footer-col a {
  color: var(--text-70);
  font-size: 0.92rem;
  line-height: 1.75;
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-col a:hover { color: var(--accent-1); }

.footer-col ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.footer-col ul li { margin-bottom: 0.45rem; }

.footer-phone {
  color: var(--text-100) !important;
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 0.8rem;
  display: inline-block;
  font-family: var(--font-display);
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  background: transparent !important;
  padding: 1.4rem 1rem !important;
  margin-top: 2.5rem !important;
  border-radius: 0 !important;
  position: relative;
  z-index: 1;
}

.footer-brand {
  text-align: left;
  margin: -14px -10px;
}

.footer-brand-logo {
  width: auto;
  height: 90px;
  display: block;
  mix-blend-mode: screen;
}

.footer-social {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-1);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-70);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  background: var(--surface-0);
}

.footer-social a:hover {
  color: var(--accent-1);
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.2);
}

.footer-mini-links {
  color: var(--text-70);
  font-size: 0.88rem;
  text-align: center;
}

footer .mt-2 { text-align: center; color: var(--text-70); }

/* ======================================================================
   Reveal animations
   ====================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.99);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero title word reveal — parent guard prevents the un-wrapped flash;
   it also acts as a JS-disabled fallback (fades the title in regardless). */
[data-word-reveal] {
  opacity: 0;
  animation: titleParentFade 0.6s ease 0.08s forwards;
}
@keyframes titleParentFade {
  to { opacity: 1; }
}

.word-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.word-reveal > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) skewY(6deg);
  animation: wordRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--word-i, 0) * 70ms + 280ms);
}
@keyframes wordRise {
  to { opacity: 1; transform: translateY(0) skewY(0); }
}

/* Re-apply gradient-on-text to per-word spans inside .text-gradient
   (background-clip: text on the parent does not paint onto the new inline-block boxes that word-reveal creates) */
.text-gradient .word-reveal > span {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Tilt-on-hover cards */
.tilt {
  transform: perspective(900px) rotateX(0) rotateY(0) translateZ(0);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}

/* Magnetic button — JS translates via CSS variables */
.magnet {
  --mx: 0px;
  --my: 0px;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.magnet:hover { transition: transform 0.05s linear; }

/* ======================================================================
   Brand marquee strip
   ====================================================================== */
.brand-marquee {
  position: relative;
  padding: 1.4rem 0;
  background: var(--bg-0);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  z-index: 2;
}

.brand-marquee::before,
.brand-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12vw;
  pointer-events: none;
  z-index: 2;
}
.brand-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-0) 10%, transparent);
}
.brand-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-0) 10%, transparent);
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marqueeSlide 38s linear infinite;
}

.brand-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-90);
  white-space: nowrap;
}

.marquee-item i {
  color: var(--accent-1);
  font-size: 0.65rem;
  opacity: 0.7;
}

.marquee-item .marquee-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes marqueeSlide {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .hero-orb,
  .hero-product,
  .hero-halo,
  .hero-ring,
  .hero-grid,
  .hero-beam {
    animation: none !important;
  }
  [data-word-reveal],
  .word-reveal > span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .scroll-reveal,
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ======================================================================
   Reusable UI primitives
   ====================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-1);
  background: var(--surface-0);
  color: var(--text-70);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 10px var(--accent-glow);
}

.text-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 991.98px) {
  .brand-logo { height: 68px; }
  .top-header.scrolled .brand-logo { height: 60px; }

  .main-nav .navbar-collapse {
    margin-top: 0.6rem;
    padding: 0.65rem;
    background: rgba(10, 12, 20, 0.96);
    backdrop-filter: saturate(160%) blur(20px);
    border: 1px solid var(--border-1);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }

  .main-nav .navbar-nav {
    gap: 0.15rem;
    align-items: stretch;
    width: 100%;
  }

  .main-nav .nav-link {
    padding: 0.7rem 1rem !important;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .main-nav .nav-link.active::before {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.04));
    box-shadow: inset 2px 0 0 var(--accent-1);
  }

  .main-nav .nav-cta {
    margin: 0.5rem 0 0;
    text-align: center;
    padding: 0.75rem 1rem !important;
    width: 100%;
  }

  .main-nav .dropdown-menu {
    margin: 0.25rem 0 0;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
    min-width: auto;
  }

  .footer-social { justify-content: center; margin-top: 0.6rem; }
  .footer-brand { text-align: left; }
}

@media (max-width: 767px) {
  .footer-col { padding: 1.3rem 1.1rem; }
  .footer-social a { width: 40px; height: 40px; }
  .brand-logo { height: 60px; }
  .top-header.scrolled .brand-logo { height: 54px; }
  .footer-brand-logo { height: 70px; margin: 0 auto; }
}
@media (min-width: 992px) {
  .dropdown-products {
    min-width: 550px;
  }

  .nav-hover-dropdown {
    position: relative;
  }

  .nav-hover-dropdown > .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.35rem);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-hover-dropdown:hover > .dropdown-menu,
  .nav-hover-dropdown:focus-within > .dropdown-menu,
  .nav-hover-dropdown > .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}
