/*
Layout Verification Checklist
[ ] Grid matches screenshots
[ ] Spacing ratios preserved
[ ] Overlapping elements positioned correctly
[ ] Responsive breakpoints mirror reference
[ ] Animations enhance without breaking layout
*/

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes contentOut {
  to {
    opacity: 0;
    transform: translate3d(0, -34px, 0);
  }
}

@keyframes overlayFade {
  0%,
  100% {
    opacity: 0;
  }
  48% {
    opacity: 0.8;
  }
}

@keyframes floatY {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@keyframes heroPillGlow {
  0%,
  100% {
    box-shadow:
      inset 0 0 30px rgba(255, 255, 255, 0.045),
      0 0 22px rgba(0, 0, 0, 0.34),
      0 0 0 0 rgba(197, 160, 89, 0);
  }
  50% {
    box-shadow:
      inset 0 0 36px rgba(255, 255, 255, 0.09),
      0 0 28px rgba(0, 0, 0, 0.42),
      0 0 26px rgba(197, 160, 89, 0.22);
  }
}

@keyframes heroRoundAura {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow:
      0 0 0 0 rgba(197, 160, 89, 0),
      0 0 18px rgba(0, 0, 0, 0.35);
  }
  50% {
    border-color: rgba(197, 160, 89, 0.55);
    box-shadow:
      0 0 0 7px rgba(197, 160, 89, 0.07),
      0 0 22px rgba(0, 0, 0, 0.45);
  }
}

@keyframes heroTitleKhalidGlow {
  0%,
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
  45% {
    filter: brightness(1.14) drop-shadow(0 0 36px rgba(197, 160, 89, 0.45));
  }
}

@keyframes heroTitleAharranWave {
  0% {
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.88);
    text-stroke: 1px rgba(255, 255, 255, 0.88);
    letter-spacing: 0.015em;
  }
  100% {
    -webkit-text-stroke-color: rgba(197, 160, 89, 0.55);
    text-stroke: 1px rgba(197, 160, 89, 0.55);
    letter-spacing: 0.058em;
  }
}

@keyframes sectionShift {
  0%,
  100% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(-5deg);
  }
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity var(--duration-slow) var(--ease-out-expo),
    transform var(--duration-slow) var(--ease-out-expo);
}

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

.work-screen .my-work-viewport.reveal {
  transform: translate3d(0, 36px, 0);
}

.work-screen .my-work-viewport.reveal.is-visible {
  transform: translate3d(0, 0, 0);
}

.hero-title > span:first-child {
  animation: heroTitleKhalidGlow 5.6s ease-in-out infinite;
}

.hero-title > span:last-child {
  animation: heroTitleAharranWave 8.5s ease-in-out infinite alternate;
}

.scroll-float .char {
  transform: translate3d(0, 115%, 0);
  opacity: 0;
  transition:
    transform 0.82s var(--ease-out-expo),
    opacity 0.62s var(--ease-soft);
  transition-delay: var(--char-delay, 0ms);
}

.reveal.is-visible .scroll-float .char {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

#hero.hero-split-playing > .hero-side-copy .scroll-float .char {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.stagger > .reveal:nth-child(1) {
  transition-delay: calc(var(--stagger-step) * 0);
}

.stagger > .reveal:nth-child(2) {
  transition-delay: calc(var(--stagger-step) * 1);
}

.stagger > .reveal:nth-child(3) {
  transition-delay: calc(var(--stagger-step) * 2);
}

.stagger > .reveal:nth-child(4) {
  transition-delay: calc(var(--stagger-step) * 3);
}

.stagger > .reveal:nth-child(5) {
  transition-delay: calc(var(--stagger-step) * 4);
}

.sm-toggle,
.arrow-btn,
.round-cta,
.round-outline,
.showcase-circle-link,
.learn-disc,
.learn-pill,
.next-project,
.showcase-slide-pill,
.pill-cta,
.contact-submit.pill-cta,
.featured-lightbox-close {
  --cursor-x: 50%;
  --cursor-y: 50%;
}

.arrow-btn,
.sm-toggle,
.pill-cta,
.round-cta,
.round-outline,
.showcase-circle-link,
.learn-disc,
.learn-pill,
.next-project,
.showcase-slide-pill,
.contact-submit.pill-cta,
.featured-lightbox-close,
.my-work-card,
.project-right,
.ideas-envelope-stage,
.testimonial-card,
.collage-card,
.circle-image {
  transition:
    transform var(--duration-med) var(--ease-soft),
    filter var(--duration-med) var(--ease-soft),
    box-shadow var(--duration-med) var(--ease-soft),
    border-color var(--duration-med) var(--ease-soft);
}

.arrow-btn:hover,
.sm-toggle:hover,
.round-cta:hover,
.round-outline:hover,
.showcase-circle-link:hover,
.learn-disc:hover,
.learn-pill:hover,
.next-project:hover,
.showcase-slide-pill:hover:not(.is-active),
.pill-cta:not(.hero-liquid-btn):hover,
.contact-submit.pill-cta:hover,
.featured-lightbox-close:hover {
  box-shadow: var(--btn-neo-shadow-pill-hover);
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) scale(1.04);
}

.learn-pill:hover,
.next-project:hover,
.showcase-slide-pill:hover:not(.is-active),
.pill-cta:not(.hero-liquid-btn):hover,
.contact-submit.pill-cta:hover,
.featured-lightbox-close:hover,
.sm-toggle:hover {
  background:
    linear-gradient(var(--btn-neo-surface-hover), var(--btn-neo-surface-hover)) padding-box,
    var(--btn-neo-border-gradient) border-box;
}

.showcase-slide-pill.is-active:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 8px rgba(0, 0, 0, 0.42),
    0 12px 32px rgba(0, 0, 0, 0.42);
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) scale(1.03);
}

.arrow-btn:hover,
.round-cta:hover,
.round-outline:hover,
.learn-disc:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(155deg, #141414 0%, #080808 100%);
  box-shadow: var(--btn-neo-shadow-circle-hover);
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) scale(1.04);
}

.showcase-circle-link:hover::after,
.showcase-circle-link:focus-visible::after {
  opacity: 0.94;
  background-image: var(--btn-spot-radial);
}

.hero-liquid-btn.border-glow-card:hover,
.pill-cta.hero-liquid-btn:hover {
  background:
    linear-gradient(var(--btn-neo-surface-hover), var(--btn-neo-surface-hover)) padding-box,
    linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.58) 0%,
      rgba(255, 255, 255, 0.1) 30%,
      rgba(255, 255, 255, 0.05) 55%,
      rgba(197, 160, 89, 0.48) 100%
    ) border-box;
  box-shadow: var(--btn-neo-shadow-pill-hover);
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) scale(1.03);
}

.showcase-photo-clip {
  transition: box-shadow var(--duration-med) var(--ease-soft);
}

.showcase-photo-orbit-stroke {
  transition:
    stroke var(--duration-med) var(--ease-soft),
    stroke-width var(--duration-med) var(--ease-soft),
    filter var(--duration-med) var(--ease-soft);
}

.showcase-photo-clip:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 44px 82px rgba(0, 0, 0, 0.58);
}

.showcase-photo-clip:hover .showcase-photo-orbit-stroke {
  stroke: rgba(255, 255, 255, 0.52);
  stroke-width: 3.75px;
  filter:
    drop-shadow(-14px 0 24px rgba(197, 160, 89, 0.55))
    drop-shadow(14px 0 26px rgba(109, 0, 26, 0.48))
    drop-shadow(0 0 18px rgba(255, 242, 234, 0.12));
}

.showcase-orbit-arrow.round-cta:hover,
.showcase-orbit-arrow.round-cta:active {
  transform: none;
  border-color: rgba(197, 160, 89, 0.42);
  background: linear-gradient(155deg, #141414 0%, #080808 100%);
  color: var(--gold-light);
  box-shadow: var(--btn-neo-shadow-circle-hover);
}

.showcase-orbit-arrow.round-cta:active {
  box-shadow: var(--btn-neo-shadow-pressed);
}

.sm-toggle:active,
.arrow-btn:active,
.pill-cta:active,
.round-cta:active,
.round-outline:active,
.showcase-circle-link:active,
.learn-disc:active,
.learn-pill:active,
.next-project:active,
.showcase-slide-pill:active,
.contact-submit.pill-cta:active,
.featured-lightbox-close:active {
  box-shadow: var(--btn-neo-shadow-pressed);
  transform: translate3d(var(--magnet-x, 0), var(--magnet-y, 0), 0) scale(0.98);
}

.hero-liquid-btn:active {
  box-shadow: var(--btn-neo-shadow-pressed);
  transform: scale(0.98);
}

.ripple {
  position: absolute;
  z-index: -1;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 177, 61, 0.35);
  transform: translate(-50%, -50%) scale(0);
  animation: ripplePulse 620ms var(--ease-out-expo);
  pointer-events: none;
}

@keyframes ripplePulse {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(18);
  }
}

.tilt-card {
  transform-style: preserve-3d;
  will-change: auto;
}

.tilt-card:hover {
  filter: brightness(1.05);
  transform:
    perspective(var(--tilt-perspective))
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    scale(1.06);
}

.corner-arrow,
.glass-tag,
.circle-image {
  animation: floatY var(--float-duration) var(--ease-in-out) infinite;
}

.corner-arrow {
  animation-delay: 200ms;
}

.glass-tag:nth-of-type(2) {
  animation-delay: 480ms;
}

.glass-tag:nth-of-type(3) {
  animation-delay: 720ms;
}

.screen.in-view {
  animation: sectionShift 1800ms var(--ease-in-out);
}

.project-right:hover .glass-tag {
  color: #111;
  background: rgba(255, 177, 61, 0.82);
}

.testimonial-card:hover,
.circle-image:hover {
  border-color: rgba(255, 177, 61, 0.68);
  filter: brightness(1.05);
}

.my-work-card:hover {
  border-color: rgba(255, 177, 61, 0.68);
  filter: brightness(1.05);
  transform: scale(1.04);
}

.testimonial-marquee .testimonial-card {
  transition:
    border-color 0.3s ease,
    filter 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.testimonial-marquee .testimonial-card:hover {
  border-color: rgba(197, 160, 89, 0.72);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(197, 160, 89, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.38);
  transform: translateY(-2px);
}

.testimonial-marquee .testimonial-card.is-expanded:hover {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-title > span:first-child,
  .hero-title > span:last-child {
    animation: none !important;
  }

  .scroll-float .char {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }

  .hero-tag-hit:hover {
    transform: none;
  }

  .arrow-btn:hover,
  .sm-toggle:hover,
  .round-cta:hover,
  .round-outline:hover,
  .showcase-circle-link:hover,
  .learn-disc:hover,
  .learn-pill:hover,
  .next-project:hover,
  .pill-cta:not(.hero-liquid-btn):hover,
  .contact-submit.pill-cta:hover,
  .featured-lightbox-close:hover,
  .showcase-slide-pill:hover {
    transform: none;
    box-shadow: var(--btn-neo-shadow-pill-hover);
  }

  .hero-liquid-btn.border-glow-card:hover,
  .pill-cta.hero-liquid-btn:hover {
    transform: none;
    box-shadow: var(--btn-neo-shadow-pill-hover);
    background:
      linear-gradient(var(--btn-neo-surface-hover), var(--btn-neo-surface-hover)) padding-box,
      var(--btn-neo-border-gradient) border-box;
  }

  .arrow-btn:hover,
  .round-cta:hover,
  .round-outline:hover,
  .learn-disc:hover {
    background: linear-gradient(155deg, #141414 0%, #080808 100%);
    box-shadow: var(--btn-neo-shadow-circle-hover);
  }

  .showcase-circle-link:hover::after {
    opacity: 0;
    background-image: none;
  }

  .sm-toggle:hover,
  .learn-pill:hover,
  .pill-cta:not(.hero-liquid-btn):hover,
  .contact-submit.pill-cta:hover,
  .featured-lightbox-close:hover,
  .showcase-slide-pill:hover:not(.is-active),
  .next-project:hover {
    background:
      linear-gradient(var(--btn-neo-surface-hover), var(--btn-neo-surface-hover)) padding-box,
      var(--btn-neo-border-gradient) border-box;
  }

  .showcase-photo-clip:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 40px 78px rgba(0, 0, 0, 0.55);
  }

  .showcase-photo-clip:hover .showcase-photo-orbit-stroke {
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 2px;
    filter: none;
  }

  .showcase-orbit-arrow.round-cta:hover,
  .showcase-orbit-arrow.round-cta:active {
    transform: none;
    background-image: var(--glass-highlight);
    background-color: var(--glass-bg-strong);
  }

  .showcase-avatar-stack li,
  .showcase-avatar-stack li:hover,
  .showcase-avatar-stack li:active,
  .showcase-avatar-stack li:hover img {
    transform: none;
  }
}
