/* ==========================================================================
   Ilusionistas — sistema visual (bloqueado desde Figma)
   Negro/blanco/grises estrictos · Poppins (display) + Jost (cuerpo)
   ========================================================================== */

:root {
  --black: #0e0e0e;
  --near-black: #191919;
  --white: #ffffff;
  --off-white: #f1f1f1;
  --gray-line: #ececec;
  --gray-soft: #9a9a9a;
  --gray-text: #636363;
  --hero-bg: #222222;
  --card-bg: #2b2b2b;
  --card-bg-2: #161616;
  --cream: var(--gray-line); /* mismo valor que --gray-line */

  /* Tipografías del Manual de Identidad: Questrial (títulos, solo Regular) + DM Sans (texto) */
  --font-display: "DM Sans", "Helvetica Neue", Arial, sans-serif; /* títulos en DM Sans Bold (opción C); Questrial queda disponible en --font-questrial */
  --font-questrial: "Questrial", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 700;

  --container: 1200px;
  --edge: 64px;
  --header-h: 92px;

  /* Ritmo, radios y líneas (escala de 8 px) */
  --section-y: 120px;
  --gutter: 16px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --divider-light: rgba(14, 14, 14, 0.15);
  --divider-dark: rgba(255, 255, 255, 0.08);
  --logo-scale: 1;
}

@media (max-width: 780px) {
  :root { --edge: 24px; --section-y: 80px; --logo-scale: 0.75; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; } /* los anclajes no quedan debajo del menú fijo */
/* Portafolio y Contacto: el ancla salta el padding superior de la sección,
   así el título queda justo debajo del menú (menú compacto ≈ 76 px + 32 px de aire) */
:root { --anchor-offset: 108px; }
#portafolio, #contacto, #servicios { scroll-margin-top: calc(var(--anchor-offset) - var(--section-y)); }
#footer { scroll-margin-top: calc(var(--anchor-offset) - 96px); }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.wrap {
  max-width: calc(var(--container) + 2 * var(--edge));
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0 0;
  transition: padding 0.35s ease, background 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(14, 14, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--edge);
}

.logo-link { display: flex; align-items: center; }
.logo-link img { height: 28px; width: auto; }

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

nav.primary-nav .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--white);
  background: none;
  border: none;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0.9;
  padding: 0 0 4px;
}
nav.primary-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--white);
  transition: right 0.3s ease;
}
nav.primary-nav .nav-link:hover { opacity: 1; }
nav.primary-nav .nav-link:hover::after { right: 0; }

/* ---------- Dropdown "Servicios" ---------- */

.nav-item { position: relative; display: flex; align-items: center; } /* evita el desfase de 2 px del botón vs. los enlaces */
.nav-item::before {
  /* puente invisible para que el hover no se pierda entre el botón y el menú */
  content: "";
  position: absolute;
  top: 100%; left: -20px; right: -20px;
  height: 14px;
}
.nav-dropdown-trigger svg {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.nav-item:hover .nav-dropdown-trigger svg,
.nav-item.is-open .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  background: var(--near-black);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 232px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  z-index: 60;
}
.nav-item:hover .nav-dropdown,
.nav-item.is-open .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--white);
  opacity: 0.82;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.nav-dropdown a:hover { background: rgba(255, 255, 255, 0.08); opacity: 1; }

.btn-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease;
}
.btn-quote:hover { transform: translateY(-2px); background: var(--off-white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.6px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 24px;
  padding: 96px 24px 48px;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(.65,0,.35,1);
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav a {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 24px;
  color: var(--white);
}
.mobile-nav .btn-quote { margin-top: 16px; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--black); }

@media (max-width: 780px) {
  nav.primary-nav .nav-link, nav.primary-nav .btn-quote { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero (con video de fondo) ---------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--hero-bg) center / cover no-repeat; /* póster de respaldo mientras carga el video */
}

.hero-media iframe,
.hero-media video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 */
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: none;
}

.hero-media .hero-placeholder-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, #2c2c2c 0%, #161616 60%, #0a0a0a 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0.22) 45%, rgba(6,6,6,0.68) 100%);
}

.hero-pending-tag {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px dashed rgba(255,255,255,0.3);
  padding: 6px 12px;
  border-radius: 100px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

h1.hero-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.75rem, 7vw, 5.5rem); /* 88 px en escritorio, 44 en celular */
  line-height: 1.08;
  margin: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll .line {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.4);
  overflow: hidden;
  position: relative;
}
.hero-scroll .line::after {
  content: "";
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: #fff;
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- Intro (foto + texto) ---------- */

.intro {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--card-bg-2); /* fallback tras la capa de parallax */
}

.intro-bg {
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.18) 55%, rgba(0,0,0,0.4) 100%);
}

.intro-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--edge));
  margin: 0 auto;
  padding: var(--section-y) var(--edge);
}
.intro-content > * { max-width: 520px; }

h2.intro-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 24px;
}

p.intro-lede {
  font-size: 18px;
  line-height: 1.5;
  color: var(--off-white);
  margin: 0 0 56px;
  max-width: 480px;
}
p.intro-lede strong { font-weight: 600; color: var(--white); }

.credit-tag {
  font-size: 14px;
  color: var(--white);
}
.credit-tag .brand { font-weight: 600; }
.credit-tag .sep { opacity: 0.5; margin: 0 8px; }
.credit-tag .role { opacity: 0.85; }

/* Poster del hero: la imagen de fondo se ve hasta que el video realmente empieza a reproducirse */
.js .hero-media iframe { opacity: 0; transition: opacity 0.8s ease; }
.js .hero-media.is-playing iframe { opacity: 1; }

/* Intro "dividida" (home y servicios): título arriba, texto abajo, foto B/N a sangre */
.intro--split {
  min-height: clamp(600px, 66vw, 960px);
  align-items: stretch;
}
.intro--split::before {
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.3) 100%);
}
.intro--split .intro-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
}
.intro--split h2.intro-title {
  max-width: none;
  font-size: clamp(2.125rem, 5.2vw, 4.75rem); /* 34 px en celular para que "Producción en vivo," quepa en una línea */
  line-height: 1.12;
  margin: 0;
}
.intro--split p.intro-lede {
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.4;
  max-width: 18.5em; /* corta igual que el diseño: "…historias / que conectan… / generan impacto." */
  margin: 0 0 32px;
}
.intro--split p.intro-lede strong { font-weight: 700; }
.intro--split .credit-tag { font-size: 16px; margin: 0; }

/* Variante 16:9 con la foto anclada a la derecha (texto a la izquierda sobre el fondo extendido) */
.intro--wide { min-height: clamp(600px, 56.25vw, 1080px); }
.intro--wide .intro-bg { top: 0; height: 100%; background-position: right center; } /* sin sobre-escala del parallax: la foto se ve completa, como en el diseño */

/* ---------- Portafolio ---------- */

.section-portfolio {
  background: var(--black);
  padding: var(--section-y) 0;
  text-align: center;
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.125rem, 5.2vw, 4.75rem); /* igual que "Del concepto a la entrega final." */
  line-height: 1.12;
  color: var(--white);
  margin: 0 0 16px;
}
.section-portfolio p.section-sub {
  max-width: 560px;
  margin: 0 auto 48px;
  color: var(--off-white);
  opacity: 0.85;
  font-size: 18px;
  line-height: 1.5;
  text-wrap: balance;
}

.play-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease;
}
.play-btn svg { margin-left: 3px; width: 20px; height: 20px; }

.pending-label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  border: 1px dashed rgba(255,255,255,0.32);
  padding: 6px 12px;
  border-radius: 100px;
}

.portfolio-main {
  position: relative;
  max-width: 900px;
  margin: 0 auto var(--gutter);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #333 0%, #141414 100%);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  width: 100%;
  font: inherit;
}
.portfolio-main .play-btn { width: 74px; height: 74px; position: relative; z-index: 1; }
.portfolio-main:hover .play-btn { transform: scale(1.08); }
.portfolio-main::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 55%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.portfolio-main.is-loaded::before { opacity: 1; }
.portfolio-main .video-card-skeleton { z-index: 0; }


/* ---------- Carrusel de miniaturas (con thumbnail real de Vimeo vía oEmbed) ---------- */

.portfolio-carousel {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.thumbs-row {
  display: flex;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0;
  margin: 0;
}
.thumbs-row::-webkit-scrollbar { display: none; }

.thumb {
  position: relative;
  flex: 0 0 auto;
  width: calc((100% - 2 * var(--gutter)) / 3); /* 3 miniaturas llenan exactamente el ancho del video */
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #2f2f2f 0%, #121212 100%);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.08);
  scroll-snap-align: start;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: border-color 0.25s ease, opacity 0.25s ease;
  opacity: 0.72;
}
.thumb:hover { opacity: 0.92; }
.thumb.is-active {
  opacity: 1;
  border-color: var(--white);
}
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
}
.thumb-caption {
  position: absolute;
  left: 16px; right: 16px; bottom: 12px;
  z-index: 1;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  color: var(--off-white);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.thumb.is-loaded .thumb-caption { opacity: 0.95; transform: translateY(0); }
.thumb-play {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.thumb:hover .thumb-play, .thumb.is-active .thumb-play { opacity: 1; transform: scale(1); }
.thumb-play svg { width: 10px; height: 10px; margin-left: 1px; }

.video-card-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, #1c1c1c 30%, #262626 50%, #1c1c1c 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.is-loaded .video-card-skeleton { display: none; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.carousel-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: none;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s ease, opacity 0.25s ease;
}
.carousel-arrow:hover { background: rgba(255,255,255,0.1); }
.carousel-arrow:disabled { opacity: 0.4; pointer-events: none; }

/* Portafolio "pendiente" (Streaming y Documentación de Obra) */
.portfolio-thumbs {
  display: flex;
  gap: var(--gutter);
  max-width: 900px;
  margin: 0 auto;
}
.portfolio-thumbs .thumb { flex: 1 1 0; width: auto; }
.portfolio-thumbs .thumb-caption { opacity: 0.95; transform: none; }

/* ---------- Lightbox de reproducción ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6,6,6,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-inner {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  transform: scale(0.96);
  transition: transform 0.35s ease;
}
.lightbox.is-open .lightbox-inner { transform: scale(1); }
.lightbox-inner iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.lightbox-close {
  position: absolute;
  top: -46px; right: 0;
  width: 34px; height: 34px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 30px;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

@media (max-width: 780px) {
  .thumb { width: 72%; }
  .portfolio-thumbs { flex-direction: column; }
  .portfolio-thumbs .thumb { flex: none; width: 100%; }
  .lightbox { padding: 24px 16px; }
  .lightbox-close { top: -38px; right: 0; }
}

/* ---------- Qué puedes lograr ---------- */

.section-lograr {
  background: var(--cream);
  padding: var(--section-y) var(--edge);
}
.lograr-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) 1px minmax(0, 6fr);
  gap: 64px;
  align-items: center;
}
.lograr-grid .divider { background: var(--divider-light); height: 100%; }
h2.lograr-heading {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.125rem, 5.2vw, 4.75rem); /* igual que "Del concepto a la entrega final." */
  line-height: 1.12;
  color: var(--black);
  margin: 0;
}
ul.lograr-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
}
ul.lograr-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 16px;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.5;
  color: #1a1a1a;
}
ul.lograr-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.75em; transform: translateY(-50%); /* centrado en la primera línea */
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--black);
}
.lograr-tag { font-size: 16px; color: var(--gray-text); }
.lograr-tag .brand { font-weight: 600; color: var(--black); }

@media (max-width: 900px) {
  .lograr-grid { grid-template-columns: 1fr; gap: 30px; }
  .lograr-grid .divider { display: none; }
}

/* ---------- Servicios grid (Home) ---------- */

.section-servicios {
  background: var(--card-bg-2); /* separa visualmente del bloque negro del portafolio */
  padding: var(--section-y) 0;
  text-align: center;
}
.servicios-grid {
  max-width: var(--container);
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gutter);
}
.servicio-tile {
  position: relative;
  aspect-ratio: 597/325;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.servicio-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 10%, rgba(0,0,0,0.05) 60%);
}
.servicio-tile:hover { transform: scale(1.02); }
.servicio-tile span {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.25rem, 2.2vw, 2rem); /* 32 px en escritorio, 20 en celular */
  color: var(--white);
  text-align: left;
  line-height: 1.2;
}

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

/* ---------- Clientes (marquee) ---------- */

.section-clientes {
  padding: var(--section-y) 0;
  text-align: center;
  overflow: hidden;
}
.section-clientes h2.section-title { color: var(--black); margin-bottom: 48px; }

.marquee-viewport {
  width: calc(100% - 2 * var(--edge));
  max-width: var(--container);
  margin: -16px auto; /* compensa el padding para no mover el espaciado */
  padding: 16px 0;   /* aire vertical para que el zoom del hover no recorte los logos */
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-viewport:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  display: block;
  /* Alto por logo (--h en el HTML) para igualar el peso óptico entre formatos anchos y cuadrados */
  height: calc(var(--h, 36px) * var(--logo-scale));
  width: auto;
  max-width: none;
  margin: 0 32px;
  flex: 0 0 auto;
  filter: grayscale(1);
  opacity: 0.7;
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}
.marquee-track img:hover { filter: none; opacity: 1; transform: scale(1.05); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 780px) {
  .marquee-track img { margin: 0 20px; }
}

/* ---------- Contacto + Footer ---------- */

.section-contact {
  background: var(--near-black);
  padding: var(--section-y) 0 calc(var(--section-y) * 0.8);
  text-align: center;
}
.section-contact h2.section-title { line-height: 1.1; }
.section-contact p.section-sub { max-width: 520px; margin: 0 auto 48px; color: var(--off-white); font-size: 18px; line-height: 1.5; text-wrap: balance; }

form.contact-form {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.form-field { margin-bottom: 32px; position: relative; }
.form-field label {
  display: block;
  font-size: 14px;
  color: var(--gray-soft);
  margin-bottom: 8px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 0 12px; /* sin sangría: el texto alinea con la etiqueta */
  outline: none;
  transition: border-color 0.25s ease;
  appearance: none;
}
.form-field select { padding-right: 24px; }
.form-field select option { color: var(--black); }
.form-field select:has(option:disabled:checked) { color: var(--gray-soft); } /* sin elegir = se ve como placeholder */
.form-field textarea { resize: none; min-height: 96px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--gray-soft); opacity: 1; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-bottom-color: var(--white); }
.select-chevron {
  /* Mismo chevron de línea que el menú "Servicios" */
  position: absolute; right: 2px; bottom: 19px;
  width: 8px; height: 6px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6' fill='none'%3E%3Cpath d='M1 1l3 3 3-3' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.contact-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px; margin-top: 8px;
}
.contact-note { font-size: 14px; color: var(--gray-soft); }
.btn-submit {
  /* Mismo estilo que "Cotiza un proyecto" */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 32px;
  background: var(--white);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: transform 0.25s ease, background 0.25s ease;
}
.btn-submit:hover { transform: translateY(-2px); background: var(--off-white); }

@media (max-width: 780px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-footer-row { flex-direction: column; align-items: stretch; gap: 16px; }
  .btn-submit { width: 100%; }
}
.form-success {
  display: none;
  margin-top: 18px;
  font-size: 14px;
  color: var(--white);
}
.form-success.is-visible { display: block; }
.form-error {
  display: none;
  margin-top: 16px;
  font-size: 14px;
  color: var(--off-white);
}
.form-error a { text-decoration: underline; }
.form-error.is-visible { display: block; }
.btn-submit:disabled { opacity: 0.6; pointer-events: none; }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80; /* debajo del menú móvil (90) y del reproductor (300) */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); background: var(--off-white); }
@media (max-width: 780px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 48px; height: 48px; }
  .whatsapp-float svg { width: 22px; height: 22px; }
}

/* Footer: marca + redes | dirección y contacto; abajo aviso de privacidad | copyright.
   Mismo ancho (760) y columnas que el formulario de contacto, para que todo alinee. */
footer.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 96px var(--edge) 80px;
}
footer.site-footer .footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 80px;
  align-items: start;
  font-size: 14px;
  line-height: 1.5;
}
.footer-logo-link { display: inline-block; }
.footer-logo { height: 40px; width: auto; margin: 0; }
.social-icons { display: flex; gap: 12px; margin-top: 40px; }
.social-icons a {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.9;
}
.social-icons a:hover { transform: translateY(-3px); opacity: 1; }
.social-icons svg { width: 100%; height: 100%; }
.footer-contact { font-style: normal; display: flex; flex-direction: column; gap: 16px; }
.footer-contact a, .footer-legal { color: var(--white); transition: opacity 0.2s ease; }
.footer-contact a:hover, .footer-legal:hover { opacity: 0.7; }
.footer-legal { justify-self: start; }
.footer-copy { margin: 0; color: var(--white); grid-column: 1 / -1; justify-self: start; } /* alineado a la izquierda, bajo el logo */

/* ---------- Cierre (foto B/N, páginas de servicio) ---------- */

.section-closing {
  /* Misma proporción que el diseño del home (≈2.9:1); el encuadre vertical se ajusta por página con --pos */
  height: max(300px, calc(100vw / 2.9));
  background-size: cover;
  background-position: 50% var(--pos, 50%);
}

/* Home: proporción del diseño (≈2.9:1) y encuadre hacia abajo para mostrar al staff y al talento completos */
.section-closing--home {
  --pos: 70%;
}

/* ---------- Scroll-reveal (GSAP hooks) ---------- */

/* Solo se ocultan si hay JS + GSAP; sin GSAP el contenido queda visible */
.js .reveal { opacity: 0; transform: translateY(24px); }

/* ---------- Lightbox (portafolio pendiente) ---------- */

.pending-toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--white);
  color: var(--black);
  padding: 14px 22px;
  border-radius: 100px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}
.pending-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Ajustes móviles ---------- */
@media (max-width: 780px) {
  .intro::before { background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 100%); }
  .footer-logo { height: 32px; }
  footer.site-footer { padding: 64px var(--edge) 48px; }
  footer.site-footer .footer-inner { grid-template-columns: 1fr; row-gap: 40px; }
  .social-icons { margin-top: 32px; }
}

/* ---------- Página legal (Aviso de Privacidad) ---------- */
.section-legal {
  background: var(--near-black);
  color: var(--off-white);
  padding: calc(var(--section-y) + 72px) 0 var(--section-y);
  min-height: 70vh;
}
.section-legal .wrap > * { max-width: 760px; }
h1.legal-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 8px;
}
.legal-updated { font-size: 14px; color: var(--gray-soft); margin: 0 0 48px; }
.legal-body { font-size: 16px; line-height: 1.7; }
.legal-body h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; color: var(--white); margin: 48px 0 16px; }
.legal-body a { color: var(--white); text-decoration: underline; }

/* ---------- Portafolio: portada + degradado en una sola capa ---------- */
/* El degradado oscuro y la portada van en el MISMO fondo (una sola capa). Antes el degradado era una capa aparte
   y en las orillas redondeadas quedaba un filo de 1 px con la foto a todo color. */
.portfolio-main {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.04) 55%, rgba(0,0,0,0.4) 100%),
    var(--bg-img, linear-gradient(135deg, #333 0%, #141414 100%));
  background-clip: padding-box;
}
.thumb {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%),
    var(--bg-img, linear-gradient(135deg, #2f2f2f 0%, #121212 100%));
  background-clip: padding-box;
}
.portfolio-main::before,
.thumb::after { content: none; }

/* ---------- Portafolio de fotos (Streaming / Documentación de Obra) ---------- */
.photo-card {
  flex: 0 0 auto;
  width: calc((100% - 2 * var(--gutter)) / 3);
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg-2);
  scroll-snap-align: start;
  cursor: zoom-in;
}
.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.photo-card:hover img { transform: scale(1.04); }
@media (max-width: 780px) {
  .photo-card { width: 72%; }
}
.lightbox--photo .lightbox-inner { width: auto; aspect-ratio: auto; }
.lightbox--photo img {
  display: block;
  max-width: min(90vw, 1100px);
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
}
.portfolio-carousel.no-overflow .carousel-nav { display: none; }

/* Poster del hero del home (B/N): encuadre con las cabezas completas; en celular se centra en el equipo de cámara */
.hero-media--home { background-position: 50% 30%; }
@media (max-width: 780px) {
  .hero-media--home { background-position: 74% 30%; }
}

/* Footer · contacto con íconos (opción B) */
.footer-contact { gap: 20px; }
.footer-item { display: flex; align-items: flex-start; gap: 12px; }
.footer-ico { flex: none; width: 16px; height: 16px; margin-top: 3px; opacity: 0.7; transition: opacity 0.2s ease; }
.footer-item:hover .footer-ico { opacity: 1; }

/* Aviso de privacidad: nota del formulario y detalles de la página legal */
.form-privacy { margin: 24px 0 0; font-size: 14px; color: var(--gray-soft); }
.form-privacy a { color: var(--off-white); text-decoration: underline; }
.legal-body ul { margin: 0 0 16px; padding-left: 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-fill { background: rgba(255,255,255,0.12); padding: 0 6px; border-radius: 3px; } /* dato pendiente de completar */

/* Videos Corporativos en celular: encuadre centrado en la mirada */
@media (max-width: 780px) {
  .intro--wide .intro-bg { background-position: 60% center; }
}
@media (max-width: 780px) {
  :root { --anchor-offset: 84px; } /* menú compacto en celular ≈ 60 px + 24 px de aire */
  #footer { scroll-margin-top: calc(var(--anchor-offset) - 64px); }
}

/* Cobertura de Eventos: foto 16:9 completa; en celular se centra en la colaboradora del frente */
.intro--eventos .intro-bg { background-position: center; }
@media (max-width: 780px) {
  .intro--eventos .intro-bg { background-position: 40% center; }
}
@media (min-width: 781px) {
  /* el título baja para no tapar la cara de la colaboradora (queda sobre su hombro, como en la referencia) */
  .intro--eventos .intro-content { padding-top: calc(var(--section-y) + 11vw); }
}
@media (max-width: 780px) {
  .intro--eventos .intro-content { padding-top: 232px; } /* en celular el título también queda debajo de la cara */
}

/* Títulos en DM Sans Bold: interletrado ligeramente cerrado para que se vean compactos */
h1.hero-title, h2.intro-title, h2.section-title, h2.lograr-heading, h1.legal-title, .servicio-tile span { letter-spacing: -0.01em; }

/* Campo trampa anti-spam: invisible para personas */
.form-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* WebP con respaldo JPG: <picture> no altera el acomodo de la foto */
.photo-card picture { display: contents; }
