/* ================================================================
   ANIMATIONS - SCROLL REVEAL + ENTRANCE
   ================================================================ */

/* --- Base reveal with stagger --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- Scale-up reveal --- */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* --- Slide from left --- */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* --- Slide from right --- */
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* --- Stagger delays (via data-delay attribute) --- */
.reveal[data-delay="0"] { transition-delay: 0s; }
.reveal[data-delay="0.1"] { transition-delay: 0.1s; }
.reveal[data-delay="0.2"] { transition-delay: 0.2s; }
.reveal[data-delay="0.3"] { transition-delay: 0.3s; }
.reveal[data-delay="0.4"] { transition-delay: 0.4s; }
.reveal[data-delay="0.5"] { transition-delay: 0.5s; }
.reveal[data-delay="0.6"] { transition-delay: 0.6s; }

.reveal-scale[data-delay="0"] { transition-delay: 0s; }
.reveal-scale[data-delay="0.1"] { transition-delay: 0.1s; }
.reveal-scale[data-delay="0.2"] { transition-delay: 0.2s; }
.reveal-scale[data-delay="0.3"] { transition-delay: 0.3s; }

/* --- Stagger children (for grid items) --- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children.in-view > *:nth-child(1) {
  transition-delay: 0.05s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.in-view > *:nth-child(2) {
  transition-delay: 0.1s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.in-view > *:nth-child(3) {
  transition-delay: 0.15s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.in-view > *:nth-child(4) {
  transition-delay: 0.2s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.in-view > *:nth-child(5) {
  transition-delay: 0.25s;
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.in-view > *:nth-child(6) {
  transition-delay: 0.3s;
  opacity: 1;
  transform: translateY(0);
}

/* --- Hover float animation --- */
.float-hover {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.float-hover:hover {
  transform: translateY(-10px);
}

/* --- Pulse glow on cards --- */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.2); }
  50% { box-shadow: 0 0 0 12px rgba(249, 115, 22, 0); }
}

.case-card-new:focus-visible {
  animation: pulseGlow 1.2s ease 2;
}

/* --- Smooth image zoom on hover --- */
.zoom-on-hover {
  overflow: hidden;
}

.zoom-on-hover img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-on-hover:hover img {
  transform: scale(1.08);
}

/* ================================================================
   PRELOADER
   ================================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  overflow: hidden;
}

.preloader-panel {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background: var(--ink);
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.panel-left { left: 0; }
.panel-right { right: 0; }

.preloader.open .panel-left { transform: translateX(-100%); }
.preloader.open .panel-right { transform: translateX(100%); }

.preloader-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.4s ease;
}

.preloader.open .preloader-inner {
  opacity: 0;
}

.preloader-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  animation: preloaderLogoIn 0.6s ease both;
}

.preloader-brand {
  display: flex;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: #fff;
}

.preloader-brand .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: preloaderWordIn 0.6s ease forwards;
}
.preloader-brand .word:nth-child(1) { animation-delay: 0.1s; }
.preloader-brand .word:nth-child(2) { animation-delay: 0.22s; }
.preloader-brand .word:nth-child(3) { animation-delay: 0.34s; }

.preloader-brand .word-accent {
  color: var(--primary-light);
}

.preloader-progress-wrap {
  width: 260px;
  margin-top: 6px;
}

.preloader-progress-track {
  height: 3px;
  width: 100%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
}

.preloader-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
  position: relative;
}

.preloader-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: preloaderShimmer 1.3s linear infinite;
}

.preloader-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--font-mono);
}

.preloader-status {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.preloader-percent {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
}

@keyframes preloaderLogoIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 0.92; transform: translateY(0); }
}

@keyframes preloaderWordIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes preloaderShimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ================================================================
   PAGE CONTENT REVEAL (after preloader)
   ================================================================ */
.page-content {
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.6s ease, transform 0.7s ease;
}

.page-content.show {
  opacity: 1;
  transform: scale(1);
}

html.is-loading,
html.is-loading body {
  overflow: hidden;
  height: 100%;
}

/* ================================================================
   CUSTOM CURSOR - DESIGN VERSION (FIXED)
   ================================================================ */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none !important;
  }
  
  .cursor-dot {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #f97316 !important;
    transform: translate(-50%, -50%) !important;
    will-change: transform !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5) !important;
    display: block !important;
    opacity: 1 !important;
  }

  .cursor-glow {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99998 !important;
    pointer-events: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(249, 115, 22, 0.08) !important;
    border: 2px solid #f97316 !important;
    transform: translate(-50%, -50%) !important;
    will-change: transform !important;
    transition: width 0.3s ease, height 0.3s ease, 
                background 0.3s ease, border-color 0.3s ease,
                opacity 0.2s ease !important;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.1) !important;
    display: block !important;
    opacity: 1 !important;
  }

  body.cursor-hover .cursor-glow {
    width: 56px !important;
    height: 56px !important;
    background: rgba(249, 115, 22, 0.15) !important;
    border-color: #fb923c !important;
    box-shadow: 0 0 40px rgba(249, 115, 22, 0.2) !important;
  }

  body.cursor-hover .cursor-dot {
    opacity: 0 !important;
    transform: translate(-50%, -50%) scale(0.5) !important;
  }

  body.cursor-click .cursor-glow {
    width: 28px !important;
    height: 28px !important;
    background: rgba(249, 115, 22, 0.25) !important;
    border-color: #ea580c !important;
    transform: translate(-50%, -50%) scale(0.8) !important;
  }

  body.cursor-click .cursor-dot {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
  }

  body.cursor-hidden .cursor-dot,
  body.cursor-hidden .cursor-glow {
    opacity: 0 !important;
  }

  .click-ripple {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99997 !important;
    width: 16px !important;
    height: 16px !important;
    margin: -8px 0 0 -8px !important;
    border-radius: 50% !important;
    border: 2px solid #f97316 !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    transform: scale(1) !important;
    animation: rippleOut 0.6s ease-out forwards !important;
  }

  @keyframes rippleOut {
    0% {
      transform: scale(1);
      opacity: 0.8;
    }
    100% {
      transform: scale(3);
      opacity: 0;
    }
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-glow {
    display: none !important;
  }
}

/* ================================================================
   MOBILE NAV
   ================================================================ */
.mobile-nav {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; height: 100vh;
  background: #fff;
  z-index: 1200;
  padding: 30px 26px;
  box-shadow: -10px 0 40px rgba(0,0,0,.15);
  transition: right .4s ease;
  overflow-y: auto;
}

.mobile-nav.open { right: 0; }

.mobile-nav .close-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
  font-size: 16px;
}

.mobile-nav ul li { border-bottom: 1px solid var(--border); }
.mobile-nav ul li a { display: block; padding: 14px 4px; font-weight: 600; color: var(--ink); font-size: 15px; }
.mobile-nav ul li a.active, .mobile-nav ul li a:hover { color: var(--primary); }

.nav-scrim {
  position: fixed; inset: 0;
  background: rgba(8,17,31,.5);
  z-index: 1100;
  opacity: 0; visibility: hidden;
  transition: .35s;
}

.nav-scrim.show { opacity: 1; visibility: visible; }

/* ================================================================
   FOCUS STATES (accessibility)
   ================================================================ */
a:focus-visible,
button:focus-visible,
.dot:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-scale,
  .reveal-left,
  .reveal-right,
  .stagger-children > *,
  .float-hover,
  .zoom-on-hover img,
  .case-card-new,
  .case-link i,
  .case-icon,
  .preloader-logo,
  .preloader-brand .word,
  .preloader-progress-fill::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ================================================================
   PREMIUM CARD ANIMATIONS
   ================================================================ */

/* Floating animation for cards */
@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.case-card-premium:nth-child(1) { animation-delay: 0s; }
.case-card-premium:nth-child(2) { animation-delay: 0.1s; }
.case-card-premium:nth-child(3) { animation-delay: 0.2s; }
.case-card-premium:nth-child(4) { animation-delay: 0.3s; }
.case-card-premium:nth-child(5) { animation-delay: 0.4s; }
.case-card-premium:nth-child(6) { animation-delay: 0.5s; }

/* Shimmer effect on hover */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.case-card-premium:hover .card-glow {
  opacity: 1;
}

/* Contact form input focus animation */
@keyframes inputPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.08); }
}

.form-field input:focus,
.form-field textarea:focus {
  animation: inputPulse 0.6s ease;
}

/* Social icon bounce */
@keyframes socialBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.contact-premium-socials a:hover {
  animation: socialBounce 0.4s ease;
}

/* ================================================================
   HERO — EXTRA MOTION
   ================================================================ */

/* Slow floating + rotating outline squares */
.hero-shape-left,
.hero-shape-right {
  animation: heroShapeFloat 9s ease-in-out infinite;
}
.hero-shape-right {
  animation-delay: 0.4s;
}

@keyframes heroShapeFloat {
  0%, 100% { transform: rotate(18deg) translateY(0) scale(1); }
  50% { transform: rotate(26deg) translateY(-18px) scale(1.05); }
}

/* Drifting glow orb behind the hero heading for extra depth */
.hero-content {
  position: relative;
}

.hero-content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35), transparent 68%);
  transform: translate(-50%, -50%);
  filter: blur(10px);
  z-index: -1;
  opacity: 0.55;
  animation: heroGlowDrift 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlowDrift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.45; }
  50% { transform: translate(-50%, -46%) scale(1.12); opacity: 0.65; }
}

/* Gentle breathing glow on the primary CTA so it keeps drawing the eye */
.hero-btn {
  animation: heroBtnPulse 2.6s ease-in-out infinite;
}

@keyframes heroBtnPulse {
  0%, 100% { box-shadow: var(--glow); }
  50% { box-shadow: 0 18px 46px rgba(249, 115, 22, 0.65); }
}

/* Small blinking accent dot after the eyebrow tag */
.hero-tag::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--primary-light);
  vertical-align: middle;
  animation: heroDotBlink 1.6s ease-in-out infinite;
}

@keyframes heroDotBlink {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 860px) {
  .hero-content::before {
    width: 340px;
    height: 340px;
  }
}
/* ================================================================
   CUSTOM CURSOR - FIXED
   ================================================================ */
.cursor-dot {
  display: block !important;
  position: fixed !important;
  top: 0px !important;
  left: 0px !important;
  z-index: 999999 !important;
  pointer-events: none !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #f97316 !important;
  transform: translate(-50%, -50%) !important;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.6) !important;
  opacity: 1 !important;
  will-change: transform !important;
  transition: opacity 0.2s ease !important;
}

.cursor-glow {
  display: block !important;
  position: fixed !important;
  top: 0px !important;
  left: 0px !important;
  z-index: 999998 !important;
  pointer-events: none !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: 2px solid #f97316 !important;
  background: rgba(249, 115, 22, 0.08) !important;
  transform: translate(-50%, -50%) !important;
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.1) !important;
  opacity: 1 !important;
  will-change: transform !important;
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-color 0.25s ease, opacity 0.2s ease !important;
}

/* Hover State */
body.cursor-hover .cursor-glow {
  width: 56px !important;
  height: 56px !important;
  background: rgba(249, 115, 22, 0.15) !important;
  border-color: #fb923c !important;
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.15) !important;
}

body.cursor-hover .cursor-dot {
  opacity: 0 !important;
}

/* Click State */
body.cursor-click .cursor-glow {
  width: 28px !important;
  height: 28px !important;
  background: rgba(249, 115, 22, 0.25) !important;
  border-color: #ea580c !important;
}

/* Hide on mobile */
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-glow {
    display: none !important;
  }
}