/* =============================================
   ANDREW – WEDDING VIDEO EDITOR | CSS
   ============================================= */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #0b0a12;
  --bg-mid: #100f1e;
  --bg-card: #13111f;
  --bg-card-hover: #1a1730;
  --purple-main: #7c3aed;
  --purple-light: #a855f7;
  --purple-glow: rgba(124, 58, 237, 0.25);
  --blue-accent: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.15);
  --text-primary: #f0eeff;
  --text-secondary: #9b92c4;
  --text-muted: #5c5480;
  --border: rgba(124, 58, 237, 0.12);
  --border-hover: rgba(124, 58, 237, 0.35);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(124, 58, 237, 0.08);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100vw;
  background-color: var(--bg-deep);
  /* Prevents backdrop edge bleed */
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== LOADING STATE ===== */
body.loading {
  overflow: hidden !important;
}

body.loading section,
body.loading .navbar,
body.loading footer {
  opacity: 0;
  pointer-events: none;
}

body:not(.loading) section,
body:not(.loading) .navbar,
body:not(.loading) footer {
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.2s;
  opacity: 1;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
}

h2 {
  font-size: clamp(2rem, 6vw, 4.5rem);
}

h3 {
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
  /* Tighter tracking for premium feel */
}

p {
  font-size: clamp(0.95rem, 1.25vw, 1.1rem);
  color: #a1a1aa;
  /* High contrast zinc tone */
  line-height: 1.7;
  /* Premium readability */
}

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

em {
  font-style: italic;
  color: var(--purple-light);
  font-family: var(--font-display);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  /* Fluid padding */
}

.section {
  padding: 120px 0;
  position: relative;
  /* Seamless transition mask for all sections */
  mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 150px,
      black calc(100% - 150px),
      transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0%,
      black 150px,
      black calc(100% - 150px),
      transparent 100%);
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  background: rgba(11, 10, 18, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}

.navbar .nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
  /* Responsive navbar padding */
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar.scrolled {
  top: 8px;
  /* Center at 40px (8 + 64/2) matching non-scrolled 0 + 80/2 */
  left: 20px;
  right: 20px;
  width: auto;
  max-width: 1360px;
  margin: 0 auto;
  height: 64px;
  background: rgba(15, 13, 25, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-video {
  background: linear-gradient(135deg, #fff 10%, #7c3aed 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.logo-dot {
  color: var(--purple-main);
  -webkit-text-fill-color: var(--purple-main);
  display: inline-block;
  font-size: 1em;
  transform: translateY(0);
  /* Baseline alignment */
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

.nav-cta {
  padding: 9px 22px;
  background: var(--purple-main);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.nav-cta:hover {
  background: var(--purple-light);
  box-shadow: 0 0 24px var(--purple-glow);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  /* Cover full height but transparent */
  z-index: 999;
  background: transparent;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* Align links to right */
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-link {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(26, 24, 42, 0.92), rgba(15, 13, 25, 0.92));
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  margin-bottom: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-link.active {
  background: var(--purple-main);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.mobile-link:active {
  transform: scale(0.96);
  background: rgba(124, 58, 237, 0.8);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: var(--radius-xl);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== HERO ACTIONS ===== */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* ===== SECTION LABELS & TITLES ===== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 24px;
}

.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--purple-light);
}

.section-title {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.05;
}

.section-title.centered {
  text-align: center;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 64px;
}

.section-sub.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ===== HERO ===== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  padding: 100px 0 100px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #1a0836 0%, var(--bg-deep) 100%);
  /* Seamless transition mask */
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.kinetic-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: 2vh;
  opacity: 0.8;
  pointer-events: none;
  overflow: hidden;
}

.kinetic-text {
  font-family: 'Inter', sans-serif;
  font-size: 14vw;
  font-weight: 900;
  line-height: 0.85;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.08);
  padding-right: 4vw;
  user-select: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(124, 58, 237, 0.15) 50%, rgba(255, 255, 255, 0.02) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.marquee-fwd {
  animation: marqueeFwd 30s linear infinite;
  display: flex;
  will-change: transform;
}

.marquee-rev {
  animation: marqueeRev 35s linear infinite;
  display: flex;
  will-change: transform;
}

@keyframes marqueeFwd {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes marqueeRev {
  0% {
    transform: translate3d(-50%, 0, 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-float 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(124, 58, 237, 0.12);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.08);
  bottom: -100px;
  right: -80px;
  animation-delay: 4s;
}

@keyframes orb-float {

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

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  position: relative;
  z-index: 2;
  /* Perfected Hero Glass - Maximum Transparency & Visibility */
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(15px) saturate(160%);
  -webkit-backdrop-filter: blur(15px) saturate(160%);
  padding: 60px;
  border-radius: 40px;
  /* Layered Glass Border */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(255, 255, 255, 0.01);
  transition: var(--transition);
}

.hero-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  overflow: hidden;
  /* Enhanced Glass Projection for Video */
  box-shadow:
    0 30px 120px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(124, 58, 237, 0.4),
    inset 0 0 40px rgba(124, 58, 237, 0.1);
  background: #000;
  aspect-ratio: 9/16;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: video-entry 1.5s var(--apple-curve) forwards;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  text-align: left;
}

.hero-avatar-wrapper {
  position: relative;
  width: 164px;
  height: 164px;
  margin: 0 auto 32px;
}

.hero-avatar {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  position: absolute;
  top: 6px;
  left: 6px;
  border: 3px solid rgba(124, 58, 237, 0.3);
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--purple-main), var(--blue-accent), var(--purple-light), var(--purple-main));
  animation: ring-spin 5s linear infinite;
  padding: 2px;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-deep);
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 16px;
}

.hero-name {
  font-size: clamp(4.2rem, 10vw, 7.2rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-bottom: 32px;
  background: linear-gradient(135deg, #fff 30%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-name span {
  display: inline-block;
  margin-right: 0.25em;
}

.hero-name span:last-child {
  margin-right: 0;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 56px;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

/* Vertical Video Reel Styling */
.hero-video-wrapper {
  flex: 0 0 320px;
  position: relative;
  aspect-ratio: 9/16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: video-entry 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.video-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, var(--purple-glow), transparent 70%);
  z-index: -1;
  filter: blur(20px);
  opacity: 0.6;
}

.vertical-reel {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes video-entry {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== REEL HINT (WOW EFFECT) ===== */
.reel-hint {
  position: relative;
  /* Now part of flex controls */
  z-index: 20;
  display: flex;
  flex-direction: row;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  animation: hint-float 4s ease-in-out infinite;
}

.hint-cloud {
  background: rgba(124, 58, 237, 0.22);
  backdrop-filter: blur(45px) saturate(180%);
  -webkit-backdrop-filter: blur(45px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: center;
  white-space: nowrap;
}

.hint-cloud span {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.05em;
  /* Matching logo */
  line-height: 1.1;
}

.hint-emoji {
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
}

.hint-arrow {
  width: 80px;
  height: 80px;
  color: var(--purple-light);
  transform: rotate(-5deg) translateY(-5px);
  filter: drop-shadow(0 0 12px var(--purple-glow));
}

@keyframes hint-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 768px) {
  .reel-hint {
    scale: 0.8;
  }
}

@media (max-width: 480px) {
  .reel-hint {
    scale: 0.88;
    /* Slightly more compact */
  }

  .hint-cloud {
    padding: 8px 18px !important;
    gap: 10px !important;
  }

  .hint-cloud span {
    font-size: 1rem !important;
    /* Smaller font as requested */
    font-weight: 800;
  }
}

[data-animate="fadeRight"] {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 1s ease, transform 1s ease;
}

[data-animate="fadeRight"].animated {
  opacity: 1;
  transform: translateX(0);
}

[data-animate="fadeLeft"] {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

[data-animate="fadeLeft"].animated {
  opacity: 1;
  transform: translateX(0);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.apple-emoji {
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
  display: inline-block;
  user-select: none;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--purple-main), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(0.7);
  }
}

/* ===== ABOUT ===== */
.about {
  background: linear-gradient(180deg, #0b0a12 0%, var(--bg-mid) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
}

.about-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centers number and label horizontally */
  text-align: center;
  gap: 4px;
}

.stat-number {
  display: block;
  font-size: clamp(2.8rem, 12vw, 4rem);
  /* Fluid size for mobile safety */
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  min-height: 1.1em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  /* Prevents "dancing" numbers */
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.num-wrapper {
  display: inline-block;
  min-width: 1.25em;
  /* Slightly more space for stability */
  text-align: right;
  margin-right: 0.15em;
  /* Increased spacing before "Days" for better aesthetics */
}

.stat-plus {
  font-size: 1.4rem;
}

.stat-label {
  display: block;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 8px;
  white-space: nowrap;
  /* Prevents "Time" from jumping to next line */
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-card {
  background: rgba(18, 16, 28, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), inset 0 -1px 1px rgba(255, 255, 255, 0.01), 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: floatCard 6s ease-in-out infinite;
  transform: translate3d(0, 0, 0);
  transition: scale 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease, border-color 0.6s ease;
  will-change: transform;
}

.about-card:nth-child(1) {
  animation-delay: 0s;
}

.about-card:nth-child(2) {
  animation-delay: -2s;
}

.about-card:nth-child(3) {
  animation-delay: -4s;
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.about-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.about-card:hover {
  scale: 1.02;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -1px 1px rgba(255, 255, 255, 0.02), 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 58, 237, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.about-card:hover::before {
  opacity: 1;
}

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

.about-card-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: block;
}

.about-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PORTFOLIO ===== */
.portfolio {
  background: linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
  overflow: hidden;
}

.carousel-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.carousel-btn {
  position: relative;
  z-index: 10;
  width: 64px;
  height: 64px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.carousel-btn:hover {
  background: var(--purple-main);
  border-color: var(--purple-main);
  box-shadow: 0 0 20px var(--purple-glow);
}

.carousel-prev {
  left: 24px;
}

.carousel-next {
  right: 24px;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Fixes mobile viewport stretching bug causing math errors */
}

.carousel-track-container {
  overflow: visible;
  /* Allow scaling to show clearly */
  width: 100%;
  padding: 40px 0;
  cursor: grab;
  user-select: none;
}

.carousel-track-container:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  align-items: center;
  /* Center items vertically */
  gap: 0;
  /* Gap is handled by negative margins */
  padding: 40px 0;
  /* Accommodate scaled items */
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  position: relative;
  /* Important for JS offset calculations */
}

.carousel-item {
  flex: 0 0 50vw;
  /* Center item occupies 50% of screen width */
  max-width: 800px;
  min-width: 300px;
  margin: 0 16px;
  /* Positive margin to ensure they never overlap */
  position: relative;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 4px solid var(--purple-main);
  /* Purple border on all items */
  background-repeat: no-repeat;
  background-position: center;
  background-color: #000;
}

/* Active Coverflow Customizations */
.carousel-item.active .video-thumb {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.4);
}

.video-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 30px var(--purple-glow);
  border-color: var(--border-hover);
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.carousel-item:not(.active) .thumb-overlay {
  opacity: 0.4;
  /* Darken non-active side items */
  background: rgba(0, 0, 0, 0.6);
}

.carousel-item.active:hover .thumb-overlay {
  opacity: 1;
  /* Only show active play overlay on hover */
}

.play-btn {
  width: 60px;
  height: 60px;
  background: rgba(124, 58, 237, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.play-btn:hover {
  transform: scale(1.1);
  background: var(--purple-main);
}

.play-btn svg {
  width: 24px;
  height: 24px;
  color: #fff;
  margin-left: 3px;
}

.thumb-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(124, 58, 237, 0.8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.thumb-meta {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
}

.thumb-duration {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.item-info {
  padding: 16px 4px 0;
}

.item-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.item-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 64px;
  /* Matches button height for perfect vertical centering */
}

.dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.dot-indicator.active {
  width: 24px;
  border-radius: 3px;
  background: var(--purple-main);
}

/* ===== SERVICES (LIQUID GLASS BENTO BOX) ===== */
.services {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
  /* Pure black for deepest contrast */
}

.services .section-title {
  background: linear-gradient(135deg, #fff 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.services-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  filter: blur(100px);
  z-index: 0;
}

.floating-emoji {
  position: absolute;
  font-size: clamp(6rem, 15vw, 15rem);
  opacity: 0.05;
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
  animation: floatEmoji 25s ease-in-out infinite alternate;
}

.floating-emoji.e1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.floating-emoji.e2 {
  top: 40%;
  right: 5%;
  animation-delay: -5s;
  font-size: clamp(8rem, 20vw, 20rem);
  filter: blur(8px);
}

.floating-emoji.e3 {
  bottom: 10%;
  left: 15%;
  animation-delay: -10s;
}

@keyframes floatEmoji {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }

  100% {
    transform: translate3d(50px, -100px, 0) rotate(20deg) scale(1.1);
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  /* Premium Liquid Glass Cards */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 40px;
  padding: 48px 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    inset 0 -1px 1px rgba(255, 255, 255, 0.01);
  transition: all 0.8s var(--apple-curve);
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow, border-color;
  animation: floatCard 6s ease-in-out infinite;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  /* Fully hidden by default */
  z-index: 1;
}

.service-card:hover {
  transform: translate3d(0, -4px, 0);
  /* Smaller levitation */
  border-color: rgba(255, 255, 255, 0.07);
  /* Extremely subtle border shift */
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    inset 0 -1px 1px rgba(255, 255, 255, 0.02),
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(124, 58, 237, 0.1);
  /* Very subtle purple ambient glow */
}

.service-card:hover::before {
  opacity: 1;
}

/* BENTO MAPPINGS - 6 COLUMN SYSTEM */
.service-card:nth-child(1) {
  grid-column: span 3;
  animation-delay: 0s;
}

.service-card:nth-child(2) {
  grid-column: span 3;
  animation-delay: -1s;
}

/* The 3-card identical size row */
.service-card:nth-child(3) {
  grid-column: span 2;
  animation-delay: -2s;
}

.service-card:nth-child(4) {
  grid-column: span 2;
  animation-delay: -3s;
}

.service-card:nth-child(5) {
  grid-column: span 2;
  animation-delay: -4s;
}

.service-card:nth-child(6) {
  grid-column: span 6;
  animation-delay: -5s;
}

/* Mobile bento reset */
@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card:nth-child(1),
  .service-card:nth-child(2),
  .service-card:nth-child(3),
  .service-card:nth-child(4),
  .service-card:nth-child(5),
  .service-card:nth-child(6) {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    padding: 30px;
  }
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.service-icon {
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.08);
  /* Frosted icon base */
  backdrop-filter: blur(10px);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  /* Margin handled by header gap */
  line-height: 1.1;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.service-tag {
  align-self: flex-start;
  /* Fix for horizontal stretching */
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--purple-main), #9333ea);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ===== WORKFLOW ===== */
.workflow {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  position: relative;
  overflow: hidden;
}

.workflow-timeline {
  position: relative;
  max-width: 1000px;
  margin: 80px auto 0;
  padding: 40px 0;
}

/* Central Glowing Axis */
.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(124, 58, 237, 0.6) 15%, rgba(59, 130, 246, 0.6) 85%, transparent 100%);
  transform: translateX(-50%);
  z-index: 0;
}

.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14px;
  right: -14px;
  background: linear-gradient(180deg, transparent 0%, rgba(124, 58, 237, 0.3) 15%, rgba(59, 130, 246, 0.3) 85%, transparent 100%);
  filter: blur(14px);
  z-index: -1;
}

/* Timeline Wrappers */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 50px;
  margin-bottom: 40px;
  /* Vertical spacing between items */
  z-index: 2;
}

/* Branching Logic */
.timeline-item.left {
  left: 0;
  text-align: right;
  padding-right: 70px;
  /* Spaced away from central line */
}

.timeline-item.right {
  left: 50%;
  text-align: left;
  padding-left: 70px;
}

/* The Glowing Nodes Centered Perfectly */
.timeline-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--purple-main);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.5), inset 0 0 12px rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  z-index: 3;
}

.timeline-item.left .timeline-dot {
  right: -26px;
}

/* Half of 52px width connects perfectly to axis */
.timeline-item.right .timeline-dot {
  left: -26px;
}

/* Apple Liquid Glass Cards */
.timeline-content {
  background: rgba(18, 16, 28, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 28px;
  padding: 36px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), inset 0 -1px 1px rgba(255, 255, 255, 0.01), 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, box-shadow, border-color;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.timeline-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  z-index: -1;
}

.timeline-content:hover {
  transform: translate3d(0, -4px, 0);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), inset 0 -1px 1px rgba(255, 255, 255, 0.02), 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(124, 58, 237, 0.08);
}

.timeline-content:hover::before {
  opacity: 1;
}

.timeline-item.left .timeline-content {
  margin-left: auto;
  max-width: 440px;
  animation: floatCard 6s ease-in-out infinite;
  will-change: transform;
}

.timeline-item.right .timeline-content {
  margin-right: auto;
  max-width: 440px;
  animation: floatCard 6s ease-in-out infinite;
  will-change: transform;
}

/* Staggered delays for timeline items */
.timeline-item:nth-child(1) .timeline-content {
  animation-delay: 0s;
}

.timeline-item:nth-child(2) .timeline-content {
  animation-delay: -1s;
}

.timeline-item:nth-child(3) .timeline-content {
  animation-delay: -2s;
}

.timeline-item:nth-child(4) .timeline-content {
  animation-delay: -3s;
}

.timeline-item:nth-child(5) .timeline-content {
  animation-delay: -4s;
}

.timeline-item:nth-child(6) .timeline-content {
  animation-delay: -5s;
}

/* Internal Typography & Decor */
.step-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.timeline-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.timeline-content p {
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
  resize: vertical;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple-main);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: var(--bg-card-hover);
}

.form-success {
  display: none;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--purple-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-success.visible {
  display: block;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
  min-width: 240px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-item-value {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-social {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-secondary);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  border-color: var(--purple-main);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 16px var(--purple-glow);
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

.back-to-top {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-secondary);
  flex-shrink: 0;
}

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

.back-to-top:hover {
  border-color: var(--purple-main);
  color: var(--purple-light);
  transform: translateY(-3px);
  box-shadow: 0 0 16px var(--purple-glow);
}

/* ===== VIDEO MODAL (LIGHTBOX) ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 10, 0.92);
  backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  transform: translateY(40px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: -60px;
  right: 0;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--purple-main);
  border-color: var(--purple-main);
  transform: rotate(90deg);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
  overflow: visible;
  /* Important for glow */
  transition: all 0.3s ease;
}

.video-wrapper.is-vertical {
  aspect-ratio: 9/16;
  max-width: 400px;
  margin: 0 auto;
}

/* THE "AMBILIGHT" GLOW EFFECT */
.ambilight-glow {
  position: absolute;
  inset: -20px;
  z-index: -1;
  border-radius: var(--radius-lg);
  filter: blur(80px);
  opacity: 0.7;
  transition: all 1s ease;
  background: conic-gradient(from 0deg, var(--purple-main), var(--blue-accent), var(--purple-light), var(--purple-main));
}

.video-iframe-container {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-iframe-container iframe {
  width: 100%;
  height: 100%;
}

.modal-info {
  margin-top: 24px;
  text-align: left;
}

.modal-info h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #fff;
}

.modal-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .video-modal {
    padding: 20px;
  }

  .modal-close {
    top: -50px;
    width: 36px;
    height: 36px;
  }

  .modal-info h3 {
    font-size: 1.2rem;
  }
}

/* ===== ANIMATIONS ===== */
[data-animate="fadeUp"] {
  opacity: 0;
  transform: translateY(40px);
  /* Slightly deeper drop */
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fadeUp"].animated {
  opacity: 1;
  transform: translateY(0);
}

/* delay classes */
.about-visual .about-card:nth-child(1) {
  transition-delay: 0.1s;
}

.about-visual .about-card:nth-child(2) {
  transition-delay: 0.2s;
}

.about-visual .about-card:nth-child(3) {
  transition-delay: 0.3s;
}

.services-grid .service-card:nth-child(1) {
  transition-delay: 0.05s;
}

.services-grid .service-card:nth-child(2) {
  transition-delay: 0.1s;
}

.services-grid .service-card:nth-child(3) {
  transition-delay: 0.15s;
}

.services-grid .service-card:nth-child(4) {
  transition-delay: 0.2s;
}

.services-grid .service-card:nth-child(5) {
  transition-delay: 0.25s;
}

.services-grid .service-card:nth-child(6) {
  transition-delay: 0.3s;
}

.workflow-step:nth-child(1) {
  transition-delay: 0.05s;
}

.workflow-step:nth-child(2) {
  transition-delay: 0.1s;
}

.workflow-step:nth-child(3) {
  transition-delay: 0.15s;
}

.workflow-step:nth-child(4) {
  transition-delay: 0.2s;
}

.workflow-step:nth-child(5) {
  transition-delay: 0.25s;
}

.workflow-step:nth-child(6) {
  transition-delay: 0.3s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Formally workflow-steps grid reset went here, timeline adapts automatically */

  .about-grid {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
    gap: 16px;
  }

  .navbar.scrolled {
    left: 10px;
    right: 10px;
    top: 12px;
    /* Center at 40px (12 + 56/2) matching non-scrolled 0 + 80/2 */
    height: 56px;
  }

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

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  /* Vertical Timeline Mobile Adjustments */
  .workflow-timeline {
    padding-left: 20px;
    margin-top: 40px;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item.left,
  .timeline-item.right {
    width: 100%;
    left: 0;
    padding: 0 0 0 50px;
    margin-bottom: 25px;
    /* Spacing between steps on mobile */
    text-align: left;
  }

  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: -26px;
    right: auto;
  }

  .timeline-item.left .timeline-content,
  .timeline-item.right .timeline-content {
    margin: 0;
    max-width: 100%;
  }
}


/* Hero Video Controls (Global Scope) */
.hero-video-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  left: auto;
  display: flex;
  align-items: center;
  /* Ensures hint and button are aligned */
  gap: 16px;
  z-index: 5;
  opacity: 1;
  /* Always visible to indicate clickability */
  transition: transform 0.3s ease;
}

.video-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11, 10, 18, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-control-btn:hover {
  background: var(--purple-main);
  border-color: var(--purple-light);
  transform: scale(1.1);
}

.video-control-btn svg {
  width: 20px;
  height: 20px;
}

.mute-icon.is-muted .volume-line {
  display: none;
}

.mute-icon.is-muted::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

@media (max-width: 768px) {
  .hero-video-controls {
    opacity: 1;
    /* Always visible on mobile/tablet */
  }
}

@media (max-width: 615px) {
  .hero-video-controls {
    left: 15px;
    right: auto;
    bottom: 15px;
  }
}

@media (max-width: 480px) {
  .hero-video-controls {
    right: 8px;
    /* Move entire container slightly more to the right */
    left: auto;
    bottom: 12px;
    gap: 6px !important;
    /* Move hint closer to button */
  }
}

/* Re-open mobile media query for remaining layout resets */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
    /* Stack vertically on small tablets/phones */
    gap: 40px;
  }

  .stat-label {
    white-space: normal;
    /* Allow wrapping on mobile to prevent overflow */
    max-width: 200px;
    /* Keep it narrow and centered */
    margin-left: auto;
    margin-right: auto;
  }

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

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .carousel-item {
    flex: 0 0 75vw;
    /* Wider center item on mobile */
    min-width: 220px;
    /* Allow shrinking on small phones so it fits without bulging */
    margin: 0 8px;
    /* Small positive margin on mobile */
    transition: var(--transition);
  }

  .carousel-track-container {
    padding: 24px 0;
    /* Removed rogue 56px horizontal padding that broke math centering */
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-bottom: 120px;
    /* Space for absolute scroll hint */
  }

  .scroll-hint {
    bottom: 30px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 3rem;
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 0;
    padding: 30px 20px;
    border-radius: 24px;
    margin: 0 10px;
    backdrop-filter: blur(12px) saturate(160%);
    background: rgba(255, 255, 255, 0.02);
  }

  .hero-text {
    display: contents;
  }

  .hero-eyebrow {
    order: 1 !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    width: 100% !important;
  }

  .hero-text h1 {
    display: none !important;
  }

  .hero-sub,
  .hero-subtitle {
    display: none !important;
  }

  .hero-video-wrapper-container {
    order: 2 !important;
    width: 100%;
    margin-bottom: 40px !important;
  }

  .hero-actions,
  .hero-btns {
    order: 3 !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  .hero-video-wrapper {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 20px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    aspect-ratio: 9/16 !important;
    height: auto !important;
  }

  .hint-cloud {
    white-space: nowrap !important;
    flex-direction: row !important;
    gap: 10px !important;
    padding: 10px 16px !important;
  }

  .hint-cloud span {
    white-space: nowrap !important;
  }

  .carousel-item {
    flex: 0 0 260px;
  }

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }
}