/* ─────── MANIFIESTO ─────── */
.manifiesto {
  position: relative;
  background: var(--blanco);
  color: var(--carbon);
  overflow: hidden;
  isolation: isolate;
  padding: clamp(120px, 16vh, 200px) 0;
}

/* Trama de tejido en verde sobre crema · sutilísima */
.manifiesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(4,114,6,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4,114,6,0.025) 1px, transparent 1px),
    linear-gradient(rgba(4,114,6,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4,114,6,0.012) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px, 8px 8px, 8px 8px;
  pointer-events: none;
  z-index: -1;
  animation: manifiestoFabricDrift 60s linear infinite;
}
@keyframes manifiestoFabricDrift {
  to { background-position: 56px 56px, 56px 56px, 8px 8px, 8px 8px; }
}

/* Resplandor sutil verde central */
.manifiesto::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 35%, rgba(4,114,6,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.manifiesto-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 56px;
}

/* Eyebrow con dashed line verde */
.manifiesto-eyebrow {
  margin-bottom: 56px;
}

/* Headline · em en verde como en el brandbook */
.manifiesto-headline {
  font-family: 'Alice', serif;
  font-size: clamp(34px, 5.6vw, 84px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--carbon);
  max-width: 16ch;
  margin-bottom: 80px;
}
.manifiesto-headline em {
  font-style: normal;
  color: var(--verde);
  display: block;
}

/* Bloque de líneas · texto carbón con dashed verde */
.manifiesto-lines {
  max-width: 720px;
  margin-bottom: 88px;
}
.manifiesto-line {
  font-family: 'Alice', serif;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.55;
  color: #4A4A44;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.manifiesto-line::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 0;
  border-top: 1px dashed rgba(4,114,6,0.4);
  transform: translateY(-6px);
}
.manifiesto-line-em {
  font-style: normal;
  color: var(--verde);
}
.manifiesto-line-strong {
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--carbon);
  margin-top: 28px;
}
.manifiesto-gap { display: block; height: 32px; }

/* ─── GALERÍA · COLLAGE TIPO TABLERO ATELIER · iframe protagonista ─── */
.manifiesto-gallery {
  display: grid;
  grid-template-columns: 0.85fr 1fr 2.6fr 0.85fr 1fr;
  gap: 22px;
  /* Break-out del .manifiesto-inner para usar más ancho */
  margin-left: calc(-1 * (50vw - 50%) + 40px);
  margin-right: calc(-1 * (50vw - 50%) + 40px);
  margin-top: 24px;
  margin-bottom: 96px;
  max-width: none;
  align-items: start;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* Staggers · alturas distintas, no una escalera · más collage */
.gallery-col-1 { padding-top: 140px; }
.gallery-col-2 { padding-top: 60px; }
.gallery-col-4 { padding-top: 90px; }
.gallery-col-5 { padding-top: 180px; }

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--crema2);
  filter: drop-shadow(0 6px 18px rgba(26,26,24,0.10));
  transition: transform 0.55s var(--ease-out), filter 0.4s var(--ease-out);
}
.gallery-item.is-portrait { aspect-ratio: 4 / 5; }
.gallery-item.is-square { aspect-ratio: 1 / 1; }
.gallery-item-tall { aspect-ratio: 1 / 1; }

/* Rotaciones de collage · cada foto su pequeña inclinación natural */
.gallery-col-1 .gallery-item { transform: rotate(-2.4deg); }
.gallery-col-2 .gallery-item:nth-child(1) { transform: rotate(1.8deg); }
.gallery-col-2 .gallery-item:nth-child(2) { transform: rotate(-1.4deg); margin-top: -8px; }
.gallery-col-4 .gallery-item:nth-child(1) { transform: rotate(-1.6deg); }
.gallery-col-4 .gallery-item:nth-child(2) { transform: rotate(2.2deg); margin-top: -6px; }
.gallery-col-5 .gallery-item { transform: rotate(2.6deg); }

/* Hover · levanta y endereza · selectores específicos para sumar specificity */
.gallery-col-1 .gallery-item:hover,
.gallery-col-2 .gallery-item:nth-child(1):hover,
.gallery-col-2 .gallery-item:nth-child(2):hover,
.gallery-col-4 .gallery-item:nth-child(1):hover,
.gallery-col-4 .gallery-item:nth-child(2):hover,
.gallery-col-5 .gallery-item:hover {
  transform: translateY(-6px) rotate(0deg);
  filter: drop-shadow(0 12px 28px rgba(26,26,24,0.18));
  z-index: 4;
}

/* Clip interno · contiene la foto con overflow hidden, libera la figure para los celos */
.gallery-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.gallery-clip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 8s linear, filter 0.6s var(--ease-out);
}
.gallery-item:hover .gallery-clip img {
  transform: scale(1.04);
}

/* Celo en la esquina · trozo de cinta translúcido pegando la foto a la pared */
.gallery-item::before {
  content: '';
  position: absolute;
  width: 72px;
  height: 22px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.42) 0%,
      rgba(248,245,239,0.82) 35%,
      rgba(248,245,239,0.86) 65%,
      rgba(255,255,255,0.4) 100%);
  border-top: 1px solid rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow:
    0 3px 6px rgba(0,0,0,0.16),
    inset 0 0 0 0.5px rgba(255,255,255,0.45);
  z-index: 6;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Por defecto · esquina superior izquierda */
.gallery-item::before {
  top: -8px;
  left: -18px;
  transform: rotate(-32deg);
}

/* Variedad por foto · alternando esquinas y rotaciones */
.gallery-col-2 .gallery-item:nth-child(1)::before {
  top: -10px;
  left: auto;
  right: -16px;
  transform: rotate(28deg);
  width: 68px;
}
.gallery-col-2 .gallery-item:nth-child(2)::before {
  top: -8px;
  left: -14px;
  transform: rotate(-26deg);
  width: 64px;
}
.gallery-col-4 .gallery-item:nth-child(1)::before {
  top: -8px;
  left: auto;
  right: -20px;
  transform: rotate(34deg);
  width: 74px;
}
.gallery-col-4 .gallery-item:nth-child(2)::before {
  top: -10px;
  left: -14px;
  transform: rotate(-28deg);
  width: 64px;
}
.gallery-col-5 .gallery-item:nth-child(1)::before {
  top: -10px;
  left: auto;
  right: -18px;
  transform: rotate(30deg);
  width: 70px;
}

/* Centro · embed HeyGen · protagonista · más alto */
.gallery-center {
  position: relative;
  background: var(--carbon);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 640px;
}

/* Placeholder visual del embed · grid · mark+waves arriba, body centro, CTA + foot abajo */
.gallery-embed-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 44px 44px 36px;
  color: white;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(4,114,6,0.16) 0%, transparent 70%),
    linear-gradient(180deg, rgba(4,114,6,0.04) 0%, transparent 100%),
    var(--carbon);
  border: 1px dashed rgba(255,255,255,0.18);
  isolation: isolate;
}

/* Top · mark + ondas */
.embed-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.embed-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.22);
}
.embed-mark-dot {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 0 rgba(4,114,6,0.6);
  animation: embedPulse 2.4s ease-in-out infinite;
}
@keyframes embedPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(4,114,6,0.5); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(4,114,6,0); transform: scale(1.15); }
}

/* Ondas de voz · 5 barras animadas */
.embed-waves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
}
.embed-waves span {
  width: 2px;
  background: var(--verde);
  border-radius: 1px;
  opacity: 0.7;
  animation: embedWave 1.8s ease-in-out infinite;
}
.embed-waves span:nth-child(1) { height: 30%; animation-delay: 0s; }
.embed-waves span:nth-child(2) { height: 75%; animation-delay: 0.15s; }
.embed-waves span:nth-child(3) { height: 50%; animation-delay: 0.3s; }
.embed-waves span:nth-child(4) { height: 90%; animation-delay: 0.45s; }
.embed-waves span:nth-child(5) { height: 40%; animation-delay: 0.6s; }
@keyframes embedWave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* Cuerpo · pregunta + sub · grande, ocupa el espacio flexible */
.embed-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
}
.embed-h {
  font-family: 'Alice', serif;
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  color: white;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.embed-sub {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
}

/* CTA · botón principal · empezar conversación */
.embed-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: white;
  background: var(--verde);
  border: 1px solid var(--verde);
  padding: 16px 26px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.embed-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.55s var(--ease-out);
  z-index: -1;
}
.embed-cta:hover::before { transform: scaleX(1); transform-origin: left center; }
.embed-cta:hover { color: var(--carbon); border-color: white; }
.embed-cta-text { position: relative; z-index: 1; }
.embed-cta-arrow {
  display: block;
  width: 18px; height: 1px;
  background: currentColor;
  position: relative;
  z-index: 1;
  transition: width 0.4s var(--ease-out);
}
.embed-cta:hover .embed-cta-arrow { width: 28px; }

/* Footer del embed · meta tag */
.embed-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding-top: 20px;
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.embed-foot-tag {
  color: var(--verde);
  border: 1px dashed rgba(4,114,6,0.6);
  padding: 3px 8px;
  background: rgba(4,114,6,0.08);
}

@media (max-width: 1100px) {
  .manifiesto-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 28px 22px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 32px;
  }
  .gallery-center {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 480px;
    margin-bottom: 12px;
  }
  /* Fila 2 · single photos pareadas (sin huecos blancos) */
  .gallery-col-1 { grid-column: 1; grid-row: 2; padding-top: 0; }
  .gallery-col-5 { grid-column: 2; grid-row: 2; padding-top: 0; flex-direction: column; }
  /* Fila 3 · stacks pareados */
  .gallery-col-2 { grid-column: 1; grid-row: 3; padding-top: 0; flex-direction: column; }
  .gallery-col-4 { grid-column: 2; grid-row: 3; padding-top: 0; flex-direction: column; }
  .gallery-col { gap: 24px; }
  /* Reduce solapamiento de stacks en mobile · que respiren */
  .gallery-col-2 .gallery-item:nth-child(2) { margin-top: 0; }
  .gallery-col-4 .gallery-item:nth-child(2) { margin-top: 0; }
}

@media (max-width: 900px) {
  .manifiesto-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 24px 18px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 24px;
    margin-bottom: 64px;
  }
  .gallery-col { gap: 22px; }
  .gallery-center { min-height: 380px; margin-bottom: 8px; }
  .embed-h { font-size: clamp(20px, 5.5vw, 28px); margin-bottom: 18px; }
  .embed-sub { font-size: 13.5px; }
  .embed-cta { padding: 14px 22px; font-size: 10px; gap: 12px; letter-spacing: 0.35em; }
  .embed-body { max-width: 100%; }
  .gallery-embed-placeholder { padding: 32px 28px 28px; gap: 28px; }
  .embed-foot { font-size: 8.5px; letter-spacing: 0.3em; padding-top: 16px; }
  /* Suaviza rotaciones en mobile · evita que se toquen las esquinas */
  .gallery-col-1 .gallery-item { transform: rotate(-1.4deg); }
  .gallery-col-2 .gallery-item:nth-child(1) { transform: rotate(1deg); }
  .gallery-col-2 .gallery-item:nth-child(2) { transform: rotate(-0.8deg); }
  .gallery-col-4 .gallery-item:nth-child(1) { transform: rotate(-1deg); }
  .gallery-col-4 .gallery-item:nth-child(2) { transform: rotate(1.2deg); }
  .gallery-col-5 .gallery-item { transform: rotate(1.6deg); }
}

/* ─── Ventana de Jackie · bucle muted dentro de la tarjeta concierge ───
   El vídeo es un idle loop de 10 s · la conversación real arranca al click.
   Lazy: concierge.js le pone el src cuando la tarjeta entra en viewport. */
.embed-media {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  height: 290px;
  padding: 0;
  border: 1px dashed rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  overflow: hidden;
}
.embed-media:focus-visible {
  outline: 1px dashed var(--verde);
  outline-offset: 4px;
}
.embed-media-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  filter: saturate(0.94);
  transition: transform 5s var(--ease-out);
}
.embed-media:hover .embed-media-video,
.embed-media:focus-visible .embed-media-video { transform: scale(1.045); }
/* Degradado bajo para que el chip respire sobre el vídeo */
.embed-media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 64px;
  background: linear-gradient(180deg, transparent, rgba(26,26,24,0.55));
  pointer-events: none;
}
.embed-media-chip {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--crema);
  background: rgba(26,26,24,0.62);
  border: 1px dashed rgba(248,245,239,0.5);
  padding: 4px 9px 4px 11px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@media (max-width: 1100px) {
  .embed-media { height: 360px; }
}
@media (max-width: 900px) {
  .embed-media { height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .embed-media-video { transition: none; }
}

@media (max-width: 600px) {
  .manifiesto-gallery {
    gap: 28px 16px;
  }
  .gallery-col { gap: 24px; }
}

/* Reveal animations · escalonadas */
.manifiesto-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.manifiesto-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .manifiesto { padding: 100px 0; }
  .manifiesto-inner { padding: 0 24px; }
  .manifiesto-eyebrow { margin-bottom: 36px; }
  .manifiesto-headline { font-size: clamp(30px, 8vw, 48px); margin-bottom: 56px; }
  .manifiesto-lines { margin-bottom: 56px; }
  .manifiesto-line { font-size: clamp(15px, 4.5vw, 19px); gap: 12px; }
  .manifiesto-line::before { width: 14px; }
  .manifiesto-line-strong { font-size: clamp(17px, 5vw, 22px); }
}
