:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 4px;
  width: 0%;
  background: #ef4444;
  transform-origin: left center;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 32px;
  background: #ef4444;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.menu-toggle.is-open span {
  background: #fff;
}

.menu-toggle.is-open span:first-child {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}

#site-menu.is-open {
  display: block;
  animation: revealMenu 0.55s cubic-bezier(0.76, 0, 0.24, 1) both;
}

@keyframes revealMenu {
  from {
    clip-path: circle(0% at 95% 5%);
  }
  to {
    clip-path: circle(150% at 95% 5%);
  }
}

.spin-star {
  animation: spin 20s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.hero-bg {
  animation: cinematicPan 15s ease-in-out infinite;
}

@keyframes cinematicPan {
  0%, 100% {
    transform: scale(1) translate(0, 0) rotate(0deg);
  }
  35% {
    transform: scale(1.14) translate(-36px, 24px) rotate(1.5deg);
  }
  70% {
    transform: scale(1.05) translate(24px, -18px) rotate(-1deg);
  }
}

.soft-pulse {
  animation: softPulse 8s ease-in-out infinite;
}

@keyframes softPulse {
  0%, 100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.85;
  }
}

.cta-gradient-motion {
  isolation: isolate;
}

.cta-gradient-motion::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(239, 68, 68, 0.6), transparent 28%),
    linear-gradient(125deg, #000000 0%, #1f0707 18%, #ef4444 42%, #7f1d1d 56%, #000000 78%, #ef4444 100%);
  background-size: 180% 180%, 260% 260%;
  pointer-events: none;
  animation: ctaRedBlackFlow 14s ease-in-out infinite;
}

@keyframes ctaRedBlackFlow {
  0% {
    background-position: 0% 30%, 0% 50%;
  }

  50% {
    background-position: 82% 64%, 100% 50%;
  }

  100% {
    background-position: 0% 30%, 0% 50%;
  }
}

.hero-banner {
  min-height: 100vh;
  min-height: 100svh;
}

.hero-content {
  text-wrap: balance;
}

.hero-headline {
  font-size: var(--hero-font-size, clamp(3.6rem, 13.8vw, 10.5rem));
  letter-spacing: 0;
}

[dir="rtl"] .hero-headline {
  font-size: var(--hero-font-size, clamp(3.25rem, 12.8vw, 9.75rem));
}

.hero-subtitle {
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hero-cta {
  max-width: min(100%, 22rem);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .cta-gradient-motion::before {
    animation: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ef4444;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s ease;
}

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

.service-card > * {
  position: relative;
  z-index: 1;
}

.clients-logo-section {
  width: 100%;
  max-width: min(1800px, calc(100vw - 2rem));
  margin: 0 auto;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .clients-logo-section {
    max-width: min(1800px, calc(100vw - 4rem));
  }
}

.marquee-track {
  width: max-content;
  animation: marquee 20s linear infinite;
}

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

[dir="rtl"] .marquee-track {
  animation-direction: reverse;
}

.work-filter-card.is-hidden {
  display: none;
}

.work-filter.is-active {
  background: #ef4444;
  color: #fff;
}

.image-zoom img {
  transition: transform 0.5s ease;
}

.image-zoom:hover img,
.group:hover .image-zoom img {
  transform: scale(1.06);
}

@media (max-width: 640px) {
  .hero-bg {
    left: -20%;
    top: -10%;
    width: 140%;
  }

  .hero-headline {
    display: flex;
    flex-wrap: wrap;
    font-size: var(--hero-mobile-font-size, clamp(3rem, 12.9vw, 3.85rem));
    gap: 0.04em 0.12em;
    justify-content: center;
    max-width: min(100%, 22rem);
    white-space: normal;
    transform: translateZ(0);
  }

  [dir="rtl"] .hero-headline {
    font-size: var(--hero-mobile-font-size, clamp(2.65rem, 11.6vw, 3.45rem));
    max-width: min(100%, 23rem);
  }

  .hero-mobile-line-break {
    flex-basis: 100%;
    height: 0;
  }

  .hero-subtitle {
    max-width: 20rem;
  }

  .hero-cta {
    width: min(100%, 18rem);
  }

  .brand-mark {
    left: 1rem;
    top: 1.35rem;
  }

  .menu-toggle {
    right: 0.75rem;
    top: 0.75rem;
  }

  .menu-toggle span {
    width: 24px;
  }

  .clients-logo-section {
    max-width: 100%;
    overflow: visible;
  }

  .clients-mobile-grid {
    direction: inherit;
  }
}
