/* =========================================================
   Broken out from the former global styles.css
   (page-specific rules below keep higher priority)
   ========================================================= */

/* Uniform 20px padding around all index page content */
.container {
  padding: 20px;
}

/* ===== One-page sections ===== */
.section {
  padding: 0;
}

.section-title {
  font-size: var(--heading-3xl);
  font-family: var(--font-heading);
}

.section-description {
  font-size: var(--text-lead);
  font-family: var(--font-body);
  color: var(--color-muted);
  margin: 0.5rem 0;
}

.section-subtitle {
  color: var(--color-muted);
  margin: -0.75rem 0 2rem;
  font-size: var(--text-md);
}

/* ===== Features ===== */
.features {
  padding: 20px;
}

.service-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc((100% - 2rem) / 3);
  min-height: 240px;
  padding: 1.5rem;
  border: 1px solid var(--quote-line, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius);
  background: var(--quote-card, #131314);
  box-shadow: 0 0 5px 0.75px var(--color-muted);
}

.service-card--link {
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
}

.service-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--heading-xl);
}

.service-card__desc {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  color: var(--color-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.service-card__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.service-card__option:not(:last-child)::after {
  content: "\2022";
  margin: 0 0.5rem;
  color: var(--color-primary);
}

.service-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

@media (max-width: 640px) {
  .service-grid {
    flex-direction: column;
  }

  .service-card {
    flex-basis: 100%;
  }
}

/* ===== Our Vehicles gallery ===== */
.vehicle-gallery {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.vehicle-track {
  display: flex;
  width: max-content;
  animation: vehicle-scroll 100s linear infinite;
}

.vehicle-gallery:hover .vehicle-track,
.vehicle-gallery.is-paused .vehicle-track {
  animation-play-state: paused;
}

.vehicle-card {
  flex: 0 0 auto;
  width: 480px;
  margin: 0 1.25rem 0 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.vehicle-card img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

@keyframes vehicle-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .vehicle-card {
    width: 85vw;
  }

  .vehicle-card img {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

/* ===== Vehicle details modal ===== */
.vehicle-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vehicle-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.vehicle-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.vehicle-modal__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 70vw;
  max-width: 70vw;
  height: auto;
  max-height: 70vh;
  overflow-y: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s ease;
}

.vehicle-modal.is-open .vehicle-modal__card {
  transform: translateY(0) scale(1);
}

.vehicle-modal__img {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
}

.vehicle-modal__body {
  flex: 0 0 auto;
  padding: 1.5rem;
}

.vehicle-modal__service {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: var(--heading-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.vehicle-modal__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: var(--text-xl);
}

.vehicle-modal__detail {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.vehicle-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

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

@media (prefers-reduced-motion: reduce) {
  .vehicle-modal,
  .vehicle-modal__card {
    transition: none;
  }
}

/* Scroll-reveal: service cards slide in as they enter the viewport */
.reveal-on-scroll {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger the service cards so they fade in one after another */
#home-services .service-card:nth-child(2) { transition-delay: 0.12s; }
#home-services .service-card:nth-child(3) { transition-delay: 0.24s; }
#home-services .service-card:nth-child(4) { transition-delay: 0.36s; }
#home-services .service-card:nth-child(5) { transition-delay: 0.48s; }
#home-services .service-card:nth-child(6) { transition-delay: 0.6s; }
#home-services .service-card:nth-child(7) { transition-delay: 0.72s; }
#home-services .service-card:nth-child(8) { transition-delay: 0.84s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Contact form ===== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 560px;
}

.mono {
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.contact-section {
  border: none;
  padding: 0;
  margin: 0;
}

.contact-step {
  font-size: var(--text-base);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.contact-input {
  width: 100%;
  height: 3.5rem;
  padding: 0 1rem;
  color: var(--color-text);
  background: var(--quote-card, #131314);
  border: 1px solid var(--quote-line, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: var(--text-base);
}

.contact-input::placeholder {
  color: var(--color-muted);
  font-family: var(--font-body);
}

.contact-input:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.contact-textarea {
  height: auto;
  min-height: 7rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  resize: vertical;
}

.form-status {
  margin-top: 1rem;
  font-weight: 500;
}

.form-status.success {
  color: #15803d;
}

.form-status.error {
  color: #b91c1c;
}

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

.intro-video {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--color-bg);
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.intro-video[hidden] {
  display: none;
}

.intro-video.is-hiding{
  opacity: 0;
}

.intro-video__media{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: var(--heading-xs);
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
  text-decoration: none;
}

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

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

/* ===== Hero (home) ===== */
.hero {
  background: var(--color-bg);
  display: flex;
  text-align: center;
  justify-content: center;
  height: var(--hero-height);
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.image-container {
  height: 100%;
  width: 100%;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content:space-evenly;
  padding: 5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  width: 85%;
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */
}

.hero-logo {
  width: 70%;
  height: auto;
  animation: hero-fade-in 2s ease-out both;
  opacity: 0;
  z-index: 10;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-fade-in 2s ease-out both;
  opacity: 1;
}

.hero-title {
  font-size: var(--heading-4xl);
  font-family: var(--font-heading);
  color: #fff;
  width: 100%;
  text-align: left;
  animation: hero-fade-in 2s ease-out both;
}

.hero-description {
  font-size: var(--text-lead);
  font-family: var(--font-body);
  color: var(--color-muted);
  width: 85%;
  text-align: left;
  animation: hero-fade-in 2s ease-out both;
}

.hero-quote-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: var(--heading-xl);
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
  text-decoration: none;
  background: var(--color-primary);
  color: #fff;
  z-index: 10;
  padding: 1rem 2.5rem;
  opacity: 0.95;
}

.hero-quote-btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

@media screen and (max-width: 960px) {
  .hero-container{
    align-items: flex-start; 
    
  }
  .image-container {
    width: 100%;
    height: 100%;
  }

  .hero-image {
    height: 100%;
    object-fit: cover;
  }

  .hero-overlay {
    padding: 2rem;
  }

  .hero-logo {
    width: 90%;
  }

  .hero-title {
    width: 100%;
  }

  .hero-description {
    width: 100%;
  }

  .hero-quote-btn {
    font-size: var(--heading-sm);
    padding: 0.75rem 1.5rem;
  }
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}