@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Barlow+Condensed:wght@700;800;900&family=Plus+Jakarta+Sans:wght@300;700;900&display=swap');

:root {
  /* Light Mode Variables */
  --bg: #f8f9fc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --nav-bg: rgba(248, 249, 252, 0.90);
  --nav-border: rgba(15, 23, 42, 0.08);
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --glass-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 244, 250, 0.65) 100%);
  --glass-card-border: rgba(255, 255, 255, 0.85);
  --glass-card-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 1), inset 0 -1px 2px 0 rgba(15, 23, 42, 0.06), 0 12px 32px 0 rgba(15, 23, 42, 0.08);
  --modal-bg: #ffffff;
  --modal-border: rgba(15, 23, 42, 0.12);
  --section-border: rgba(15, 23, 42, 0.08);
  --footer-border: rgba(15, 23, 42, 0.08);
  --btn-border: rgba(15, 23, 42, 0.2);
  --input-bg: rgba(15, 23, 42, 0.03);
  --cta-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  --cta-border: rgba(15, 23, 42, 0.12);
  --cta-gradient: linear-gradient(135deg, #1FA7B8 0%, #6B5BFF 50%, #E53E9D 100%);

  /* Constants & Brand Gradients */
  --accent-cyan: #1FA7B8;
  --accent-blue: #2E8CFF;
  --accent-violet: #6B5BFF;
  --accent-purple: #A64DFF;
  --accent-pink: #E53E9D;
  --aurora-gradient: linear-gradient(135deg, #1FA7B8 0%, #2E8CFF 25%, #6B5BFF 50%, #A64DFF 75%, #E53E9D 100%);
  --ocean-gradient: linear-gradient(135deg, #1FA7B8 0%, #2E8CFF 50%, #6B5BFF 100%);
  --creative-gradient: linear-gradient(135deg, #6B5BFF 0%, #A64DFF 50%, #E53E9D 100%);
}

html.dark, .dark {
  /* Dark Mode Variables */
  --bg: #07070d;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-faint: rgba(255, 255, 255, 0.2);
  --nav-bg: rgba(7, 7, 13, 0.88);
  --nav-border: rgba(255, 255, 255, 0.05);
  --card-bg: #0f0f1a;
  --card-border: rgba(255, 255, 255, 0.06);
  --card-shadow: none;
  --glass-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  --glass-card-border: rgba(255, 255, 255, 0.14);
  --glass-card-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 2px 0 rgba(0, 0, 0, 0.4), 0 12px 36px 0 rgba(0, 0, 0, 0.45);
  --modal-bg: #0e0f1d;
  --modal-border: rgba(255, 255, 255, 0.12);
  --section-border: rgba(255, 255, 255, 0.05);
  --footer-border: rgba(255, 255, 255, 0.06);
  --btn-border: rgba(255, 255, 255, 0.2);
  --input-bg: rgba(255, 255, 255, 0.05);
  --cta-bg: linear-gradient(135deg, #0f0f1a 0%, #1a0a1a 50%, #0a0f1a 100%);
  --cta-border: rgba(255, 255, 255, 0.08);
  --cta-gradient: linear-gradient(135deg, #A64DFF 0%, #E53E9D 50%, #2E8CFF 100%);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  transition: background-color 0.30s ease, color 0.30s ease;
  overflow-x: hidden;
}

/* 1. 7-LAYER DEPTH SYSTEM STACKING ARCHITECTURE */
.depth-layer-1-bg {
  z-index: 0;
  pointer-events: none;
}
.depth-layer-2-ambient {
  z-index: 1;
  pointer-events: none;
}
.depth-layer-3-mesh {
  z-index: 2;
  pointer-events: none;
}
.depth-layer-4-particles {
  z-index: 3;
  pointer-events: none;
}
.depth-layer-5-content {
  z-index: 10;
  position: relative;
}
.depth-layer-6-glass {
  z-index: 20;
}
.depth-layer-7-cursor {
  z-index: 50;
  pointer-events: none;
}

/* 2. ANIMATIONS & KEYFRAMES */
@keyframes revealWordUp {
  0% {
    opacity: 0;
    transform: translateY(110%);
  }
  100% {
    opacity: 1;
    transform: translateY(0%);
  }
}

.reveal-word {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
  animation: revealWordUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headingWordReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.heading-word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.95);
  animation: headingWordReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shimmerSweep {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }
  22%, 100% {
    transform: translateX(250%) skewX(-20deg);
  }
}

@keyframes lightSweepReflection {
  0% {
    transform: translateX(-180%) translateY(-50%) rotate(25deg);
  }
  22%, 100% {
    transform: translateX(280%) translateY(-50%) rotate(25deg);
  }
}

@keyframes edgePulse {
  0%, 100% {
    border-color: rgba(31, 167, 184, 0.25);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), 0 0 15px -3px rgba(31, 167, 184, 0.15);
  }
  50% {
    border-color: rgba(229, 62, 157, 0.35);
    box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.3), 0 0 22px -2px rgba(229, 62, 157, 0.22);
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-30px) translateX(20px) scale(1.25);
    opacity: 0.65;
  }
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.15;
  }
}

.floating-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: particleFloat var(--float-duration, 14s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes heroFloatBreathing {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

.hero-motion-container {
  will-change: transform, opacity;
  animation: heroFloatBreathing 7s cubic-bezier(0.45, 0, 0.55, 1) infinite ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

/* 3. GLASSMORPHISM & SPECULAR EFFECTS */
.glass-reflection {
  position: relative;
}

.glass-reflection::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 35%, transparent 100%);
  pointer-events: none;
  z-index: 12;
  border-radius: inherit;
}

.dark .glass-reflection::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 35%, transparent 100%);
}

.mirror-reflection-bottom {
  position: relative;
}

.mirror-reflection-bottom::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 5%;
  right: 5%;
  height: 20px;
  background: inherit;
  filter: blur(8px);
  opacity: 0.18;
  transform: scaleY(-0.3);
  pointer-events: none;
  z-index: 1;
}

/* 4. LIGHT SWEEPS & SHIMMERS */
.light-sweep-card {
  position: relative;
  overflow: hidden;
}

.light-sweep-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -60%;
  width: 50%;
  height: 250%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 35%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.06) 65%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 15;
  animation: lightSweepReflection 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.shimmer-btn {
  position: relative;
  overflow: hidden;
}

.shimmer-btn > * {
  position: relative;
  z-index: 20;
}

.shimmer-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(
    120px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.5) 0%,
    rgba(31, 167, 184, 0.2) 45%,
    transparent 80%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
}

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

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
  animation: shimmerSweep 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.shimmer-badge {
  position: relative;
  overflow: hidden;
}

.shimmer-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: shimmerSweep 4s infinite;
}

/* 5. GLOWS & CUSTOM HIGHLIGHT CARDS */
.edge-glow-card {
  position: relative;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.edge-glow-card:hover {
  border-color: rgba(31, 167, 184, 0.45);
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.35), 0 0 20px -3px rgba(31, 167, 184, 0.25);
}

.edge-glow-animated {
  animation: edgePulse 5s infinite ease-in-out;
}

.soft-highlight {
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px -10px rgba(31, 167, 184, 0.08);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.soft-highlight:hover {
  box-shadow: inset 0 1px 2px 0 rgba(255, 255, 255, 0.3), 0 15px 35px -8px rgba(31, 167, 184, 0.18);
}

.soft-glow-cyan { box-shadow: 0 0 25px -4px rgba(31, 167, 184, 0.35); }
.soft-glow-blue { box-shadow: 0 0 25px -4px rgba(46, 140, 255, 0.35); }
.soft-glow-violet { box-shadow: 0 0 25px -4px rgba(107, 91, 255, 0.35); }
.soft-glow-pink { box-shadow: 0 0 25px -4px rgba(229, 62, 157, 0.35); }

/* 6. TEXT AND GRADIENTS */
.text-gradient-brand {
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-aurora-gradient { background: var(--aurora-gradient); }
.bg-ocean-gradient { background: var(--ocean-gradient); }
.bg-creative-gradient { background: var(--creative-gradient); }
.bg-cta-gradient { background: var(--cta-gradient); }

.text-aurora-gradient {
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-ocean-gradient {
  background: var(--ocean-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-creative-gradient {
  background: var(--creative-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 7. SCROLLBARS & UTILITIES */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 3D Tilt Setup */
.perspective-1000 {
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Dynamic grid adjustments matching React code */
@media (min-width: 768px) {
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .md\:row-span-2 {
    grid-row: span 2 / span 2;
  }
}

/* Toasts custom rendering */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-header {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-body {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* Scroll Entry Animations mimicking Framer Motion */
.scroll-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.animate-active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered transition delays */
.stagger-1 { transition-delay: 60ms; }
.stagger-2 { transition-delay: 140ms; }
.stagger-3 { transition-delay: 220ms; }
.stagger-4 { transition-delay: 300ms; }
.stagger-5 { transition-delay: 380ms; }
.stagger-6 { transition-delay: 460ms; }

/* Booking timeline buttons active styling overrides */
.booking-timeline-btn {
  border-color: var(--btn-border);
}
.booking-timeline-btn.border-cyan-400 {
  border-color: var(--accent-cyan) !important;
}

/* 8. MARQUEE TICKER */
.marquee-wrap {
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

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

.marquee-track:hover {
  animation-play-state: paused;
}

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

/* 9. PRELOADER */
.preloader-mark {
  animation: preloaderMarkPulse 1.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  filter: drop-shadow(0 0 20px rgba(107, 91, 255, 0.45));
}

@keyframes preloaderMarkPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

.preloader-bar {
  width: 180px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.preloader-bar-fill {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--aurora-gradient);
  animation: preloaderBarSlide 1.1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes preloaderBarSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(380%); }
}

.preloader-text {
  animation: preloaderTextBlink 1.4s ease-in-out infinite;
}

@keyframes preloaderTextBlink {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* 10. SCROLLSPY ACTIVE NAV LINK — brand aurora gradient, not teal */
.nav-link-active {
  background: var(--aurora-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1 !important;
  filter: drop-shadow(0 0 8px rgba(123, 108, 235, 0.45));
}

/* 11. RESPONSIVE POLISH */
@media (max-width: 767px) {
  .hero-slide-container {
    height: 100%;
  }
  .industry-tab {
    font-size: clamp(1.9rem, 11vw, 2.6rem) !important;
  }
}

@media (max-width: 420px) {
  .stat-number {
    font-size: clamp(2.4rem, 14vw, 3.2rem) !important;
  }
}

/* 12.5 BLUR-FILL: fill image frames with a soft blurred backdrop of the same
   image so products are always fully visible (object-fit: contain) while the
   frame is never left empty. */
.img-blur-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
}
.img-blur-fill::before {
  content: "";
  position: absolute;
  inset: -15%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.65) saturate(1.1);
  transform: scale(1.1);
}
.img-blur-fill > img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
}

/* Fashion Campaign card: show the top of the photo instead of the middle */
.portfolio-card[data-project-id="oli-ella"] .img-blur-fill,
.portfolio-card[data-project-id="oli-ella"] .img-blur-fill::before {
  background-position: center top;
}
.portfolio-card[data-project-id="oli-ella"] .img-blur-fill > img {
  object-position: center top;
}

/* High-Fashion Portraiture hero slide: show the upper part of the photo */
.hero-slide[data-slide-title="High-Fashion Portraiture"] .img-blur-fill,
.hero-slide[data-slide-title="High-Fashion Portraiture"] .img-blur-fill::before {
  background-position: center top;
}
.hero-slide[data-slide-title="High-Fashion Portraiture"] .img-blur-fill > img {
  object-position: center top;
}

/* Industries: frame the FASHION photo from the top */
.img-blur-fill.frame-top {
  background-position: center top;
}
.img-blur-fill.frame-top::before {
  background-position: center top;
}
.img-blur-fill.frame-top > img {
  object-position: center top;
}

/* 12. REDUCED MOTION: respect user preference, keep content visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-animate,
  .reveal-word,
  .heading-word-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-track {
    animation: none !important;
  }
}
