/* ============================================================
   SensEye — Design System
   Color Rule: 60% Black / 30% White / 10% Red
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --color-bg: #000000;
  --color-bg-elevated: #0a0a0a;
  --color-text: #ffffff;
  --color-text-muted: #999999;
  --color-accent: #ff0000;
  --color-accent-glow: rgba(255, 0, 0, 0.35);
  --color-overlay: rgba(0, 0, 0, 0.35);
  --color-glass: rgba(10, 10, 10, 0.65);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  --font-hero: 'Syne', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --fs-hero: clamp(3rem, 8vw, 7rem);
  --fs-h2: clamp(2rem, 4vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.75rem);
  --fs-body: clamp(1rem, 1.2vw, 1.125rem);
  --fs-small: clamp(0.8rem, 1vw, 0.9rem);

  --nav-height: 72px;
  --section-padding: clamp(80px, 12vh, 160px) clamp(20px, 5vw, 80px);
  --max-content: 1200px;
  --radius: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- Lenis Smooth Scrolling --- */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Global Text Legibility Shadows --- */
h1,
h2,
h3,
p,
.nav-logo,
.stat-number,
.stat-label {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 2px 5px rgba(0, 0, 0, 0.6);
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   CINEMATIC EFFECTS
   ============================================================ */

/* --- Custom Circle Cursor --- */
body, body * {
  /* cursor: none !important; */
}

.custom-cursor {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, background-color 0.3s ease;
}

.custom-cursor.active {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 0, 0, 0.8);
  background-color: rgba(255, 0, 0, 0.1);
}

/* --- Cursor Glow --- */
.cursor-glow {
  display: none !important;
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.07) 0%, rgba(255, 0, 0, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform, width, height, background;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.5s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease;
}

body:hover .cursor-glow {
  opacity: 1;
}

.cursor-glow.active {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.15) 0%, rgba(255, 0, 0, 0.05) 50%, transparent 70%);
}

/* --- Film Grain Overlay --- */
.film-grain {
  position: fixed;
  inset: -10%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  animation: grain 0.5s steps(8) infinite;
}

@keyframes grain {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-2%, -3%);
  }

  20% {
    transform: translate(3%, 1%);
  }

  30% {
    transform: translate(-1%, 4%);
  }

  40% {
    transform: translate(4%, -2%);
  }

  50% {
    transform: translate(-3%, 2%);
  }

  60% {
    transform: translate(2%, -4%);
  }

  70% {
    transform: translate(-4%, 1%);
  }

  80% {
    transform: translate(1%, 3%);
  }

  90% {
    transform: translate(3%, -1%);
  }
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #ff4444 60%, #ff8888 100%);
  z-index: 200;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5), 0 0 30px rgba(255, 0, 0, 0.2);
  will-change: transform;
  transform: scaleX(0);
  transform-origin: left;
}

/* --- Ambient Floating Orbs --- */
.ambient-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.08) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: orbDrift1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 30, 0, 0.05) 0%, transparent 70%);
  bottom: 10%;
  left: -8%;
  animation: orbDrift2 25s ease-in-out infinite;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(200, 0, 0, 0.04) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation: orbDrift3 18s ease-in-out infinite;
}

@keyframes orbDrift1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(-60px, 80px) scale(1.1);
  }

  50% {
    transform: translate(-30px, 150px) scale(0.9);
  }

  75% {
    transform: translate(40px, 60px) scale(1.05);
  }
}

@keyframes orbDrift2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(80px, -60px) scale(1.15);
  }

  66% {
    transform: translate(40px, -120px) scale(0.85);
  }
}

@keyframes orbDrift3 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-100px, 80px) scale(1.2);
  }
}

/* --- Vignette Effect --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 3;
  pointer-events: none;
}

/* --- Scroll Hint Indicator --- */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 1.5s forwards;
}

.scroll-hint-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.3;
    transform: scaleY(0.6);
  }
}

/* --- Video Background --- */
.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  
  /* GPU-accelerated compositing */
  will-change: opacity, transform;
  transform: translateZ(0) scale(1.15);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* --- Three.js Canvas & Overlay --- */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.canvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.18);
  z-index: 1;
  pointer-events: none;
  /* GPU-accelerated compositing */
  will-change: opacity;
  transform: translateZ(0);
}

/* --- Content Layer --- */
.content-layer {
  position: relative;
  z-index: 2;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 60px);
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-glass-border);
  z-index: 100;
  transition: background var(--transition-fast);
}

.nav-logo {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: var(--nav-height);
}

.nav-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: invert(1) brightness(400%);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.08);
  filter: invert(1) brightness(400%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  list-style: none;
}

.nav-links a {
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Nav Book a Call button */
.btn-nav {
  padding: 8px 20px !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
}

.btn-nav::after {
  display: none;
}

.btn-nav:hover::after {
  width: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-fast);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 5%;
  overflow: hidden;
  z-index: 10;
}

/* Cinematic Ambient Text (Matches Workflow Numbers) */
.hero-ambient-text {
  position: absolute;
  font-family: var(--font-hero);
  font-size: 6vw; /* Reduced from 10vw for better visibility */
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
  z-index: -1;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-txt-2 {
  bottom: 10%;
  right: 10%;
  font-size: 5.5vw; /* Slightly increased size */
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0;
  animation: hero-blink 2.5s infinite 1.2s;
}

.ambient-txt-showcase {
  top: 50%;
  left: 2%;
  font-size: clamp(3rem, 6vw, 8rem);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  opacity: 0.9;
  filter: opacity(0.6);
}

.ambient-icon-showcase {
  position: absolute;
  top: 50%;
  right: 5%;
  width: clamp(5rem, 12vw, 12rem);
  transform: translateY(-50%);
  opacity: 0.9;
  filter: opacity(0.6);
  z-index: -1;
  pointer-events: none;
}

.ambient-icon-showcase svg {
  width: 100%;
  height: 100%;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.8px;
  fill: none;
}

.ambient-txt-contact {
  top: 50%;
  right: 2%;
  font-size: clamp(3rem, 6vw, 8rem);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 20%, black 80%, transparent 100%);
  mask-image: linear-gradient(to top, transparent 0%, black 20%, black 80%, transparent 100%);
}

/* --- Render Aesthetic Elements --- */
.render-element {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  stroke: var(--color-accent);
  stroke-width: 0.5px;
  fill: none;
  transition: opacity 1.5s ease, transform 3s ease;
}

.render-cube {
  top: 10%;
  right: 5%;
  width: clamp(150px, 20vw, 300px);
  animation: slow-spin-3d 30s linear infinite;
  transform-style: preserve-3d;
}

.render-cross {
  width: 24px;
  height: 24px;
  opacity: 0.3;
}
.render-cross.top-left { top: 40px; left: 40px; }
.render-cross.top-right { top: 40px; right: 40px; }
.render-cross.bottom-left { bottom: 40px; left: 40px; }
.render-cross.bottom-right { bottom: 40px; right: 40px; }

.render-grid-plane {
  bottom: -20%;
  left: -10%;
  width: 120%;
  height: 50%;
  opacity: 0.05;
  background-image: 
    linear-gradient(rgba(255, 0, 0, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.5) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(500px) rotateX(75deg);
  -webkit-mask-image: radial-gradient(ellipse at top, black 0%, transparent 60%);
  mask-image: radial-gradient(ellipse at top, black 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

@keyframes slow-spin-3d {
  0% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: perspective(1000px) rotateX(360deg) rotateY(720deg) rotateZ(360deg); }
}

@keyframes hero-blink {
  0%, 80% { opacity: 0.9; }
  80.1%, 100% { opacity: 0; }
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-tag {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero h1 {
  font-family: var(--font-hero);
  font-size: clamp(2.5rem, 4.5vw, 4rem); /* Slightly larger subtle font size */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 900px;
  text-shadow: 0 0 25px rgba(255, 60, 0, 0.7), 0 0 8px rgba(255, 100, 0, 0.35), 0 2px 2px rgba(0, 0, 0, 0.2) !important;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero p,
.hero .hero-tag {
  text-shadow: 0 0 18px rgba(255, 60, 0, 0.55), 0 0 5px rgba(255, 100, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* --- Hero Socials --- */
.hero-socials {
  position: absolute;
  bottom: 40px;
  left: clamp(20px, 4vw, 60px);
  display: flex;
  flex-direction: row;
  gap: 28px;
  z-index: 100;
}

.hero-socials a {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-socials a svg {
  width: 38px;
  height: 38px;
}

.hero-socials a:hover {
  color: #fff;
  transform: scale(1.1);
}

/* --- Scratch Effect (Strike-through) --- */
.scratch {
  position: relative;
  display: inline-block;
}

.scratch::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  top: 55%;
  height: 4px;
  background-color: var(--color-accent);
  transform: translateY(-50%) rotate(-3deg);
  opacity: 0.85;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 0 10px var(--color-accent);
}

/* --- Glitch Animation --- */
.glitch {
  display: inline-block;
  position: relative;
  animation: glitch-flicker 3s infinite linear;
}

@keyframes glitch-flicker {

  0%,
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: hue-rotate(0);
  }

  3% {
    opacity: 0;
    transform: translateX(-4px);
  }

  5% {
    opacity: 1;
    transform: translateX(4px);
    filter: hue-rotate(90deg);
  }

  7% {
    opacity: 0;
    transform: translateX(-2px);
  }

  9% {
    opacity: 1;
    transform: translateX(0);
    filter: hue-rotate(0);
  }

  33% {
    opacity: 1;
    transform: translateX(0);
  }

  35% {
    opacity: 0;
    transform: translateY(-3px);
    text-shadow: -4px 0 red, 4px 0 cyan !important;
  }

  37% {
    opacity: 1;
    transform: translateY(0);
  }

  60% {
    opacity: 1;
  }

  62% {
    opacity: 0;
    transform: translateX(2px);
  }

  64% {
    opacity: 1;
    transform: translateX(0);
  }

  85% {
    opacity: 1;
  }

  87% {
    opacity: 0.3;
    transform: translateX(3px);
    text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff !important;
  }

  89% {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero h1 .accent {
  color: var(--color-accent);
  position: relative;
  font-size: var(--fs-hero);
}

/* --- Word Swap: TELL ↔ SHOW --- */
.word-swap {
  position: relative;
  display: inline-flex;
  justify-content: center;
  min-width: 4.5ch;
}

.word-swap-tell,
.word-swap-show {
  display: inline-block;
  font-size: var(--fs-hero);
}

.word-swap-show {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  color: var(--color-accent);
  opacity: 0;
  animation: swapShow 4s 1 forwards;
}

.word-swap-tell {
  color: var(--color-text);
  position: relative;
  opacity: 1;
  animation: swapTell 4s 1 forwards;
}

/* Red scratch line across TELL */
.word-swap-tell::after {
  content: '';
  position: absolute;
  left: -5%;
  right: -5%;
  top: 55%;
  height: 4px;
  background: var(--color-accent);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--color-accent);
  animation: scratchDraw 4s 1 forwards;
}

@keyframes scratchDraw {
  0%, 40%   { transform: translateY(-50%) scaleX(0); opacity: 0.85; }
  55%       { transform: translateY(-50%) scaleX(1); opacity: 0.85; }
  75%, 100% { transform: translateY(-50%) scaleX(1); opacity: 0; }
}

@keyframes swapTell {
  0%, 50%  { opacity: 1; transform: translateX(0); }
  65%      { opacity: 1; transform: translateX(0); }
  80%      { opacity: 0; transform: translateX(80px); }
  100%     { opacity: 0; transform: translateX(80px); }
}

@keyframes swapShow {
  0%, 72% { opacity: 0; }
  88%, 100% { opacity: 1; }
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-top: 28px;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: 40px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-primary {
  background: var(--color-primary, #e60000); /* Solid bright red */
  border: 1px solid #ff4d4d;
  color: #ffffff;
  box-shadow: 0 8px 32px rgba(255, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.55) 0%, rgba(180, 0, 0, 0.2) 100%);
  border-color: rgba(255, 150, 150, 0.6);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 0, 0, 0.4), inset 0 2px 6px rgba(255, 255, 255, 0.5);
}

.btn-primary:hover::after {
  left: 150%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2), inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.btn-glass {
  background: rgba(255, 0, 0, 0.02);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #ffffff;
  box-shadow: 0 4px 30px rgba(255, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-glass:hover {
  background: rgba(255, 0, 0, 0.08);
  border-color: rgba(255, 0, 0, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 0, 0, 0.4);
}

/* --- View Our Work Button (Film Reel CTA) --- */
.btn-reel {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.35) 0%, rgba(180, 0, 0, 0.15) 50%, rgba(255, 30, 0, 0.25) 100%);
  border: 1px solid rgba(255, 100, 100, 0.45);
  color: var(--color-text);
  box-shadow:
    0 8px 32px rgba(255, 0, 0, 0.3),
    0 0 60px rgba(255, 0, 0, 0.08),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  padding: 16px 40px 16px 36px;
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  letter-spacing: 0.08em;
  position: relative;
  overflow: hidden;
  animation: reelPulse 3s ease-in-out infinite;
}

/* Shimmer sweep on hover */
.btn-reel::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-reel:hover {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.5) 0%, rgba(200, 0, 0, 0.25) 50%, rgba(255, 40, 0, 0.35) 100%);
  border-color: rgba(255, 150, 150, 0.6);
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 16px 48px rgba(255, 0, 0, 0.4),
    0 0 80px rgba(255, 0, 0, 0.12),
    inset 0 2px 6px rgba(255, 255, 255, 0.4);
  animation: none;
}

.btn-reel:hover::after {
  left: 160%;
}

.btn-reel:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 4px 15px rgba(255, 0, 0, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

/* Play icon circle */
.btn-reel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-right: 4px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-reel-icon svg {
  margin-left: 2px;
  width: 14px;
  height: 14px;
}

.btn-reel:hover .btn-reel-icon {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Subtle idle pulse to draw attention */
@keyframes reelPulse {
  0%, 100% {
    box-shadow:
      0 8px 32px rgba(255, 0, 0, 0.3),
      0 0 60px rgba(255, 0, 0, 0.08),
      inset 0 2px 4px rgba(255, 255, 255, 0.25);
  }
  50% {
    box-shadow:
      0 8px 40px rgba(255, 0, 0, 0.45),
      0 0 80px rgba(255, 0, 0, 0.15),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
}
.section {
  padding: var(--section-padding);
  position: relative;
}

/* Subtle glassmorphic grid effect on all sections except hero */
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-mask-image: 
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: 
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 15%, black 75%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
  z-index: 0;
}

/* Remove grid from contact CTA and portfolio sections */
.contact-section::before,
#our-work::before {
  display: none;
}

.section-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.section-desc {
  color: var(--color-text-muted);
  max-width: 560px;
  margin-top: 20px;
  line-height: 1.8;
}

/* --- Divider --- */
.divider {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-accent) 50%,
      transparent 100%);
  opacity: 0.3;
  transform-origin: center center;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.feature-card {
  background: rgba(10, 5, 5, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* --- Portfolio Section (Full-Bleed Carousel) --- */
.portfolio-section {
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.portfolio-section .section-inner {
  padding: 0 clamp(20px, 5vw, 80px);
  margin-bottom: 48px;
}

/* ============================================================
   SHOWREEL VIDEO PLAYER
   ============================================================ */

.showreel-container {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 40px auto 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 10px 30px rgba(255, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  /* GPU compositing for smooth video playback */
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.showreel-container:hover {
  border-color: rgba(255, 0, 0, 0.2);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.8),
    0 15px 40px rgba(255, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Video element — fill container with GPU acceleration */
.showreel-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Critical GPU performance hints */
  will-change: transform;
  transform: translateZ(0) scale(1.01); /* slight scale prevents sub-pixel gaps */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Smooth rendering */
  image-rendering: auto;
}

/* Cinematic vignette overlay */
.showreel-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 20%);
}

/* Subtle grain overlay on the video */
.showreel-grain {
  position: absolute;
  inset: -10%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  animation: grain 0.5s steps(8) infinite;
}

/* Play overlay (shown when video hasn't started) */
.showreel-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.showreel-container.paused .showreel-play-overlay {
  opacity: 1;
  pointer-events: auto;
}

.showreel-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.2);
}

.showreel-play-btn svg {
  color: #fff;
  margin-left: 4px;
}

.showreel-play-overlay:hover .showreel-play-btn {
  transform: scale(1.1);
  background: rgba(255, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.35);
}

.showreel-play-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Live badge indicator */
.showreel-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.showreel-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--color-accent); }
  50% { opacity: 0.4; box-shadow: 0 0 4px var(--color-accent); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .showreel-container {
    border-radius: 10px;
    margin: 24px auto 0;
  }
  
  .showreel-play-btn {
    width: 56px;
    height: 56px;
  }
  
  .showreel-play-btn svg {
    width: 24px;
    height: 24px;
  }
  
  .showreel-badge {
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.55rem;
  }
}

/* ============================================================
   FILMSTRIP CAROUSEL
   ============================================================ */

/* Filmstrip wrapper */
.filmstrip-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* --- Filmstrip Perforation Borders --- */
.filmstrip-perf {
  position: relative;
  height: 24px;
  background: rgba(15, 15, 15, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.perf-track {
  display: flex;
  gap: 28px;
  padding: 0 14px;
  height: 100%;
  align-items: center;
  animation: perfScroll 20s linear infinite;
}

/* Create perforations with repeating background */
.perf-track::before {
  content: '';
  display: block;
  width: 6000px;
  flex-shrink: 0;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0px,
    rgba(255, 255, 255, 0.08) 12px,
    transparent 12px,
    transparent 32px
  );
  border-radius: 2px;
}

@keyframes perfScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-32px); }
}

/* --- Carousel Viewport --- */
.carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 40px 0;
  cursor: grab;
}

.carousel-viewport:active {
  cursor: grabbing;
}

/* Edge fade gradient for seamless look */
.carousel-viewport::before,
.carousel-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}

.carousel-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-bg) 0%, transparent 100%);
}

.carousel-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, var(--color-bg) 0%, transparent 100%);
}

/* --- Carousel Track (horizontal scrolling) --- */
.carousel-track {
  display: flex;
  gap: 32px;
  padding: 0;
  transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* --- Carousel Card --- */
.carousel-card {
  flex: 0 0 auto;
  width: clamp(340px, 32vw, 480px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg, rgba(20, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.95) 100%);
  cursor: pointer;
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  position: relative;
  display: flex;
  flex-direction: column;
}

.carousel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  z-index: 3;
}

.carousel-card:hover {
  transform: translateY(-12px) scale(1.03);
  border-color: rgba(255, 0, 0, 0.25);
  box-shadow:
    0 30px 80px rgba(255, 0, 0, 0.1),
    0 15px 40px rgba(0, 0, 0, 0.6);
}

.carousel-card:hover::before {
  opacity: 1;
}

/* --- Card Media (Image/Video) --- */
.carousel-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.carousel-card-media img,
.carousel-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
  filter: brightness(0.85) saturate(0.9);
}

.carousel-card:hover .carousel-card-media img,
.carousel-card:hover .carousel-card-media video {
  filter: brightness(0.6) saturate(1.2);
}

/* Frame number overlay (35mm style) */
.carousel-card-frame-number {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.2em;
  z-index: 3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* --- Card Overlay --- */
.carousel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 2;
}

.carousel-card:hover .carousel-card-overlay {
  opacity: 1;
}

/* --- Play Button --- */
.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transform: scale(0.7);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
}

.play-btn svg {
  margin-left: 3px;
}

.carousel-card:hover .play-btn {
  transform: scale(1);
}

.play-btn:hover {
  background: rgba(255, 0, 0, 0.7);
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.5);
  transform: scale(1.1) !important;
}

/* --- Card Info --- */
.carousel-card-info {
  padding: 24px 28px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.carousel-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.portfolio-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.portfolio-genre {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.25);
  color: var(--color-accent);
}

.carousel-card h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.carousel-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.88rem;
  max-width: 400px;
  flex: 1;
}

.portfolio-credits {
  display: flex;
  gap: 20px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  font-weight: 500;
}

.portfolio-credits span {
  position: relative;
}

.portfolio-credits span + span::before {
  content: '•';
  position: absolute;
  left: -13px;
  color: var(--color-accent);
}

/* --- Carousel Controls --- */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  padding: 0 clamp(20px, 5vw, 80px);
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.carousel-btn:hover {
  border-color: rgba(255, 0, 0, 0.4);
  background: rgba(255, 0, 0, 0.1);
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.15);
}

.carousel-indicator {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.carousel-current {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 28px;
  text-align: right;
}

.carousel-separator {
  color: rgba(255, 255, 255, 0.2);
}

.carousel-total {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* --- Portfolio CTA --- */
.portfolio-cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding-bottom: 20px;
}


.btn-liquid-glass {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.btn-liquid-glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
  z-index: 0;
}

.btn-liquid-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.btn-liquid-glass:hover::before {
  left: 100%;
}

.btn-liquid-glass:active {
  transform: scale(0.98);
}

.btn-liquid-glass-text {
  position: relative;
  z-index: 1;
}

.btn-liquid-glass-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.btn-liquid-glass:hover .btn-liquid-glass-arrow {
  transform: translateX(4px);
}


/* ============================================================
   PROJECT DETAIL MODAL
   ============================================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.project-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  background: linear-gradient(168deg, rgba(18, 8, 8, 0.95) 0%, rgba(5, 3, 3, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.8),
    0 0 80px rgba(255, 0, 0, 0.05);
  transform: scale(0.92) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar styling for modal */
.project-modal-content::-webkit-scrollbar {
  width: 6px;
}
.project-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.project-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 0, 0.3);
  border-radius: 3px;
}

.project-modal.open .project-modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 0, 0, 0.3);
  border-color: rgba(255, 0, 0, 0.5);
  transform: rotate(90deg);
}

.modal-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
}

.modal-play-large {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.3);
}

.modal-play-large svg {
  margin-left: 4px;
}

.modal-play-large:hover {
  background: rgba(255, 0, 0, 0.7);
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.5);
}

.modal-body {
  padding: 36px 40px 44px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-meta-row span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-meta-row .portfolio-genre {
  font-size: 0.65rem;
}

.modal-body h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.15;
}

.modal-description {
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 1rem;
  max-width: 700px;
  margin-bottom: 32px;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.modal-detail-value {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Showcase / Stats --- */
.showcase {
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: clamp(40px, 6vw, 100px);
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-accent);
}

.stat-label {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* --- Contact Section --- */
.contact-section {
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
  perspective: 1000px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  background: linear-gradient(168deg, rgba(18, 8, 8, 0.6) 0%, rgba(8, 4, 4, 0.8) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  /* Subtle resting shadow */
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Top highlight edge */
.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: opacity 0.5s ease;
}

/* Inner light reflection on hover */
.contact-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 60, 60, 0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.contact-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-2deg) scale(1.02);
  border-color: rgba(255, 80, 80, 0.2);
  background: linear-gradient(168deg, rgba(25, 8, 8, 0.75) 0%, rgba(12, 4, 4, 0.9) 100%);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.contact-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(255, 100, 100, 0.25), transparent);
}

.contact-card:hover::after {
  opacity: 1;
}

.contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.06);
  border: 1px solid rgba(255, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.contact-card:hover .contact-icon {
  background: rgba(255, 0, 0, 0.12);
  border-color: rgba(255, 0, 0, 0.3);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.whatsapp-icon {
  color: #25d366;
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-small);
}

/* --- Footer --- */
.footer {
  position: relative;
  padding: 40px clamp(20px, 4vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-glass-border);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--color-accent);
  filter: blur(40px);
  opacity: 0.6;
  z-index: -1;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.return-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  animation: pulse-glow 2s infinite;
}

.return-home-btn:hover {
  background: #ff1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 30px rgba(255, 0, 0, 0.6);
  animation: none;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* --- Scroll Reveal (Slower, Cinematic) --- */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Speed up features grid cards specifically */
.features-grid .reveal {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger children for cascading effect */
.features-grid .reveal:nth-child(1) {
  transition-delay: 0s;
}

.features-grid .reveal:nth-child(2) {
  transition-delay: 0.05s;
}

.features-grid .reveal:nth-child(3) {
  transition-delay: 0.1s;
}



.contact-grid .reveal:nth-child(1) {
  transition-delay: 0s;
}

.contact-grid .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.contact-grid .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.contact-grid .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.stats-row .reveal:nth-child(1) {
  transition-delay: 0s;
}

.stats-row .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.stats-row .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.stats-row .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* --- Keyframes --- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */

/* Touch devices: hide cursor glow, disable hover-only effects */
@media (hover: none) and (pointer: coarse) {
  .cursor-glow {
    display: none !important;
  }
  .tech-specs-overlay {
    display: none !important;
  }
  /* Larger touch targets */
  .carousel-btn {
    width: 52px;
    height: 52px;
  }
  .nav-links a {
    padding: 8px 0;
  }
}

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel-card {
    width: clamp(300px, 45vw, 400px);
  }

  .modal-details {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }
  
  .hero h1 .accent {
    font-size: clamp(3rem, 7vw, 5.5rem);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
    --section-padding: clamp(48px, 8vh, 100px) clamp(16px, 4vw, 40px);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-glass-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
  
  .nav-logo-img {
    height: 110px;
  }

  /* Hero mobile */
  .hero {
    min-height: 100svh;
    padding: 80px 5% 60px;
  }
  
  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    max-width: 100%;
  }
  
  .hero h1 .accent {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  
  .hero-sub {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    margin-top: 20px;
    max-width: 100%;
  }
  
  .hero-cta-group {
    margin-top: 32px;
    gap: 12px;
  }
  
  .btn {
    padding: 12px 24px;
    font-size: 0.78rem;
  }
  
  .btn-reel {
    padding: 14px 28px 14px 24px;
    font-size: 0.78rem;
  }
  
  .btn-reel-icon {
    width: 28px;
    height: 28px;
  }
  
  .hero-socials {
    bottom: 24px;
    left: 16px;
    gap: 20px;
  }
  
  .hero-socials a svg {
    width: 28px;
    height: 28px;
  }
  
  .hero-ambient-text,
  .hero-txt-2 {
    display: none;
  }
  
  .scroll-hint {
    bottom: 20px;
  }

  /* Features mobile */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }
  
  .feature-card {
    padding: 28px 24px;
  }

  /* Carousel mobile */
  .carousel-card {
    width: clamp(260px, 78vw, 340px);
  }

  .carousel-viewport::before,
  .carousel-viewport::after {
    width: 12px;
  }
  
  .carousel-viewport {
    padding: 24px 0;
  }
  
  .carousel-track {
    gap: 20px;
    padding: 0;
  }
  
  .carousel-card-info {
    padding: 16px 20px 20px;
  }
  
  .carousel-card h3 {
    font-size: 1.15rem;
  }
  
  .carousel-card p {
    font-size: 0.82rem;
  }
  
  .carousel-controls {
    gap: 24px;
    margin-top: 16px;
  }
  
  .filmstrip-perf {
    height: 16px;
  }

  /* Contact mobile */
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .cinematic-form {
    padding: 24px 20px;
    gap: 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .submit-btn {
    width: 100%;
    justify-content: center;
  }

  /* Modal mobile */
  .project-modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 12px;
  }
  
  .modal-hero {
    border-radius: 12px 12px 0 0;
  }
  
  .modal-details {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .modal-body {
    padding: 20px 16px 28px;
  }
  
  .modal-body h2 {
    font-size: clamp(1.3rem, 4vw, 2rem);
  }
  
  .modal-description {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }
  
  .modal-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
  }
  
  /* NLE controls mobile */
  .nle-controls-bar {
    flex-direction: column;
    padding: 12px 16px;
    gap: 12px;
    align-items: stretch;
  }
  
  .bts-label {
    font-size: 0.7rem;
  }

  /* Stats mobile */
  .stats-row {
    gap: 24px;
    flex-wrap: wrap;
  }
  
  .stat {
    flex: 1 1 40%;
    min-width: 120px;
  }
  
  .stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  /* Section titles mobile */
  .section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  }
  
  .section-desc {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
  }

  /* Footer mobile */
  .footer {
    flex-direction: column;
    text-align: center;
    padding: 32px 16px;
    gap: 12px;
  }
  
  /* Workflow mobile */
  .workflow-main {
    padding-top: 100px;
    padding-bottom: 60px;
  }
  
  .workflow-header {
    margin-bottom: 60px;
    padding: 0 16px;
  }
  
  .workflow-timeline {
    gap: 100px;
    padding: 0 16px 0 40px;
  }
  
  .ws-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 16px;
  }
  
  .ws-desc {
    font-size: 1rem;
  }
  
  .ws-number {
    font-size: 5rem;
    top: -40px;
    left: -10px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --section-padding: clamp(40px, 6vh, 80px) 16px;
  }
  
  .hero {
    padding: 70px 4% 50px;
  }
  
  .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }
  
  .hero h1 .accent {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }
  
  .hero-sub {
    font-size: 0.88rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .hero-cta-group .btn {
    width: 100%;
    text-align: center;
  }
  
  .carousel-card {
    width: clamp(240px, 85vw, 320px);
  }
  
  .carousel-card-info {
    padding: 14px 16px 16px;
  }
  
  .stats-row {
    gap: 20px;
  }
  
  .stat {
    flex: 1 1 45%;
    min-width: 100px;
  }
  
  .stat-number {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .modal-details {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .contact-direct-links {
    gap: 16px;
  }
  
  .dl-value {
    font-size: 0.95rem;
  }
  
  .workflow-timeline {
    gap: 80px;
    padding: 0 12px 0 32px;
  }
  
  .ws-image-wrapper {
    border-radius: 4px;
  }
  
  .ws-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .ws-desc {
    font-size: 0.9rem;
  }
  
  .ws-number {
    font-size: 4rem;
    top: -30px;
  }
  
  .scroll-thread-container {
    left: 10px;
  }
  
  .floating-workflow-btn {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 16px;
  }
  
  .global-mute-btn {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 16px;
  }
  
  /* Prevent both floating buttons from overlapping */
  .global-mute-btn {
    bottom: 76px;
  }
}

/* ==========================================================================
   CINEMATIC FEATURES (Director's View, BTS, Metadata)
   ========================================================================== */

/* --- Layered Metadata Hover --- */
.tech-specs-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.carousel-card:hover .tech-specs-overlay {
  opacity: 1;
  transform: translateY(0);
}

.tech-specs-overlay h4 {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.tech-specs-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tech-specs-overlay li {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-text-dim);
}

.tech-specs-overlay li strong {
  color: var(--color-text);
  font-weight: 500;
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

/* --- BTS Split Screen Modal --- */
.bts-split-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

.modal-image-graded,
.modal-image-raw {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Simulate RAW LOG look */
.modal-image-raw {
  filter: saturate(0.2) contrast(0.7) brightness(1.2) sepia(0.1);
}

.modal-image-raw-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* Changed dynamically via JS */
  height: 100%;
  overflow: hidden;
  border-right: 2px solid var(--color-accent);
}

.bts-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  cursor: ew-resize;
  box-shadow: 0 0 20px rgba(255, 60, 0, 0.5);
  z-index: 5;
}

.raw-label,
.graded-label {
  position: absolute;
  bottom: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 12px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
}

.raw-label {
  left: 24px;
  color: #aaa;
}

.graded-label {
  right: 24px;
  color: var(--color-accent);
}

/* --- NLE Scrubber & Controls Bar --- */
.nle-controls-bar {
  background: #111;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.bts-toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bts-label {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Space Mono', monospace;
}

/* Toggle Switch */
.bts-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.bts-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.bts-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333;
  transition: .3s;
  border-radius: 24px;
}

.bts-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .bts-switch-slider {
  background-color: var(--color-accent);
}

input:checked + .bts-switch-slider:before {
  transform: translateX(20px);
}

/* Timeline */
.nle-scrubber-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  display: none; /* Only show when BTS is off, or show always? Let's show always */
}

.nle-timecode {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--color-accent);
}

.nle-timeline {
  height: 48px;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 4px 0;
}

/* Simulated Timeline grid */
.nle-timeline::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 100%;
  pointer-events: none;
}

.nle-tracks {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.nle-track {
  height: 16px;
  border-radius: 2px;
  width: 80%;
  margin-left: 10%;
}

.video-track {
  background: rgba(0, 150, 255, 0.4);
  border: 1px solid rgba(0, 150, 255, 0.8);
}

.audio-track {
  background: rgba(0, 200, 100, 0.4);
  border: 1px solid rgba(0, 200, 100, 0.8);
}

.nle-playhead {
  position: absolute;
  top: 0;
  left: 50%; /* default */
  width: 2px;
  height: 100%;
  background: var(--color-accent);
  z-index: 10;
  pointer-events: none;
}

.nle-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 8px;
  background: var(--color-accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* --- Interactive Showreel Filters --- */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 24px;
  justify-content: center;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-dim);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
}

.filter-btn.active {
  background: var(--color-accent);
  color: #000;
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(255, 60, 0, 0.4);
}

/* --- Global Sound Toggle --- */
.global-mute-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.global-mute-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.global-mute-btn.muted .icon-unmuted {
  display: none;
}
.global-mute-btn.muted .icon-muted {
  display: block !important;
}

/* --- Dark Mode Refinements --- */
/* The site is already dark, but let's ensure the deepest blacks are used for cinematic feel */
body {
  background-color: #050505;
}
.header {
  background: rgba(5, 5, 5, 0.8);
}
.project-modal-content {
  background: #0a0a0a;
}
.nle-controls-bar {
  background: #050505;
}

/* ==========================================================================
   CINEMATIC CONTACT FORM
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.cinematic-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: rgba(255, 255, 255, 0.03);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-group input,
.input-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  outline: none;
  transition: all 0.3s ease;
  resize: none;
}

.input-group label {
  position: absolute;
  top: 14px;
  left: 0;
  color: #888;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.8;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group input:not(:placeholder-shown),
.input-group textarea:not(:placeholder-shown) {
  border-bottom-color: var(--color-accent);
  box-shadow: 0 1px 0 var(--color-accent);
}

.input-group input:focus ~ label,
.input-group textarea:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -16px;
  font-size: 0.7rem;
  color: var(--color-accent);
}

.word-counter {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--color-text-dim);
  transition: color 0.3s ease;
}

.word-counter.limit-reached {
  color: #ff3333;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-accent);
  color: #000;
  border: none;
  padding: 16px 32px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 60, 0, 0.4);
}

/* --- Compact Direct Links --- */
.contact-direct-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 16px;
}

.direct-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
}

.direct-link:hover {
  border-bottom-color: var(--color-accent);
  transform: translateX(8px);
}

.dl-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dl-value {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-text);
  font-weight: 500;
}

.direct-link:hover .dl-value {
  color: var(--color-accent);
}

/* ==========================================================================
   WORKFLOW FLOATING BUTTON
   ========================================================================== */
.floating-workflow-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  padding: 24px 20px 24px 28px;
  border-radius: 16px 0 0 16px;
  color: var(--color-text);
  text-decoration: none;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.7), -2px 0 20px rgba(255, 0, 0, 0.4);
  cursor: pointer;
  overflow: hidden;
  animation: workflow-bubble-pop 2.5s infinite;
}

@keyframes workflow-bubble-pop {
  0%, 80%, 100% {
    transform: translateY(-50%) scale(1);
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.7), -2px 0 20px rgba(255, 0, 0, 0.4);
  }
  90% {
    transform: translateY(-50%) scale(1.04);
    box-shadow: -6px 0 32px rgba(0, 0, 0, 0.7), -6px 0 35px rgba(255, 0, 0, 0.6);
  }
}

.fwb-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.fwb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.fwb-icon svg {
  width: 24px;
  height: 24px;
}

.floating-workflow-btn:hover {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  padding-left: 36px;
  box-shadow: -12px 0 40px rgba(255, 0, 0, 0.4);
}

.floating-workflow-btn:hover .fwb-text {
  opacity: 1;
  color: var(--color-text);
}

.floating-workflow-btn:hover .fwb-icon {
  transform: translateY(4px);
}

@media (max-width: 768px) {
  .floating-workflow-btn {
    top: auto;
    bottom: 24px;
    right: 24px;
    transform: none;
    border-radius: 50%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  }
  .fwb-text {
    display: none;
  }
}

/* ==========================================================================
   WORKFLOW PAGE
   ========================================================================== */
.workflow-body {
  background-color: #030303;
}

.workflow-main {
  padding-top: 140px;
  padding-bottom: 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.workflow-header {
  text-align: center;
  margin-bottom: 120px;
}

.workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: 200px; /* Massive negative space */
  padding: 0 24px 0 60px; /* added left padding for timeline */
  position: relative;
}

.workflow-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.workflow-step.reverse {
  flex-direction: row-reverse;
}

.ws-image-wrapper {
  flex: 0 0 55%;
  position: relative;
  border-radius: 4px; /* minimal curve */
  overflow: hidden;
  transition: transform 0.1s ease-out;
  cursor: default;
  /* Subtle cinematic shadow */
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ws-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transform: scale(1.05);
  filter: brightness(0.9) contrast(1.05);
}

.ws-glass-overlay {
  position: absolute;
  inset: 0;
  /* Subtle film texture overlay */
  background: 
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.06) 3px,
      rgba(0, 0, 0, 0.06) 4px
    ),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  pointer-events: none;
}

.ws-number {
  position: absolute;
  top: -80px;
  left: -20px;
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25);
  z-index: -1;
  line-height: 1;
}

.ws-content {
  flex: 0 0 35%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ws-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #fff;
}

.ws-desc {
  font-size: 1.15rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .workflow-step,
  .workflow-step.reverse {
    flex-direction: column;
    gap: 60px;
  }
  .ws-image-wrapper, .ws-content {
    flex: 0 0 100%;
    width: 100%;
  }
  .ws-number {
    font-size: 6rem;
    top: -30px;
  }
}

/* ==========================================================================
   WORKFLOW 3D AMBIENT SHAPES
   ========================================================================== */
.ambient-3d-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  perspective: 1000px;
}

.shape {
  position: absolute;
  background: rgba(255, 0, 0, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 0, 0, 0.1);
  will-change: transform;
}

.shape-1 {
  width: 400px; height: 400px;
  border-radius: 50%;
  top: 10%; left: 5%;
  animation: float3D 15s infinite ease-in-out alternate;
}

.shape-2 {
  width: 300px; height: 300px;
  top: 50%; right: 5%;
  transform: rotateZ(45deg);
  animation: float3D2 18s infinite ease-in-out alternate;
}

.shape-3 {
  width: 200px; height: 200px;
  border-radius: 30px;
  top: 80%; left: 30%;
  animation: float3D 12s infinite ease-in-out alternate-reverse;
}

@keyframes float3D {
  0% { transform: translateZ(-200px) rotateX(10deg) rotateY(10deg) translateY(0); }
  100% { transform: translateZ(100px) rotateX(-20deg) rotateY(45deg) translateY(-100px); }
}

@keyframes float3D2 {
  0% { transform: translateZ(-100px) rotateX(-10deg) rotateY(-20deg) translateY(0) rotateZ(45deg); }
  100% { transform: translateZ(200px) rotateX(20deg) rotateY(30deg) translateY(-150px) rotateZ(90deg); }
}

/* ==========================================================================
   THE RED THREAD (SCROLL TRACKER)
   ========================================================================== */
.scroll-thread-container {
  position: absolute;
  top: 100px;
  bottom: 0;
  left: 20px; /* moved to the left edge like a timeline */
  width: 2px;
  background: rgba(255,255,255,0.05);
  z-index: 1;
}

.scroll-thread {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent), 0 0 30px var(--color-accent);
  will-change: height;
  transition: height 0.1s linear;
}

/* Workflow animations controlled by GSAP — no CSS initial states needed */

/* =============================
   Mobile Optimizations (≤768px)
   ============================= */
@media only screen and (max-width: 768px) {
  /* Reduce overall section padding for better fit */
  .section {
    padding: clamp(40px, 8vh, 80px) clamp(15px, 4vw, 60px);
  }

  /* Hero adjustments */
  .hero {
    min-height: 80vh;
    padding-top: var(--nav-height);
  }
  .hero h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    text-align: center;
    line-height: 1.2;
  }
  .hero .hero-tag {
    font-size: clamp(0.8rem, 2vw, 1rem);
  }
  .hero .hero-sub {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  }
  .hero .hero-socials {
    left: 15px;
    bottom: 20px;
    gap: 16px;
  }
  .hero .hero-socials a svg {
    width: 30px;
    height: 30px;
  }
  .hero .scroll-hint {
    display: none; /* hide tiny hint on mobile */
  }

  /* Word swap centering */
  .word-swap {
    min-width: auto;
  }

  /* Feature grid to single column */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feature-card {
    padding: 30px 20px;
  }
  .feature-card h3 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
  }
  .feature-card p {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }

  /* Stats row layout */
  .stats-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .stat-number {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .stat-label {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
  }

  /* Contact section adjustments */
  .contact-section .section-inner {
    max-width: 90%;
  }
  .contact-container {
    flex-direction: column;
    gap: 30px;
  }
  .contact-form-wrapper {
    width: 100%;
  }

  /* Faster reveal animations for mobile */
  .reveal {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .features-grid .reveal {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Ensure touch-friendly tap targets */
  button, a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* --- content-visibility: skip rendering of far off-screen sections --- */
#showcase,
#workflow,
#contact,
#footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

/* --- Pause expensive CSS animations when elements are off-screen --- */
.offscreen-paused .film-grain,
.offscreen-paused .orb,
.offscreen-paused .perf-track,
.offscreen-paused .showreel-grain {
  animation-play-state: paused !important;
}

/* --- CLS prevention: explicit sizing for known images --- */
.video-bg {
  aspect-ratio: 2688 / 1792;
}

.nav-logo-img {
  aspect-ratio: auto;
  height: 52px;
  width: auto;
}

.ws-image {
  aspect-ratio: 16 / 10;
}

.carousel-card-media {
  aspect-ratio: 16 / 10;
}

/* --- Reduce motion for users who prefer it --- */
@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;
  }
  .film-grain,
  .orb,
  .perf-track {
    animation: none !important;
  }
}
