/* Keep catalog photos proportional despite different source aspect ratios. */
.header-request {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 20px;
  padding: 13px 18px;
  border: 0;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}

.site-header.is-scrolled:not(.site-header-light) {
  background: rgba(16, 19, 16, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.site-header-light {
  background: var(--ink);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.header-request span {
  color: var(--ink);
  font-size: 1.1rem;
}

.header-request:hover {
  background: var(--ink);
  color: #fff;
}

.header-request:hover span {
  color: var(--lime);
}

.home-page .car-card:nth-child(n + 5) {
  display: none;
}

.site-header-light {
  position: fixed;
  color: #fff;
}

.site-header-light .desktop-nav a,
.site-header-light .header-phone {
  color: #fff;
  opacity: 0.72;
}

.site-header-light .menu-toggle i {
  background: #fff;
}

.site-header-light .header-request {
  background: var(--lime);
  color: var(--ink);
}

.site-header-light .header-request:hover {
  background: var(--ink);
  color: #fff;
}

.fleet-page .car-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-hero {
  min-height: 470px;
  padding-top: 120px;
  padding-bottom: 90px;
  background: var(--paper);
}

.page-hero h1 {
  max-width: 700px;
  margin: 30px 0 22px;
  font: 800 clamp(4rem, 8vw, 8rem) / 0.86 var(--display);
  letter-spacing: -0.1em;
}

.page-hero h1 span {
  font-family: var(--serif);
  font-weight: 400;
}

.page-hero > p {
  max-width: 390px;
  margin: 0;
  color: #6f756d;
  font-size: 0.9rem;
  line-height: 1.65;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  border-top: 1px solid var(--line);
}

.contact-detail {
  min-height: 165px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.contact-detail small {
  display: block;
  margin-bottom: 16px;
  color: #7c8278;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-detail a,
.contact-detail p {
  margin: 0;
  font: 700 clamp(1.1rem, 2vw, 1.65rem) / 1.2 var(--display);
}

.contact-detail p {
  font-size: 0.92rem;
  line-height: 1.55;
}

.contact-detail a span {
  color: #81921c;
}

.car-image {
  background: #f7f7f3;
}

.car-image img {
  display: block;
  padding: 8px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 1100px) and (min-width: 801px) {
  .fleet-page .car-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile-specific layout: touch first, with safe-area support for modern phones. */
@media (max-width: 800px) {
  body {
    min-width: 320px;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-header {
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .site-header-light {
    background: var(--ink);
  }

  .header-request {
    display: inline-flex;
    min-height: 40px;
    gap: 6px;
    padding: 11px 10px;
    font-size: 0.58rem;
  }

  .header-request span {
    font-size: 0.85rem;
  }

  .fleet-page .car-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 760px;
    padding-bottom: max(70px, env(safe-area-inset-bottom));
  }

  .hero h1,
  .intro h2,
  .section-heading h2,
  .benefit-layout h2,
  .contact-section h2,
  .contact-cta h2,
  .modal-panel h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    max-width: 290px;
  }

  .hero-actions .button,
  .hero-actions .text-link {
    min-height: 48px;
  }

  .hero-actions .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    min-height: 126px;
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter {
    min-height: 44px;
    padding: 10px 18px;
  }

  .car-info {
    gap: 12px;
    padding: 22px 20px 14px;
  }

  .car-info h3 {
    font-size: clamp(1.5rem, 8vw, 2.1rem);
  }

  .car-price strong {
    font-size: 1.05rem;
  }

  .car-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 20px;
    padding: 14px 0 18px;
  }

  .car-meta span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
  }

  .reserve-btn {
    grid-column: 1 / -1;
    min-height: 46px;
    border: 1px solid currentColor;
  }

  .fleet-more {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-cta {
    padding-bottom: max(85px, env(safe-area-inset-bottom));
  }

  .contact-cta .button {
    min-height: 50px;
  }

  .site-footer {
    padding-bottom: max(45px, env(safe-area-inset-bottom));
  }

  .page-hero {
    min-height: 390px;
    padding-top: 75px;
    padding-bottom: 70px;
  }

  .page-hero h1 {
    font-size: clamp(4rem, 18vw, 6.5rem);
  }

  .contact-details {
    display: block;
  }

  .contact-detail {
    min-height: 135px;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 750px;
  }

  .hero-visual {
    min-height: 270px;
  }

  .hero-car-wrap {
    inset: 20px -22% 0 -12%;
  }

  .hero-sticker {
    right: 3%;
  }

  .section-shell {
    padding-right: 20px;
    padding-left: 20px;
  }

  .contact-section {
    gap: 0;
  }

  .modal-panel {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    padding: 43px 20px max(26px, env(safe-area-inset-bottom));
  }

  .modal-panel h2 {
    font-size: 3rem;
  }

  .modal-form {
    gap: 18px;
  }

  .modal-form input,
  .modal-form select,
  .modal-form textarea {
    min-height: 44px;
  }

  .modal-close {
    top: 13px;
    right: 13px;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
