/* ============================================
   Ionovante Automotive — Design System
   ============================================ */

:root {
  /* Colors */
  --background-color: #3b3b3b;
  --background-dark: #1a1a1a;
  --background-card: #2a2a2a;
  --theme1-color: #0090ff;
  --theme1-hover: #0080e6;
  --theme2-color: #ee7000;
  --theme2-hover: #d66300;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);

  /* Typography */
  --headings-font-family: amandine, sans-serif;
  --body-font-family: clother, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;
  --text-hero: clamp(2.5rem, 6vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-padding-y: clamp(4rem, 10vw, 6rem);
  --section-padding-x: clamp(1.5rem, 5vw, 3rem);

  /* Layout */
  --max-width: 1400px;
  --nav-height: 4rem;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset / Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font-family);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    opacity var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--headings-font-family);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: var(--text-hero);
}
h2 {
  font-size: var(--text-4xl);
}
h3 {
  font-size: var(--text-2xl);
}
h4 {
  font-size: var(--text-xl);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-padding-x);
  transition: background-color var(--transition-base);
  border-bottom: 3px solid var(--theme1-color);
}

.nav.is-scrolled {
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
}

.nav__brand-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__logo {
  height: 2rem;
  width: auto;
}

.nav__brand-name {
  font-family: var(--headings-font-family);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-8);
    background: var(--background-dark);
    gap: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform var(--transition-base),
      opacity var(--transition-base),
      visibility var(--transition-base);
  }

  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__toggle {
    display: block;
  }
}

/* ============================================
   Hero (Homepage)
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--nav-height) var(--section-padding-x) var(--section-padding-y);
  background: var(--background-dark);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__title {
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.hero__tagline {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: var(--body-font-family);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.btn--primary {
  background-color: var(--theme1-color);
  color: var(--text-primary);
}

.btn--primary:hover {
  background-color: var(--theme1-hover);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.btn--secondary:hover {
  background-color: var(--text-primary);
  color: var(--background-dark);
}

.btn--accent {
  background-color: var(--theme2-color);
  color: var(--text-primary);
}

.btn--accent:hover {
  background-color: var(--theme2-hover);
}

/* ============================================
   Sections (shared)
   ============================================ */

.section {
  padding: var(--section-padding-y) var(--section-padding-x);
}

.section--dark {
  background-color: var(--background-dark);
}

.section__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* ============================================
   Vehicles grid (Homepage)
   ============================================ */

.vehicles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .vehicles {
    grid-template-columns: 1fr;
  }
}

.vehicle-card {
  background: var(--background-card);
  border-radius: 4px;
  overflow: hidden;
  transition: transform var(--transition-base);
}

.vehicle-card:hover {
  transform: translateY(-4px);
}

.vehicle-card__image-wrap {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}

.vehicle-card__label {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  font-family: var(--headings-font-family);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.5);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--theme1-color);
}

.vehicle-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

.vehicle-card:hover .vehicle-card__image {
  transform: scale(1.03);
}

.vehicle-card__content {
  padding: var(--space-8);
}

.vehicle-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.vehicle-card__copy {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.vehicle-card__link {
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--theme1-color);
}

.vehicle-card__link:hover {
  color: var(--theme1-hover);
}

/* ============================================
   Brand values grid
   ============================================ */

.values__badge-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-8);
}

.values__badge {
  display: block;
  width: auto;
  height: clamp(4rem, 10vw, 6rem);
  object-fit: contain;
  margin: 0 auto;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12);
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .values {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

.value {
  text-align: center;
}

.value__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: var(--theme1-color);
}

.value__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.value__text {
  color: var(--text-secondary);
  font-size: var(--text-base);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: var(--space-16) var(--section-padding-x);
  background: var(--background-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.footer__logo {
  height: 1.75rem;
  width: auto;
}

.footer__links {
  display: flex;
  gap: var(--space-6);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   Vehicle page hero
   ============================================ */

.vehicle-hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--nav-height) var(--section-padding-x) var(--space-24);
  position: relative;
  overflow: hidden;
  background-color: var(--background-dark);
}

.vehicle-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.vehicle-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 1;
}

.vehicle-hero__content {
  position: relative;
  z-index: 2;
}

.vehicle-hero__title {
  margin-bottom: var(--space-2);
}

.vehicle-hero__tagline {
  font-size: var(--text-xl);
  color: var(--text-secondary);
}

/* ============================================
   Vehicle overview (specs + copy)
   ============================================ */

.overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .overview {
    grid-template-columns: 1fr;
  }
}

.overview__specs {
  display: grid;
  gap: var(--space-3);
}

.overview__spec {
  display: flex;
  justify-content: space-between;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overview__spec-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.overview__spec-value {
  font-weight: 500;
}

.overview__copy h3 {
  margin-bottom: var(--space-4);
}

.overview__copy p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* ============================================
   Interior gallery (Swiper)
   ============================================ */

.gallery {
  padding: var(--section-padding-y) var(--section-padding-x);
}

.gallery .swiper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: var(--space-12);
}

.gallery .swiper-slide {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
}

.gallery .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery .swiper-pagination-bullet {
  background: var(--text-muted);
  opacity: 0.6;
}

.gallery .swiper-pagination-bullet-active {
  background: var(--theme1-color);
  opacity: 1;
}

/* ============================================
   CTA banner (vehicle pages)
   ============================================ */

.cta-banner {
  padding: var(--space-20) var(--section-padding-x);
  text-align: center;
  background: var(--background-card);
}

.cta-banner__title {
  margin-bottom: var(--space-4);
}

.cta-banner__text {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Reveal animations (GSAP targets)
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

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