/*
 * ARCHETYPE: Atmospheric-Moody
 * LAYOUT DNA: Full-bleed hero with text overlay, Asymmetric grid, Overlapping elements, Full-width image bands
 * SIGNATURE DETAIL: Scroll-triggered color stripe that pulses through sections — a yellow "diagnostic scan line"
 * WHY: Fix It is a premium European exotic car workshop. Dark, cinematic, industrial — the website should feel like walking into their dramatic garage with Bentleys and Lamborghinis under dramatic lighting.
 */

/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
  --color-primary: #1C1C1E;
  --color-secondary: #F5C518;
  --color-accent: #CC2936;
  --color-bg: #0A0A0B;
  --color-bg-raised: #141416;
  --color-bg-card: #1A1A1D;
  --color-text: #E8E8EC;
  --color-text-muted: #8A8A8F;
  --color-border: rgba(245, 197, 24, 0.12);
  --color-surface: #111113;

  --font-heading: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --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.5vw, 1.35rem);
  --text-xl: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --text-2xl: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  --text-3xl: clamp(1.875rem, 1rem + 2.5vw, 3rem);
  --text-hero: clamp(2.5rem, 1rem + 5vw, 5.5rem);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --max-width: 1200px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover { color: #FFD84D; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  text-wrap: balance;
}

::selection {
  background: rgba(245, 197, 24, 0.3);
  color: var(--color-text);
}

/* ============================================
   SCAN LINE — signature detail
   ============================================ */
.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
  z-index: 1000;
  transform: scaleX(0);
  transform-origin: left;
  animation: scan-progress linear;
  animation-timeline: scroll();
}

@keyframes scan-progress {
  to { transform: scaleX(1); }
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  width: min(92%, var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(92%, 800px);
  margin-inline: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.4s var(--ease-out-expo),
              backdrop-filter 0.4s var(--ease-out-expo),
              box-shadow 0.4s var(--ease-out-expo);
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  position: relative;
  transition: color 0.3s ease;
}

.nav__links a:hover { color: var(--color-secondary); }

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width 0.3s var(--ease-out-expo);
}
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  padding: 0.6rem 1.5rem;
  background: var(--color-secondary);
  color: var(--color-primary) !important;
  font-weight: 700 !important;
  border-radius: 4px;
  letter-spacing: 0.08em !important;
  transition: all 0.25s ease !important;
}
.nav__cta:hover {
  background: #FFD84D !important;
  transform: translateY(-1px);
}
.nav__cta::after { display: none !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s var(--ease-out-expo);
  transform-origin: center;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 1200px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

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

@supports (animation-timeline: scroll()) {
  .hero__bg {
    animation: hero-parallax linear;
    animation-timeline: scroll();
    animation-range: 0% 50%;
  }
  @keyframes hero-parallax {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(12%) scale(1.04); }
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,0.95) 0%, rgba(10,10,11,0.4) 40%, rgba(10,10,11,0.2) 100%),
    linear-gradient(to right, rgba(10,10,11,0.6) 0%, transparent 50%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(3rem, 8vh, 6rem);
  max-width: 700px;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--color-secondary);
}

.hero__title {
  font-size: var(--text-hero);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1.0;
}

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

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero__stars {
  color: var(--color-secondary);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-secondary);
  color: var(--color-primary);
  border-color: var(--color-secondary);
}
.btn--primary:hover {
  background: #FFD84D;
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255,255,255,0.2);
}
.btn--outline:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.section__label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-secondary);
}

.section__title {
  font-size: var(--text-3xl);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ============================================
   BRANDS BAR
   ============================================ */
.brands-bar {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: var(--color-surface);
}

.brands-bar__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  flex-wrap: wrap;
}

.brands-bar__item {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.brands-bar__item:hover { opacity: 1; }

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.service-card:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card__icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

/* ============================================
   WORKSHOP — Split layout
   ============================================ */
.workshop {
  position: relative;
}

.workshop__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.workshop__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.workshop__img {
  border-radius: 8px;
  overflow: hidden;
}

.workshop__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  transition: transform 0.6s var(--ease-out-expo);
}

.workshop__img:hover img { transform: scale(1.05); }

.workshop__img--tall {
  grid-row: span 2;
}

.workshop__img--tall img {
  aspect-ratio: auto;
  height: 100%;
}

.workshop__content {
  padding-left: 2rem;
}

.workshop__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat {
  text-align: left;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-secondary);
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ============================================
   GALLERY — Full-bleed image band
   ============================================ */
.gallery-band {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--color-surface);
}

.gallery-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-scroll__item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-scroll__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.gallery-scroll__item:hover img { transform: scale(1.06); }

/* ============================================
   REVIEWS
   ============================================ */
.reviews {
  background: var(--color-bg);
}

.reviews__hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.reviews__score {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.reviews__stars-big {
  font-size: 2rem;
  color: var(--color-secondary);
  letter-spacing: 4px;
  margin-bottom: 0.75rem;
}

.reviews__count {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 2rem;
}

.review-card__stars {
  color: var(--color-secondary);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.review-card__text {
  font-size: var(--text-base);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.review-card__author {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: normal;
}

/* ============================================
   CONTACT / CTA
   ============================================ */
.cta-section {
  background: var(--color-bg-card);
  border-top: 2px solid var(--color-secondary);
}

.cta__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.cta__info h2 {
  font-size: var(--text-3xl);
  margin-bottom: 1.5rem;
}

.cta__detail {
  margin-bottom: 1.5rem;
}

.cta__detail-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.cta__detail-value {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
}

.cta__detail-value a {
  color: var(--color-text);
  font-size: var(--text-xl);
  font-weight: 600;
}

.cta__map {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-bg);
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2rem 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer a { color: var(--color-secondary); }

/* ============================================
   SCROLL REVEALS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out-expo);
}

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

.reveal--left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out-expo);
}
.reveal--left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out-expo);
}
.reveal--scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger */
.services-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.services-grid .reveal:nth-child(3) { transition-delay: 200ms; }
.gallery-scroll .reveal--scale:nth-child(2) { transition-delay: 80ms; }
.gallery-scroll .reveal--scale:nth-child(3) { transition-delay: 160ms; }
.gallery-scroll .reveal--scale:nth-child(4) { transition-delay: 240ms; }
.reviews-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.reviews-grid .reveal:nth-child(3) { transition-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--left, .reveal--scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scan-line { display: none; }
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo);
  }

  .nav__links.open { transform: translateX(0); }

  .nav__links a {
    font-size: var(--text-lg);
    color: var(--color-text);
  }

  .nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .workshop__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .workshop__content {
    padding-left: 0;
    order: -1;
  }

  .gallery-scroll {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .cta__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

  .workshop__img--tall {
    grid-row: auto;
  }

  .gallery-scroll {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
