#hero {
  position: relative;
  isolation: isolate;
}

#hero .hero-media {
  position: absolute;
  right: 3%;
  top: 14%;
  width: min(42vw, 520px);
  aspect-ratio: 4/5;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
  border: 6px solid rgba(243, 227, 180, 0.85);
  z-index: 1;
}

#hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: min(55ch, 58%);
  backdrop-filter: blur(1.5px);
}

.services-marquee-wrap {
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.services-marquee-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: looksMarquee 24s linear infinite;
}

.services-marquee-track--reverse {
  animation-direction: reverse;
  animation-duration: 28s;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 165, 75, 0.34);
  background: linear-gradient(135deg, #191919 0%, #101010 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  color: #f5deb0;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 201, 120, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(227, 201, 120, 0.35), 0 0 18px rgba(201, 165, 75, 0.36);
}

.service-pill i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c9a54b;
  color: #111;
  font-size: 0.95rem;
}

@keyframes looksMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.clients-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #111112 0%, #1b1b1d 100%);
}

.clients-section .section-header h2 {
  color: #f2ddb0;
}

.clients-section .section-header p {
  color: #c9c9c9;
}

.clients-section .clients-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 80px;
  gap: 18px;
  transition: opacity 0.45s ease;
}

.clients-section .clients-grid--switching {
  opacity: 0.88;
}

.clients-section .client-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(201, 165, 75, 0.3);
  background: #f6f1e6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  grid-row: span 3;
  will-change: transform;
  animation: clientFloatA 6.5s ease-in-out infinite;
}

.clients-section .client-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.clients-section .client-card:nth-child(even) {
  animation-name: clientFloatB;
  animation-delay: 0.35s;
}

.clients-section .client-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 45%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

.clients-section .client-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: clientZoom 11s ease-in-out infinite;
}

.clients-section .client-card--tall {
  grid-row: span 4;
}

.clients-section .client-card--featured {
  grid-row: span 4;
  border-color: rgba(201, 165, 75, 0.68);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.clients-section .client-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(180deg, rgba(30, 10, 22, 0) 0%, rgba(30, 10, 22, 0.65) 66%, rgba(30, 10, 22, 0.82) 100%);
  z-index: 2;
}

.clients-section .client-caption span {
  display: inline-block;
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.clients-section .clients-empty {
  grid-column: 1/-1;
  border: 1px dashed rgba(201, 165, 75, 0.3);
  border-radius: 18px;
  min-height: 220px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  color: #00c2a8;
  background: #f6f1e6;
  padding: 30px;
}

.clients-section .clients-empty i {
  font-size: 2.2rem;
}

.clients-section .clients-cta {
  text-align: center;
  margin-top: 34px;
}

@keyframes clientFloatA {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  40% {
    transform: translateY(-6px) translateX(2px);
  }
  70% {
    transform: translateY(3px) translateX(-2px);
  }
}

@keyframes clientFloatB {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  35% {
    transform: translateY(5px) translateX(-3px);
  }
  75% {
    transform: translateY(-5px) translateX(2px);
  }
}

@keyframes clientZoom {
  0%, 100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.07);
  }
  75% {
    transform: scale(1.03);
  }
}

@media (max-width: 1024px) {
  #hero .hero-media {
    width: min(44vw, 420px);
    right: 2%;
    top: 18%;
    border-radius: 20px;
  }

  #hero .hero-content {
    max-width: 60%;
  }
}

@media (max-width: 768px) {
  #hero {
    min-height: 620px;
  }

  #hero .hero-media {
    position: relative;
    margin: 22px auto 0;
    top: auto;
    right: auto;
    width: min(84vw, 430px);
    border-width: 4px;
  }

  #hero .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .services-marquee-track {
    gap: 10px;
    animation-duration: 18s;
  }

  .service-pill {
    padding: 10px 13px;
    font-size: 0.78rem;
  }

  .service-pill i {
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
  }

  .clients-section {
    padding: 72px 0;
  }

  .clients-section .clients-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 70px;
    gap: 12px;
  }

  .clients-section .client-card {
    grid-row: span 3;
    animation-duration: 5.8s;
  }

  .clients-section .client-card--tall {
    grid-row: span 3;
  }

  .clients-section .client-card--featured {
    grid-row: span 4;
  }

  .clients-section .client-caption {
    padding: 24px 10px 9px;
  }

  .clients-section .client-caption span {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .services-marquee-wrap {
    gap: 8px;
  }

  .services-marquee-track {
    animation-duration: 16s;
  }

  .clients-section .clients-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 78px;
  }

  .clients-section .client-card,
  .clients-section .client-card--tall {
    grid-row: span 3;
  }

  .clients-section .client-card--featured {
    grid-row: span 3;
  }

  .clients-section .client-caption span {
    font-size: 0.74rem;
  }
}
