/* Root tokens - DARK THEME */
:root {
  --bg: #0a0a0a;
  --text: #ffffff;
  --muted: #a0a0a0;
  --muted-soft: #2a2a2a;
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.15);
  --frame-bg: #050505;
  --header-height: 64px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* Hide default video play button overlays on all browsers */
video::-webkit-media-controls {
  display: none !important;
}
video::-webkit-media-controls-enclosure {
  display: none !important;
}
video::-webkit-media-controls-panel {
  display: none !important;
}
video::-webkit-media-controls-play-button {
  display: none !important;
}
video::-webkit-media-controls-start-playback-button {
  display: none !important;
}
video::-moz-media-controls {
  display: none !important;
}
video::--moz-media-controls-start-playback-button {
  display: none !important;
}

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

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 3vw, 3rem);
  z-index: 100;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.96),
    rgba(10, 10, 10, 0.75),
    transparent
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-wordmark {
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform-origin: left center;
}

.site-wordmark.wordmark-hide {
  opacity: 0;
  transform: translateY(-140%);
  pointer-events: none;
}

.wordmark-last {
  color: var(--accent);
}

/* burger */
.menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

/* Panels */
.panel {
  position: relative;
}

/* STACKED PANEL WRAPPER: ABOUT + SKILLS + SERVICES */
.panel-stack {
  position: relative;
}

/* About + Skills: pin and fade as whole panels */
.panel-stack .agency-intro,
.panel-stack .skills-showcase {
  position: sticky;
  top: 0;
  opacity: 0;
  transform: translateY(3vh);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

/* When they enter the viewport */
.panel-stack .agency-intro.is-visible,
.panel-stack .skills-showcase.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stacking order */
.panel-stack .agency-intro {
  z-index: 1;
}

.panel-stack .skills-showcase {
  z-index: 2;
}

/* Services scroll normally inside the stack */
.panel-stack .services {
  position: relative;
  z-index: 3;
  background: var(--bg);
}

/* HERO */
.hero {
  height: 200vh;
  position: relative;
}

.hero-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  padding-top: calc(var(--header-height) + 8vh);
  padding-inline: clamp(1.5rem, 8vw, 8rem);
  padding-bottom: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-text {
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-line {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-line + .hero-line {
  margin-top: 0.25em;
}

.accent {
  color: var(--accent);
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.6),
    0 0 14px rgba(168, 85, 247, 0.4);
}

/* Hero accent word */
.hero-accent {
  position: relative;
  display: inline-block;
  min-width: 11ch;
  text-align: left;
  color: var(--accent);
  text-shadow:
    0 0 4px rgba(168, 85, 247, 0.5),
    0 0 10px rgba(168, 85, 247, 0.35);
  transition:
    text-shadow 0.25s ease,
    filter 0.25s ease;
}

.hero-accent.hero-accent-scrambling {
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.8),
    0 0 14px rgba(168, 85, 247, 0.6);
  filter: brightness(1.08) contrast(1.05);
}

/* Name + subtitle */
.hero-portfolio {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  text-align: center;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.2s ease-out;
  will-change: opacity;
}

.hero-portfolio-name {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: #ffffff;
}

.hero-name-first {
  display: inline-block;
}

.hero-name-last {
  display: inline-block;
  margin-left: 0.35ch;
}

.hero-portfolio-sub {
  margin: 1.2rem auto 0;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 40rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 3.2vh;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 4;
  pointer-events: none;
}

/* ABOUT */
.agency-intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12vh clamp(1.5rem, 6vw, 6rem);
  border-top: 1px solid var(--muted-soft);
  position: relative;
  overflow: hidden;
}

.agency-intro-inner {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  z-index: 2;
  position: relative;
}

.agency-headline {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 4.2rem);
  line-height: 1.3;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1em;
}

.agency-line {
  display: block;
}

.agency-line-rotating {
  margin: 0.1em 0 0.15em;
}

.agency-line-with-word {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3em;
}

.no-break {
  white-space: nowrap;
}

/* rotating word */
.rotating-word-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 8em;
  height: 1.8em;
  overflow: visible;
}

.rotating-word {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-size: 1.4em;
  text-shadow:
    0 0 4px rgba(168, 85, 247, 0.6),
    0 0 12px rgba(168, 85, 247, 0.4);
  transition:
    text-shadow 0.9s ease,
    filter 0.9s ease;
}

.rotating-word.pulse {
  animation: none;
}

/* EPIC ANIMATED VISUAL BACKGROUND */
.visual-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Extra depth layer behind the agency intro visuals */
.visual-background::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(168, 85, 247, 0.22), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: visualLightSweep 22s ease-in-out infinite alternate;
}

@keyframes visualLightSweep {
  0% {
    transform: translate3d(-4%, -2%, 0) scale(1);
    opacity: 0.25;
  }
  50% {
    transform: translate3d(4%, 3%, 0) scale(1.05);
    opacity: 0.5;
  }
  100% {
    transform: translate3d(-2%, 0%, 0) scale(1.02);
    opacity: 0.35;
  }
}

/* Flowing Mesh Gradient */
.mesh-gradient {
  position: absolute;
  inset: -50%;
  filter: blur(70px);
  opacity: 0.4;
  will-change: transform;
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.gradient-blob-1 {
  width: 60%;
  height: 60%;
  top: -10%;
  left: -10%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.9) 0%,
    transparent 70%
  );
  animation: meshFloat1 20s ease-in-out infinite;
}

.gradient-blob-2 {
  width: 50%;
  height: 50%;
  top: 20%;
  right: -5%;
  background: radial-gradient(
    circle,
    rgba(0, 200, 255, 0.7) 0%,
    transparent 70%
  );
  animation: meshFloat2 18s ease-in-out infinite;
}

.gradient-blob-3 {
  width: 55%;
  height: 55%;
  bottom: -15%;
  left: 10%;
  background: radial-gradient(
    circle,
    rgba(255, 0, 200, 0.6) 0%,
    transparent 70%
  );
  animation: meshFloat3 22s ease-in-out infinite;
}

.gradient-blob-4 {
  width: 45%;
  height: 45%;
  top: 50%;
  left: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 150, 0, 0.5) 0%,
    transparent 70%
  );
  animation: meshFloat4 16s ease-in-out infinite;
}

.gradient-blob-5 {
  width: 40%;
  height: 40%;
  bottom: 10%;
  right: 15%;
  background: radial-gradient(
    circle,
    rgba(0, 255, 150, 0.6) 0%,
    transparent 70%
  );
  animation: meshFloat5 24s ease-in-out infinite;
}

@keyframes meshFloat1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(20%, -15%) scale(1.2) rotate(120deg);
  }
  66% {
    transform: translate(-15%, 20%) scale(0.9) rotate(240deg);
  }
}

@keyframes meshFloat2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(-25%, 20%) scale(1.1) rotate(-120deg);
  }
  66% {
    transform: translate(15%, -25%) scale(0.95) rotate(-240deg);
  }
}

@keyframes meshFloat3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(15%, 25%) scale(1.15) rotate(90deg);
  }
  66% {
    transform: translate(-20%, -15%) scale(0.85) rotate(180deg);
  }
}

@keyframes meshFloat4 {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(-40%, -60%) scale(1.3) rotate(180deg);
  }
}

@keyframes meshFloat5 {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(-18%, -22%) scale(1.05) rotate(-90deg);
  }
  66% {
    transform: translate(22%, 18%) scale(0.9) rotate(-180deg);
  }
}

/* Geometric Shapes */
.geometric-shapes {
  position: absolute;
  inset: 0;
}

.shape {
  position: absolute;
  border: 1px solid rgba(168, 85, 247, 0.2);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.02);
  will-change: transform;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 5%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: shapeRotate1 25s linear infinite, shapeMorph1 8s ease-in-out
    infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  top: 60%;
  right: 8%;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: shapeRotate2 20s linear infinite reverse, shapeMorph2 10s
      ease-in-out infinite;
}

.shape-3 {
  width: 200px;
  height: 200px;
  bottom: 15%;
  left: 50%;
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  animation: shapeRotate3 30s linear infinite, shapeMorph3 7s ease-in-out
    infinite;
}

.shape-4 {
  width: 180px;
  height: 180px;
  top: 40%;
  right: 25%;
  border-radius: 50%;
  animation: shapeFloat 15s ease-in-out infinite;
}

@keyframes shapeRotate1 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shapeRotate2 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shapeRotate3 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shapeMorph1 {
  0%,
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
}

@keyframes shapeMorph2 {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 40% 70% 30% 60%;
  }
}

@keyframes shapeMorph3 {
  0%,
  100% {
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  }
  50% {
    border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%;
  }
}

@keyframes shapeFloat {
  0%,
  100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -40px); }
  66% { transform: translate(-30px, 40px); }
}

/* Grid Overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(168, 85, 247, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(168, 85, 247, 0.05) 1px,
      transparent 1px
    );
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  opacity: 0.3;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Particles */
.particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(168, 85, 247, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(168, 85, 247, 1);
}

.particle:nth-child(1) { top: 20%; left: 10%; animation: particleFloat 8s ease-in-out infinite; }
.particle:nth-child(2) { top: 40%; right: 15%; animation: particleFloat 10s ease-in-out infinite 1s; }
.particle:nth-child(3) { bottom: 30%; left: 20%; animation: particleFloat 12s ease-in-out infinite 2s; }
.particle:nth-child(4) { top: 60%; left: 60%; animation: particleFloat 9s ease-in-out infinite 1.5s; }
.particle:nth-child(5) { top: 15%; right: 30%; animation: particleFloat 11s ease-in-out infinite 0.5s; }
.particle:nth-child(6) { bottom: 20%; right: 20%; animation: particleFloat 13s ease-in-out infinite 2.5s; }
.particle:nth-child(7) { top: 70%; left: 40%; animation: particleFloat 10s ease-in-out infinite 3s; }
.particle:nth-child(8) { bottom: 40%; right: 40%; animation: particleFloat 14s ease-in-out infinite 1s; }

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate(30px, -50px) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translate(-20px, -100px) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(-50px, -50px) scale(1.1);
    opacity: 0.8;
  }
}

/* Light Rays */
.light-rays {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 20% 30%,
      rgba(168, 85, 247, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 70%,
      rgba(0, 200, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(255, 0, 200, 0.08) 0%,
      transparent 60%
    );
  animation: lightPulse 8s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes lightPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* SKILLS */
.skills-showcase {
  padding: 16vh 0 18vh;
  background: var(--bg);
  border-top: 1px solid var(--muted-soft);
  overflow: hidden;
  position: relative;
}

.skills-showcase-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 7vw, 7rem);
}

/* Shared heading style for skills + services */
.skills-title,
.section-title {
  margin: 0 0 5vh 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: lowercase;
  text-align: center;
}

.skills-carousel-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  align-items: center;
  position: relative;
}

.skills-carousel {
  position: relative;
  overflow: hidden;
  width: min(100%, 1100px);
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 18%,
    black 82%,
    transparent 100%
  );
}

.skills-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Animate right */
.skills-carousel[data-direction="right"] .skills-track {
  animation: scrollRight 28s linear infinite;
}

/* Animate left */
.skills-carousel[data-direction="left"] .skills-track {
  animation: scrollLeft 32s linear infinite;
}

/* Pause on hover */
.skills-carousel:hover .skills-track {
  animation-play-state: paused;
}

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

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

.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.2rem 3rem;
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.skill-badge:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

/* SERVICES - stacked case study cards */
.services {
  padding: 16vh clamp(1.5rem, 7vw, 7rem) 14vh;
  border-top: 1px solid var(--muted-soft);
  position: relative;
  background: var(--bg);
}

.services-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Gradient behind the header while scrolling through services */
.services::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.9),
    rgba(10, 10, 10, 0.6),
    rgba(10, 10, 10, 0)
  );
  pointer-events: none;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.2s ease;
}

body.services-active .services::before {
  height: calc(var(--header-height) + 52px);
  opacity: 1;
}

/* "case studies" title */
.services .section-title {
  margin: 0 0 5vh 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: lowercase;
  text-align: center;
  position: static;
  top: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Work / Approach toggle heading */
.services .section-title.section-title--work {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(2.4rem, 5.5vw, 4.6rem);
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.services .section-title--work .work-switch {
  font: inherit;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.services .section-title--work .work-switch.is-active,
.services .section-title--work .work-switch[aria-current="page"] {
  color: var(--accent);
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.6),
    0 0 14px rgba(168, 85, 247, 0.4);
}

.services .section-title--work .work-switch:hover {
  color: var(--accent);
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.6),
    0 0 14px rgba(168, 85, 247, 0.4);
}

.services .section-title--work .work-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 8px;
}

/* Base card styling */
.service-row {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 2.2rem clamp(2rem, 4vw, 3rem) 2.7rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 50% 0,
      rgba(168, 85, 247, 0.12),
      transparent 60%),
    #050505;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.1rem;
  cursor: default;
}

.service-row:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.82);
}

.service-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.service-name {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 600;
  text-transform: lowercase;
  line-height: 1.15;
  transition: color 0.25s ease;
}

.service-row:hover .service-name {
  color: var(--accent);
}

.service-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.service-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Gallery row under the header */
.service-gallery {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2.4rem;
  max-width: 1100px;
  width: 100%;
  margin: 2.1rem auto 0;
}

.case-gallery {
  align-items: flex-start;
}

/* Each case item = label + card + caption */
.case-gallery .case-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Card frame */
.thumb {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: visible;
  background: transparent;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.thumb::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: #000;
  border-radius: 0 0 1rem 1rem;
  pointer-events: none;
}

/* Default media fill for thumbs */
.service-gallery .thumb img,
.service-gallery .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  display: block;
  border-radius: 1rem;
  background: #000;
}

/* Show browser controls on hover only on desktop */
.service-gallery .thumb video::-webkit-media-controls-panel {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.service-gallery .thumb video:hover::-webkit-media-controls-panel {
  opacity: 1;
}

/* Subtle float when the row is hovered */
.service-row:hover .thumb {
  transform: translateY(-4px);
}

/* Case card overlay */
.case-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

/* CONTACT PAGE */
.contact-page {
  min-height: 100vh;
  padding: 12vh clamp(1.5rem, 8vw, 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-inner {
  max-width: 720px;
}

.contact-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.contact-intro {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 520px;
}

.contact-intro a {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
/* Contact form: match the work/collage gradient treatment */
.contact-page .contact-form {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 18% 0%,
      rgba(168, 85, 247, 0.16),
      transparent 60%),
    radial-gradient(circle at 85% 35%,
      rgba(0, 200, 255, 0.12),
      transparent 65%),
    radial-gradient(circle at 50% 110%,
      rgba(255, 255, 255, 0.06),
      transparent 55%),
    #050505;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.7);
  padding: 1.6rem 1.4rem 1.8rem;
}


.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
}

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

.form-row textarea {
  resize: vertical;
}

.contact-submit {
  margin-top: 0.6rem;
  align-self: flex-start;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.form-result {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.form-result:empty {
  display: none;
}

.form-result.sending {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
}

.form-result.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.form-result.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Footer */
.site-footer {
  padding: 3rem clamp(1.5rem, 7vw, 7rem) 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Overlay menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 120;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-close {
  position: absolute;
  top: 1.4rem;
  right: 1.8rem;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  text-align: center;
}

.overlay-nav a {
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: capitalize;
  transition: color 0.3s ease;
}

.overlay-nav a:hover {
  color: var(--accent);
}

/* LAPTOP */
@media (max-width: 1400px) and (min-width: 1024px) {
  .service-name {
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  }

  .service-desc {
    font-size: 0.85rem;
  }

  .rotating-word-container {
    min-width: 7em;
  }

  .agency-headline {
    font-size: clamp(1.7rem, 3.8vw, 3.8rem);
  }
}

/* TABLET */
@media (max-width: 1023px) {
  .hero-line {
    font-size: clamp(2.2rem, 8vw, 4rem);
  }

  .agency-headline {
    font-size: clamp(1.6rem, 5.2vw, 3rem);
    line-height: 1.35;
  }

  .rotating-word-container {
    min-width: 6em;
  }

  .shape {
    transform: scale(0.7);
  }

  .skills-title,
  .section-title {
    font-size: clamp(2.2rem, 5vw, 3rem);
  }

  .skill-badge {
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
  }

  /* Services behave like normal cards on tablet */
  .services {
    padding-top: 12vh;
    padding-bottom: 12vh;
  }

  .services-inner {
    padding-bottom: 4rem;
  }

  .service-row {
    position: static;
    margin: 0 auto 3rem;
    padding: 2.2rem 1.8rem 2.6rem;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.8);
  }

  .service-gallery {
    flex-wrap: wrap;
    gap: 1.75rem;
    margin-top: 1.75rem;
  }

  .service-link {
    position: static;
    margin-top: 1.6rem;
    align-self: center;
  }
}

/* MOBILE */
@media (max-width: 767px) {
  /* Disable complex scroll animations on mobile for smooth scrolling */
  .hero-line {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.15;
    transition: none !important;
    will-change: auto !important;
  }

  .hero--approach .hero-line-top,
  .hero--approach .hero-line-bottom {
    transition: none !important;
    will-change: auto !important;
  }

  .approach-hero-video-wrapper {
    transition: none !important;
    will-change: auto !important;
  }

  .hero-portfolio {
    margin-top: 2rem;
  }

  .hero-portfolio-name {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero-portfolio-sub {
    font-size: 0.8rem;
    padding-inline: 1.5rem;
  }

  .agency-headline {
    font-size: clamp(0.95rem, 3.2vw, 1.15rem);
    line-height: 1.3;
  }

  .agency-line {
    white-space: nowrap;
  }

  .rotating-word-container {
    min-width: 5.5em;
  }

  .rotating-word {
    font-size: 2.1em;
  }

  .skills-title,
  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    margin-bottom: 3rem;
  }

  .service-name {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .service-desc {
    font-size: 0.85rem;
  }

  .service-row {
    padding: 2rem 0;
  }

  .arrow-circle {
    width: 44px;
    height: 44px;
  }

  .arrow-tip {
    width: 14px;
    height: 14px;
  }

  .skill-badge {
    padding: 0.75rem 1.75rem;
    font-size: 0.9rem;
  }

  .shape {
    transform: scale(0.5);
  }

  .site-header {
    padding: 0 1.5rem;
  }

  .service-gallery {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.25rem;
  }

  .service-gallery .thumb {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
    aspect-ratio: 3 / 4;
  }

  .service-link {
    margin-top: 1.4rem;
  }
}

/* VERY SMALL MOBILE */
@media (max-width: 480px) {
  .hero-line {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
  }

  .agency-headline {
    font-size: clamp(0.9rem, 4.6vw, 1rem);
    line-height: 1.3;
  }

  .rotating-word-container {
    min-width: 5em;
  }

  .rotating-word {
    font-size: 2em;
  }

  .service-gallery {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .service-gallery .thumb {
    flex: 0 0 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .skill-badge {
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }
}

/* Extra tweaks for hero and rotating word on phones */
@media (max-width: 767px) {
  .hero-text {
    max-width: 21rem;
    margin-inline: auto;
  }

  .hero-line {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .hero-line-bottom {
    white-space: nowrap;
  }

  .rotating-word-container {
    display: inline-block;
    min-width: 0;
    height: auto;
  }

  .rotating-word {
    position: static;
    transform: none;
  }

  .rotating-word.pulse {
    animation: none;
  }

  .skills-carousel-wrapper {
    left: 0;
    transform: none;
    width: 100%;
  }
}

/* Touch devices: always show labels, no hover motion */
@media (hover: none) and (pointer: coarse) {
  .service-row {
    cursor: default;
  }

  .service-row:hover .thumb {
    transform: translateY(0);
  }
}

/* Neon glitch and glow states for the rotating word */
.rotating-word.is-scrambling {
  animation: rotatingWordGlitch 1.4s ease-in-out infinite;
  filter: contrast(1.08) brightness(1.06);
}

.rotating-word.pre-glow {
  text-shadow:
    0 0 8px rgba(168, 85, 247, 0.7),
    0 0 18px rgba(168, 85, 247, 0.6),
    0 0 28px rgba(168, 85, 247, 0.5);
  filter: contrast(1.08) brightness(1.08);
}

@keyframes rotatingWordGlitch {
  0% {
    text-shadow:
      0 0 8px rgba(168, 85, 247, 0.8),
      -1px 0 16px rgba(168, 85, 247, 0.9),
      1px 0 16px rgba(168, 85, 247, 0.9);
  }
  50% {
    text-shadow:
      0 0 18px rgba(168, 85, 247, 1),
      -2px 0 30px rgba(168, 85, 247, 0.98),
      2px 0 30px rgba(168, 85, 247, 0.98);
  }
  100% {
    text-shadow:
      0 0 10px rgba(168, 85, 247, 0.9),
      -1px 0 20px rgba(168, 85, 247, 0.92),
      1px 0 20px rgba(168, 85, 247, 0.92);
  }
}

/* Hyper visual aura for the rotating word container */
.rotating-word-container::after {
  content: "";
  position: absolute;
  inset: -0.15em 0;
  pointer-events: none;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(168, 85, 247, 0.6),
      rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transform: scale(0.9);
  filter: blur(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.rotating-word-container.pre-glow::after {
  opacity: 0.45;
  transform: scale(1.02);
}

.rotating-word-container.is-scrambling::after {
  opacity: 0.9;
  transform: scale(1.06);
}

/* APPROACH PAGE
   Clean hero + collage implementation
   Single source of truth for stacking
*/

/* Hero height for approach page */
.hero.hero--approach {
  height: 260vh;
  margin-bottom: -8px;
}

/* Match home hero feel */
.hero--approach .hero-line {
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  will-change: transform, opacity;
}

/* Reuse base .hero-inner sticky layout, just tighten spacing */
.hero-inner--approach {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
}

.hero-inner--approach .hero-text {
  position: relative;
  z-index: 2;
}

/* Main hero video card */
.approach-hero-video-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, calc(100vw - 96px));
  height: calc(100vh + 200px);
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale3d(0.4, 0.4, 1);
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1;
}

/* GPU acceleration for approach hero lines */
.hero--approach .hero-line {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Frame uses full wrapper height */
.approach-hero-video-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.approach-hero-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Small screens hero tweaks */
@media (max-width: 767px) {
  .hero.hero--approach {
    height: 200vh;
  }

  .approach-hero-video-wrapper {
    width: calc(100% - 2.5rem);
    height: calc(100vh - var(--header-height) - 80px);
    border-radius: 18px;
  }
}

/* =========================================
   APPROACH COLLAGE - BASE LAYOUT
   ========================================= */

.approach-collage {
  padding: 8vh 0 10vh;
  border-top: 1px solid var(--muted-soft);
  background: var(--bg);
}

/* shared inner width */
.approach-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* header copy above collages */
.approach-header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 0 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.approach-header > p:first-child {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0;
}

.approach-header h2 {
  margin: 0.35rem 0 0.9rem;
  font-size: clamp(2.4rem, 3.4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.approach-copy {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
  max-width: 620px;
  text-align: center;
}

/* Stacked collage cards - mobile / tablet default (non sticky) */
.collage-stack {
  position: relative;
  padding-top: 4vh;
  padding-bottom: 8vh;
}

.collage-panel {
  position: static;
  top: auto;
  margin: 0 auto 3rem;
  padding: 1.8rem clamp(1.6rem, 3.5vw, 2.6rem) 2.1rem;
  max-width: min(1140px, 94vw);
  background: #050505;
  border-radius: 24px;
  box-shadow: none;
}

.collage-panel:last-of-type {
  margin-bottom: 0;
}

/* Title block before each collage grid */
.collage-title-block {
  margin-top: 0;
  margin-bottom: 1.6rem;
  text-align: center;
}

/* Glowing purple collage titles */
.approach-collage-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  font-weight: 600;
  color: var(--accent);
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.85),
    0 0 16px rgba(168, 85, 247, 0.7),
    0 0 28px rgba(168, 85, 247, 0.6);
}

/* Small description under each collage title */
.collage-title-desc {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  max-width: 32rem;
  color: var(--muted);
  line-height: 1.5;
  margin-left: auto;
  margin-right: auto;
}

/* Collage grid layout - mobile first, one column */
.approach-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1.5rem;
  grid-template-areas:
    "primary"
    "top"
    "bottom"
    "tall-left"
    "tall-right";
}

/* tile roles */
.approach-tile--primary   { grid-area: primary; }
.approach-tile--top       { grid-area: top; }
.approach-tile--bottom    { grid-area: bottom; }
.approach-tile--tall-left { grid-area: tall-left; }
.approach-tile--tall-right{ grid-area: tall-right; }

/* each tile card */
.approach-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Card frame */
.approach-tile-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.approach-tile-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  background: radial-gradient(
    circle at 20% 0%,
    rgba(168, 85, 247, 0.25),
    transparent 60%
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Video / image fills frame — always above pseudo overlays */
.approach-tile-video video,
.approach-tile-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
  position: relative;
  z-index: 1;
}

/* Fade for collage videos that swap sources */
.approach-tile-video video {
  opacity: 1;
  transition: opacity 320ms ease;
}

/* Slight zoom for typography tiles */
#tile-delivery .approach-tile-video video,
#tile-post-3 .approach-tile-video video {
  transform: scale(1.32);
  transform-origin: center center;
}

/* captions under each tile */
.approach-caption {
  margin: 0.6rem 0 0;
  font-size: 0.98rem;
  color: #ffffff;
  text-transform: lowercase;
  letter-spacing: 0.12em;
}

/* =========================================
   APPROACH COLLAGE - TABLET GRID
   ========================================= */
@media (min-width: 768px) and (max-width: 1199px) {
  .approach-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    column-gap: 1.5rem;
    row-gap: 1.2rem;
    grid-template-areas:
      "primary top"
      "bottom bottom"
      "tall-left tall-right";
  }
}

/* Small screens extra tweaks */
@media (max-width: 767px) {
  .approach-header {
    padding-bottom: 1.5rem;
  }

  .approach-header h2 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .collage-title-block {
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
  }

  .approach-tile-video {
    aspect-ratio: 16 / 9;
  }
}

/* =========================================
   APPROACH COLLAGE - DESKTOP GRID
   (layout only, not sticky yet)
   ========================================= */
@media (min-width: 1024px) {
  .approach-collage {
    padding-top: 4vh;
    padding-bottom: 7vh;
  }

  .approach-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.75rem;
    row-gap: 0.9rem;
    grid-template-areas:
      "primary top top"
      "bottom tall-left tall-right";
    align-items: stretch;
  }

  .approach-tile--primary .approach-tile-video { aspect-ratio: 16 / 9; }
  .approach-tile--top .approach-tile-video { aspect-ratio: 19 / 10; }
  .approach-tile--bottom .approach-tile-video { aspect-ratio: 9 / 8; }

  .approach-tile--tall-left .approach-tile-video,
  .approach-tile--tall-right .approach-tile-video {
    aspect-ratio: 3 / 4;
  }

  .approach-caption {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .collage-title-desc {
    max-width: 100%;
    white-space: normal;
    text-wrap: balance;
  }

  .collage-title-desc br {
    display: none;
  }
}

@media (min-width: 1200px) {
  :root {
    --wcs-header-height: var(--header-height);
  }

  .approach-header {
    margin-bottom: 3rem;
  }

  /* --- Pinned scroll-driven horizontal rail --- */
  .approach-page .collage-scroll-section {
    position: relative;
    /* height set by JS: pinH + scrollDistance */
  }

  .approach-page .collage-scroll-pin {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    height: calc(100vh - var(--header-height) - 40px);
    display: flex;
    align-items: center;
    overflow: visible;
  }

  .collage-stack {
    display: flex;
    gap: clamp(1.5rem, 2.5vw, 3rem);
    padding-inline: calc(clamp(1.5rem, 4vw, 4rem) + var(--railPadExtra, 0px));
    overflow-x: hidden;
    overflow-y: visible;
    scroll-snap-type: none;
    scrollbar-width: none;
    perspective: 1100px;
  }

  .collage-stack::-webkit-scrollbar {
    display: none;
  }

  .collage-stack::after {
    content: none;
  }

  .collage-panel {
    position: relative;
    top: auto;
    flex: 0 0 min(1140px, 85vw);
    min-height: auto;
    margin: 0;
    max-width: none;
    padding: 1.5rem 2rem 2rem;
    background: #050505;
    border-radius: 24px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    scroll-snap-align: none;
    transform-style: preserve-3d;
    will-change: transform, opacity;
  }

  .collage-panel:last-of-type {
    margin-bottom: 0;
  }

  .collage-title-block {
    flex-shrink: 0;
    margin-bottom: 1rem;
    text-align: center;
  }

  .collage-panel .approach-grid {
    flex: 1;
    align-content: start;
  }

  .collage-stack > .collage-panel { z-index: 1; }

  .approach-grid {
    grid-template-columns: 2fr 1.1fr 1.1fr;
    grid-template-rows: auto auto;
    column-gap: 1.2rem;
    row-gap: 0.6rem;
    align-items: stretch;
  }

  .approach-tile-video {
    height: 210px;
    max-height: 210px;
    aspect-ratio: auto;
    border-radius: 16px;
  }

  .approach-tile--top .approach-tile-video,
  .approach-tile--bottom .approach-tile-video {
    height: 190px;
    max-height: 190px;
  }

  .approach-tile--tall-left .approach-tile-video,
  .approach-tile--tall-right .approach-tile-video {
    height: 210px;
    max-height: 210px;
  }

  /* On approach page, let aspect-ratio control size instead of fixed heights */
  .approach-page .approach-tile-video {
    height: auto;
    max-height: none;
  }

  .approach-caption {
    font-size: 0.9rem;
    line-height: 1.35;
    margin-top: 0.3rem;
  }
}

/* =========================================
   CASE STUDIES (Services): cleaned, single source of truth
   - captions above media (inside cards)
   - consistent subtitle height
   - labels float with zero layout shift
   - media FILLS (cover) and keeps TOP visible
   ========================================= */

/* Slightly smaller overall case study container */
.service-row.case-study {
  max-width: 1120px;
  padding: 2rem clamp(1.7rem, 3.2vw, 2.6rem) 2.4rem;
  gap: 1.85rem;
  position: relative;
  overflow: hidden;
}

/* Keep all content above background */
.service-row.case-study > *:not(.case-bg) {
  position: relative;
  z-index: 2;
}

/* Add a subtle “glass” veil for readability */
.service-row.case-study::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

/* Give the header a touch more width so the summary can fit in 2 lines */
.service-row.case-study .service-header {
  max-width: 860px;
}

/* Summary: clamp to 2 lines */
.service-row.case-study .service-desc--summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-wrap: balance;

  font-size: 1.05rem;
  line-height: 1.6;
}

/* Tighten gallery spacing a bit */
.service-row.case-study .service-gallery.case-gallery {
  max-width: 1040px;
  gap: 2.1rem;
  margin-top: 2.35rem;
}

/* If any old “caption under thumb” exists, keep it hidden */
.case-card-caption {
  display: none;
}

/* Card becomes a vertical stack: label, description, media */
.service-row.case-study .case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Label floats above the card, no layout shift */
.service-row.case-study .case-card-label {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -135%);

  margin: 0;
  padding: 0;

  background: transparent;
  border: none;
  border-radius: 0;

  color: #ffffff;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.1vw, 1.4rem);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Show label on hover */
.service-row.case-study .case-card:hover .case-card-label,
.service-row.case-study:hover .case-card-label {
  opacity: 1;
  transform: translate(-50%, -150%);
}

/* Touch devices: always show labels */
@media (hover: none) and (pointer: coarse) {
  .service-row.case-study .case-card-label {
    opacity: 1;
    transform: translate(-50%, -150%);
  }
}

/* Subtitle under label, fixed 2 lines so media aligns */
.service-row.case-study .case-card-sub {
  margin: 0 0 0.65rem;
  padding: 0 0.4rem;
  text-align: center;

  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  height: calc(1.45em * 2);
}

/* Media wrapper takes remaining space */
.service-row.case-study .case-card-media {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
}

/* SERVICES media should FILL, anchored to TOP */
.services .service-gallery .thumb video,
.services .service-gallery .thumb img,
.service-row.case-study .case-card-media video,
.service-row.case-study .case-card-media img {
  object-fit: cover;
  object-position: 50% 0%;
  background: #000;
}

/* Media fills wrapper */
.service-row.case-study .case-card-media video,
.service-row.case-study .case-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;

  /* no forced zoom by default */
  transform: translate3d(0, var(--media-y, 0%), 0) scale(var(--media-zoom, 1));
  transform-origin: 50% 0%;
  will-change: transform;
}

/* Animated backgrounds */
.case-bg {
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.55;
  transform: translate3d(0, 0, 0);
  animation: caseBgDrift 18s ease-in-out infinite alternate;
}

@keyframes caseBgDrift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 1%, 0) scale(1.05); }
}

/* Palettes */
.case-bg--taskorbit {
  background:
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.55), transparent 55%),
    radial-gradient(circle at 80% 40%, rgba(0, 200, 255, 0.35), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(255, 255, 255, 0.12), transparent 55%);
}

.case-bg--design {
  background:
    radial-gradient(circle at 25% 35%, rgba(168, 85, 247, 0.5), transparent 55%),
    radial-gradient(circle at 75% 45%, rgba(255, 140, 90, 0.35), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(255, 255, 255, 0.1), transparent 55%);
}

.case-bg--threed {
  background:
    radial-gradient(circle at 25% 30%, rgba(168, 85, 247, 0.45), transparent 55%),
    radial-gradient(circle at 80% 40%, rgba(0, 255, 170, 0.28), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(255, 255, 255, 0.1), transparent 55%);
}

.case-bg--lab {
  background:
    radial-gradient(circle at 25% 35%, rgba(168, 85, 247, 0.5), transparent 55%),
    radial-gradient(circle at 80% 45%, rgba(255, 60, 160, 0.32), transparent 60%),
    radial-gradient(circle at 50% 85%, rgba(255, 255, 255, 0.1), transparent 55%);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .case-bg { animation: none; }
}
/* =========================================================
   APPROACH COLLAGE FIX
   - remove tile drop shadows
   - enforce cleaner aspect ratios
   - keep sticky stacking safe (no caption clipping)
   ========================================================= */

/* 1) Single shadow system: panel has shadow, tiles do not */
.approach-page .approach-tile-video {
  box-shadow: none !important;
  border: none !important;
}

/* 2) desktop ratios (non-sticky and sticky) */
@media (min-width: 1024px) {
  /* top two */
  .approach-page .approach-tile--primary .approach-tile-video { aspect-ratio: 16 / 9; }
  .approach-page .approach-tile--top .approach-tile-video { aspect-ratio: 16 / 9; }

  /* bottom left (default = 1:1). if you want taller, switch to 3 / 4 */
  .approach-page .approach-tile--bottom .approach-tile-video { aspect-ratio: 1 / 1; }

  /* bottom right two */
  .approach-page .approach-tile--tall-left .approach-tile-video,
  .approach-page .approach-tile--tall-right .approach-tile-video { aspect-ratio: 9 / 16; }
}

/* 3) Desktop 1200+: Sliver rail for ALL collage panels */
@media (min-width: 1200px) {
  /* Panels need overflow visible so slivers can lift without clipping */
  .approach-page .collage-panel {
    overflow: visible;
  }

  /* --- Sliver rail wrappers (shared) --- */
  .approach-page .collage-panel .sliverRailWrap {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .approach-page .collage-panel .sliverRail {
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 22px 0 26px;
    position: relative;
  }

  /* --- The sliver track (converts grid to flex for all panels) --- */
  .approach-page .approach-grid.sliverTrack {
    --sliverW: clamp(120px, 9vw, 150px);
    --expandedW: clamp(420px, 48vw, 560px);
    display: flex;
    gap: clamp(16px, 1.8vw, 26px);
    width: 100%;
    justify-content: center;
    align-items: stretch;
    height: clamp(420px, 58vh, 620px);
    perspective: 900px;
    position: relative;
    z-index: 1;
    /* neutralize grid templates */
    grid-template-columns: none;
    grid-template-rows: none;
    grid-template-areas: none;
  }

  .approach-page .approach-grid.sliverTrack .approach-tile {
    grid-area: unset;
  }

  /* Each sliver tile */
  .approach-page .approach-grid.sliverTrack .approach-tile {
    flex: 0 0 var(--sliverW);
    height: 100%;
    min-width: 0;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #050505;
    cursor: pointer;
    transform-style: preserve-3d;
    z-index: 1;
    transition: flex-basis 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                filter 0.35s ease,
                box-shadow 0.35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }

  /* Tile frames fill entire sliver */
  .approach-page .approach-grid.sliverTrack .approach-tile-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    border-radius: inherit;
    display: block;
    max-height: none !important;
    background: #050505;
  }

  .approach-page .approach-grid.sliverTrack .approach-tile-video video,
  .approach-page .approach-grid.sliverTrack .approach-tile-video img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
  }

  /* Dim non-hovered slivers */
  .approach-page .approach-grid.sliverTrack:hover .approach-tile {
    filter: saturate(0.85) brightness(0.9);
  }

  /* Expanded sliver on hover/focus */
  .approach-page .approach-grid.sliverTrack .approach-tile:hover,
  .approach-page .approach-grid.sliverTrack .approach-tile:focus-within {
    flex-basis: var(--expandedW);
    transform: translateY(-12px) rotateY(-4deg);
    filter: none;
    z-index: 5;
    box-shadow: 0 16px 60px rgba(168, 85, 247, 0.25),
                0 8px 24px rgba(0, 0, 0, 0.6);
  }

  /* Caption: hidden by default, revealed on hover */
  .approach-page .approach-grid.sliverTrack .approach-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    margin: 0;
    padding: 2.25rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.82), transparent);
    border-radius: 0 0 18px 18px;
    font-size: clamp(0.9rem, 1.05vw, 1.1rem);
    line-height: 1.35;
    text-align: center;
    color: #fff;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .approach-page .approach-grid.sliverTrack .approach-tile:hover .approach-caption,
  .approach-page .approach-grid.sliverTrack .approach-tile:focus-within .approach-caption {
    opacity: 1;
    max-height: 90px;
  }
}

/* Reduced motion: all sliver panels + card 3D */
@media (min-width: 1200px) and (prefers-reduced-motion: reduce) {
  .approach-page .approach-grid.sliverTrack .approach-tile {
    transition: flex-basis 0.15s ease;
    transform: none !important;
  }
  .approach-page .approach-grid.sliverTrack .approach-tile:hover,
  .approach-page .approach-grid.sliverTrack .approach-tile:focus-within {
    transform: none !important;
  }
  .approach-page .approach-grid.sliverTrack .approach-caption {
    transition: opacity 0.1s ease;
  }
  .approach-page .collage-panel {
    transform: none !important;
    opacity: 1 !important;
  }
}
/* =========================================================
   APPROACH COLLAGE: per-panel gradients (SAFE with sticky)
   - does not touch position/sticky
   - makes the gradient visible by tinting tile overlays too
   ========================================================= */

.approach-page .collage-panel {
  /* keep sticky rules untouched, just skin */
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.06);

  /* stronger "work card" style backdrop */
  background:
    radial-gradient(circle at 18% 0%,
      var(--panel-glow-a, rgba(168, 85, 247, 0.16)),
      transparent 60%),
    radial-gradient(circle at 85% 35%,
      var(--panel-glow-b, rgba(0, 200, 255, 0.12)),
      transparent 65%),
    radial-gradient(circle at 50% 110%,
      rgba(255, 255, 255, 0.06),
      transparent 55%),
    #050505;

  /* Single shadow system — panel only, no tile shadows */
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.7);
}


/* make the glow read inside the tiles too (this is why you couldn't "see it") */
.approach-page .approach-tile-video::after {
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 0%,
      var(--panel-glow-a, rgba(168, 85, 247, 0.22)),
      transparent 60%),
    radial-gradient(circle at 85% 85%,
      var(--panel-glow-b, rgba(0, 200, 255, 0.12)),
      transparent 55%);
  mix-blend-mode: soft-light;
  opacity: 1;
}

/* per-panel palettes (matches your stacking order) */
.approach-page .collage-stack > .collage-panel:nth-of-type(1) {
  --panel-glow-a: rgba(168, 85, 247, 0.22);
  --panel-glow-b: rgba(0, 200, 255, 0.14);
}

.approach-page .collage-stack > .collage-panel:nth-of-type(2) {
  --panel-glow-a: rgba(255, 0, 200, 0.18);
  --panel-glow-b: rgba(168, 85, 247, 0.16);
}

.approach-page .collage-stack > .collage-panel:nth-of-type(3) {
  --panel-glow-a: rgba(255, 150, 0, 0.16);
  --panel-glow-b: rgba(168, 85, 247, 0.14);
}

.approach-page .collage-stack > .collage-panel:nth-of-type(4) {
  --panel-glow-a: rgba(0, 255, 150, 0.14);
  --panel-glow-b: rgba(0, 200, 255, 0.12);
}

.approach-page .collage-stack > .collage-panel:nth-of-type(5) {
  --panel-glow-a: rgba(0, 200, 255, 0.16);
  --panel-glow-b: rgba(255, 0, 200, 0.12);
}

.approach-page .collage-stack > .collage-panel:nth-of-type(6) {
  --panel-glow-a: rgba(168, 85, 247, 0.20);
  --panel-glow-b: rgba(255, 140, 90, 0.12);
}

/* Clickable video tiles */
.approach-page .approach-tile-video {
  cursor: pointer;
}

/* =========================================================
   VIDEO PREVIEW MODAL
   ========================================================= */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.video-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
}

.video-modal-content video,
.video-modal-content img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .video-modal-overlay {
    transition: none;
  }
}

/* =========================================================
   OVERLAY MENU: match site typography (same feel as hero)
   ========================================================= */

.menu-overlay,
.overlay-nav,
.overlay-nav a {
  font-family: inherit;
}

.overlay-nav a {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;

  /* remove the “different” look */
  text-transform: none; /* overrides your current capitalize */
}
/* =========================================================
   MOBILE ONLY: work case study cards become readable
   - no hover dependency
   - label + description always visible
   - videos become 16:9 and full width
   ========================================================= */
@media (max-width: 767px) {
  /* give the whole work card real padding again */
  .services .service-row.case-study {
    padding: 1.8rem 1.25rem 2.1rem;
    gap: 1.4rem;
  }

  /* stack the 3 cards vertically instead of cramped mini-cards */
  .services .service-row.case-study .service-gallery.case-gallery {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    margin-top: 1.25rem;
  }

  .services .service-row.case-study .case-gallery .case-item {
    width: 100%;
  }

  /* undo the mobile "50%" squeeze that makes everything tiny */
  .services .service-row.case-study .case-gallery .thumb {
    max-width: 100% !important;
    width: 100%;
    aspect-ratio: auto;
  }

  .services .service-row.case-study .case-gallery .thumb::after {
    display: none;
  }

  /* make label part of the normal flow (not floating above) */
  .services .service-row.case-study .case-card-label {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;

    display: block;
    text-align: center;
    margin: 0 0 0.35rem;

    font-size: 1.05rem;
    letter-spacing: 0.08em;
  }

  /* always show the description, no hover needed */
  .services .service-row.case-study .case-card-sub {
    height: auto;
    -webkit-line-clamp: 4;
    margin: 0 0 0.85rem;
    padding: 0;

    text-align: center;
    font-size: 0.95rem;
    line-height: 1.45;
  }

  /* force a visible video frame */
  .services .service-row.case-study .case-card-media {
    flex: none;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
  }

  .services .service-row.case-study .case-card-media video,
  .services .service-row.case-study .case-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0%;
  }

  /* kill hover-only behavior on mobile */
  .services .service-row.case-study:hover .case-card-label,
  .services .service-row.case-study .case-card:hover .case-card-label {
    transform: none;
  }
}

/* =========================================================
   WORK 5-PANEL COLLAGE (index.html)
   ========================================================= */

/* Collage wrapper — centered under "work" heading */
.work-collage {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Grid — mobile-first single column */
.work-collage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* Individual panel */
.comic-panel {
  position: relative;
  display: block;
  overflow: hidden;
  background: #050505;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.32s ease,
              border-color 0.32s ease,
              box-shadow 0.32s ease,
              transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Mobile: all panels 16:9 */
.comic-panel { aspect-ratio: 16 / 9; }

/* --- Tablet + Desktop (≥768px): 12-col grid, 2 top wides + 2×2 squares --- */
@media (min-width: 768px) {
  .work-collage-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
  }

  .comic-panel--top {
    grid-column: span 6;
    aspect-ratio: 1 / 1;
  }

  .comic-panel--sq {
    grid-column: span 6;
    aspect-ratio: 1 / 1;
  }
}

/* Video fills panel (gradient bg for empty panels) */
.comic-panel-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 60%, #0d0816 100%);
}

.comic-panel-video video,
.comic-panel-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle purple tint */
.comic-panel-video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 0%, rgba(168, 85, 247, 0.2), transparent 60%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Caption overlay */
.comic-panel-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  padding: 2.5rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  border-radius: 0 0 14px 14px;
}

.comic-panel-name {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.comic-panel-desc {
  margin: 0.35rem 0 0;
  font-size: clamp(0.78rem, 0.9vw, 0.92rem);
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Touch: no dim (handled via #workCollageGrid scoped rules below) --- */

/* Task Orbit: slight overscan to eliminate white slivers */
.comic-panel[href="work-02-task-orbit.html"] .comic-panel-video video {
  transform: scale(1.02);
  transform-origin: center;
}

/* =====  APPLE CARD TILT + FOCUS MODE + PRESS  ===== */

/* Perspective on grid enables 3D tilt */
#workCollageGrid {
  perspective: 900px;
}

/* Perf hints scoped to Work collage only */
#workCollageGrid .comic-panel {
  will-change: transform, opacity;
  transform-style: preserve-3d;
  --tiltX: 0deg;
  --tiltY: 0deg;
  --mx: 50%;
  --my: 50%;
}
#workCollageGrid .comic-panel-video {
  will-change: transform, filter;
  transition: transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1),
              filter 0.32s ease;
  --mediaX: 0px;
  --mediaY: 0px;
}

/* Specular highlight pseudo — always present, fades in on active */
#workCollageGrid .comic-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: radial-gradient(
    circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0) 50%
  );
  mix-blend-mode: overlay;
}

/* CSS-only hover fallback — guarantees every tile responds even if JS breaks */
@media (hover: hover) and (pointer: fine) {
  #workCollageGrid .comic-panel:hover {
    transform: translate3d(0, -8px, 0) scale(1.025);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 8px 20px rgba(0, 0, 0, 0.4);
  }
  #workCollageGrid .comic-panel:hover .comic-panel-video {
    transform: scale(1.04);
  }
}

/* JS-driven active state (overrides CSS :hover when JS is running) */
#workCollageGrid .comic-panel.is-active {
  transform: translate3d(0, -8px, 0) scale(1.03)
             rotateX(var(--tiltX)) rotateY(var(--tiltY));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
  transition: transform 0.12s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.32s ease,
              border-color 0.32s ease,
              box-shadow 0.32s ease;
}
#workCollageGrid .comic-panel.is-active .comic-panel-video {
  transform: translate3d(var(--mediaX), var(--mediaY), 0) scale(1.06);
  transition: transform 0.12s cubic-bezier(0.25, 0.8, 0.25, 1),
              filter 0.32s ease;
}
#workCollageGrid .comic-panel.is-active::after {
  opacity: 1;
}

/* Focus Mode: dim non-active tiles — media only, no blur */
@media (hover: hover) and (pointer: fine) {
  #workCollageGrid.is-dimming .comic-panel {
    opacity: 0.65;
  }
  #workCollageGrid.is-dimming .comic-panel .comic-panel-video {
    filter: saturate(0.75) brightness(0.75);
  }
  #workCollageGrid.is-dimming .comic-panel.is-active {
    opacity: 1;
  }
  #workCollageGrid.is-dimming .comic-panel.is-active .comic-panel-video {
    filter: none;
  }
}

/* Press: tactile compress */
#workCollageGrid .comic-panel.is-pressed {
  transform: translate3d(0, -4px, 0) scale(1.01)
             rotateX(var(--tiltX)) rotateY(var(--tiltY));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  transition: transform 0.1s ease,
              box-shadow 0.1s ease;
}

/* --- Touch devices: no dim, no tilt --- */
@media (hover: none) and (pointer: coarse) {
  #workCollageGrid .comic-panel {
    transform: none;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  #workCollageGrid .comic-panel {
    transition: opacity 0.15s ease, border-color 0.15s ease !important;
    transform: none !important;
  }
  #workCollageGrid .comic-panel-video {
    transition: filter 0.15s ease !important;
    transform: none !important;
  }
  #workCollageGrid .comic-panel::after {
    display: none;
  }
  #workCollageGrid .comic-panel:hover {
    transform: none !important;
  }
  #workCollageGrid .comic-panel:hover .comic-panel-video {
    transform: none !important;
  }
  #workCollageGrid.is-dimming .comic-panel {
    opacity: 0.6;
  }
  #workCollageGrid.is-dimming .comic-panel.is-active {
    opacity: 1;
  }
  #workCollageGrid .comic-panel.is-pressed {
    transform: none !important;
  }
}

/* CURSOR FX — disabled */

/* =========================================================
   CASE STUDY PAGES (static)
   ========================================================= */

.case-study-page {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 4rem;
}

.case-study-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* Hero */
.case-study-hero {
  margin-bottom: 3rem;
}

.case-study-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin: 0;
  color: #fff;
}

.case-study-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--muted);
  margin: 0.75rem 0 0;
  line-height: 1.5;
  max-width: 640px;
}

/* 3-column layout */
.case-study-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .case-study-columns {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
  }
}

.case-study-col p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

.case-study-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: rgba(168, 85, 247, 0.85);
  margin: 0;
}

/* Media grid */
.case-study-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .case-study-media {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.case-study-media-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.case-study-media-item video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.case-study-media-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin: 0;
  z-index: 2;
}

/* Back link */
.case-study-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.case-study-back:hover {
  color: #fff;
}

/* Placeholder box for media items without video */
.case-study-media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0a0a0a 0%, #111 60%, #0d0816 100%);
  border-radius: inherit;
}
