/* ============================================
   VCTI Truck & Trailer Repair — Design Tokens
   ============================================ */

:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 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;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transition */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Trebuchet MS', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

/* ============================================
   VCTI Color Palette — Red, White, Blue
   Industrial, trustworthy, bold
   ============================================ */

:root,
[data-theme='light'] {
  --color-bg: #f5f5f3;
  --color-surface: #ffffff;
  --color-surface-2: #fafaf8;
  --color-surface-offset: #eceae6;
  --color-divider: #d6d3ce;
  --color-border: #c8c5bf;

  --color-text: #1a1a2e;
  --color-text-muted: #5c5c6d;
  --color-text-faint: #9a9aa8;
  --color-text-inverse: #ffffff;

  --color-primary: #c41e3a;
  --color-primary-hover: #a01830;
  --color-primary-active: #7d1225;
  --color-primary-highlight: #fde8ec;

  --color-accent: #1b3a6b;
  --color-accent-hover: #152e56;
  --color-accent-active: #0f2240;

  --color-success: #437a22;
  --color-warning: #964219;
  --color-error: #c41e3a;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

[data-theme='dark'] {
  --color-bg: #0f0f14;
  --color-surface: #1a1a22;
  --color-surface-2: #22222c;
  --color-surface-offset: #151519;
  --color-divider: #2a2a36;
  --color-border: #3a3a48;

  --color-text: #e0e0e6;
  --color-text-muted: #8a8a9a;
  --color-text-faint: #5a5a6a;
  --color-text-inverse: #0f0f14;

  --color-primary: #e8506a;
  --color-primary-hover: #d43a54;
  --color-primary-active: #c02e48;
  --color-primary-highlight: #2a1a1e;

  --color-accent: #4a7ec8;
  --color-accent-hover: #3a6ab0;
  --color-accent-active: #2a5698;

  --color-success: #6daa45;
  --color-warning: #bb653b;
  --color-error: #e8506a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f0f14;
    --color-surface: #1a1a22;
    --color-surface-2: #22222c;
    --color-surface-offset: #151519;
    --color-divider: #2a2a36;
    --color-border: #3a3a48;
    --color-text: #e0e0e6;
    --color-text-muted: #8a8a9a;
    --color-text-faint: #5a5a6a;
    --color-text-inverse: #0f0f14;
    --color-primary: #e8506a;
    --color-primary-hover: #d43a54;
    --color-primary-active: #c02e48;
    --color-primary-highlight: #2a1a1e;
    --color-accent: #4a7ec8;
    --color-accent-hover: #3a6ab0;
    --color-accent-active: #2a5698;
    --color-success: #6daa45;
    --color-warning: #bb653b;
    --color-error: #e8506a;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

.section {
  padding-block: clamp(var(--space-10), 6vw, var(--space-24));
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s ease;
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo img {
  height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
  .header__logo img {
    height: 56px;
  }
}

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

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
}

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

/* Mobile menu */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 99;
  background: var(--color-bg);
  padding: var(--space-20) var(--space-6) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav__link {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.mobile-nav__link:hover,
.mobile-nav__link:active {
  color: var(--color-primary);
}

.mobile-nav__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.06);
}

/* ============================================
   CTA Button
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
}

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

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

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--outline:hover {
  background: oklch(from var(--color-text) l c h / 0.04);
  border-color: var(--color-text-muted);
}

.btn--accent {
  background: var(--color-accent);
  color: #ffffff;
}

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

.btn--large {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(0.12 0.02 250 / 0.92) 0%,
    oklch(0.12 0.02 250 / 0.75) 50%,
    oklch(0.12 0.02 250 / 0.3) 100%
  );
}

@media (max-width: 767px) {
  .hero__overlay {
    background: linear-gradient(
      to bottom,
      oklch(0.12 0.02 250 / 0.7) 0%,
      oklch(0.12 0.02 250 / 0.85) 60%,
      oklch(0.12 0.02 250 / 0.95) 100%
    );
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding-block: var(--space-16);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: oklch(1 0 0 / 0.12);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid oklch(1 0 0 / 0.15);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.hero__title span {
  color: var(--color-primary);
}

[data-theme='dark'] .hero__title span,
.dark .hero__title span {
  color: #e8506a;
}

.hero__subtitle {
  font-size: var(--text-base);
  color: oklch(1 0 0 / 0.8);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 50ch;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__phone-btn {
  background: var(--color-primary);
  color: #ffffff;
}

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

/* ============================================
   Section Headings
   ============================================ */

.section-header {
  text-align: left;
  margin-bottom: var(--space-10);
}

.section-header__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.section-header__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
}

/* ============================================
   Services Grid
   ============================================ */

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

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  padding: var(--space-6);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.07);
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.service-card__icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   About / Story Section
   ============================================ */

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.about-content__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.about-stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.about-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ============================================
   Why Choose Us
   ============================================ */

.why-section {
  background: var(--color-accent);
  color: #ffffff;
}

.why-section .section-header__label {
  color: oklch(1 0 0 / 0.6);
}

.why-section .section-header__title {
  color: #ffffff;
}

.why-section .section-header__desc {
  color: oklch(1 0 0 / 0.75);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.why-card {
  padding: var(--space-5);
  background: oklch(1 0 0 / 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(1 0 0 / 0.1);
}

.why-card__icon {
  width: 40px;
  height: 40px;
  color: oklch(1 0 0 / 0.9);
  margin-bottom: var(--space-3);
}

.why-card__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.why-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: var(--space-2);
}

.why-card__desc {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.7);
  line-height: 1.5;
}

/* ============================================
   CTA Banner
   ============================================ */

.cta-banner {
  background: var(--color-surface);
}

.cta-banner__inner {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-xl);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.15);
}

.cta-banner__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.cta-banner__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 48ch;
  margin-inline: auto;
}

.cta-banner__phone {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.cta-banner__phone:hover {
  color: var(--color-primary-hover);
}

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

.footer {
  background: var(--color-accent);
  color: #ffffff;
  padding-block: var(--space-10);
}

[data-theme='dark'] .footer {
  background: var(--color-surface);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
  }
}

.footer__brand-logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
}

.footer__desc {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.7);
  line-height: 1.6;
  max-width: 40ch;
}

[data-theme='dark'] .footer__desc {
  color: var(--color-text-muted);
}

.footer__heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(1 0 0 / 0.5);
  margin-bottom: var(--space-4);
}

[data-theme='dark'] .footer__heading {
  color: var(--color-text-faint);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__links a {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.8);
  text-decoration: none;
}

[data-theme='dark'] .footer__links a {
  color: var(--color-text-muted);
}

.footer__links a:hover {
  color: #ffffff;
}

[data-theme='dark'] .footer__links a:hover {
  color: var(--color-text);
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.8);
  margin-bottom: var(--space-2);
}

[data-theme='dark'] .footer__contact-item {
  color: var(--color-text-muted);
}

.footer__contact-item a {
  color: inherit;
  text-decoration: none;
}

.footer__contact-item a:hover {
  color: #ffffff;
}

[data-theme='dark'] .footer__contact-item a:hover {
  color: var(--color-text);
}

.footer__contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.5;
}

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.1);
  text-align: center;
  font-size: var(--text-xs);
  color: oklch(1 0 0 / 0.5);
}

[data-theme='dark'] .footer__bottom {
  border-top-color: var(--color-border);
  color: var(--color-text-faint);
}

/* ============================================
   Scroll Animations
   ============================================ */

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

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

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* ============================================
   Mobile phone floating CTA
   ============================================ */

.phone-float {
  display: flex;
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.phone-float:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
}

.phone-float svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .phone-float {
    display: none;
  }
}
