/* PISO 100 — sitio público v1 | sistema visual cinematográfico */
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --ink: #0a0a0a;
  --carbon: #161616;
  --panel: #222222;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --paper: #f7f7f5;
  --white: #ffffff;
  --gold: #9b0026;
  --gold-soft: #c40032;
  --gold-on-dark: #9b0026;
  --wine: #9b0026;
  --wine-fill: #9b0026;
  --teal: #2f6f73;
  --cafe: #5c3d2e;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Outfit", sans-serif;
  --header-h: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
  --max: 1240px;
  --theme-t: 0.35s;
}

/* FOUC: ocultar frames gestionados hasta que content.js aplique API/galería */
html:not(.piso-content-ready) .hero-media > img,
html:not(.piso-content-ready) .showreel-media > img,
html:not(.piso-content-ready) .showreel-media > video,
html:not(.piso-content-ready) .showreel-media .piso-auto-video,
html:not(.piso-content-ready) #presentacion .media-frame > img,
html:not(.piso-content-ready) #nosotros .team-photo > img,
html:not(.piso-content-ready) #piso100 .media-frame > img,
html:not(.piso-content-ready) #equipo .team-photo > img,
html:not(.piso-content-ready) [data-showreel-modal] .modal-card > img,
html:not(.piso-content-ready) .frame-video-host,
html:not(.piso-content-ready) .process-step-media > img {
  opacity: 0 !important;
}

html:not(.piso-content-ready) .showreel-media {
  background-image: none !important;
}

/* Tema claro por defecto */
:root,
html[data-theme="light"] {
  --bg: #f7f7f5;
  --fg: #0a0a0a;
  --fg-soft: #4a4a4a;
  --surface: #ffffff;
  --surface-2: #efefed;
  --border: rgba(10, 10, 10, 0.1);
  --nav-bg: #ffffff;
  --nav-fg: #0a0a0a;
  --nav-fg-soft: #4a4a4a;
  --nav-border: rgba(10, 10, 10, 0.1);
  --block-a-bg: #ffffff;
  --block-a-fg: #0a0a0a;
  --block-a-muted: #5a5a5a;
  --block-b-bg: #ecece8;
  --block-b-fg: #0a0a0a;
  --block-b-muted: #5a5a5a;
  --hero-veil: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.22) 48%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, transparent 42%);
  --card-bg: #ffffff;
  --card-border: rgba(10, 10, 10, 0.1);
  --input-bg: #ffffff;
  --input-fg: #111;
  --input-border: rgba(10, 10, 10, 0.14);
  --footer-bg: #e8e8e4;
  --chip-border: rgba(10, 10, 10, 0.15);
  --chip-fg: #444;
  --ghost-border: rgba(10, 10, 10, 0.25);
  --ghost-fg: #0a0a0a;
  --logo-filter: none;
  --gold: #9b0026;
  --gold-soft: #c40032;
  --gold-on-dark: #9b0026;
  --wine: #9b0026;
  --fg-soft: #3a3a3a;
}

/* Tema oscuro */
html[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --fg-soft: #d6d6d6;
  --surface: #161616;
  --surface-2: #222222;
  --border: rgba(255, 255, 255, 0.12);
  --nav-bg: #050505;
  --nav-fg: #ffffff;
  --nav-fg-soft: #d0d0d0;
  --nav-border: rgba(255, 255, 255, 0.16);
  --logo-filter: invert(1);
  --block-a-bg: #111111;
  --block-a-fg: #ffffff;
  --block-a-muted: rgba(255, 255, 255, 0.7);
  --block-b-bg: #161616;
  --block-b-fg: #ffffff;
  --block-b-muted: rgba(255, 255, 255, 0.72);
  --hero-veil: linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 48%);
  --card-bg: #141414;
  --card-border: rgba(255, 255, 255, 0.1);
  --input-bg: #1a1a1a;
  --input-fg: #fff;
  --input-border: rgba(255, 255, 255, 0.18);
  --footer-bg: #050505;
  --chip-border: rgba(255, 255, 255, 0.18);
  --chip-fg: rgba(255, 255, 255, 0.8);
  --ghost-border: rgba(255, 255, 255, 0.4);
  --ghost-fg: #fff;
  --gold: #9b0026;
  --gold-soft: #c40032;
  --gold-on-dark: #9b0026;
  --wine: #9b0026;
  --wine-fill: #9b0026;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background-color: var(--bg);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.55;
  transition: background-color var(--theme-t) var(--ease), color var(--theme-t) var(--ease);
  overflow-x: hidden;
}

/* Transición de tema: solo color/fondo (sin opacity global → evita flash y “solo logo”) */
html.theme-anim,
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .section,
html.theme-anim .section-light,
html.theme-anim .section-dark,
html.theme-anim .page-hero,
html.theme-anim .site-footer,
html.theme-anim .service-card,
html.theme-anim .need-item,
html.theme-anim .brand-tile,
html.theme-anim .testimonial,
html.theme-anim .case-cube,
html.theme-anim .project-card,
html.theme-anim .chip,
html.theme-anim .btn,
html.theme-anim .theme-toggle,
html.theme-anim .menu-btn,
html.theme-anim .nav,
html.theme-anim .nav a,
html.theme-anim .card-copy,
html.theme-anim .cta-band,
html.theme-anim .showreel,
html.theme-anim .film-rail,
html.theme-anim input,
html.theme-anim select,
html.theme-anim textarea,
html.theme-anim .modal-card {
  transition:
    background-color var(--theme-t) var(--ease),
    color var(--theme-t) var(--ease),
    border-color var(--theme-t) var(--ease),
    box-shadow var(--theme-t) var(--ease) !important;
}

html.theme-anim .brand-logo img {
  transition: opacity var(--theme-t) var(--ease), filter var(--theme-t) var(--ease) !important;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  min-height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  /* Opaco: el logo no se pierde sobre el hero */
  background-color: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--nav-border);
  color: var(--nav-fg);
  overflow: visible;
  transition:
    background-color var(--theme-t) var(--ease),
    color var(--theme-t) var(--ease),
    border-color var(--theme-t) var(--ease),
    box-shadow 0.45s var(--ease);
}

html[data-theme="dark"] .site-header {
  background-color: #050505;
}

html[data-theme="light"] .site-header {
  background-color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  flex-shrink: 0;
  height: 28px;
  max-height: 28px;
  background: transparent;
}

.brand-logo {
  position: relative;
  display: block;
  height: 100%;
  width: min(78px, 28vw);
  max-width: min(78px, 28vw);
  flex-shrink: 0;
}

.brand-logo img {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  transition: none;
  pointer-events: none;
}

/* Logo: mismas reglas en PC y móvil (claro=negro, oscuro=blanco) */
.brand-logo .logo-on-light,
.brand-logo .logo-on-dark {
  transition: none !important;
}

.brand-logo .logo-on-light {
  opacity: 1;
  visibility: visible;
  filter: brightness(0);
  z-index: 2;
}

.brand-logo .logo-on-dark {
  opacity: 0;
  visibility: hidden;
  filter: none;
  z-index: 1;
}

html[data-theme="dark"] .brand-logo .logo-on-light,
html[data-logo-theme="dark"] .brand-logo .logo-on-light,
.brand-logo[data-logo-theme="dark"] .logo-on-light {
  opacity: 0 !important;
  visibility: hidden !important;
}

html[data-theme="dark"] .brand-logo .logo-on-dark,
html[data-logo-theme="dark"] .brand-logo .logo-on-dark,
.brand-logo[data-logo-theme="dark"] .logo-on-dark {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

html[data-theme="light"] .brand-logo .logo-on-light,
html[data-logo-theme="light"] .brand-logo .logo-on-light,
.brand-logo[data-logo-theme="light"] .logo-on-light {
  opacity: 1 !important;
  visibility: visible !important;
  filter: brightness(0) !important;
}

html[data-theme="light"] .brand-logo .logo-on-dark,
html[data-logo-theme="light"] .brand-logo .logo-on-dark,
.brand-logo[data-logo-theme="light"] .logo-on-dark {
  opacity: 0 !important;
  visibility: hidden !important;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--nav-fg-soft);
  transition: color 0.2s;
  white-space: nowrap;
  line-height: 1.2;
  padding: 5px 1px;
}

.nav a:hover,
.nav a.active {
  color: var(--gold);
}

html[data-theme="dark"] .nav a.active {
  color: #9b0026;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-eagle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 2px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.header-eagle img {
  width: 133%;
  height: 133%;
  max-width: none;
  object-fit: cover;
  object-position: center 28%;
  transform: translateY(-17%);
  filter: contrast(0.94) saturate(0.96);
  pointer-events: none;
}

.theme-toggle,
.menu-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--nav-border);
  background: transparent;
  color: var(--nav-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
  padding: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.theme-toggle {
  grid-template: 1fr / 1fr;
}

.theme-toggle svg,
.menu-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
  fill: currentColor;
}

/* Claro → luna. Oscuro → sol. */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  grid-area: 1 / 1;
  margin: auto;
}

html[data-theme="light"] .theme-toggle .icon-sun,
html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon,
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* En táctil el :hover se queda pegado en rojo: solo hover con puntero real */
@media (hover: hover) and (pointer: fine) {
  .header-eagle:hover {
    border-color: var(--gold);
    transform: scale(1.04);
  }

  .theme-toggle:hover,
  .menu-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
  }
}

.theme-toggle:focus-visible,
.menu-btn:focus-visible,
.header-eagle:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

/* Cambio de tema instantáneo (evita bug móvil: solo cambia el logo) */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: none !important;
  animation: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--wine-fill, #9b0026);
  color: #fff;
}

.btn-gold:hover {
  background: #c40032;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ghost-border);
  color: var(--ghost-fg);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-dark {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}

html[data-theme="dark"] .btn-dark {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
}

html[data-theme="light"] .btn-dark {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--fg);
  color: var(--fg);
}

.menu-btn {
  display: none;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 40px) 28px 64px;
  overflow: hidden;
  background: var(--bg);
  /* Texto siempre claro: la niebla del hero es oscura en ambos temas */
  color: #ffffff;
}

.hero-lead {
  max-width: 520px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 32px;
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero .btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  animation: ken 18s var(--ease) infinite alternate;
}

@keyframes ken {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, -1%, 0);
  }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: var(--hero-veil);
  z-index: 1;
}

.hero-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 2;
  pointer-events: none;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 255, 255, 0.55);
  border-style: solid;
}

.hero-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.hero-frame::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 920px;
  color: #ffffff;
  opacity: 1 !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  /* Contraste fuerte en claro/oscuro (no blanco fijo) */
  color: var(--wine, #9b0026);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

/* Hero cinematográfico (fondo oscuro/imagen): eyebrow en blanco */
.hero:not([data-layout]) .eyebrow {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
}

.hero:not([data-layout]) .eyebrow::before {
  background: rgba(255, 255, 255, 0.75);
  opacity: 1;
}

.page-hero .eyebrow,
html[data-theme="light"] .page-hero .eyebrow {
  color: var(--wine, #9b0026) !important;
}

html[data-theme="light"] .page-hero,
html[data-theme="light"] .page-hero h1 {
  color: var(--fg) !important;
}

html[data-theme="light"] .page-hero .hero-lead {
  color: var(--fg-soft) !important;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 148px);
  line-height: 0.88;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  color: #ffffff;
}

.hero h1 span {
  display: block;
  color: #9b0026;
}

.hero h1 .hero-line {
  display: inline;
  color: inherit;
  font-style: normal;
}

html.is-mgmt-preview [data-piso-field] {
  cursor: text;
}

html.is-mgmt-preview [data-piso-field]:hover,
html.is-mgmt-preview [data-piso-field]:focus {
  outline: 2px solid #9b0026;
  outline-offset: 3px;
}

html.is-mgmt-preview .is-block-on {
  outline: 2px solid #9b0026;
  outline-offset: 6px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-ctas .btn {
  flex: 0 1 auto;
}

.hero-meta {
  position: absolute;
  right: 40px;
  bottom: 64px;
  z-index: 3;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

/* ── Showreel ── */
.showreel {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding: 0;
}

.showreel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 56px 28px 28px;
  max-width: var(--max);
  margin: 0 auto;
}

.showreel-head h2 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 84px);
  margin: 0;
  line-height: 0.92;
  letter-spacing: 0.03em;
}

.showreel-year {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.showreel-stage {
  position: relative;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto 64px;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: default;
  /* Evita quedar invisible por motion/reveal */
  opacity: 1;
}

.showreel-stage.reveal {
  opacity: 1;
  transform: none;
}

.showreel-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #111;
}

.showreel-media .showreel-slide,
.showreel-media .showreel-video,
.showreel-media .showreel-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 6s linear;
  transform: scale(1.04);
  background: #111;
}

.showreel-media .showreel-slide.is-on {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Si ninguna lleva is-on, mostrar la primera (evita bloque negro) */
.showreel-media:not(:has(.is-on)) .showreel-slide:first-child {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.showreel-media .showreel-video,
.showreel-media .showreel-embed,
.showreel-media .piso-auto-video {
  opacity: 1 !important;
  transform: none;
  z-index: 1;
}

.showreel-stage.is-playing .showreel-play {
  opacity: 0;
}

.showreel-stage.is-playing:hover .showreel-play {
  opacity: 0;
}

.showreel-stage:hover img {
  transform: scale(1.03);
}

.showreel-letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--bg);
  z-index: 2;
}

.showreel-letterbox.top {
  top: 0;
}

.showreel-letterbox.bottom {
  bottom: 0;
}

.showreel-play {
  display: none !important;
}

.showreel-stage.has-player .showreel-letterbox {
  display: none;
}

.showreel-stage.has-player .showreel-badge {
  top: 14px;
  bottom: auto;
  z-index: 5;
}

.showreel-stage.has-player .showreel-media .showreel-video,
.showreel-stage.has-player .showreel-media .showreel-embed,
.showreel-stage.has-player .showreel-media .piso-showreel-player {
  opacity: 1 !important;
  transform: none;
  z-index: 3;
}

.showreel-stage.has-player .showreel-media video {
  pointer-events: auto;
}

.showreel-play-legacy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.showreel-stage.is-playing .showreel-play {
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.22));
}

.play-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}

.showreel-stage:hover .play-ring {
  transform: scale(1.06);
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 18%, transparent);
}

.play-ring svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
  fill: #fff;
}

.showreel-badge {
  position: absolute;
  left: 20px;
  bottom: 44px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(230, 208, 212, 0.45);
  padding: 8px 12px;
}

.showreel-timecode {
  position: absolute;
  right: 20px;
  top: 44px;
  z-index: 4;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
}

/* ── Sections ── */
.section {
  padding: 88px 28px;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-dark,
.section-light,
.page-hero,
.site-footer,
.service-card,
.need-item,
.brand-tile,
.testimonial,
.case-cube,
.chip,
.btn,
.theme-toggle,
.menu-btn,
.nav a,
input,
select,
textarea,
.modal-card,
.wa-sphere .n,
.hero,
.showreel,
.cta-band,
.card-copy,
.film-rail,
.project-card {
  transition:
    background-color var(--theme-t) var(--ease),
    color var(--theme-t) var(--ease),
    border-color var(--theme-t) var(--ease),
    box-shadow var(--theme-t) var(--ease);
}

.hero-veil {
  transition: opacity var(--theme-t) var(--ease);
}

.section-dark {
  background-color: var(--block-a-bg);
  color: var(--block-a-fg);
}

.section-light {
  background-color: var(--block-b-bg);
  color: var(--block-b-fg);
}

.section-light .muted {
  color: var(--block-b-muted);
}

.section-dark .muted,
.section-dark .section-lead {
  color: var(--block-a-muted);
}

.section-light .section-lead {
  color: var(--block-b-muted);
}

.section-kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  position: relative;
  display: inline-block;
  max-width: 100%;
  transition: color 0.25s var(--ease);
}

.showreel-head h2,
.page-hero h1,
.cta-band h2 {
  position: relative;
  display: inline-block;
  max-width: 100%;
  transition: color 0.25s var(--ease);
}

/* Indicador visual al pasar el cursor sobre títulos de sección */
.section-title::after,
.showreel-head h2::after,
.page-hero h1::after,
.cta-band h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12em;
  width: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.35s var(--ease);
  pointer-events: none;
}

.section-title:hover,
.showreel-head h2:hover,
.page-hero h1:hover,
.cta-band h2:hover,
.section-title.is-field-hot,
.showreel-head h2.is-field-hot,
.page-hero h1.is-field-hot,
.cta-band h2.is-field-hot {
  color: var(--gold);
}

.section-title:hover::after,
.showreel-head h2:hover::after,
.page-hero h1:hover::after,
.cta-band h2:hover::after,
.section-title.is-field-hot::after,
.showreel-head h2.is-field-hot::after,
.page-hero h1.is-field-hot::after,
.cta-band h2.is-field-hot::after {
  width: min(100%, 7.5rem);
}

.section-title.is-field-hot,
.showreel-head h2.is-field-hot {
  text-shadow: none;
}

.section-lead {
  max-width: 560px;
  margin: 0 0 40px;
  color: inherit;
  opacity: 0.82;
}

.muted {
  color: var(--fg-soft);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.split img,
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #0a0a0a;
}

/* Bleed extra: el parallax no debe dejar hueco negro arriba/abajo */
.media-frame img[data-parallax],
.showreel-stage img[data-parallax] {
  height: 112%;
  width: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Presentación: imagen centrada en el cuadro asignado */
#presentacion .split {
  align-items: center;
}

#presentacion .media-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-height: min(640px, 78vh);
  height: auto;
  align-self: center;
  overflow: hidden;
  background: #0a0a0a;
}

#presentacion .media-frame img,
#presentacion .media-frame img[data-parallax] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: auto;
  object-fit: cover;
  object-position: center center;
}

.media-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.media-frame.wide {
  aspect-ratio: 16 / 10;
}

.media-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px 10px;
}

/* services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background-color: var(--card-bg);
  padding: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 0.3s;
  color: var(--fg);
}

.service-card:hover {
  background-color: var(--surface-2);
}

.service-card .photo-strip {
  flex: 1 1 auto;
  min-height: 200px;
  aspect-ratio: 16 / 11;
}

.service-card .card-copy {
  padding: 22px 24px 26px;
  flex: 0 0 auto;
}

.service-card .num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 28px;
  margin-bottom: 12px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 12px;
  letter-spacing: 0.03em;
}

.service-card p {
  margin: 0;
  color: var(--fg-soft);
  font-size: 15px;
}

/* portfolio */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  border: 1px solid var(--chip-border);
  background: transparent;
  color: var(--chip-fg);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.project-card.wide {
  /* Misma huella que el resto */
  grid-column: auto;
}

.project-card > .photo-strip {
  position: relative;
  flex: 1 1 auto;
  min-height: 168px;
  aspect-ratio: 16 / 10;
  z-index: 0;
}

.project-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
  transition: transform 0.7s var(--ease);
  filter: contrast(1.05);
}

.project-card:hover > .photo-strip img,
.project-card:hover > img {
  transform: scale(1.04);
}

.project-card .overlay {
  position: relative;
  z-index: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 16px 18px 18px;
  pointer-events: auto;
}

.project-card .overlay .btn-ver-mas {
  margin-top: 10px;
  align-self: flex-start;
}

.project-card .cat {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0;
  letter-spacing: 0.03em;
  color: var(--fg);
}

.project-card .project-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-soft);
  max-width: 42ch;
  font-weight: 300;
}

/* needs */
.need-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.need-item {
  border: 1px solid var(--border);
  padding: 0;
  background: var(--card-bg);
  color: var(--fg);
  transition: border-color 0.25s, transform 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 220px;
}

.need-item:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.need-item .photo-strip {
  flex: 1 1 auto;
  min-height: 140px;
  aspect-ratio: 4 / 3;
}

.need-item .card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px 16px;
}

.need-item .card-copy strong {
  margin: 0;
}

.need-item .card-copy .btn-ver-mas {
  margin-top: 4px;
  align-self: flex-start;
  flex-shrink: 0;
}

.need-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.03em;
  margin-bottom: 0;
}

.need-item span {
  display: block;
  width: 100%;
  font-size: 14px;
  line-height: 1.35;
  color: var(--fg-soft);
}

/* Proceso Nosotros — CÓMO TRABAJAMOS */
.process-grid {
  grid-template-columns: repeat(3, 1fr);
}

.process-step {
  min-height: 280px;
}

.process-step-media {
  flex: 1 1 auto;
  min-height: 140px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.process-step-media.is-empty {
  min-height: 72px;
  aspect-ratio: auto;
  background: linear-gradient(135deg, var(--surface-2), var(--card-bg));
}

.process-step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--ease);
}

.process-step:hover .process-step-media img {
  transform: scale(1.04);
}

.process-step-copy {
  padding: 16px 18px 18px;
}

.process-step-copy strong {
  margin-bottom: 8px;
}

.process-step-copy span {
  display: block;
  line-height: 1.45;
}

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

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

/* team */
.team-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}

/* CTA band */
.cta-band {
  padding: 100px 28px;
  background:
    linear-gradient(120deg, rgba(10, 10, 10, 0.78), rgba(47, 111, 115, 0.45)),
    url("../assets/04_banner_horizontal.png") center/cover;
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  margin: 0 0 16px;
  line-height: 0.92;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.brand-tile {
  min-height: 280px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  padding: 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.brand-tile .photo-strip {
  flex: 1 1 auto;
  min-height: 150px;
  aspect-ratio: 4 / 3;
}

.brand-tile .card-copy {
  padding: 14px 16px 16px;
  text-align: center;
}

.brand-tile span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.case-rail {
  margin-top: 28px;
  position: relative;
  width: 100%;
}

.case-rail-viewport {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.case-rail-track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding: 4px 2px 10px;
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 0.55s var(--ease);
}

.case-rail[data-dragging="1"] .case-rail-track {
  transition: none;
}

.case-cube {
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(340px, 78vw);
  width: min(340px, 78vw);
  max-width: 340px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
  scroll-snap-align: start;
}

.case-cube:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.case-cube > .photo-strip,
.case-cube-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #0a0a0a;
  flex: 0 0 auto;
  min-height: 160px;
}

.case-cube-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 1;
  background: #0a0a0a;
  transition: transform 0.7s var(--ease);
}

.case-cube:hover .case-cube-media img,
.case-cube:hover > .photo-strip img {
  transform: scale(1.04);
}

.case-cube-body {
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.case-cube-body h3 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--fg);
}

.case-meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-soft);
}

.case-meta strong {
  color: var(--fg);
  display: inline;
}

.case-rail-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.case-rail-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.case-rail-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.case-rail-dots button.is-on {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}

.case-rail-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.case-rail-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.case-rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .case-rail-track {
    transform: none !important;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
  }

  .case-rail-viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow: visible;
  }

  .case-rail-controls {
    display: none;
  }
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.testimonial {
  border: 1px solid var(--border);
  background: var(--card-bg);
  padding: 0;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.testimonial .photo-strip {
  flex: 0 0 auto;
  min-height: 180px;
  aspect-ratio: 16 / 10;
  width: 100%;
}

.testimonial .card-copy {
  padding: 22px 24px 24px;
  flex: 1 1 auto;
}

.testimonial p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.45;
}

.testimonial strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.testimonial em {
  font-style: normal;
  color: var(--fg-soft);
  font-size: 13px;
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  min-height: 320px;
}

.team-card .photo-strip {
  flex: 1 1 auto;
  min-height: 180px;
}

.team-card .card-copy {
  padding: 18px 20px 22px;
}

.team-card h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  letter-spacing: 0.03em;
}

.faq details {
  overflow: hidden;
}

.faq details > .photo-strip {
  min-height: 140px;
  margin: 0;
}

.faq details > .card-copy {
  padding: 12px 0 8px;
}

@media (max-width: 920px) {
  .brand-grid,
  .testimonial-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* footer — mismo bloque en todas las páginas; colores de tema (no blanco fijo) */
.site-footer {
  background: var(--footer-bg);
  color: var(--fg);
  padding: 72px 28px 28px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h4 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 22px;
  font-weight: 400;
  color: var(--fg);
  margin: 0 0 16px;
  text-transform: uppercase;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--fg-soft);
}

.footer-grid a:hover {
  color: var(--wine, #9b0026);
}

.footer-wa-block p {
  margin: 0 0 14px;
  max-width: 18ch;
  line-height: 1.45;
}

.footer-wa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--wine, #9b0026);
  background: var(--wine, #9b0026);
  color: #fff;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.footer-wa-cta:hover {
  background: transparent;
  color: var(--wine, #9b0026);
}

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.footer-bottom span,
.footer-bottom .footer-credit {
  color: var(--fg-soft);
}

.footer-bottom .footer-credit {
  text-decoration: none;
}

.footer-bottom .footer-credit:hover {
  color: var(--wine, #9b0026);
}

/* WA — FAB único + panel de 2 contactos */
.wa-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wa-fab {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #25d366 0%, #1ebe57 45%, #128c7e 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.wa-fab:hover,
.wa-fab:focus-visible {
  transform: scale(1.14);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.5);
  outline: none;
}

.wa-dock.is-open .wa-fab {
  transform: scale(1.06);
}

.wa-fab svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.wa-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 210px;
}

.wa-panel[hidden] {
  display: none !important;
}

.wa-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, #25d366 0%, #1ebe57 45%, #128c7e 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transform-origin: right center;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.wa-option:hover,
.wa-option:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.48);
  outline: none;
}

.wa-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0.12));
}

.wa-option-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.wa-option-num {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* legacy */
.wa-sphere {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.wa-sphere:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45);
}

.wa-sphere svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.wa-sphere .n {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #25d366;
  line-height: 1;
}

html[data-theme="light"] .wa-sphere .n {
  background: #fff;
  color: #0a0a0a;
  border-color: #128c7e;
}

/* modal showreel */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  place-items: center;
  padding: 24px;
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(960px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  overflow: hidden;
}

.modal-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.9;
}

.modal-body {
  padding: 24px 28px 28px;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 0 0 8px;
  letter-spacing: 0.03em;
}

.modal-body p {
  margin: 0 0 8px;
  color: var(--fg-soft);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

/* page hero small */
.page-hero {
  padding: calc(var(--header-h) + 56px) 28px 48px;
  background: var(--bg);
  color: var(--fg);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  margin: 0;
  line-height: 0.92;
}

/* forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* Honeypot anti-bot (oculto a humanos) */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--fg-soft);
}

input,
select,
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 14px 14px;
  color: var(--input-fg);
  border-radius: var(--radius);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* GSAP controla reveals con fromTo (opacity 0→1) */
html.js-motion .reveal {
  opacity: 0;
  transition: none;
}

html.js-motion .reveal.in {
  opacity: 1;
}

html.js-motion.is-mgmt-preview .reveal,
html.js-motion.is-mgmt-preview img,
html.is-mgmt-preview img,
html.is-mgmt-preview .showreel-stage,
html.is-mgmt-preview .showreel-media .showreel-slide.is-on,
html.is-mgmt-preview .showreel-media .showreel-video,
html.is-mgmt-preview .showreel-media .showreel-embed {
  opacity: 1 !important;
  transform: none !important;
}

/* Solo la foto suelta del frame — el mosaico .photo-strip debe verse al cargar */
html.js-motion #nosotros .team-photo > img,
html.js-motion #nosotros [data-fade-photo] > img,
html.js-motion #equipo .team-photo > img,
html.js-motion #equipo [data-fade-photo] > img,
html.js-motion .case-cube-media > img,
html.js-motion .media-frame > img {
  opacity: 0;
}

html.js-motion .photo-strip img {
  opacity: 1;
}

/* Si el frame ya tiene mosaico, no dejar el contenedor en negro por fade inicial */
html.js-motion [data-fade-photo]:has(> .photo-strip),
html.js-motion .media-frame:has(> .photo-strip),
html.js-motion .team-photo:has(> .photo-strip),
html.js-motion .case-cube:has(> .photo-strip) {
  opacity: 1;
}

/* Showreel: no forzar opacity 0 (causaba bloque negro en preview / race con hydrate) */
html.js-motion .showreel-stage,
html.js-motion .showreel-stage.reveal {
  opacity: 1;
}

html.js-motion .showreel-stage .showreel-slide:not(.is-on) {
  opacity: 0;
}

html.js-motion .showreel-stage .showreel-slide.is-on,
html.js-motion .showreel-stage .showreel-video,
html.js-motion .showreel-stage .showreel-embed {
  opacity: 1;
}

html.js-motion [data-fade-photo],
html.js-motion [data-fade-copy] > * {
  opacity: 0;
}

html.js-motion .hero-media img {
  animation: none;
  will-change: transform;
  opacity: 1;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

/* Carril cinematográfico — carrete infinito */
.cine-rail {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 0;
  user-select: none;
}

.cine-rail-track {
  display: flex;
  width: max-content;
  gap: 0;
  will-change: transform;
  backface-visibility: hidden;
}

.cine-rail-track span {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.06em;
  padding: 0 28px;
  white-space: nowrap;
  color: var(--fg);
  opacity: 0.88;
  flex-shrink: 0;
}

.cine-rail-track span em {
  font-style: normal;
  color: var(--gold);
  margin-left: 0.15em;
}

@media (prefers-reduced-motion: reduce) {
  .cine-rail-track {
    transform: none !important;
  }
}

.cine-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.35) 100%);
  mix-blend-mode: multiply;
  opacity: 0.45;
}

html[data-theme="light"] .cine-vignette {
  background: radial-gradient(ellipse at center, transparent 48%, rgba(10, 10, 10, 0.12) 100%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.media-frame,
.team-photo {
  will-change: transform;
}

.showreel-stage {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal {
    opacity: 1;
    transform: none;
  }
}

/* mobile nav */
@media (max-width: 920px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 28px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--nav-border);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .menu-btn {
    display: grid;
  }

  .header-actions .btn {
    display: none;
  }

  .header-eagle,
  .theme-toggle,
  .menu-btn {
    width: 32px;
    height: 32px;
  }

  .theme-toggle svg,
  .menu-btn svg {
    width: 18px;
    height: 18px;
  }

  .hero-frame {
    display: none;
  }

  .hero-ctas .btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: clamp(52px, 14vw, 96px);
  }

  .hero-content {
    opacity: 1 !important;
  }

  .split,
  .team-layout,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  #presentacion .media-frame {
    max-height: none;
    aspect-ratio: 4 / 5;
  }

  .project-card,
  .project-card.wide {
    grid-column: auto;
  }

  .hero-meta {
    display: none;
  }

  .showreel-head {
    flex-direction: column;
    align-items: start;
  }

  .showreel-year {
    margin-top: -8px;
  }

  .wa-fab {
    width: 52px;
    height: 52px;
  }
}

/* Multi-foto: 50% izquierda a altura completa + 2×25% apiladas a la derecha */
.photo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 6px;
  box-sizing: border-box;
  align-items: stretch;
  background: transparent;
  min-height: 168px;
  aspect-ratio: 16 / 10;
}

.photo-strip[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  aspect-ratio: 16 / 10;
}

.photo-strip[data-count="2"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.photo-strip[data-count="3"] .photo-strip-item:first-child,
.photo-strip[data-count="3"] .photo-strip-item.is-hero {
  grid-column: 1;
  grid-row: 1 / 3;
}

.photo-strip[data-count="3"] .photo-strip-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.photo-strip[data-count="3"] .photo-strip-item:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.photo-strip-item {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #111;
  cursor: default;
  display: block;
}

.photo-strip-item img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s var(--ease);
  background: #0a0a0a;
}

.photo-strip-video {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
  aspect-ratio: 16 / 10;
}

.photo-strip-video .photo-strip-item,
.photo-strip-item.is-video {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
}

.piso-auto-video,
.photo-strip-item video,
.photo-strip-item iframe,
.frame-video-host video,
.frame-video-host iframe,
.ver-mas-video video,
.ver-mas-video iframe {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  border: 0;
  display: block;
  background: #0a0a0a;
}

.frame-video-host {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: transparent;
}

.hero-media.has-video > img,
.media-frame.has-video > img,
.team-photo.has-video > img {
  z-index: 1;
}

.hero-media.has-video {
  /* Mantener absolute + inset:0 (relative colapsaba el hero a altura 0) */
  position: absolute;
}

.hero-media .frame-video-host,
.media-frame .frame-video-host,
.team-photo .frame-video-host {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.hero-media .frame-video-host video,
.hero-media .frame-video-host iframe,
.media-frame .frame-video-host video,
.media-frame .frame-video-host iframe,
.team-photo .frame-video-host video,
.team-photo .frame-video-host iframe {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
}

.media-frame.has-video,
.team-photo.has-video {
  position: relative;
}

.ver-mas-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
  overflow: hidden;
  background: #000;
}

.card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-copy .btn-ver-mas {
  margin-top: 16px;
}

.service-card:hover .photo-strip-item img,
.testimonial:hover .photo-strip-item img,
.brand-tile:hover .photo-strip-item img,
.need-item:hover .photo-strip-item img,
.team-card:hover .photo-strip-item img {
  transform: scale(1.03);
}

.btn-ver-mas {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 7px 12px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
}

.btn-ver-mas:hover {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ver-mas.on-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.brand-tile .brand-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.showreel-stage,
.media-frame,
.team-photo {
  position: relative;
}

/* Hero: la foto debe cubrir todo el bloque (texto encima) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}

.hero-media > .photo-strip,
.showreel-stage > .photo-strip,
.media-frame > .photo-strip,
.team-photo > .photo-strip {
  position: absolute;
  inset: 0;
  left: 0;
  bottom: 0;
  margin: 0;
  padding: 6px;
  background: transparent;
  aspect-ratio: auto;
  min-height: 100%;
  height: 100%;
  z-index: 1;
}

/* Si hay mosaico, ocultar la foto suelta del frame */
.media-frame:has(> .photo-strip) > img,
.team-photo:has(> .photo-strip) > img {
  display: none !important;
}

/* Sin Ver más / strips sobre hero, showreel, presentación e Inicio→Nosotros */
.hero-media > .photo-strip,
.showreel-stage > .photo-strip,
#presentacion .media-frame > .photo-strip,
#nosotros .media-frame > .photo-strip,
#nosotros .team-photo > .photo-strip {
  display: none !important;
}

/* Evita la “V” fantasma: el botón no debe vivir debajo del mosaico absolute */
.media-frame > .btn-ver-mas,
.team-photo > .btn-ver-mas,
.hero-media > .btn-ver-mas,
.showreel-stage > .btn-ver-mas {
  display: none !important;
}

.ver-mas-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  place-items: center;
  padding: 20px;
}

.ver-mas-modal.open {
  display: grid;
}

.ver-mas-card {
  width: min(860px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #111;
  color: #f2f2f2;
  border-radius: 12px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ver-mas-card .modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.ver-mas-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding: 16px;
  background: #0a0a0a;
}

.ver-mas-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.ver-mas-body {
  padding: 8px 18px 20px;
}

.ver-mas-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

/* Preview Management: sin badge; chrome limpio */
html.is-mgmt-preview .header-eagle,
html.is-mgmt-preview [data-mgmt-link],
html.is-mgmt-preview.preview-hide-wa .wa-dock,
html.is-mgmt-preview.preview-hide-wa #wa-root,
html.is-mgmt-preview.preview-hide-wa .wa-sphere,
html.is-mgmt-preview.preview-hide-wa a[href*="wa.me"] {
  display: none !important;
}

/* En preview Management: sin marco dorado (parecía un “recuadro” vacío) */
html.is-mgmt-preview .hero-frame {
  display: none !important;
}

html.is-mgmt-preview.preview-keep-wa .wa-dock {
  display: flex !important;
}

html.is-mgmt-preview .site-header {
  overflow: visible;
  background-color: var(--nav-bg) !important;
}

html.is-mgmt-preview .brand-logo {
  width: min(78px, 28vw);
  max-width: min(78px, 28vw);
  height: 28px;
  max-height: 28px;
}

/* Preview Management: forzar layout PC (ignora breakpoints móvil) */
html.preview-desktop,
html.preview-desktop body {
  min-width: 1280px;
}

html.preview-desktop .cta-lead {
  max-width: 42ch;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.5;
}

html.preview-desktop .nav {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  inset: auto !important;
}

html.preview-desktop .menu-btn {
  display: none !important;
}

html.preview-desktop .header-actions .btn {
  display: inline-flex !important;
}

html.preview-desktop .split {
  grid-template-columns: 1.05fr 0.95fr !important;
}

html.preview-desktop .team-layout {
  grid-template-columns: 0.9fr 1.1fr !important;
}

html.preview-desktop .footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr 1fr !important;
}

html.preview-desktop .service-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

html.preview-desktop .need-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}

html.preview-desktop .process-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

html.preview-desktop .form-grid {
  grid-template-columns: 1fr 1fr !important;
}

html.preview-desktop .project-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

html.preview-desktop .brand-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}

html.preview-desktop .testimonial-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

html.preview-desktop .project-card.wide {
  grid-column: span 2 !important;
}

html.preview-desktop #presentacion .media-frame {
  max-height: none;
  min-height: 280px;
  aspect-ratio: 4 / 5;
}

.cta-lead {
  max-width: 42ch;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.5;
}



/* Cambios solicitados — layout de secciones */
.title-accent { color: var(--gold); }
.section-title:hover, .section-title:hover .title-accent { color: inherit; }
.section-title .title-accent, .quote .title-accent, h3 .title-accent, .section-aside .title-accent { color: var(--gold); }
.section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:28px; flex-wrap:wrap; margin-bottom:28px; }
.section-aside { margin:0; max-width:28ch; text-align:right; font-size:13px; letter-spacing:0.14em; text-transform:uppercase; line-height:1.45; color:var(--fg-soft); }
.btn-pill { display:inline-flex; align-items:center; gap:10px; border:1px solid var(--wine); color:var(--fg); background:var(--card-bg); border-radius:999px; padding:10px 16px 10px 18px; letter-spacing:0.12em; text-transform:uppercase; font-size:12px; text-decoration:none; }
.btn-pill::after { content:'→'; width:28px; height:28px; border-radius:50%; background:var(--wine); color:#fff; display:inline-grid; place-items:center; }
.service-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; background:transparent; border:0; }
.service-card, .brand-tile, .testimonial { border-radius:18px; border:1px solid var(--card-border); background:var(--card-bg); color:var(--fg); overflow:hidden; }
.project-card, .process-step { border-radius:18px; overflow:hidden; background:var(--card-bg); color:var(--fg); border:1px solid var(--card-border); }
.service-card { position:relative; min-height:0; }
.service-card .num {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.55);
  text-shadow: none;
}
.service-card .card-copy, .brand-tile .card-copy, .testimonial .card-copy { background:var(--card-bg); color:var(--fg); }
.service-card h3 { color:var(--gold); }
.service-card p, .brand-tile span, .testimonial em { color:var(--fg-soft); }
.btn-ver-mas {
  border: 0;
  padding: 0;
  letter-spacing: 0.14em;
  gap: 10px;
  background: transparent;
  color: var(--fg);
}
.card-copy .btn-ver-mas,
.service-card .btn-ver-mas,
.testimonial .btn-ver-mas,
.brand-tile .btn-ver-mas,
.need-item .btn-ver-mas,
.team-card .btn-ver-mas {
  color: var(--fg);
}
.btn-ver-mas::after { content:'→'; width:28px; height:28px; border-radius:50%; background:var(--wine); color:#fff; display:inline-grid; place-items:center; flex:0 0 auto; }
.project-card .overlay { background:var(--card-bg); color:var(--fg); }
.project-card h3 { color:var(--fg); }
.project-card .project-desc { color:var(--fg-soft); }
.project-card .cat { color: var(--gold); }
.need-cta { margin:22px 0 0; }
.need-item { background:var(--card-bg); color:var(--fg); }
.testimonial-grid { grid-template-columns:repeat(5,minmax(180px,1fr)); gap:14px; }
.testimonial.t-card { background:var(--card-bg); color:var(--fg); border-radius:22px; }
.t-media { position:relative; }
.t-time, .t-play { position:absolute; z-index:2; color:#fff; }
.t-time { top:10px; right:10px; background:rgba(0,0,0,.55); border-radius:999px; padding:2px 8px; font-size:12px; }
.t-play { left:50%; top:42%; transform:translate(-50%,-50%); width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:rgba(255,255,255,.2); border:1px solid rgba(255,255,255,.7); }
.nosotros-copy { display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center; }
.nosotros-feats { list-style:none; margin:0; padding:0 0 0 22px; border-left:1px solid var(--line); display:grid; gap:22px; }
.nosotros-feats li { display:flex; gap:12px; align-items:flex-start; }
.nosotros-feats strong { display:block; letter-spacing:.08em; font-size:13px; }
.nosotros-feats p { margin:4px 0 0; color:var(--fg-soft); font-size:14px; }
.feat-ico { width:42px; height:42px; border:1px solid var(--line); border-radius:50%; display:grid; place-items:center; flex:0 0 auto; }
#nosotros .team-photo, #nosotros .team-photo img { border-radius:28px; }
.process-step-copy strong .title-accent { margin-right:8px; }
@media (max-width:1100px) {
  .service-grid:not([data-film-track]), .testimonial-grid:not([data-film-track]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nosotros-copy { grid-template-columns:1fr; }
  .section-aside { text-align:left; }
}
@media (max-width:640px) {
  .brand-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.ra-left { display: block; text-align: left; }
.ra-center { display: block; text-align: center; }
.ra-right { display: block; text-align: right; }
.ru, .ro { display: block; margin: 0.35em 0; }
.ru .ri, .ro .ri { display: list-item; margin-left: 1.25em; }
.ru .ri { list-style: disc; }
.ro .ri { list-style: decimal; }
.hero-lead a, .section-lead a, .lead a, .quote a { color: #9b0026; }
.rz-sm { font-size: 0.82em; }
.rz-md { font-size: 1em; }
.rz-lg { font-size: 1.28em; }
.rz-xl { font-size: 1.6em; }
.rc-vinotinto { color: #9b0026; }
.rc-cafe { color: #5c3d2e; }
.rc-teal { color: #2f6f73; }
.hero h1 .rc-vinotinto,
.hero h1 .rc-cafe,
.hero h1 .rc-teal { color: inherit; }
.hero h1 .rc-vinotinto { color: #9b0026; }
.hero h1 .rc-cafe { color: #d7b39a; }
.hero h1 .rc-teal { color: #8fd4d6; }

[data-layout="text-left"] > .section-inner,
[data-layout="text-right"] > .section-inner,
#presentacion[data-layout="text-left"] .split,
#presentacion[data-layout="text-right"] .split,
#nosotros[data-layout="text-left"] .team-layout,
#nosotros[data-layout="text-right"] .team-layout,
html.preview-desktop [data-layout="text-left"] > .section-inner,
html.preview-desktop [data-layout="text-right"] > .section-inner,
html.preview-desktop #presentacion[data-layout="text-left"] .split,
html.preview-desktop #presentacion[data-layout="text-right"] .split,
html.preview-desktop #nosotros[data-layout="text-left"] .team-layout,
html.preview-desktop #nosotros[data-layout="text-right"] .team-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
  align-items: start;
  gap: 28px;
}

[data-layout="text-top"] > .section-inner,
[data-layout="text-bottom"] > .section-inner,
#presentacion[data-layout="text-top"] .split,
#presentacion[data-layout="text-bottom"] .split,
#nosotros[data-layout="text-top"] .team-layout,
#nosotros[data-layout="text-bottom"] .team-layout,
html.preview-desktop [data-layout="text-top"] > .section-inner,
html.preview-desktop [data-layout="text-bottom"] > .section-inner,
html.preview-desktop #presentacion[data-layout="text-top"] .split,
html.preview-desktop #presentacion[data-layout="text-bottom"] .split,
html.preview-desktop #nosotros[data-layout="text-top"] .team-layout,
html.preview-desktop #nosotros[data-layout="text-bottom"] .team-layout {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

[data-layout="text-left"] [data-arrange-copy],
[data-layout="text-top"] [data-arrange-copy] { order: 1; }
[data-layout="text-left"] [data-arrange-media],
[data-layout="text-top"] [data-arrange-media] { order: 2; }
[data-layout="text-right"] [data-arrange-copy],
[data-layout="text-bottom"] [data-arrange-copy] { order: 2; }
[data-layout="text-right"] [data-arrange-media],
[data-layout="text-bottom"] [data-arrange-media] { order: 1; }
[data-layout] [data-arrange-extra] { order: 5; }

[data-layout="text-left"] .service-grid,
[data-layout="text-right"] .service-grid,
[data-layout="text-left"] .project-grid,
[data-layout="text-right"] .project-grid,
[data-layout="text-left"] .testimonial-grid,
[data-layout="text-right"] .testimonial-grid,
html.preview-desktop [data-layout="text-left"] .service-grid,
html.preview-desktop [data-layout="text-right"] .service-grid,
html.preview-desktop [data-layout="text-left"] .project-grid,
html.preview-desktop [data-layout="text-right"] .project-grid,
html.preview-desktop [data-layout="text-left"] .testimonial-grid,
html.preview-desktop [data-layout="text-right"] .testimonial-grid {
  grid-template-columns: 1fr !important;
}

[data-layout="text-left"] .need-grid,
[data-layout="text-right"] .need-grid,
[data-layout="text-left"] .brand-grid,
[data-layout="text-right"] .brand-grid,
html.preview-desktop [data-layout="text-left"] .need-grid,
html.preview-desktop [data-layout="text-right"] .need-grid,
html.preview-desktop [data-layout="text-left"] .brand-grid,
html.preview-desktop [data-layout="text-right"] .brand-grid {
  grid-template-columns: 1fr 1fr !important;
}

[data-layout="text-top"] .service-grid,
[data-layout="text-bottom"] .service-grid,
[data-layout="text-top"] .testimonial-grid,
[data-layout="text-bottom"] .testimonial-grid,
html.preview-desktop [data-layout="text-top"] .service-grid,
html.preview-desktop [data-layout="text-bottom"] .service-grid,
html.preview-desktop [data-layout="text-top"] .testimonial-grid,
html.preview-desktop [data-layout="text-bottom"] .testimonial-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

[data-layout="text-top"] .project-grid,
[data-layout="text-bottom"] .project-grid,
html.preview-desktop [data-layout="text-top"] .project-grid,
html.preview-desktop [data-layout="text-bottom"] .project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

[data-layout="text-top"] .need-grid,
[data-layout="text-bottom"] .need-grid,
[data-layout="text-top"] .brand-grid,
[data-layout="text-bottom"] .brand-grid,
html.preview-desktop [data-layout="text-top"] .need-grid,
html.preview-desktop [data-layout="text-bottom"] .need-grid,
html.preview-desktop [data-layout="text-top"] .brand-grid,
html.preview-desktop [data-layout="text-bottom"] .brand-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hero[data-layout] {
  display: grid !important;
  align-items: stretch;
  min-height: 78vh;
  color: var(--fg);
  background: var(--bg);
}
.hero[data-layout="text-left"],
.hero[data-layout="text-right"] { grid-template-columns: 1fr 1fr !important; }
.hero[data-layout="text-top"],
.hero[data-layout="text-bottom"] { grid-template-columns: 1fr !important; }
.hero[data-layout] .hero-media {
  position: relative !important;
  inset: auto !important;
  min-height: 420px;
  height: auto;
}
.hero[data-layout] .hero-content {
  position: relative !important;
  z-index: 3;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 36px;
}
.hero[data-layout] .hero-veil,
.hero[data-layout] .cine-vignette,
.hero[data-layout] .hero-frame { display: none !important; }
.hero[data-layout] .eyebrow,
.hero[data-layout] .hero-lead,
.hero[data-layout] h1 { color: var(--fg); }
.hero[data-layout] .eyebrow { color: var(--fg-soft); }
.hero[data-layout] .eyebrow::before { background: currentColor; opacity: 0.75; }
.hero[data-layout] .hero-lead { color: var(--fg-soft); }
.hero[data-layout] .btn-ghost { border-color: var(--fg); color: var(--fg); }
.hero[data-layout="text-left"] .hero-content,
.hero[data-layout="text-top"] .hero-content { order: 1; }
.hero[data-layout="text-left"] .hero-media,
.hero[data-layout="text-top"] .hero-media { order: 2; }
.hero[data-layout="text-right"] .hero-content,
.hero[data-layout="text-bottom"] .hero-content { order: 2; }
.hero[data-layout="text-right"] .hero-media,
.hero[data-layout="text-bottom"] .hero-media { order: 1; }

.arrange-handle { display: none; }
html.is-mgmt-preview .arrange-handle {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px dashed #9b0026;
  background: #fff;
  color: #9b0026;
  border-radius: 999px;
  cursor: grab;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 6;
}
html.is-mgmt-preview [data-arrange].is-arranging {
  outline: 2px dashed #9b0026;
  outline-offset: -10px;
}
html.is-mgmt-preview .hero[data-layout] .arrange-handle {
  background: var(--bg);
}

/* Inicio en móvil: cinta tipo portafolio + mosaico de proyectos */
.film-rail {
  position: relative;
}

.film-rail-controls {
  display: none;
}

@media (max-width: 920px) {
  /* Misma paleta que PC: no forzar surface distinta del section */
  .film-rail {
    margin: 8px -16px 0;
    padding: 12px 0 8px;
    background: transparent;
    border-radius: 0;
  }

  /* Marquee infinito + arrastre (JS transform) */
  .film-rail.is-marquee {
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    user-select: none;
    -webkit-user-select: none;
  }

  .film-rail.is-marquee.is-dragging {
    cursor: grabbing;
  }

  .film-rail.is-marquee [data-film-track],
  .film-rail.is-marquee .service-grid,
  .film-rail.is-marquee .testimonial-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: max-content;
    max-width: none;
    overflow: visible;
    scroll-snap-type: none;
    padding: 10px 0 16px;
    background: transparent !important;
    border: 0 !important;
    animation: none !important;
    will-change: transform;
  }

  @media (prefers-reduced-motion: reduce) {
    .film-rail.is-marquee {
      cursor: default;
      touch-action: auto;
    }
    .film-rail.is-marquee [data-film-track],
    .film-rail.is-marquee .service-grid,
    .film-rail.is-marquee .testimonial-grid {
      transform: none !important;
      overflow-x: auto;
      width: auto;
      max-width: 100%;
      padding-inline: 16px;
    }
  }

  .film-rail [data-film-track],
  .film-rail .service-grid,
  .film-rail .testimonial-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  /* Bloques compactos en cinta continua */
  .film-rail .service-card,
  .film-rail .testimonial {
    flex: 0 0 min(48vw, 200px);
    width: min(48vw, 200px);
    max-width: min(48vw, 200px);
    margin-right: 12px;
    min-height: 0;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--fg);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
  }

  html[data-theme="dark"] .film-rail .service-card,
  html[data-theme="dark"] .film-rail .testimonial {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  }

  .film-rail-controls {
    display: none !important;
  }

  /* Fotos apiladas: mismo hueco + esquinas redondeadas */
  .film-rail .service-card .photo-strip,
  .film-rail .testimonial .photo-strip,
  .film-rail .testimonial .t-media {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 8px;
    min-height: 0;
    aspect-ratio: auto;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    background: transparent;
    overflow: hidden;
  }

  .film-rail .photo-strip[data-count],
  .film-rail .photo-strip[data-count="1"],
  .film-rail .photo-strip[data-count="2"],
  .film-rail .photo-strip[data-count="3"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
  }

  .film-rail .photo-strip .photo-strip-item,
  .film-rail .photo-strip[data-count="3"] .photo-strip-item:first-child,
  .film-rail .photo-strip[data-count="3"] .photo-strip-item.is-hero,
  .film-rail .photo-strip[data-count="3"] .photo-strip-item:nth-child(2),
  .film-rail .photo-strip[data-count="3"] .photo-strip-item:nth-child(3) {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100%;
    flex: 0 0 auto;
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    aspect-ratio: auto;
    border-radius: 10px;
    overflow: hidden;
    border: 0;
  }

  .film-rail .photo-strip .photo-strip-item img,
  .film-rail .photo-strip .photo-strip-item video,
  .film-rail .photo-strip .photo-strip-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
  }

  .film-rail .photo-strip-video,
  .film-rail .photo-strip-video .photo-strip-item {
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    aspect-ratio: auto;
  }

  .film-rail .service-card .card-copy,
  .film-rail .testimonial .card-copy {
    padding: 8px 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1 1 auto;
  }

  .film-rail .service-card h3 {
    font-size: 13px;
    margin: 0;
    line-height: 1.15;
  }

  .film-rail .service-card .num {
    position: static;
    font-size: 12px;
    margin: 0;
    text-shadow: none;
    color: var(--gold);
  }

  .film-rail .service-card p,
  .film-rail .testimonial p {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .film-rail .service-card .btn-ver-mas,
  .film-rail .testimonial .btn-ver-mas {
    margin-top: auto;
    padding-top: 4px;
  }

  .film-rail-controls,
  .film-rail-dots,
  .film-rail-btn {
    display: none !important;
  }

  #proyectos .project-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .project-card {
    min-height: 0;
    border-radius: 14px;
  }

  .project-card > .photo-strip {
    min-height: 108px;
    aspect-ratio: 4 / 3;
  }

  .project-card .overlay {
    padding: 10px 12px 12px;
    gap: 4px;
  }

  .project-card .cat {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .project-card h3 {
    font-size: 15px;
    line-height: 1.15;
  }

  .project-card .project-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
    max-width: none;
  }

  .project-card .overlay .btn-ver-mas {
    margin-top: 6px;
    font-size: 11px;
  }

  .project-card .overlay a.btn-ver-mas {
    display: none;
  }

  #necesitas .need-grid,
  .need-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .need-item {
    min-height: 0;
  }

  .need-item .photo-strip {
    min-height: 88px;
    aspect-ratio: 16 / 11;
  }

  .need-item .card-copy {
    padding: 12px 12px 14px;
    gap: 4px;
  }

  .need-item strong {
    font-size: 20px;
  }

  .need-item span {
    font-size: 13px;
  }

  #marcas .brand-grid,
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .brand-tile {
    min-height: 0;
    font-size: 16px;
  }

  .brand-tile .photo-strip {
    min-height: 96px;
    aspect-ratio: 4 / 3;
  }

  .brand-tile .card-copy {
    padding: 10px 12px 12px;
  }

  .header-eagle,
  .theme-toggle,
  .menu-btn {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 641px) and (max-width: 920px) {
  #proyectos .project-grid,
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .film-rail .service-card,
  .film-rail .testimonial {
    flex-basis: min(34vw, 220px);
    width: min(34vw, 220px);
    max-width: min(34vw, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-rail [data-film-track],
  .film-rail .service-grid,
  .film-rail .testimonial-grid {
    scroll-snap-type: none;
  }
}
