/* Joaquín G. Torrecilla · v2
   Mundo: sala de postproducción a oscuras. Casi negro cálido, texto de papel,
   un único color de señal (el rojo del piloto REC) y nada que brille por brillar. */
:root {
  --bg: #0c0b0b;
  --surface: #141312;
  --surface-2: #1b1918;
  --line: rgba(236, 232, 227, 0.1);
  --line-strong: rgba(236, 232, 227, 0.22);
  --text: #ece8e3;
  --text-2: #c9c3bc;
  --muted: #a39d96;
  --accent: #ff6a55;
  --accent-soft: rgba(255, 106, 85, 0.14);
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scrollbar-color: #3a3532 var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-stretch: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent);
}
::selection { background: var(--accent); color: var(--bg); }
html { -webkit-tap-highlight-color: transparent; } /* sin el destello azul al tocar en móvil */
body.menu-open, body.player-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:not([class]) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 232, 227, 0.35); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(236, 232, 227, 0.35); }
.text-link:hover { text-decoration-color: var(--accent); }
.sheet a, .nav a { text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 16px; }
/* campo trampa para bots del formulario: fuera de pantalla, no se lee ni se enfoca */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Portada ---------- */
.hero-section { position: relative; min-height: 100vh; min-height: 100svh; overflow: clip; }
/* parallax (v3): --sy = píxeles bajados dentro de la portada, --p = lo mismo de 0 a 1 (lo pone main.js) */
.bg { position: absolute; inset: 0; background: var(--bg); overflow: hidden; z-index: 0; pointer-events: none; transform: translate3d(0, calc(var(--sy, 0px) * 0.5), 0); will-change: transform; }
.hero { transform: translate3d(0, calc(var(--sy, 0px) * -0.18), 0); }
.headline { transform: translate3d(0, calc(var(--sy, 0px) * -0.12), 0); }
/* el fondo baja con el parallax: este fundido se queda fijo al pie de la portada y evita el corte seco */
.hero-section::after { content: ""; position: absolute; inset: auto 0 0 0; height: 26%; background: linear-gradient(to top, var(--bg) 8%, transparent); pointer-events: none; }
.facts-par { flex-shrink: 0; width: 100%; transform: translate3d(0, calc(var(--sy, 0px) * -0.06), 0); }
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(12, 11, 11, 0.7), transparent);
}
.no-gl .bg { background: radial-gradient(60% 40% at 50% 60%, rgba(255, 106, 85, 0.22), transparent 70%), var(--bg); }

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(16px, 2.4vh, 28px) clamp(16px, 3vw, 32px) clamp(22px, 4vh, 40px);
}

.header {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 2.4vw, 24px);
  width: 100%;
  max-width: 1120px;
  animation: slideDown 0.7s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; justify-self: start; }
.brand-name { display: grid; font-weight: 650; font-stretch: 105%; font-size: 15px; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; }
.brand-name small { font-weight: 450; font-stretch: 100%; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }
.logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  height: 46px;
  transition: transform 0.3s var(--ease);
}
.brand:hover .logo { transform: scale(1.04); }
.logo img { height: 30px; width: auto; display: block; } /* misma altura que las dos líneas del nombre */

.nav {
  width: min(380px, 34vw);
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 19, 18, 0.78);
  border: 1px solid var(--line);
}
.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-2);
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.2s;
}
.nav-cta:hover { background: #fff; }
.burger { display: none; }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 980px;
  text-align: center;
}
.headline {
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(42px, 7.6vw, 96px);
  letter-spacing: -0.035em;
  line-height: 0.94;
  color: var(--text);
  text-wrap: balance;
}
.headline span {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: headlineIn 1s var(--ease) forwards;
}
.headline span:nth-child(1) { animation-delay: 0.1s; }
.headline span:nth-child(2) { animation-delay: 0.24s; color: var(--accent); }

.sub {
  max-width: 54ch;
  text-wrap: pretty;
  margin-top: clamp(18px, 2.6vh, 26px);
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.55;
  color: var(--text-2);
  text-shadow: 0 1px 14px var(--bg), 0 0 4px var(--bg);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 3.6vh, 34px);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #160806;
  font-weight: 650;
  font-size: 15px;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.cta i { font-size: 0.85em; }
.cta:hover { background: #ff7c69; transform: translateY(-1px); }
.cta:active { transform: scale(0.98); }
.ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(20, 19, 18, 0.7);
  border: 1px solid var(--line-strong);
  font-weight: 550;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.ghost i { font-size: 0.8em; width: 1em; color: var(--accent); }
.ghost small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.ghost:hover { border-color: rgba(236, 232, 227, 0.45); background: var(--surface-2); }
.ghost[aria-pressed="true"] { border-color: var(--accent); }

.facts {
  flex-shrink: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  font-size: 14px;
  color: var(--muted);
}
.facts li { padding: 0 18px; }
.facts li + li { border-left: 1px solid var(--line-strong); }
.facts b { color: var(--text); font-weight: 600; }

/* ================= Secciones ================= */
.wrap { width: min(1120px, 100% - 2 * clamp(16px, 4vw, 40px)); margin: 0 auto; }
.section { padding: clamp(88px, 13vh, 150px) 0; position: relative; }
#servicios { border-top: 1px solid var(--line); }
.section, .projects { scroll-margin-top: calc(24px - clamp(56px, 9vh, 110px)); }
.h2 {
  font-weight: 750;
  font-stretch: 112%;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: clamp(30px, 5vh, 52px);
  text-wrap: balance;
}
.h3 { font-weight: 700; font-stretch: 112%; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 60ch; }
.lead { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; color: var(--text); max-width: 34ch; margin-bottom: 18px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* clientes: créditos agrupados por tipo */
.clients { padding: clamp(48px, 8vh, 80px) 0; border-block: 1px solid var(--line); }
.clients-t { font-weight: 700; font-stretch: 110%; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.02em; margin-bottom: clamp(20px, 3vh, 30px); }
.client-groups { display: grid; grid-template-columns: 1.5fr 0.8fr 0.8fr 1.4fr; gap: clamp(20px, 3vw, 44px); border-top: 1px solid var(--line-strong); padding-top: 18px; }
.client-groups h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.client-groups ul { list-style: none; display: grid; gap: 4px; }
.client-groups li { font-weight: 600; font-stretch: 106%; font-size: clamp(16px, 1.45vw, 19px); letter-spacing: -0.01em; color: var(--text-2); }

/* servicios: paneles con su escena de trabajo dibujada */
.svc { display: flex; gap: clamp(8px, 1vw, 12px); height: clamp(420px, 58vh, 510px); }
.svc-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #161514, #0e0d0d 60%);
  border: 1px solid var(--line);
  cursor: pointer;
  outline: none;
  clip-path: inset(100% 0 0 0 round 20px);
  transition:
    flex 0.85s var(--ease),
    height 0.85s var(--ease),
    border-color 0.4s,
    clip-path 1.1s var(--ease) calc(0.15s + var(--i) * 0.12s);
}
.svc.in .svc-panel { clip-path: inset(0 0 0 0 round 20px); }
.svc-panel.active { flex: 4.4 1 0; border-color: rgba(255, 106, 85, 0.4); cursor: default; }
.svc-panel:focus-visible { border-color: var(--text); }
.svc-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 13, 13, 0.96) 40%, rgba(14, 13, 13, 0.5) 52%, rgba(14, 13, 13, 0) 60%);
  pointer-events: none;
}
.svc-tl { position: absolute; left: 0; bottom: 0; width: 100%; height: 44%; display: block; }
.svc-ico, .svc-meter, .svc-vert, .svc-body { position: absolute; z-index: 2; }
.svc-ico { top: 22px; left: 20px; font-size: 17px; color: var(--accent); }
.svc-vert {
  left: 18px;
  top: 64px;
  writing-mode: vertical-rl;
  font-weight: 650;
  font-stretch: 108%;
  font-size: clamp(17px, 1.6vw, 20px);
  white-space: nowrap;
  transition: opacity 0.45s ease 0.3s, transform 0.7s var(--ease) 0.3s;
}
.svc-panel.active .svc-vert { opacity: 0; transform: translateX(-10px); transition: opacity 0.2s, transform 0.3s; }
.svc-ico { transition: opacity 0.45s ease 0.3s; }
.svc-panel.active .svc-ico { opacity: 0; transition: opacity 0.2s; }
.svc-meter { right: 20px; top: 22px; display: flex; gap: 3px; align-items: flex-end; height: 30px; transition: opacity 0.35s; }
.svc-meter i { width: 4px; height: 100%; border-radius: 1px; background: linear-gradient(to top, #5fb08a, #e6c35a 70%, var(--accent)); transform-origin: bottom; animation: meter 0.9s ease-in-out infinite alternate; }
.svc-meter i:nth-child(2) { animation-duration: 0.62s; animation-delay: -0.2s; }
.svc-meter i:nth-child(3) { animation-duration: 0.78s; animation-delay: -0.5s; }
.svc-meter i:nth-child(4) { animation-duration: 0.55s; animation-delay: -0.1s; }
.svc-meter i:nth-child(5) { animation-duration: 0.84s; animation-delay: -0.35s; }
@keyframes meter { 0% { transform: scaleY(0.15); } 100% { transform: scaleY(1); } }
/* solo se mueven los vúmetros del panel abierto */
.svc-panel:not(.active) .svc-meter i { animation-play-state: paused; }
.svc-body {
  left: 28px;
  top: 40px;
  width: min(470px, calc(0.58 * (100vw - 80px) - 64px)); /* depende de la pantalla, no del panel: al cerrarse el panel el texto no se recoloca, solo se recorta y se funde */
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.22s ease-out, transform 0.3s ease-out;
}
.svc-panel.active .svc-body {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.6s var(--ease) 0.3s, transform 0.7s var(--ease) 0.3s;
}
.svc-tc { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.svc-body h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; font-stretch: 110%; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 12px; }
.svc-body p { color: var(--text-2); font-size: 15.5px; line-height: 1.55; max-width: 42ch; }
.svc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.svc-tags li { padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: rgba(236, 232, 227, 0.06); border: 1px solid var(--line); }

/* trabajos: selección por cliente */
.projects { padding: clamp(88px, 13vh, 150px) 0 clamp(40px, 6vh, 70px); border-top: 1px solid var(--line); }
.projects-head { margin-bottom: clamp(30px, 5vh, 54px); }
.projects-head .h2 { margin-bottom: 14px; }
.plist { border-top: 1px solid var(--line); }
.prow {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) 2fr;
  gap: clamp(16px, 3vw, 44px);
  align-items: start;
  padding: clamp(22px, 3.4vw, 36px) 0;
  border-bottom: 1px solid var(--line);
}
.pmeta h3 { font-size: clamp(21px, 2.2vw, 28px); font-weight: 700; font-stretch: 110%; letter-spacing: -0.025em; margin-bottom: 6px; }
.pmeta p { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 30ch; }
.pmedia { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.2vw, 14px); }
.pshot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  text-align: left;
}
.pshot img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--z, 1)); transition: transform 0.8s var(--ease), filter 0.4s; filter: brightness(0.9); }
.pshot:hover img { transform: scale(calc(var(--z, 1) * 1.03)); filter: none; }
.pshot-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  font-size: 13px;
  font-weight: 500;
}
.pshot-cap small { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.pshot-cap em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.screen-play {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.screen-play i { margin-left: 3px; }
.pshot:hover .screen-play, .pshot:focus-visible .screen-play { opacity: 1; transform: none; }

/* archivo: mosaico con zoom de cámara al pasar el ratón */
.wall { padding: clamp(40px, 6vh, 70px) 0 clamp(88px, 13vh, 150px); overflow: clip; }
/* mientras la cámara se acerca, el mosaico tapa el título: se apaga para que no asome entre miniaturas */
.wall-head { position: relative; transition: opacity 0.35s var(--ease), visibility 0s linear 0s; }
.wall.zoomed .wall-head { opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s; }
.mosaic { z-index: 1; }
.wall-hint { color: var(--muted); font-size: 14.5px; margin-bottom: clamp(22px, 4vh, 36px); }
.hint-touch { display: none; }
@media (hover: none) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
.mosaic { position: relative; width: min(1120px, 100% - 2 * clamp(16px, 4vw, 40px)); margin: 0 auto; }
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(6px, 0.8vw, 10px);
  transform-origin: 0 0;
  will-change: transform;
}
.tile {
  --i: 0;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  container-type: inline-size;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease) calc(var(--i) * 24ms), transform 0.7s var(--ease) calc(var(--i) * 24ms), filter 0.4s, border-color 0.3s;
}
.mosaic.in .tile { opacity: 1; transform: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--z, 1)); filter: brightness(0.85); transition: filter 0.4s, transform 0.8s var(--ease); }
.mosaic.zoom .tile { filter: brightness(0.42) saturate(0.7); }
.mosaic.zoom .tile.hot { filter: none; border-color: rgba(255, 106, 85, 0.6); }
.tile.hot img { filter: none; transform: scale(calc(var(--z, 1) * 1.04)); }
.tile-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16cqw 5cqw 4cqw;
  display: grid;
  gap: 0.6cqw;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  opacity: 0;
  transform: translateY(4cqw);
  transition: opacity 0.35s, transform 0.45s var(--ease);
}
.tile-cap strong { font-size: 5.6cqw; font-weight: 600; line-height: 1.15; }
.tile-cap span { font-size: 4.3cqw; color: var(--text-2); }
.tile.hot .tile-cap { opacity: 1; transform: none; }
.tile-play {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 17cqw;
  height: 17cqw;
  margin: -8.5cqw 0 0 -8.5cqw;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font-size: 5cqw;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.tile-play i { margin-left: 1cqw; }
.tile.hot .tile-play { opacity: 1; transform: none; }
/* táctil: sin zoom; el título siempre visible y un toque reproduce */
@media (hover: none) {
  .tile-cap { opacity: 1; transform: none; padding-top: 22cqw; }
  .tile-cap strong { font-size: 7cqw; }
  .tile-cap span { font-size: 5.6cqw; }
  .tile img { filter: none; }
}

/* sobre mí: texto y hoja de datos, como una hoja de créditos */
.about { border-top: 1px solid var(--line); }
.about-photo { position: relative; margin-bottom: clamp(40px, 7vh, 72px); }
.about-photo picture { display: block; border-radius: 16px; overflow: hidden; background: var(--surface); }
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2000 / 770;
  object-fit: cover;
  object-position: 50% 50%;
  /* el etalonaje de cine (sombras frías, luces cálidas, grano) va ya en la propia foto */
}
.about-photo figcaption { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.about-id { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 20px); margin-bottom: clamp(24px, 4vh, 36px); }
.about-id .h2 { margin-bottom: 0; }
.avatar { width: clamp(60px, 6vw, 76px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 550;
  font-size: 14.5px;
  transition: border-color 0.2s, background 0.2s;
}
.link:hover { border-color: rgba(236, 232, 227, 0.45); background: var(--surface); }
.sheet-list { border-top: 1px solid var(--line-strong); margin-top: clamp(4px, 1vw, 12px); }
.sheet-list div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sheet-list dt { font-size: 13.5px; font-weight: 500; color: var(--muted); padding-top: 2px; }
.sheet-list dd { font-size: 16px; line-height: 1.45; color: var(--text); }

/* contacto */
.contact { border-top: 1px solid var(--line); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.direct { list-style: none; margin-top: 28px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.direct li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.direct li > a:first-child { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 550; }
.direct li > a:first-child i { width: 18px; color: var(--accent); }
.direct li > a:first-child:hover { color: #fff; }
.copy, .wa { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); }
.copy:hover, .wa:hover { color: var(--text); border-color: var(--line-strong); }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.form em { font-style: normal; color: var(--muted); font-weight: 400; }
.form input, .form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 13px 15px;
  border-radius: 10px;
  background: rgba(236, 232, 227, 0.04);
  border: 1px solid rgba(236, 232, 227, 0.16);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}
.form input:focus, .form textarea:focus { border-color: rgba(236, 232, 227, 0.5); background: rgba(236, 232, 227, 0.07); }
.form [aria-invalid="true"] { border-color: var(--accent); }
.form-note { font-size: 14px; line-height: 1.5; color: var(--text-2); padding: 12px 14px; border-radius: 10px; background: rgba(236, 232, 227, 0.05); border: 1px solid var(--line); }
.err { font-size: 13px; color: #ff8f7e; min-height: 0; }
.err:empty { display: none; }
.form .cta { border: 0; flex: none; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; color: var(--text-2); min-height: 1.4em; flex: 1 1 200px; line-height: 1.5; }

/* sesión de grabación */
.rec {
  gap: 14px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}
.rec-head { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 74, 61, 0.28); transition: background 0.25s; }
.rec.recording .rec-dot { background: #ff4a3d; animation: recblink 1s steps(2, start) infinite; }
.rec.recording .rec-state { color: var(--text); }
@keyframes recblink { to { opacity: 0.35; } }
.rec-tc { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--accent); font-variant-numeric: tabular-nums; text-transform: none; }
.rec-wave { display: block; width: 100%; height: 48px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); }
.lbl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lvl { --lv: 0; display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.lvl i { width: 3px; height: 100%; border-radius: 1px; background: var(--c, var(--accent)); transform-origin: bottom; transform: scaleY(calc(0.12 + var(--lv) * var(--k, 1))); opacity: calc(0.3 + var(--lv)); }
.lvl i:nth-child(1) { --k: 0.55; } .lvl i:nth-child(2) { --k: 0.85; } .lvl i:nth-child(3) { --k: 0.7; } .lvl i:nth-child(4) { --k: 0.95; } .lvl i:nth-child(5) { --k: 0.6; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 26px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.foot-links { display: flex; gap: 8px; }
.foot-links a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: background 0.2s;
}
.foot-links a:hover { background: var(--surface-2); }

/* reproductor */
.player {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.player[hidden] { display: none; }
.player-scrim { position: fixed; inset: 0; background: rgba(8, 7, 7, 0.9); }
/* caja: vídeo a la izquierda, ficha técnica a la derecha */
.player-box {
  position: relative;
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 330px);
  align-items: stretch;
}
.player-bg { position: absolute; inset: 0; border-radius: 18px; background: linear-gradient(180deg, #161514, #0e0d0d); border: 1px solid var(--line); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); }
.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 10px 0 10px 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  transform-origin: 0 0;
  will-change: transform;
}
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transition: opacity 0.5s 0.3s; }
/* con el vídeo cargado la miniatura se va: en los vídeos 4:3 se veía por detrás de las bandas laterales */
.player-frame.live .player-poster { opacity: 0; }
/* fin del vídeo: se tapa la pantalla final de Vimeo (otros vídeos) con la miniatura y "Volver a ver" */
.player-frame.live.ended iframe { visibility: hidden; opacity: 0; pointer-events: none; transition: none; }
.player-frame.ended .player-poster { opacity: 0.35; transition-delay: 0s; }
.player-replay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.player-replay:hover { background: #fff; transform: translate(-50%, -50%) scale(1.03); }
.player-frame.ended .player-replay { display: inline-flex; animation: overlayIn 0.35s ease both; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity 0.4s; }
.player-frame.live iframe { opacity: 1; }
.player-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(236, 232, 227, 0.08);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}
.player-close:hover { background: var(--text); color: var(--bg); }

.ficha { position: relative; padding: 30px 28px 28px; display: flex; flex-direction: column; min-width: 0; }
.ficha-k { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.ficha h2 { font-size: clamp(21px, 1.9vw, 26px); font-weight: 700; font-stretch: 108%; letter-spacing: -0.02em; line-height: 1.12; padding-right: 36px; text-wrap: balance; }
.ficha-dl { margin-top: 22px; border-top: 1px solid var(--line); }
.ficha-dl > div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; }
.ficha-dl dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ficha-dl dd { color: var(--text); }
.ficha-dl dd.pend { color: var(--muted); opacity: 0.55; font-style: italic; }
.ficha-reto { margin-top: 22px; }
.ficha-reto h3 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.ficha-reto p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 900px) {
  .player { place-items: start center; }
  .player-box { grid-template-columns: 1fr; }
  .player-frame { margin: 8px 8px 0; }
  .ficha { padding: 22px 20px 24px; }
  .ficha h2 { padding-right: 0; }
  .player-close { top: auto; bottom: calc(100% + 10px); right: 0; }
  .player-box { margin-top: 52px; }
}

/* ---------- Entradas ---------- */
.anim {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } }
@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes headlineIn { to { opacity: 1; transform: none; } }
@keyframes overlayIn { from { opacity: 0; } }
@keyframes menuIn { from { opacity: 0; transform: translate(-50%, -16px) scale(0.95); } }
@keyframes linkIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Menú móvil ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(8, 7, 7, 0.8);
  animation: overlayIn 0.28s ease both;
}
.sheet {
  position: fixed;
  z-index: 25;
  top: calc(clamp(16px, 2.4vh, 28px) + 60px);
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 380px);
  padding: 14px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  animation: menuIn 0.6s var(--ease) both;
}
.sheet nav { display: flex; flex-direction: column; gap: 2px; }
.sheet a {
  display: block;
  padding: 14px 10px;
  text-align: center;
  font-weight: 550;
  font-size: 17px;
  color: var(--text);
  border-radius: 12px;
  animation: linkIn 0.55s var(--ease) both;
  animation-delay: calc(0.14s + var(--i) * 0.08s);
}
.sheet a:hover { background: rgba(236, 232, 227, 0.06); }
.sheet .sheet-cta { position: relative; margin-top: 9px; color: var(--accent); }
.sheet .sheet-cta::before { content: ""; position: absolute; top: -6px; left: 10px; right: 10px; height: 1px; background: var(--line); }
.overlay[hidden], .sheet[hidden] { display: none; }

/* ---------- Adaptación ---------- */
@media (max-width: 960px) {
  .client-groups { grid-template-columns: 1fr 1fr; }
  .mosaic-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-wrap, .about-grid { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 1fr; gap: 16px; }
  .pmeta p { max-width: 60ch; }
}
@media (max-width: 760px) {
  .svc { flex-direction: column; height: auto; }
  .svc-panel { flex: none; height: 76px; }
  .svc-panel.active { flex: none; height: 520px; }
  .svc-vert { writing-mode: horizontal-tb; left: 54px; top: 25px; font-size: 18px; }
  .svc-panel.active .svc-vert { transform: translateY(-8px); }
  .svc-ico { top: 28px; }
  .svc-meter { top: 22px; height: 30px; }
  .svc-body { left: 20px; top: 28px; width: calc(100% - 40px); }
  .svc-panel::after { background: linear-gradient(180deg, rgba(14, 13, 13, 0.96) 42%, rgba(14, 13, 13, 0.5) 60%, rgba(14, 13, 13, 0) 76%); }
  .svc-tl { height: 40%; transition: opacity 0.4s; }
  .svc-panel:not(.active) .svc-tl { opacity: 0; }
}
@media (max-width: 720px) {
  .nav, .nav-cta { display: none; }
  .header { grid-template-columns: 1fr auto; max-width: none; }
  .burger {
    position: relative;
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
  }
  .burger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 1.5px;
    margin: -0.75px 0 0 -9px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.2s;
  }
  .burger span:nth-child(1) { transform: translateY(-6.5px); }
  .burger span:nth-child(3) { transform: translateY(6.5px); }
  .menu-open .burger span:nth-child(1) { transform: rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: rotate(-45deg); }
  .headline { font-stretch: 108%; }
  .facts { font-size: 13px; }
  .facts li { padding: 0 12px; }
}
@media (max-width: 560px) {
  .hero { justify-content: flex-start; padding-top: clamp(24px, 4.5svh, 64px); } /* el texto queda por encima de la onda de puntos */
  .hero-section, .page { min-height: max(100svh, 620px); } /* en móviles bajos la onda no se mete bajo el texto */
  .mosaic-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-row { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
  .cta, .ghost { justify-content: center; }
  .ghost { flex-wrap: wrap; column-gap: 10px; row-gap: 0; padding: 9px 22px; }
  .ghost small { flex-basis: 100%; text-align: center; }
  .sheet-list div { grid-template-columns: 1fr; gap: 4px; }
  /* recorte propio para móvil: estudio-movil.webp. Con una foto puesta desde el editor,
     --pos-movil dice qué parte de la foto se ve (0% = izquierda, 100% = derecha) */
  .about-photo img { aspect-ratio: 1026 / 770; object-position: var(--pos-movil, 50%) 50%; }
  .facts { flex-direction: column; align-items: center; gap: 4px; }
  .facts li + li { border-left: 0; }
}
@media (max-height: 700px) {
  .sub { margin-top: 12px; }
  .cta-row { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .header, .anim, .headline span, .overlay, .sheet, .sheet a {
    animation: none !important;
    opacity: 1 !important;
    transform: none;
  }
  .sheet { transform: translateX(-50%); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .svc-panel { clip-path: none !important; }
  .svc-meter i { animation: none; transform: scaleY(0.6); }
  html { scroll-behavior: auto; }
}
