/* ============================================
   PUZZLE AGENCY - ULTIMATE DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --black: #050505;
  --black-light: #0a0a0a;
  --white: #fafafa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --violet-400: #A78BFA;
  --violet-500: #8B5CF6;
  --violet-600: #7C3AED;
  --cyan-400: #22D3EE;
  --cyan-500: #06B6D4;
  --pink-400: #F472B6;
  --pink-500: #EC4899;
  --orange-500: #F97316;
  --green-500: #10B981;

  --gradient-1: linear-gradient(135deg, var(--violet-600) 0%, var(--pink-500) 100%);
  --gradient-2: linear-gradient(135deg, var(--cyan-500) 0%, var(--violet-600) 100%);
  --gradient-3: linear-gradient(135deg, var(--orange-500) 0%, var(--pink-500) 100%);
  --gradient-text: linear-gradient(90deg, var(--violet-400), var(--pink-400), var(--cyan-400));

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--violet-600);
  color: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.preloader-logo {
  width: 100px;
  height: 100px;
  animation: preloaderPulse 2s ease-in-out infinite;
}

.preloader-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  animation: preloaderRotate 3s linear infinite;
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
}

.preloader-puzzle {
  width: 80px;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  animation: preloaderRotate 3s linear infinite;
}

.pl-piece {
  border-radius: 8px;
  animation: plPieceIn 0.8s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: scale(0) rotate(-180deg);
}

.pl-1 {
  background: var(--gradient-1);
  animation-delay: 0s;
}

.pl-2 {
  background: var(--gradient-2);
  animation-delay: 0.1s;
}

.pl-3 {
  background: var(--gradient-2);
  animation-delay: 0.2s;
}

.pl-4 {
  background: var(--gradient-1);
  animation-delay: 0.3s;
}

@keyframes plPieceIn {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes preloaderRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes preloaderPulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.1);
    filter: brightness(1.2);
  }
}

.preloader-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  gap: 2px;
}

.preloader-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: plTextIn 0.5s var(--ease-out-expo) forwards;
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: plTextIn 0.5s var(--ease-out-expo) forwards, gradientFlow 2s linear infinite;
}

.preloader-text span:nth-child(1) {
  animation-delay: 0.4s;
}

.preloader-text span:nth-child(2) {
  animation-delay: 0.45s;
}

.preloader-text span:nth-child(3) {
  animation-delay: 0.5s;
}

.preloader-text span:nth-child(4) {
  animation-delay: 0.55s;
}

.preloader-text span:nth-child(5) {
  animation-delay: 0.6s;
}

.preloader-text span:nth-child(6) {
  animation-delay: 0.65s;
}

@keyframes plTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preloader-loading {
  width: 120px;
  height: 3px;
  background: var(--gray-800);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-1);
  border-radius: 2px;
  animation: loadingProgress 2s var(--ease-out-quart) 0.5s forwards;
}

@keyframes loadingProgress {
  to {
    width: 100%;
  }
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-1);
  z-index: 1000;
  transform-origin: left;
  transform: scaleX(0);
}

/* Floating Puzzle Pieces */
.floating-puzzles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.puzzle-piece {
  position: absolute;
  opacity: 0.15;
  transition: transform 0.1s linear;
}

.floating-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.piece-1 {
  width: 120px;
  top: 15%;
  left: 5%;
  animation: floatSlow 20s ease-in-out infinite;
}

.piece-2 {
  width: 80px;
  top: 60%;
  right: 8%;
  animation: floatMedium 15s ease-in-out infinite reverse;
}

.piece-3 {
  width: 100px;
  bottom: 20%;
  left: 15%;
  animation: floatFast 12s ease-in-out infinite;
}

.piece-4 {
  width: 60px;
  top: 30%;
  right: 20%;
  animation: floatSlow 18s ease-in-out infinite reverse;
}

@keyframes floatSlow {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(20px, -30px) rotate(5deg);
  }

  50% {
    transform: translate(-10px, 20px) rotate(-3deg);
  }

  75% {
    transform: translate(15px, 10px) rotate(2deg);
  }
}

@keyframes floatMedium {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(-25px, 20px) rotate(-5deg);
  }

  66% {
    transform: translate(15px, -25px) rotate(3deg);
  }
}

@keyframes floatFast {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(30px, -20px) rotate(8deg);
  }
}

/* Custom Cursor */
.cursor,
.cursor-follower {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor {
  width: 8px;
  height: 8px;
  background: var(--white);
  transition: transform 0.1s;
}

.cursor.click {
  transform: translate(-50%, -50%) scale(0.8);
}

.cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.2s var(--ease-out-expo);
}

.cursor-follower.hover {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

.cursor-follower.active {
  transform: translate(-50%, -50%) scale(0.9);
}

@media (hover: none) {

  .cursor,
  .cursor-follower {
    display: none;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all 0.4s var(--ease-out-expo);
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.logo:hover .logo-img {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  transition: transform 0.4s var(--ease-out-expo);
}

.logo:hover .logo-icon {
  transform: rotate(90deg);
}

.logo-piece {
  border-radius: 4px;
  transition: all 0.4s var(--ease-out-expo);
}

.lp-1 {
  background: var(--gradient-1);
}

.lp-2 {
  background: var(--gradient-2);
}

.lp-3 {
  background: var(--gradient-2);
}

.lp-4 {
  background: var(--gradient-1);
}

.logo:hover .lp-1 {
  transform: translate(2px, 2px);
}

.logo:hover .lp-2 {
  transform: translate(-2px, 2px);
}

.logo:hover .lp-3 {
  transform: translate(2px, -2px);
}

.logo:hover .lp-4 {
  transform: translate(-2px, -2px);
}

.logo-text {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-400);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-1);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--white);
  color: var(--black);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  transition: all 0.3s var(--ease-out-expo);
}

.cta-arrow {
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-cta:hover {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.nav-cta:hover .cta-arrow {
  transform: translateX(4px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  z-index: 101;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.4s var(--ease-out-expo);
  transform-origin: center;
}

.mobile-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.mobile-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path 0.6s var(--ease-out-expo);
}

.mobile-menu.active {
  clip-path: circle(150% at calc(100% - 40px) 40px);
}

.mobile-nav-links {
  list-style: none;
  text-align: center;
}

.mobile-nav-links li {
  overflow: hidden;
}

.mobile-nav-links a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  padding: 0.25rem 0;
}

.mobile-nav-links a span {
  display: block;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out-expo);
}

.mobile-menu.active .mobile-nav-links a span {
  transform: translateY(0);
}

.mobile-nav-links li:nth-child(1) a span {
  transition-delay: 0.1s;
}

.mobile-nav-links li:nth-child(2) a span {
  transition-delay: 0.15s;
}

.mobile-nav-links li:nth-child(3) a span {
  transition-delay: 0.2s;
}

.mobile-nav-links li:nth-child(4) a span {
  transition-delay: 0.25s;
}

.mobile-menu-footer {
  position: absolute;
  bottom: 3rem;
}

.mobile-menu-footer a {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: glowPulse 8s ease-in-out infinite;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(124, 58, 237, 0.2);
  top: 0;
  left: 20%;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.15);
  bottom: 10%;
  right: 10%;
  animation-delay: -3s;
}

.glow-3 {
  width: 300px;
  height: 300px;
  background: rgba(236, 72, 153, 0.1);
  top: 40%;
  right: 30%;
  animation-delay: -5s;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.eyebrow-icon {
  display: flex;
  gap: 4px;
}

.eyebrow-icon span {
  width: 6px;
  height: 6px;
  background: var(--violet-500);
  border-radius: 50%;
  animation: iconPulse 1.5s ease-in-out infinite;
}

.eyebrow-icon span:nth-child(2) {
  animation-delay: 0.2s;
}

.eyebrow-icon span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes iconPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.hero-eyebrow>span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  overflow: hidden;
}

.title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: slideUp 0.8s var(--ease-out-expo) forwards;
}

.title-line:nth-child(1) .title-word:nth-child(1) {
  animation-delay: 0.3s;
}

.title-line:nth-child(1) .title-word:nth-child(2) {
  animation-delay: 0.35s;
}

.title-line:nth-child(1) .title-word:nth-child(3) {
  animation-delay: 0.4s;
}

.title-line:nth-child(2) .title-word {
  animation-delay: 0.5s;
}

.title-line:nth-child(3) .title-word:nth-child(1) {
  animation-delay: 0.6s;
}

.title-line:nth-child(3) .title-word:nth-child(2) {
  animation-delay: 0.65s;
}

.title-line:nth-child(3) .title-dot {
  animation-delay: 0.7s;
}

.title-gradient {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideUp 0.8s var(--ease-out-expo) 0.5s forwards, gradientFlow 3s linear infinite;
  opacity: 0;
  transform: translateY(100%);
}

.title-dot {
  display: inline-block;
  color: var(--violet-500);
  opacity: 0;
  transform: translateY(100%);
  animation: slideUp 0.8s var(--ease-out-expo) 0.7s forwards;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray-400);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.8s forwards;
}

.hero-tagline span {
  color: var(--gray-500);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out-expo) 1s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--gradient-1);
  color: var(--white);
  font-weight: 600;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.btn-icon {
  display: flex;
  transition: transform 0.3s var(--ease-out-expo);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 1px solid var(--gray-700);
  color: var(--white);
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.3s var(--ease-out-expo);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.scroll-text {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-500);
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: var(--gray-700);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  width: 3px;
  height: 10px;
  background: var(--violet-500);
  border-radius: 2px;
  position: absolute;
  left: -1px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% {
    top: -10px;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    top: 50px;
    opacity: 0;
  }
}

/* Hero Marquee */
.hero-marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-600);
  white-space: nowrap;
}

.marquee-icon {
  color: var(--violet-500);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styles */
section {
  padding: clamp(80px, 15vh, 150px) 0;
  position: relative;
}

.section-header {
  margin-bottom: 4rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.label-line {
  width: 40px;
  height: 1px;
  background: var(--gray-600);
}

.label-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.title-stroke {
  display: block;
  -webkit-text-stroke: 1px var(--gray-600);
  -webkit-text-fill-color: transparent;
}

.text-gradient {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s linear infinite;
}

/* Work Section */
.work {
  background: var(--black-light);
}

.work-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.work-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gray-900);
  transition: transform 0.5s var(--ease-out-expo);
}

.work-card:hover {
  transform: translateY(-10px);
}

.work-card.featured {
  grid-row: span 2;
}

.work-card.wide {
  grid-column: span 2;
}

.work-link {
  display: block;
}

.work-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.work-card.featured .work-media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 400px;
}

.work-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.6s var(--ease-out-expo);
}

.work-card:hover .work-bg {
  transform: scale(1.08);
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s;
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-cta {
  padding: 0.75rem 1.5rem;
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 100px;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease-out-expo);
}

.work-card:hover .work-cta {
  transform: translateY(0);
}

.work-content {
  padding: 1.5rem;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.work-cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet-400);
}

.work-year {
  font-size: 0.7rem;
  color: var(--gray-500);
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.work-desc {
  font-size: 0.9rem;
  color: var(--gray-400);
  line-height: 1.5;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.work-tags span {
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--gray-400);
}

.section-cta {
  margin-top: 4rem;
  text-align: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--white);
  transition: gap 0.3s var(--ease-out-expo);
}

.link-arrow svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s var(--ease-out-expo);
}

.link-arrow:hover {
  gap: 1rem;
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* Services Section */
.services {
  background: var(--black);
}

.services-accordion {
  border-top: 1px solid var(--gray-800);
}

.service-item {
  border-bottom: 1px solid var(--gray-800);
  cursor: pointer;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  transition: padding 0.4s var(--ease-out-expo);
}

.service-item.active .service-header,
.service-item:hover .service-header {
  padding: 2.5rem 0;
}

.service-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  min-width: 40px;
}

.service-item.active .service-num,
.service-item:hover .service-num {
  color: var(--violet-500);
}

.service-header h3 {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  transition: color 0.3s;
}

.service-item:hover .service-header h3 {
  color: var(--violet-400);
}

.service-toggle {
  width: 24px;
  height: 24px;
  position: relative;
}

.service-toggle span {
  position: absolute;
  background: var(--gray-500);
  transition: all 0.3s var(--ease-out-expo);
}

.service-toggle span:first-child {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.service-toggle span:last-child {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.service-item.active .service-toggle span:last-child {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.service-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out-expo), padding 0.5s var(--ease-out-expo);
}

.service-item.active .service-body {
  max-height: 300px;
  padding-bottom: 2rem;
}

.service-body p {
  color: var(--gray-400);
  max-width: 600px;
  margin-bottom: 1.5rem;
  padding-left: 60px;
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-left: 60px;
}

.service-list span {
  padding: 0.5rem 1rem;
  background: var(--gray-800);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--gray-300);
}

/* About Section */
.about {
  background: linear-gradient(180deg, var(--black-light) 0%, var(--black) 100%);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.about-text {
  margin-bottom: 3rem;
}

.about-text p {
  color: var(--gray-400);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-stats {
  display: flex;
  gap: 2rem;
}

.stat-card {
  padding: 1.5rem;
  background: var(--gray-900);
  border-radius: 16px;
  border: 1px solid var(--gray-800);
  min-width: 120px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.about-visual {
  position: relative;
  height: 500px;
}

.visual-card {
  position: absolute;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease-out-expo);
}

.card-inner {
  width: 100%;
  height: 100%;
}

.card-1 {
  width: 280px;
  height: 350px;
  top: 0;
  left: 0;
  z-index: 3;
}

.card-1 .card-inner {
  background: var(--gradient-1);
}

.card-2 {
  width: 240px;
  height: 300px;
  top: 50px;
  right: 20px;
  z-index: 2;
}

.card-2 .card-inner {
  background: var(--gradient-2);
}

.card-3 {
  width: 200px;
  height: 250px;
  bottom: 0;
  left: 60px;
  z-index: 1;
}

.card-3 .card-inner {
  background: var(--gradient-3);
}

.about-visual:hover .card-1 {
  transform: translate(-10px, -10px) rotate(-3deg);
}

.about-visual:hover .card-2 {
  transform: translate(10px, -5px) rotate(2deg);
}

.about-visual:hover .card-3 {
  transform: translate(5px, 10px) rotate(-1deg);
}

/* Testimonials */
.testimonials {
  background: var(--black);
  padding: clamp(100px, 20vh, 180px) 0;
}

.testimonials-wrapper {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.testimonial-quotes {
  margin-bottom: 3rem;
}

.quote-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  opacity: 0.5;
}

.testimonial-slider {
  position: relative;
  min-height: 280px;
}

.testimonial {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s var(--ease-out-expo);
  pointer-events: none;
}

.testimonial.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}

.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.author-info {
  text-align: left;
}

.author-info strong {
  display: block;
  font-weight: 600;
}

.author-info span {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.testimonial-btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--gray-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all 0.3s var(--ease-out-expo);
}

.testimonial-btn svg {
  width: 18px;
  height: 18px;
}

.testimonial-btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.testimonial-progress {
  width: 120px;
  height: 3px;
  background: var(--gray-800);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-1);
  width: 0%;
  transition: width 0.1s linear;
}

/* Contact Section */
.contact {
  background: linear-gradient(180deg, var(--black) 0%, var(--black-light) 100%);
}

.contact-layout {
  max-width: 1000px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.contact-subtitle {
  color: var(--gray-400);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

.contact-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

.form-group {
  position: relative;
}

.form-group.full {
  grid-column: span 2;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1.25rem 0 0.75rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray-700);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--violet-500);
}

.form-group label {
  position: absolute;
  left: 0;
  top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-500);
  pointer-events: none;
  transition: all 0.3s var(--ease-out-expo);
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
  top: -0.5rem;
  font-size: 0.7rem;
  color: var(--violet-400);
}

.form-group textarea {
  resize: none;
  min-height: 120px;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: width 0.4s var(--ease-out-expo);
}

.form-group input:focus~.input-line,
.form-group textarea:focus~.input-line {
  width: 100%;
}

.btn-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: var(--gradient-1);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 100px;
  transition: all 0.3s var(--ease-out-expo);
}

.btn-submit .btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-submit:hover {
  box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.btn-submit:hover .btn-icon {
  transform: translateX(4px) rotate(-15deg);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 1rem;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-600);
}

.info-link {
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s;
}

.info-link:hover {
  color: var(--violet-400);
}

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

.social-link {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: color 0.3s;
}

.social-link:hover {
  color: var(--white);
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--gray-800);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.footer-logo:hover .footer-logo-img {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.back-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: color 0.3s;
}

.back-top svg {
  width: 18px;
  height: 18px;
}

.back-top:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s var(--ease-out-expo);
}

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

/* Responsive */
@media (max-width: 1024px) {

  .nav-links,
  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about-visual {
    order: -1;
    height: 400px;
  }

  .contact-body {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

  .form-group.full {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .work-showcase {
    grid-template-columns: 1fr;
  }

  .work-card.featured,
  .work-card.wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .work-card.featured .work-media {
    min-height: 250px;
  }

  .about-stats {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 100px;
  }

  .service-header {
    gap: 1rem;
  }

  .service-body p,
  .service-list {
    padding-left: 0;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .floating-puzzles {
    display: none;
  }
}

/* Language Toggle Button */
.lang-toggle {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--gray-700);
  border-radius: 100px;
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  margin-right: 1rem;
}

.lang-toggle:hover {
  border-color: var(--white);
  color: var(--white);
}

/* RTL Support */
[dir="rtl"] {
  font-family: 'Tajawal', var(--font-body), sans-serif;
}

[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

[dir="rtl"] .logo-img {
  order: 2;
}

[dir="rtl"] .logo-text {
  order: 1;
}

[dir="rtl"] .logo:hover .logo-img {
  transform: scale(1.05) rotate(-5deg);
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-cta {
  flex-direction: row-reverse;
}

[dir="rtl"] .cta-arrow {
  transform: scaleX(-1);
}

[dir="rtl"] .nav-cta:hover .cta-arrow {
  transform: scaleX(-1) translateX(-4px);
}

[dir="rtl"] .hero-eyebrow {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-cta {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-outline {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-icon {
  transform: scaleX(-1);
}

[dir="rtl"] .btn-primary:hover .btn-icon {
  transform: scaleX(-1) translateX(-4px);
}

[dir="rtl"] .section-label {
  flex-direction: row-reverse;
}

[dir="rtl"] .label-line {
  margin-left: 1rem;
  margin-right: 0;
}

[dir="rtl"] .work-meta {
  flex-direction: row-reverse;
}

[dir="rtl"] .work-tags {
  flex-direction: row-reverse;
}

[dir="rtl"] .service-header {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .service-body p,
[dir="rtl"] .service-list {
  padding-left: 0;
  padding-right: 60px;
  text-align: right;
}

[dir="rtl"] .service-list {
  flex-direction: row-reverse;
}

[dir="rtl"] .about-layout {
  direction: rtl;
}

[dir="rtl"] .about-text {
  text-align: right;
}

[dir="rtl"] .about-stats {
  flex-direction: row-reverse;
}

[dir="rtl"] .stat-card {
  text-align: right;
}

[dir="rtl"] .testimonial-author {
  flex-direction: row-reverse;
}

[dir="rtl"] .author-info {
  text-align: right;
}

[dir="rtl"] .testimonial-controls {
  flex-direction: row-reverse;
}

[dir="rtl"] .testimonial-btn svg {
  transform: scaleX(-1);
}

[dir="rtl"] .contact-header {
  text-align: right;
}

[dir="rtl"] .contact-subtitle {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .form-group label {
  right: 0;
  left: auto;
}

[dir="rtl"] .input-line {
  right: 0;
  left: auto;
}

[dir="rtl"] .btn-submit {
  flex-direction: row-reverse;
}

[dir="rtl"] .contact-info {
  text-align: right;
}

[dir="rtl"] .social-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-top,
[dir="rtl"] .footer-bottom {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-logo {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-logo-img {
  order: 2;
}

[dir="rtl"] .footer-logo span {
  order: 1;
}

[dir="rtl"] .footer-logo:hover .footer-logo-img {
  transform: scale(1.05) rotate(-5deg);
}

[dir="rtl"] .back-top {
  flex-direction: row-reverse;
}

[dir="rtl"] .back-top svg {
  transform: scaleX(-1);
}

[dir="rtl"] .link-arrow {
  flex-direction: row-reverse;
}

[dir="rtl"] .link-arrow svg {
  transform: scaleX(-1);
}

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

[dir="rtl"] .mobile-nav-links {
  text-align: center;
}

[dir="rtl"] .scroll-progress {
  transform-origin: right;
}

/* Arabic Font Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .about-title,
[dir="rtl"] .contact-title {
  font-family: 'Tajawal', sans-serif;
}

@media (max-width: 768px) {

  [dir="rtl"] .service-body p,
  [dir="rtl"] .service-list {
    padding-right: 0;
  }

  [dir="rtl"] .footer-top,
  [dir="rtl"] .footer-bottom {
    flex-direction: column;
  }
}
