/*
  Picby Studio — estilo base inspirado en apple.com: fondo blanco y gris muy claro,
  tipografía sistema, mucho espacio, y un h1 con efecto "liquid crystal".
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7; /* Gris muy clarito (estilo Apple) */
  --fg: #1d1d1f;     /* Gris muy oscuro, no negro puro */
  --muted: #6e6e73;
  --hairline: #e5e5ea;
  --surface: #ffffff; /* Tarjetas/pastillas */
  --nav-bg: rgba(255,255,255,0.7);
  --btn-bg: #ffffff;
  --btn-fg: #1d1d1f;
  --btn-primary-bg: #000000;
  --btn-primary-fg: #ffffff;
  --radius: 18px;
  --maxw: 1200px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --logo-h: 20px;
  --nav-h: 56px; /* altura usada para menú móvil */
  --anchor-offset: 84px; /* Compensa header sticky */
}

/* Dark theme variables */
[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0f0f12;
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --hairline: #2c2c2e;
  --surface: #111114;
  --nav-bg: rgba(0,0,0,0.7);
  --btn-bg: #1b1b1d;
  --btn-fg: #f5f5f7;
  --btn-primary-bg: #ffffff;
  --btn-primary-fg: #000000;
  --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll suave para anclas */
html { scroll-behavior: smooth; }

/* Compensar el header sticky en anclas */
.section, .hero { scroll-margin-top: var(--anchor-offset); }
@media (max-width: 768px) { :root { --anchor-offset: 92px; } }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Contenedor a ancho completo (sin límite de max-width) */
.container-wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus { left: 12px; top: 12px; background:#000; color:#fff; padding:8px 12px; border-radius: 8px; }

/* Reel (showreel de portada) */
.reel { background: var(--bg); }
.reel-wrap {
  position: relative;
  width: 100%;
  height: min(70vh, 760px);
  max-height: 760px;
  overflow: hidden;
}
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-overlay { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: auto; }
.reel-gradient { pointer-events: none; }
.reel-hero { pointer-events: auto; }
.reel-gradient { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.0) 75%); }
.reel-hero { position: relative; text-align: center; color: #fff; padding: clamp(36px, 6vw, 72px) 0; }
.reel-hero .hero-subtitle { color: rgba(255,255,255,0.85); }
.reel-hero .hero-actions { display: flex; justify-content: center; gap: 12px; }
.reel-hero .button { 
  background: transparent; 
  color: rgba(255,255,255,0.92); 
  border-color: rgba(255,255,255,0.6);
}
.reel-hero .button.primary { background: #ffffff; color: #000000; border-color: #ffffff; }
@media (hover:hover) {
  .reel-hero .button:hover { 
    color: #ffffff; 
    border-color: #ffffff; 
    background: rgba(255,255,255,0.08);
  }
  .reel-hero .button.primary:hover { filter: brightness(0.98); }
}
.reel-sound {
  position: absolute; right: 14px; bottom: 14px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--btn-bg);
  color: var(--fg);
  cursor: pointer;
}
@media (max-width: 640px) { .reel-wrap { height: min(52vh, 420px); } }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.logo img, .logo-img { height: var(--logo-h); max-height: var(--logo-h); width: auto; display: block; }
.logo-text { display: inline-block; }

/* Altura de barra ligeramente mayor en móvil */
@media (max-width: 768px) {
  .nav-inner { min-height: 56px; }
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 500;
}
.nav-links a.cta {
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--btn-bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
@media (hover:hover) {
  .theme-toggle:hover { filter: brightness(0.98); }
}
.theme-text { font-weight: 600; }
@media (max-width: 480px) { .theme-text { display: none; } }

/* Menú móvil (hamburguesa) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--btn-bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.nav-toggle-icon {
  position: relative; width: 18px; height: 2px; background: currentColor; display: inline-block;
}
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; transform-origin: center; transition: transform .18s ease, opacity .18s ease; 
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after  { top:  6px; }
.nav.is-open .nav-toggle-icon { background: transparent; }
.nav.is-open .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle-icon::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links { 
    position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 19;
    display: none; /* se muestra con .nav.is-open */
    flex-direction: column; gap: 8px;
    padding: 14px 16px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links a { margin: 0; padding: 10px 12px; display: block; }
  .nav-links .cta { text-align: center; }
  .theme-toggle { width: 100%; justify-content: center; }
  .nav.is-open .nav-links { display: flex; }
  .nav-toggle { display: inline-flex; }
}

/* Hero */
.hero {
  background: var(--bg);
}
.hero-inner {
  padding: 96px 0 56px;
  text-align: center;
}

/* Hero para páginas de servicio */
.hero-service {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
}
/* Cabecera encima del vídeo, fondo blanco y texto negro */
.hero-service .hero-head {
  background: #ffffff;
  color: #000000;
  padding: clamp(36px, 8vw, 80px) 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.hero-service .hero-head .section-title { margin-bottom: 8px; color: #000000; }
.hero-service .hero-head .lead { max-width: 900px; color: #000000; }
/* Contenedor del vídeo con recorte progresivo y esquinas redondeadas */
.hero-service .hero-video {
  position: relative;
  height: calc(100vh - var(--hero-head-h, 0px));
  overflow: hidden;
  background: #000;
  clip-path: inset(var(--hero-inset-top, 0%) var(--hero-inset-x, 0%) var(--hero-inset-bottom, 0%) var(--hero-inset-x, 0%) round var(--hero-radius, 0px));
  transition: clip-path .12s ease-out;
  will-change: clip-path;
  transform: translateZ(0);
}
.hero-service .hero-video video, .hero-service .hero-video img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}

/* H1 con efecto "liquid crystal" */
.hero-title {
  font-size: clamp(48px, 9vw, 108px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  position: relative;
  display: inline-block;
  color: transparent;
  background: 
    radial-gradient(120% 120% at 0% 100%, rgba(0,255,213,0.35) 0%, rgba(0,255,213,0.0) 45%),
    radial-gradient(120% 120% at 100% 0%, rgba(122,92,255,0.35) 0%, rgba(122,92,255,0.0) 45%),
    conic-gradient(from 180deg at 50% 50%, rgba(0,255,213,0.55), rgba(122,92,255,0.55), rgba(255,138,0,0.55), rgba(255,61,119,0.55), rgba(0,255,213,0.55));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.25));
  animation: liquid 12s ease-in-out infinite alternate;
}
.hero-title::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@keyframes liquid {
  0% { background-position: 0% 50%; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.25)); }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  margin: 16px auto 28px;
  max-width: 800px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
}
.hero-actions { display: flex; justify-content: center; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
  background: var(--btn-bg);
}
.button.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}

/* Secciones */
.section { padding: 72px 0; background: var(--bg); }
.section.alt { background: var(--bg-alt); }
.section.section-video { background: transparent; position: relative; display: grid; padding: 72px 0; }
.section.section-video > .bg-video,
.section.section-video > .section-content { grid-area: 1 / 1; }
.section.section-video > .section-content { position: relative; z-index: 2; }

/* Sticky background video para efecto parallax limitado a la sección */
.bg-video { position: sticky; top: 0; height: 100vh; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-video-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05) contrast(1.05); }
.bg-video-overlay { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 50%, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.13) 40%, rgba(0,0,0,0.08) 75%, rgba(0,0,0,0.0) 100%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .bg-video { position: relative; height: 56vh; } }

/* Móvil: el video cubre toda la altura de la sección */
@media (max-width: 768px) {
  .section.section-video { position: relative; }
  .section.section-video > .bg-video { position: absolute; inset: 0; height: 100%; }
}

/* Muy pequeño: ocultar video y usar fondo legible */
@media (max-width: 480px) {
  .section.section-video > .bg-video { display: none; }
  .section.section-video { background: linear-gradient(180deg, #0c0c10 0%, #000000 100%); }
}

/* Si el usuario prefiere menos movimiento: en móvil ocultamos el vídeo */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  .section.section-video > .bg-video { display: none; }
  .section.section-video { background: linear-gradient(180deg, #0c0c10 0%, #000000 100%); }
}

.section-title {
  margin: 0 0 24px 0;
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.02em;
}
/* Utilidad para títulos sobre vídeo/fondos complejos */
.title-on-video {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 1px 1px rgba(0,0,0,0.6);
}
.lead { color: var(--muted); }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumb a:hover { border-bottom-color: currentColor; }
.breadcrumb .sep { opacity: 0.6; }

/* Galería simple */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery .media { aspect-ratio: 16/9; }

/* Video ancho bajo cards en servicios */
.service-video-block { margin-top: 22px; }
.ratio { position: relative; width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ratio-16x9 { padding-bottom: 56.25%; }
.ratio-9x16 { padding-bottom: calc(100% * 16 / 9); }
/* Prefer modern aspect-ratio when available */
@supports (aspect-ratio: 1) {
  .ratio-9x16 { padding-bottom: 0; aspect-ratio: 9 / 16; }
}
/* Ensure a comfortable minimum height across breakpoints (bumped) */
@media (min-width: 1100px) { .ratio-9x16 { min-height: 640px; } }
@media (max-width: 1099px) and (min-width: 820px) { .ratio-9x16 { min-height: 520px; } }
@media (max-width: 819px) and (min-width: 640px) { .ratio-9x16 { min-height: 460px; } }
@media (max-width: 639px) { .ratio-9x16 { min-height: 380px; } }
.tile-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.0)); pointer-events: none; z-index: 1; }
.tile-label { position: absolute; left: 12px; bottom: 10px; color: #fff; font-weight: 800; letter-spacing: -0.01em; z-index: 2; text-shadow: 0 2px 8px rgba(0,0,0,0.45), 0 1px 1px rgba(0,0,0,0.6); font-size: clamp(16px, 2.4vw, 20px); }
.tile-plus { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 999px; background: #ffffff; color: #000000; display: grid; place-items: center; font-weight: 900; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
/* Ajuste de máscara para tile de Consistencia: menos cobertura para mostrar más imagen */
.tile--consistencia .tile-scrim { height: 30%; }
@media (hover:hover) {
  .card .media-el { transition: transform .25s ease; }
  /* Desactivar zoom del vídeo en tiles y ampliar la caja completa por defecto */
  .tile:hover .media-el { transform: none; }
  .tile { transition: transform .25s ease, box-shadow .25s ease; }
  .tile:hover { transform: translateY(-1px) scale(1.02); }

  /* Permitir zoom suave del contenido sólo en tiles marcados */
  .tile.tile--content-zoom .media-el { transition: transform .35s ease; }
  .tile.tile--content-zoom:hover .media-el { transform: scale(1.045) !important; }
}
.card:focus-visible { outline: 2px solid rgba(122,92,255,0.6); outline-offset: 2px; }
.tile:focus-visible { transform: translateY(-1px) scale(1.02); }

/* Modal flotante tipo Apple focus */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 120% at 0% 100%, rgba(0,255,213,0.18) 0%, rgba(0,255,213,0.0) 45%),
    radial-gradient(120% 120% at 100% 0%, rgba(122,92,255,0.18) 0%, rgba(122,92,255,0.0) 45%),
    linear-gradient(0deg, rgba(0,0,0,0.45), rgba(0,0,0,0.45));
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
}
.modal-dialog {
  position: relative; z-index: 1;
  width: min(900px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35), var(--shadow);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.modal.is-open .modal-dialog { transform: translateY(0) scale(1); opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.modal-title { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.modal-close { border: 1px solid var(--hairline); background: var(--btn-bg); color: var(--fg); border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.modal-body { position: relative; padding: 16px; overflow: auto; flex: 1 1 auto; max-height: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.modal-body .prose { max-width: 820px; margin: 0 auto; font-size: clamp(18px, 2.2vw, 20px); line-height: 1.65; color: var(--fg); letter-spacing: -0.005em; }
.modal-body .prose p { margin: 0 0 16px 0; }
.modal-body .prose figure { margin: 18px auto; max-width: 720px; }
.modal-body .prose img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
/* removed .prose .block to restore previous look */
.modal-body .prose strong { color: #000; font-weight: 800; }
[data-theme="dark"] .modal-body .prose strong { color: #fff; }
.modal-media { width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  .tile:hover { transform: none; }
  .modal-dialog { transition: none; transform: none; }
}

/* Evitar scroll de fondo al abrir modal */
.no-scroll { overflow: hidden; }
.ratio > .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Asegurar estilos también cuando la imagen va envuelta en <picture> */
.ratio .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Variante para encajar sin recortar */
.ratio .media-el.fit-contain { object-fit: contain; object-position: center center; background: #000; }
/* util: encajar imagen completa sin recorte en cajas ratio */
.ratio > .media-el.fit-contain { object-fit: contain; object-position: center center; background: #000; }

/* CTA card */
.cta-card { text-align: center; padding: 28px 24px; }
.cta-card .lead { margin-bottom: 16px; }
.cta-card .button { margin-top: 16px; }

/* Servicios visuales */
.service-list { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .service-list { grid-template-columns: 1fr; } }
.service-mini { 
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center;
  grid-template-columns: 72px 1fr;
  padding: 22px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(0,0,0,0.28);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 12px 32px rgba(0,0,0,0.14);
  min-height: 132px;
  color: #ffffff;
  text-decoration: none; /* si es <a> */
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}
[data-theme="dark"] .service-mini {
  border-color: rgba(255,255,255,0.20);
  background: rgba(0,0,0,0.34);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.4);
}
.service-mini::before { content: none; }
.service-mini::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.08);
}
.service-copy h3 { position: relative; z-index: 1; }
.service-copy p, .service-link { position: relative; z-index: 1; }

.service-icon { width: 72px; height: 72px; display: block; }
.service-copy h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; color: #ffffff; }
.service-copy p { margin: 0 0 10px; color: #ffffff; font-size: 16px; }
.service-link { color: #ffffff; text-decoration: none; border-bottom: 1px solid #ffffff; }
.service-mini:link, .service-mini:visited, .service-mini a:link, .service-mini a:visited { color: #ffffff; text-decoration: none; }
@media (hover:hover) { .service-mini:hover { transform: translateY(-1px) scale(1.02); box-shadow: var(--shadow); } }
.service-mini:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }

/* Grid de trabajos */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* Grid responsivo fluido para cards (se adapta al ancho) */
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 480px) { .grid-auto { grid-template-columns: 1fr; } }

.card {
  display: block; /* permite usar .card como <a> clicable */
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.tile.card { background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
.tile .ratio { border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.card h3 { margin: 12px 0 6px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.media {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: calc(var(--radius) - 6px);
  background:
    linear-gradient(135deg, #ececf0, #fafafa);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .media {
  background: linear-gradient(135deg, #1b1b1f, #0f0f12);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s infinite;
}
.media.has-video::after, .media.has-thumb.is-ready::after { content: none; }
.media > .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Soporte cuando hay <picture> */
.media .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media .media-el.fit-contain { object-fit: contain; object-position: center center; background: #000; }
/* util: encajar imagen completa sin recorte en cajas horizontales */
.media > .media-el.fit-contain { object-fit: contain; object-position: center center; background: #000; }
.work-card { cursor: pointer; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* Servicios */
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; justify-content: center; }
.pill-list li {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  transition: transform .18s ease, box-shadow .18s ease;
  will-change: transform;
}
@media (hover:hover) {
  .pill-list li:hover { transform: scale(1.04); box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 10px 24px rgba(0,0,0,0.10); }
}

/* (Hover y centrado ya aplicados globalmente a .pill-list) */

/* Split layout: columnas (izquierda cajas apiladas, derecha vídeo vertical) */
.service-split { 
  display: grid; 
  grid-template-columns: minmax(300px, 1.1fr) minmax(300px, clamp(26vw, 440px, 560px)); 
  gap: 18px; 
  height: calc(100vh - 64px);
  margin: 24px 0; 
  align-items: stretch;
}
.service-split .stack { display: grid; grid-template-rows: repeat(3, 1fr); gap: 14px; min-height: 0; }
.service-split .stack .card { height: 100%; display: flex; flex-direction: column; }
.service-split .media-col { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.service-split .media-col video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) {
  .service-split { grid-template-columns: 1fr; height: auto; }
  .service-split .media-col { aspect-ratio: 9/16; }
}

/* Clientes */
.logo-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 800px) { .logo-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .logo-row { grid-template-columns: repeat(2, 1fr); } }
.logo-badge {
  display: grid; place-items: center;
  height: 72px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-weight: 700;
  color: var(--muted);
}

/* Contacto */
.contact-form { max-width: 700px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

/* Honeypot anti-spam */
.hp { position: absolute !important; left: -5000px !important; opacity: 0 !important; }

/* Footer */
.footer { border-top: 1px solid var(--hairline); background: var(--bg); }
.footer-inner { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 24px 0; }
.footer-links a { color: var(--muted); text-decoration: none; margin-left: 14px; }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 8px; }
  .footer-links a { margin: 0 10px; }
}

/* Accesibilidad / animación reducida */
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
  .media::after { animation: none; }
  html { scroll-behavior: auto; }
  .service-mini::before { animation: none; }
  .related-services .card::before, .related-services .card::after { animation: none; }
}

/* Logo swap depending on theme */
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }
.related-services .rel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.related-services .rel-icon { width: 28px; height: 28px; display: block; }
.related-services .card h4 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.related-services .card h4 a { color: inherit; text-decoration: none; }
/* Multicolor gradient text (subtle, based on hero palette) */
.ai-gradient-text {
  color: var(--fg);
  background: conic-gradient(from 180deg at 50% 50%, rgba(0,255,213,0.85), rgba(122,92,255,0.85), rgba(255,138,0,0.85), rgba(255,61,119,0.85), rgba(0,255,213,0.85));
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Iridescent framed cards (Apple‑style subtle border) */
.related-services .card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  /* subtle outer neon-like glow */
  box-shadow: var(--shadow), 0 0 14px rgba(122,92,255,0.06), 0 0 22px rgba(0,255,213,0.05);
  transition: transform .18s ease, box-shadow .18s ease;
  will-change: transform;
  display: block; /* si es <a> card */
  text-decoration: none;
  color: inherit;
}
/* Asegurar sin subrayado en todos los estados del enlace */
/* (link styles unchanged) */
/* Thick iridescent ring + inner fade */
.related-services .card::before {
  content: "";
  position: absolute; inset: -1px; border-radius: inherit;
  padding: 3px; /* border thickness */
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(0,255,213,0.9), rgba(122,92,255,0.9), rgba(255,138,0,0.9), rgba(255,61,119,0.9), rgba(0,255,213,0.9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; /* show only the ring */
  animation: none; /* keep border static */
  z-index: 0;
}
.related-services .card::after {
  content: ""; pointer-events: none; border-radius: inherit; position: absolute;
  inset: -36%; /* expand further to avoid any white while rotating */
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(0,255,213,0.35), rgba(122,92,255,0.30), rgba(255,138,0,0.30), rgba(255,61,119,0.30), rgba(0,255,213,0.35));
  filter: blur(42px);
  opacity: 0.20; /* softer iridescent */
  animation: iridescent 24s linear infinite reverse;
  z-index: 0;
}
/* Ensure content sits above glow/border */
.related-services .card > * { position: relative; z-index: 1; }
@keyframes iridescent { to { transform: rotate(360deg); } }
@media (hover:hover) {
  .related-services .card:hover {
    transform: translateY(-1px) scale(1.015);
    box-shadow: var(--shadow), 0 0 16px rgba(122,92,255,0.08), 0 0 28px rgba(0,255,213,0.06);
  }
}
/* Enlace de tarjeta sin subrayado en todos los estados */
.related-services .card:link,
.related-services .card:visited,
.related-services .card:hover,
.related-services .card:active,
.related-services .card:focus { text-decoration: none; color: inherit; }
/* Foco accesible */
.related-services .card:focus-visible { outline: 2px solid rgba(122,92,255,0.6); outline-offset: 2px; }
/* (sin hover extra ni focus-visible custom) */
