/* =========================================================
   Carlos Benitez — Portfolio
   Bento Grid editorial · glassmorphism selectivo
   60% Polar White · 30% Glacier Blue · 10% Racing Red
   Acento tipográfico: morado · Texto: navy
   ========================================================= */

:root {
  --polar: #F4F7F9;
  --glacier: #B9DCEB;
  --glacier-deep: #9CCBE0;
  --red: #D71920;
  --purple: #5B21B6;          /* morado intenso: acento tipográfico */
  --navy: #172B3A;
  --navy-70: rgba(23, 43, 58, .72);
  --navy-50: rgba(23, 43, 58, .55);
  --hair: rgba(23, 43, 58, .12);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .72);
  --glass-edge: rgba(23, 43, 58, .06);
  --glass-blur: 16px;
  --glass-shadow: 0 1px 1px rgba(23, 43, 58, .04), 0 12px 32px -12px rgba(23, 43, 58, .18);

  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gap: clamp(10px, 1.2vw, 16px);
  --wrap: 1280px;
  --pad: clamp(20px, 4vw, 48px);
  --r: 6px;
  --r-glass: 16px;

  /* Movimiento */
  --ease-out: cubic-bezier(.22, 1, .36, 1);   /* ease-out suave para scroll */
  --dur-reveal: .85s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--polar);
  color: var(--navy);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
::selection { background: var(--purple); color: #fff; }

/* Playfair: frases y palabras destacadas */
em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }

/* ---------- Glass (solo donde se aplica la clase) ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 0 0 .5px var(--glass-edge);
  border-radius: var(--r-glass);
}
.glass--dark { --glass-bg: rgba(255, 255, 255, .9); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .92); }
}

/* ---------- Tipos comunes ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font: 600 12px/1 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy-70);
}
.eyebrow__num {
  color: var(--red); font-variant-numeric: tabular-nums;
  padding-right: 12px; border-right: 1px solid var(--hair);
}
.eyebrow--small { font-size: 11px; }

.section { padding-block: clamp(72px, 10vw, 140px) 0; }
.section__head { display: grid; gap: 20px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__title {
  font: 700 clamp(32px, 4.6vw, 60px)/1.05 var(--sans);
  letter-spacing: -.035em;
  max-width: 22ch;
}
.section__title em { color: var(--purple); font-weight: 500; letter-spacing: -.01em; }

/* =========================================================
   BOTONES — NEUMORFISMO
   Reposo: superficie elevada con dos sombras opuestas (luz arriba-izquierda,
   sombra abajo-derecha). Hover: más elevación. Pulsado: se hunde con
   sombras interiores + squash & stretch (ver .squash más abajo).
   ========================================================= */
:root {
  --neu-light: rgba(255, 255, 255, 1);
  --neu-dark: rgba(133, 155, 178, .55);
  --neu-raised: 8px 8px 18px var(--neu-dark), -8px -8px 18px var(--neu-light);
  --neu-raised-hi: 12px 12px 26px var(--neu-dark), -12px -12px 26px var(--neu-light);
  --neu-pressed: inset 6px 6px 12px rgba(133, 155, 178, .6), inset -6px -6px 12px rgba(255, 255, 255, .95);
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px;
  border-radius: 18px; border: 0;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition:
    box-shadow .4s var(--ease-out),
    transform .4s var(--ease-out),
    background .3s, color .25s;
}

/* Secundario: misma superficie que el fondo, elevado */
.btn--line {
  background: linear-gradient(145deg, #FFFFFF, #E6ECF1);
  color: var(--navy);
  box-shadow: var(--neu-raised), inset 1px 1px 0 rgba(255, 255, 255, .9);
}
.btn--line span { font-size: 10px; color: var(--purple); }

/* Principal: superficie roja elevada sobre el fondo claro */
.btn--red {
  background: linear-gradient(145deg, #E5242B, #C4141A);
  color: #fff;
  box-shadow:
    var(--neu-raised),
    inset 2px 2px 3px rgba(255, 120, 120, .45),
    inset -2px -2px 4px rgba(110, 0, 4, .35);
}

/* Hover: sube un poco y la sombra se abre */
.btn:hover { transform: translateY(-2px); }
.btn--line:hover {
  color: var(--purple);
  box-shadow: var(--neu-raised-hi), inset 1px 1px 0 rgba(255, 255, 255, .9);
}
.btn--red:hover {
  background: linear-gradient(145deg, #EA2A31, #CC161D);
  box-shadow:
    var(--neu-raised-hi),
    inset 2px 2px 3px rgba(255, 120, 120, .5),
    inset -2px -2px 4px rgba(110, 0, 4, .35);
}

/* Pulsado: se hunde en la superficie */
.btn:active, .btn.is-pressed { transform: translateY(0); }
.btn--line:active, .btn--line.is-pressed {
  background: linear-gradient(145deg, #E6ECF1, #F4F7F9);
  color: var(--purple);
  box-shadow: var(--neu-pressed);
  transition-duration: .12s;
}
.btn--red:active, .btn--red.is-pressed {
  background: linear-gradient(145deg, #BC1218, #D71920);
  box-shadow:
    3px 3px 8px rgba(133, 155, 178, .35), -3px -3px 8px var(--neu-light),
    inset 5px 5px 10px rgba(95, 0, 4, .55),
    inset -4px -4px 10px rgba(255, 95, 95, .35);
  transition-duration: .12s;
}

.btn--big { height: 68px; padding: 0 34px; border-radius: 22px; font-size: clamp(16px, 2vw, 20px); }
.btn--sm { height: 42px; padding: 0 18px; border-radius: 14px; font-size: 13.5px; }

/* =========================================================
   SQUASH & STRETCH
   Usa la propiedad `scale` (independiente de `translate` del hover).
   El ::after amplía el área de clic para que la compresión
   nunca deje el puntero fuera del botón.
   ========================================================= */
.squash { position: relative; scale: 1; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.squash::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; }
.squash.is-pressed {
  scale: 1.05 .9;
  transition: scale .1s cubic-bezier(.3, 0, .5, 1), box-shadow .12s ease-out, transform .12s ease-out, background .12s, color .2s;
}
.squash.is-released { animation: squash-spring .52s both; }
@keyframes squash-spring {
  0%   { scale: 1.05 .9;    animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  32%  { scale: .96 1.07;   animation-timing-function: cubic-bezier(.4, 0, .4, 1); }
  58%  { scale: 1.02 .975;  animation-timing-function: cubic-bezier(.4, 0, .4, 1); }
  80%  { scale: .995 1.008; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  100% { scale: 1 1; }
}

/* =========================================================
   NAV flotante (glass)
   ========================================================= */
.nav {
  position: fixed; z-index: 50;
  top: 16px; left: 50%; transform: translateX(-50%);
  width: min(100% - 32px, 980px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
}
.nav.is-scrolled { --glass-bg: rgba(255, 255, 255, .74); }
.nav__logo {
  display: inline-flex; align-items: center;
  font: 700 16px/1 var(--sans); letter-spacing: -.02em; text-decoration: none;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin: 0 6px; translate: 0 1px; }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  display: inline-block;
  padding: 10px 14px; border-radius: 999px;
  font: 500 14px/1 var(--sans); text-decoration: none; color: var(--navy-70);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--purple); background: rgba(255, 255, 255, .75); }
/* CTA de la nav: neumórfico navy sobre el vidrio */
.nav__cta {
  display: inline-block;
  padding: 13px 20px; border-radius: 999px;
  background: linear-gradient(145deg, #24405A, #13232F);
  color: #fff;
  font: 600 14px/1 var(--sans); text-decoration: none;
  box-shadow: 5px 5px 12px rgba(23, 43, 58, .32), -5px -5px 12px rgba(255, 255, 255, .95), inset 1px 1px 1px rgba(255, 255, 255, .18);
  transition: box-shadow .4s var(--ease-out), transform .4s var(--ease-out), background .3s;
}
.nav__cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #6D2FD0, #4C1A9A);
  box-shadow: 7px 7px 16px rgba(23, 43, 58, .34), -7px -7px 16px rgba(255, 255, 255, 1), inset 1px 1px 1px rgba(255, 255, 255, .2);
}
.nav__cta:active, .nav__cta.is-pressed {
  transform: translateY(0);
  box-shadow: 2px 2px 5px rgba(23, 43, 58, .2), -2px -2px 5px rgba(255, 255, 255, .9), inset 4px 4px 9px rgba(0, 0, 0, .45), inset -3px -3px 8px rgba(255, 255, 255, .12);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  align-items: end;
  padding-top: clamp(130px, 16vw, 190px);
}
.hero__copy { grid-column: 1 / 7; padding-bottom: 8px; }
.hero__title {
  margin-top: 28px;
  font: 800 clamp(44px, 6.4vw, 92px)/.98 var(--sans);
  letter-spacing: -.045em;
}
.hero__title em { color: var(--purple); font-weight: 500; letter-spacing: -.02em; }
.hero__lede { margin-top: 28px; max-width: 44ch; font-size: clamp(16px, 1.3vw, 18px); color: var(--navy-70); }
.hero__lede em { color: var(--navy); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__media { grid-column: 7 / 13; margin: 0; position: relative; }
.hero__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  background: var(--glacier);
}
.hero__frame video {
  position: absolute; inset: 9% -18% 9% 9%;
  width: 109%; height: 82%;
  object-fit: cover; object-position: left center;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 30px 60px -30px rgba(23, 43, 58, .45);
}
.hero__cap {
  position: absolute; left: 0; top: calc(100% + 12px);
  font: 500 12px/1 var(--sans); letter-spacing: .04em; color: var(--navy-50);
}
.hero__cap::before { content: ""; display: inline-block; width: 18px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--purple); }

/* Elemento decorativo de interfaz */
.timecode {
  position: absolute; left: -9%; bottom: 13%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
}
.tc { font: 500 13px/1 var(--mono); letter-spacing: .02em; }
.timecode__meta { color: var(--navy-50); padding-left: 12px; border-left: 1px solid var(--hair); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: .25; } }

/* =========================================================
   BENTO — base
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.tile { position: relative; overflow: hidden; border-radius: var(--r); min-width: 0; }

/* ---------- Proyectos ---------- */
.bento--work {
  grid-template-rows: repeat(2, clamp(190px, 21vw, 290px)) clamp(150px, 15vw, 210px) clamp(150px, 15vw, 210px);
  grid-template-areas:
    "fz fz fz fz fz fz fz fz ch ch ch ch"
    "fz fz fz fz fz fz fz fz ch ch ch ch"
    "ct ct ct tf tf tf tf tf tf tf qt qt"
    "sp sp sp tf tf tf tf tf tf tf qt qt";
}
.w-flowzen { grid-area: fz; }
.w-chere   { grid-area: ch; }
.w-count   { grid-area: ct; }
.w-tuf     { grid-area: tf; }
.w-spec    { grid-area: sp; }
.w-quote   { grid-area: qt; }

.tile--media { cursor: pointer; background: #0B0D10; isolation: isolate; }
.tile--media:not(.tile--dark) { background: #EEF2F8; }
.tile--media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 0% 50%;
  transition: transform 1.1s var(--ease-out);
}
.w-chere video { object-position: 62% 50%; }
.w-tuf video { object-position: 30% 40%; }
.tile--media:hover video, .tile--media:focus-visible video { transform: scale(1.035); }

/* Panel glass con datos del proyecto */
.meta {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100% - 28px);
  padding: 12px 14px 12px 16px;
}
.meta__idx { color: var(--red); align-self: flex-start; padding-top: 2px; font: 600 12px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.meta__name { font: 700 14px/1.2 var(--sans); letter-spacing: .03em; }
.meta__line { font-size: 13px; color: var(--navy-70); line-height: 1.4; }
.meta__line em { color: var(--purple); }
/* "Ver proyecto": botón redondo neumórfico dentro del panel */
.meta__play {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; margin-left: 6px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFFFFF, #E3E9EE);
  color: var(--navy);
  font-size: 10px; padding-left: 2px;
  box-shadow: 4px 4px 9px rgba(133, 155, 178, .55), -4px -4px 9px rgba(255, 255, 255, 1);
  transition: box-shadow .35s var(--ease-out), color .25s, transform .35s var(--ease-out);
}
.tile--media:hover .meta__play {
  color: var(--purple); transform: translateY(-1px);
  box-shadow: 6px 6px 12px rgba(133, 155, 178, .6), -5px -5px 11px rgba(255, 255, 255, 1);
}
.tile--media:active .meta__play {
  transform: translateY(0) scale(1.06, .92);
  box-shadow: inset 3px 3px 6px rgba(133, 155, 178, .6), inset -3px -3px 6px rgba(255, 255, 255, 1);
  transition-duration: .1s;
}

/* Tarjetas de apoyo */
.tile--count {
  background: var(--glacier);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(16px, 2vw, 24px);
}
.count__num {
  font: italic 500 clamp(64px, 8vw, 116px)/.82 var(--serif);
  color: var(--purple);
  letter-spacing: -.03em;
}
.count__label { font: 600 13px/1.35 var(--sans); color: var(--navy-70); }

.tile--spec {
  border: 1px solid var(--hair);
  padding: clamp(16px, 2vw, 24px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.spec { margin: 0; display: grid; gap: 6px; }
.spec div { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--hair); padding-top: 6px; }
.spec dt { font-size: 13px; color: var(--navy-50); }
.spec dd { margin: 0; font: 600 14px/1.3 var(--sans); font-variant-numeric: tabular-nums; }

.tile--quote {
  background: var(--polar);
  border: 1px solid var(--hair);
  padding: clamp(16px, 2vw, 24px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.quote { font: 500 clamp(19px, 1.85vw, 25px)/1.22 var(--serif); }
.quote em { color: var(--purple); display: block; margin-top: 6px; }
.quote__link { align-self: flex-start; }
.quote__link span { font-size: 15px; transition: transform .3s var(--ease-out); }
.quote__link:hover span { transform: translateX(4px); }

/* =========================================================
   QUÉ HAGO — fondo Glacier, detalles en glass
   ========================================================= */
.services {
  position: relative; overflow: hidden;
  margin-top: clamp(80px, 11vw, 150px);
  padding-block: clamp(72px, 9vw, 120px);
  background: var(--glacier);
}
.services__shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; }
.shape--a { width: 46vw; height: 46vw; right: -10vw; top: -14vw; background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 65%); }
.shape--b { width: 30vw; height: 30vw; left: 30%; bottom: -12vw; background: radial-gradient(circle, rgba(244,247,249,.9), rgba(244,247,249,0) 66%); }
.shape--c { width: 7vw; height: 7vw; right: 3%; top: 70%; background: radial-gradient(circle, rgba(215,25,32,.38), rgba(215,25,32,0) 68%); }
.services .wrap { position: relative; }

.bento--services {
  grid-template-rows: repeat(3, minmax(150px, auto));
  grid-template-areas:
    "fl fl fl fl fl fl fl ui ui ui ui ui"
    "fl fl fl fl fl fl fl so so so so so"
    "fl fl fl fl fl fl fl sc sc sc nt nt";
}
.s-film   { grid-area: fl; }
.s-ui     { grid-area: ui; }
.s-sound  { grid-area: so; }
.s-social { grid-area: sc; }
.s-note   { grid-area: nt; }

.svc { padding: clamp(18px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 10px; }
.svc.glass { border-radius: var(--r); --glass-bg: rgba(255, 255, 255, .5); }
.svc__idx { color: var(--red); font: 600 12px/1 var(--sans); letter-spacing: .1em; }
.svc__title { font: 700 clamp(20px, 1.9vw, 25px)/1.15 var(--sans); letter-spacing: -.025em; margin-top: auto; }
.svc__title em { color: var(--purple); }
.svc__text { font-size: 14.5px; color: var(--navy-70); max-width: 42ch; }
.s-ui .svc__title, .s-sound .svc__title { margin-top: 28px; }

.svc--hero {
  min-height: 540px;
  background: #07090A; color: #fff;
  justify-content: space-between;
}
.svc--hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 40%; opacity: .9; }
.svc--hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,9,10,.8) 0%, rgba(7,9,10,0) 42%);
}
.svc__body { position: relative; z-index: 1; display: grid; gap: 10px; }
.svc--hero .svc__title { margin: 0; font-size: clamp(26px, 3vw, 40px); }
.svc--hero .svc__text { color: rgba(255,255,255,.8); }

.svc__detail {
  position: relative; z-index: 1;
  list-style: none; margin: 0; padding: 6px 18px;
  align-self: flex-end; width: min(100%, 320px);
  --glass-bg: rgba(255, 255, 255, .9);
  color: var(--navy);
}
.svc__detail li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 13.5px; font-weight: 500; }
.svc__detail li + li { border-top: 1px solid var(--hair); }
.svc__detail .num { color: var(--purple); font-weight: 600; }

.svc--note {
  background: var(--navy); color: var(--polar);
  justify-content: flex-end;
}
.svc--note p { font: 600 15px/1.35 var(--sans); }
.svc--note em { display: block; margin-top: 4px; font-size: 1.15em; color: var(--glacier); }

/* =========================================================
   SOBRE MÍ / proceso
   ========================================================= */
.section__head--split { grid-template-columns: repeat(12, 1fr); align-items: start; gap: var(--gap); }
.section__head--split .eyebrow { grid-column: 1 / 4; padding-top: 14px; }
.statement {
  grid-column: 4 / 13;
  font: 600 clamp(24px, 3vw, 42px)/1.22 var(--sans);
  letter-spacing: -.03em;
}
.statement em { color: var(--purple); font-weight: 500; }

.bento--process {
  list-style: none; margin: 0; padding: 0;
  grid-template-areas:
    "p1 p1 p1 p1 p1 p2 p2 p2 p2 p3 p3 p3"
    "p1 p1 p1 p1 p1 p4 p4 p4 p4 p4 p4 p4";
}
.p-1 { grid-area: p1; } .p-2 { grid-area: p2; } .p-3 { grid-area: p3; } .p-4 { grid-area: p4; }
.step {
  border-top: 2px solid var(--navy);
  border-radius: 0;
  padding: 18px 4px 28px 0;
  display: grid; align-content: start; gap: 10px;
}
.step p { font-size: 14.5px; color: var(--navy-70); max-width: 36ch; }
.step__num { font: italic 500 clamp(50px, 5.5vw, 80px)/.9 var(--serif); color: var(--glacier-deep); }
.step__title { font: 700 19px/1.2 var(--sans); letter-spacing: -.015em; }
.p-1 { padding-right: 20%; border-top-color: var(--purple); }
.p-1 .step__num { font-size: clamp(110px, 14vw, 196px); color: var(--purple); }
.step--last { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: end; }
.step--last .step__num { grid-row: span 2; }

/* =========================================================
   CONTACTO + footer
   ========================================================= */
.contact { padding-block: clamp(100px, 13vw, 180px) clamp(60px, 8vw, 100px); }
.contact__title {
  margin-top: 24px;
  font: 800 clamp(50px, 9.5vw, 140px)/.95 var(--sans);
  letter-spacing: -.055em;
}
.contact__title em { color: var(--purple); font-weight: 500; letter-spacing: -.03em; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 44px; }
.contact__note { color: var(--navy-70); font-size: 15px; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 24px 40px; border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--navy-70);
}
.footer a { text-decoration: none; display: inline-block; }
.footer a:hover { color: var(--purple); }

/* =========================================================
   LIGHTBOX (overlay glass)
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__scrim {
  position: absolute; inset: 0;
  background: rgba(185, 220, 235, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.lightbox__panel {
  position: relative; width: min(100%, 1120px);
  padding: 10px; --glass-bg: rgba(255, 255, 255, .7);
  animation: pop .45s var(--ease-out);
}
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px 10px; }
.lightbox__title { font: 600 15px/1.2 var(--sans); }
.lightbox__close {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(145deg, #FFFFFF, #E3E9EE); color: var(--navy); font-size: 13px;
  box-shadow: 4px 4px 9px rgba(133, 155, 178, .55), -4px -4px 9px rgba(255, 255, 255, 1);
  transition: box-shadow .35s var(--ease-out), color .2s;
}
.lightbox__close:hover { color: var(--purple); box-shadow: 6px 6px 12px rgba(133, 155, 178, .6), -5px -5px 11px rgba(255, 255, 255, 1); }
.lightbox__close:active, .lightbox__close.is-pressed { box-shadow: inset 3px 3px 6px rgba(133, 155, 178, .6), inset -3px -3px 6px rgba(255, 255, 255, 1); }
.lightbox video { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #000; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* =========================================================
   ANIMACIONES DE SCROLL — aparecen al entrar en pantalla, una sola vez
   opacity 0 → 1 · subida 30px → 0 · 800ms · cubic-bezier(0.16, 1, 0.3, 1)
   Son @keyframes (no transitions) para no chocar con los hovers.
   main.js añade .js-motion y la clase .is-in a cada elemento.
   ========================================================= */
:root { --reveal-ease: cubic-bezier(.16, 1, .3, 1); --reveal-dur: .8s; --reveal-y: 30px; }

@keyframes reveal-up   { from { opacity: 0; translate: 0 var(--reveal-y); } to { opacity: 1; translate: 0 0; } }
@keyframes reveal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal-mask { from { clip-path: inset(100% 0 0 0 round var(--r)); } to { clip-path: inset(0 0 0 0 round var(--r)); } }
@keyframes reveal-zoom { from { scale: 1.14; } to { scale: 1; } }

/* Estado inicial (oculto) */
.js-motion [data-reveal]:not(.is-in),
.js-motion [data-card]:not(.is-in) { opacity: 0; }
.js-motion [data-mask]:not(.is-in) { clip-path: inset(100% 0 0 0 round var(--r)); }
.js-motion [data-mask]:not(.is-in) > :not(video) { opacity: 0; }

/* Texto y tarjetas del bento: fade + subida, escalonados con --delay */
.js-motion .is-in[data-reveal],
.js-motion .is-in[data-card] {
  animation: reveal-up var(--reveal-dur) var(--reveal-ease) var(--delay, 0ms) both;
}

/* Imágenes y miniaturas de proyecto: máscara de abajo arriba + zoom de salida */
.js-motion .is-in[data-mask] {
  animation: reveal-mask 1s var(--reveal-ease) var(--delay, 0ms) both;
}
.js-motion .is-in[data-mask] > video {
  animation: reveal-zoom 1.4s var(--reveal-ease) var(--delay, 0ms) both;
}
.js-motion .is-in[data-mask] > :not(video) {
  animation: reveal-up .7s var(--reveal-ease) calc(var(--delay, 0ms) + 400ms) both;
  --reveal-y: 14px;
}

/* Reducir movimiento: sin desplazamientos ni máscaras, solo un fundido suave */
@media (prefers-reduced-motion: reduce) {
  .js-motion [data-mask]:not(.is-in) { clip-path: none; opacity: 0; }
  .js-motion .is-in[data-reveal],
  .js-motion .is-in[data-card],
  .js-motion .is-in[data-mask],
  .js-motion .is-in[data-mask] > :not(video) {
    animation: reveal-fade .6s ease-out var(--delay, 0ms) both !important;
  }
  .js-motion .is-in[data-mask] > video { animation: none !important; }
}

/* =========================================================
   HOVER — solo en dispositivos con ratón (sin estados pegados en móvil)
   Usa `transform` para elevar, así no choca con `translate` (scroll)
   ni con `scale` (squash & stretch).
   ========================================================= */
.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {

  /* Nav: subrayado morado que crece desde el centro */
  .nav__links a { position: relative; }
  .nav__links a::before {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
    background: var(--purple); border-radius: 2px;
    transform: scaleX(0); transition: transform .35s var(--ease-out);
  }
  .nav__links a:hover { background: transparent; }
  .nav__links a:hover::before { transform: scaleX(1); }

  /* Botones: la flecha avanza (la elevación neumórfica está en .btn) */
  .btn--line span { transition: transform .35s var(--ease-out); }
  .btn--line:hover span { transform: translateX(3px); }

  /* Proyectos: el vídeo se acerca, el panel glass sube y se vuelve más nítido */
  .tile--media .meta { transition: transform .45s var(--ease-out), background .3s; }
  .tile--media:hover .meta { transform: translateY(-4px); --glass-bg: rgba(255, 255, 255, .86); }
  .tile--media.tile--dark:hover .meta { --glass-bg: rgba(255, 255, 255, .96); }
  .tile--media::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    border-radius: inherit; box-shadow: inset 0 0 0 2px var(--purple);
    opacity: 0; transition: opacity .3s;
  }
  .tile--media:hover::after { opacity: 1; }
  .has-cursor .tile--media, .has-cursor .tile--media * { cursor: none; }

  /* Tarjetas de apoyo */
  .tile--count .count__num { transition: transform .5s var(--ease-out); transform-origin: left bottom; }
  .tile--count:hover .count__num { transform: rotate(-4deg) translateY(-2px); }
  .tile--spec, .tile--quote { transition: border-color .3s, box-shadow .4s var(--ease-out); }
  .tile--spec:hover, .tile--quote:hover { border-color: rgba(91, 33, 182, .35); box-shadow: 0 16px 36px -22px rgba(23, 43, 58, .35); }
  .spec div { transition: color .2s; }
  .spec div:hover dd { color: var(--purple); }

  /* Servicios: el vidrio sube y gana opacidad */
  .svc.glass { transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s; }
  .svc.glass:hover {
    transform: translateY(-4px);
    --glass-bg: rgba(255, 255, 255, .72);
    box-shadow: 0 1px 1px rgba(23, 43, 58, .04), 0 22px 44px -18px rgba(23, 43, 58, .28), inset 0 0 0 .5px var(--glass-edge);
  }
  .svc__idx { display: inline-block; transition: transform .35s var(--ease-out); }
  .svc:hover .svc__idx { transform: translateX(4px); }
  .svc--hero video { transition: transform 1.1s var(--ease-out); }
  .svc--hero:hover video { transform: scale(1.03); }
  .svc__detail li { transition: padding .3s var(--ease-out); }
  .svc__detail li:hover { padding-left: 6px; }

  /* Proceso: la línea superior y el número pasan a morado */
  .step { transition: border-color .35s; }
  .step__num { transition: color .35s, transform .45s var(--ease-out); }
  .step:hover { border-top-color: var(--purple); }
  .step:hover .step__num { color: var(--purple); transform: translateY(-3px); }

  /* Footer */
  .footer a { transition: color .2s, transform .3s var(--ease-out); }
  .footer a:hover { transform: translateY(-2px); }

  /* Cursor glass "Ver película" sobre los proyectos (overlay interactivo) */
  .cursor {
    display: flex; align-items: center; gap: 8px;
    position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
    padding: 10px 16px 10px 12px;
    border-radius: 999px;
    font: 600 13px/1 var(--sans); color: var(--navy);
    opacity: 0; scale: .6;
    transition: opacity .25s var(--ease-out), scale .35s var(--ease-out);
    will-change: transform;
  }
  .cursor.is-on { opacity: 1; scale: 1; }
  .cursor__dot {
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--purple); color: #fff; font-size: 8px; padding-left: 2px;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero__copy { grid-column: 1 / 13; }
  .hero__media { grid-column: 2 / 13; margin-top: 40px; }
  .hero__frame { aspect-ratio: 16 / 10; }
  .timecode { left: -6%; }

  .bento--work {
    grid-template-rows: clamp(260px, 44vw, 420px) clamp(220px, 34vw, 340px) clamp(150px, 20vw, 200px) clamp(220px, 34vw, 340px);
    grid-template-areas:
      "fz fz fz fz fz fz fz fz fz fz fz fz"
      "ch ch ch ch ch ch ch ct ct ct ct ct"
      "ch ch ch ch ch ch ch sp sp sp sp sp"
      "tf tf tf tf tf tf tf tf qt qt qt qt";
  }
  .bento--services {
    grid-template-rows: auto;
    grid-template-areas:
      "fl fl fl fl fl fl fl fl fl fl fl fl"
      "ui ui ui ui ui ui so so so so so so"
      "sc sc sc sc sc sc sc nt nt nt nt nt";
  }
  .svc--hero { min-height: 460px; }
  .s-ui .svc__title, .s-sound .svc__title { margin-top: 18px; }

  .section__head--split .eyebrow, .statement { grid-column: 1 / 13; }
  .bento--process {
    grid-template-areas:
      "p1 p1 p1 p1 p1 p1 p1 p1 p1 p1 p1 p1"
      "p2 p2 p2 p2 p2 p2 p3 p3 p3 p3 p3 p3"
      "p4 p4 p4 p4 p4 p4 p4 p4 p4 p4 p4 p4";
  }
  .p-1 { padding-right: 0; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .nav { padding-left: 18px; }
  .nav__links { display: none; }
  .nav__cta { padding: 11px 14px; font-size: 13px; }

  .hero__media { grid-column: 1 / 13; }
  .timecode { left: 12px; bottom: 12px; padding: 10px 12px; }
  .timecode__meta { display: none; }

  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento--work {
    grid-template-rows: 300px 380px 160px 260px auto;
    grid-template-areas:
      "fz fz fz fz fz fz"
      "ch ch ch ch ch ch"
      "ct ct ct sp sp sp"
      "tf tf tf tf tf tf"
      "qt qt qt qt qt qt";
  }
  .tile--quote { gap: 28px; }
  .count__num { font-size: 64px; }
  .meta { left: 10px; bottom: 10px; max-width: calc(100% - 20px); }

  .bento--services {
    grid-template-areas:
      "fl fl fl fl fl fl"
      "ui ui ui ui ui ui"
      "so so so so so so"
      "sc sc sc nt nt nt";
  }
  .svc--hero { min-height: 520px; }
  .svc__detail { width: 100%; }

  .bento--process {
    grid-template-areas: "p1 p1 p1 p1 p1 p1" "p2 p2 p2 p2 p2 p2" "p3 p3 p3 p3 p3 p3" "p4 p4 p4 p4 p4 p4";
  }
  .step--last { grid-template-columns: 1fr; }
  .step--last .step__num { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .squash, .squash.is-pressed { scale: 1 !important; }
}

/* Email bajo el botón de contacto */
.contact__mail { font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1.5px solid rgba(91, 33, 182, .35); transition: color .2s, border-color .2s; }
.contact__mail:hover { color: var(--purple); border-color: var(--purple); }
