/* ==========================================================================
   CLASS OTOMOTİV OTONOMİ — Responsive
   ========================================================================== */

/* Large desktop */
@media (min-width: 1400px) {
  :root {
    --container: 78rem;
  }
}

/* Tablet & below: collapse desktop nav */
@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .btn-header-call span {
    display: none;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .story-visual {
    max-width: 22rem;
  }

  .why-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-item:nth-child(4),
  .why-item:nth-child(5) {
    grid-column: span 1;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .world-grid {
    grid-template-columns: 1fr;
  }

  .visit-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(10rem, 28vw);
  }

  .gallery-item {
    grid-column: span 3;
  }

  .gallery-item--wide {
    grid-column: span 6;
  }

  .gallery-item--tall {
    grid-row: span 1;
    grid-column: span 3;
  }

  .why-list {
    grid-template-columns: 1fr 1fr;
  }

  .hero-lines {
    inset: 12% 5% 18%;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --header-h: 4rem;
  }

  .container {
    width: min(100% - 1.75rem, var(--container));
  }

  body {
    font-size: 1rem;
  }

  .hero {
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 4.5rem;
    align-items: flex-end;
    min-height: 100svh;
  }

  .hero-content {
    padding-bottom: 1rem;
  }

  .hero-brand {
    letter-spacing: 0.04em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-grid {
    opacity: 0.22;
    transform: perspective(800px) rotateX(62deg) scale(1.8) translateY(-5%);
  }

  .hero-photo {
    object-position: 48% 38%;
    filter: saturate(0.9) contrast(1.04) brightness(0.62);
  }

  .hero-vignette {
    background:
      linear-gradient(to bottom, rgba(8, 9, 11, 0.55) 0%, rgba(8, 9, 11, 0.2) 28%, rgba(8, 9, 11, 0.55) 58%, rgba(8, 9, 11, 0.96) 100%),
      linear-gradient(to top, rgba(8, 9, 11, 0.85) 0%, transparent 45%);
  }

  .story,
  .gallery,
  .world,
  .why,
  .visit,
  .contact {
    padding: 4.5rem 0;
  }

  .slogan-band {
    padding: 5rem 0;
  }

  .section-head {
    margin-bottom: 2.5rem;
  }

  .gallery-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(12rem, auto);
    gap: 0.5rem;
  }

  .gallery-item,
  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: 1;
    grid-row: auto;
  }

  .why-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .why-item {
    padding: 1.5rem 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: left;
  }

  .visit-actions {
    flex-direction: column;
  }

  .visit-actions .btn {
    width: 100%;
  }

  .float-cta {
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .float-btn {
    width: 2.85rem;
    height: 2.85rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.35rem;
  }

  .lightbox-prev {
    left: 0.35rem;
  }

  .lightbox-next {
    right: 0.35rem;
  }
}

/* Narrow phones */
@media (max-width: 380px) {
  .brand-name {
    font-size: 0.7rem;
  }

  .hero-slogan {
    font-size: 1.1rem;
  }
}

/* Short viewports (landscape phones) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 3rem;
  }

  .hero-scroll {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-grid,
  .hero-glow,
  .hero-brand,
  .hero-scroll span,
  .visit-map-pin,
  .hero-fx-beam,
  .hero-fx-scan,
  .hero-fx-line {
    animation: none !important;
  }
}

/* High contrast support */
@media (prefers-contrast: more) {
  .btn-outline {
    border-color: var(--white);
  }

  .nav-desktop a,
  .section-lead,
  .story-text,
  .why-item p {
    color: #d0d4db;
  }
}
