/* =============================================================
   AMATORA · VERSIÓN CLARA (fondo blanco)
   Gemela de index.css. Mismo layout y mismos componentes;
   sólo cambia la capa de color: fondos claros, tinta oscura.
   No tocar index.css desde aquí: la versión oscura vive aparte.
   ============================================================= */

@font-face {
  font-family: Gerline;
  src: url('../fonts/Gerline.otf');
}

@font-face {
  font-family: Aeonik;
  src: url('../fonts/Aeonik.ttf');
}

@font-face {
  font-family: Goldplay;
  src: url('../fonts/Goldplay.otf');
}

@font-face {
  font-family: GoldplayBold;
  src: url('../fonts/Goldplay\ Bold.otf');
}

@font-face {
  font-family: Barlow;
  src: url('../fonts/Barlow.ttf');
}


:root {
  --swiper-navigation-color: #1F1F21;
  --swiper-pagination-color: #F05E23;

  /* --- Color de marca (invariante entre versiones) --- */
  --dark-color: #1F1F21;
  --mwhite-color: #F6F5EC;
  --yellow-color: #FFDA29;
  --orange-color: #F05E23;
  --blue-color: #000080;

  /* --- Capa clara --- */
  --bg: #FFFFFF;
  --bg-soft: #FFF7F0;      /* crema cálido para bandas */
  --bg-warm: #FFE7D5;      /* naranja muy diluido */
  --ink: #1F1F21;          /* texto principal */
  --line: rgba(31, 31, 33, 0.10);

  /* Degradado de marca para RELLENOS (el texto encima va oscuro) */
  --grad-marca: linear-gradient(90deg, #FFDA29, #F05E23);
  /* Degradado de marca para TEXTO sobre claro: el amarillo puro se pierde
     sobre blanco, así que el naranja pesa más que el ámbar. */
  --grad-texto: linear-gradient(90deg, #E8900A, #E24A10);
  /* Naranja de marca ya legible como texto pequeño sobre blanco */
  --naranja-tinta: #D2440C;
}

/* Scroll suave gestionado por Lenis (momentum premium).
   Se desactiva el smooth nativo para evitar dobles animaciones. */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  font-family: Aeonik;
  color: var(--ink);
}

/* Todos los títulos comparten la misma tipografía de marca.
   Se define aquí y no en cada etiqueta: un solo sitio que tocar. */
h1, h2, h3 {
  font-family: Gerline;
}

.GoldplayBold {
  font-family: GoldplayBold;
}

/* Texto en degradado de marca legible sobre fondo claro.
   Sustituye a `from-yellow to-orange` de la versión oscura. */
.texto-marca {
  background: var(--grad-texto);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Slider de partners ===== */
.slider {
  width: 100%;
  height: var(--height);
  overflow: hidden;
  z-index: 40;
  padding: 2px 0rem;
  mask-image: linear-gradient(to right, transparent, #000 10% 90%, transparent);
}

.slider .list {
  display: flex;
  width: 100%;
  height: 86px;
  min-width: calc(var(--width) * var(--quantity));
  position: relative;
  background: var(--bg);
}

.slider .list .item {
  width: var(--width);
  height: var(--height);
  position: absolute;
  left: 100%;
  animation: autoRun 55s linear infinite;
  transition: filter 0.5s;
  display: flex;
  align-items: center;
  animation-delay: calc((55s / var(--quantity)) * (var(--position) - 1) - 55s) !important;
}

.bg-gradiante { background: var(--grad-marca); }

.slider .list .item img {
  width: 100%;
  /* Los archivos de `logos-light/` ya vienen en tinta oscura (#1F1F21):
     no hace falta filtro, sólo bajar la intensidad para que no compitan. */
  opacity: 0.72;
}

@keyframes autoRun {
  from { left: 100%; }
  to   { left: calc(var(--width) * -1); }
}

.slider[reverse="true"] .item {
  animation: reversePlay 55s linear infinite;
}

@keyframes reversePlay {
  from { left: calc(var(--width) * -1); }
  to   { left: 100%; }
}

/* ===== Tarjetas de cristal (stats) · versión clara =====
   Sobre blanco el "liquid glass" oscuro no funciona: aquí el efecto
   se consigue con blanco puro, un halo cálido y sombra baja difusa. */
.glass {
  position: relative;
  border-radius: 15px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF7 100%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid rgba(240, 94, 35, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(31, 31, 33, 0.05),
    0 12px 32px -12px rgba(240, 94, 35, 0.32);
}

/* Easing elástico (del demo gooey nav) */
:root {
  --linear-ease: linear(0, 0.068, 0.19 2.7%, 0.804 8.1%, 1.037, 1.199 13.2%, 1.245, 1.27 15.8%, 1.274, 1.272 17.4%, 1.249 19.1%, 0.996 28%, 0.949, 0.928 33.3%, 0.926, 0.933 36.8%, 1.001 45.6%, 1.013, 1.019 50.8%, 1.018 54.4%, 1 63.1%, 0.995 68%, 1.001 85%, 1);
}

/* ===== Menú categorías · píldora deslizante ===== */
.menu-gooey {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px;
  border-radius: 99em;
}

.menu-gooey > a {
  position: relative;
  z-index: 2;
  flex: 1 1 0;            /* todos los items ocupan el mismo ancho → espaciado uniforme */
  text-align: center;
  padding: 8px 10px;
  border-radius: 99em;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(31, 31, 33, 0.8);
  text-decoration: none;
  transition: color 0.45s ease;
}

.menu-gooey > a.active {
  color: #1F1F21;
  font-weight: 600;
}

.menu-gooey .pill {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 99em;
  background: var(--grad-marca);
  box-shadow: 0 0 18px -3px rgba(240, 94, 35, 0.45);
  z-index: 1;
  pointer-events: none;
  transform: translateX(0);
  transition: transform 0.55s var(--linear-ease), width 0.55s var(--linear-ease);
  will-change: transform, width;
}

/* ===== Acordeón de servicios (Sección 4) ===== */
.acc-item {
  position: relative;
  z-index: 1;
  border-radius: 15px;
  border: 1px solid rgba(31, 31, 33, 0.12);
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 12px 28px -14px rgba(31, 31, 33, 0.45);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Cards levemente encimadas una sobre otra */
.acc-item + .acc-item {
  margin-top: -10px;
}

.acc-item.is-open {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF8F2 100%);
  border-color: rgba(240, 94, 35, 0.32);
  box-shadow: 0 18px 40px -20px rgba(240, 94, 35, 0.45);
}

.acc-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc-item.is-open .acc-body {
  max-height: 1400px;
}

.acc-arrow {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc-item.is-open .acc-arrow {
  transform: rotate(90deg);
}

/* Card Email · muro de emails en movimiento (marquee vertical con fade) */
.email-marquee {
  height: 340px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.email-track {
  display: flex;
  flex-direction: column;
}

.email-track img {
  width: 100%;
  display: block;
}

@keyframes email-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* Card Contenido · grid de creativos (full-bleed, fade arriba) */
.content-grid {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
}

.content-cell {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

/* ===== Móvil (<768px): el motor-swiper NO se inicializa → acordeón apilado ===== */
@media (max-width: 767px) {
  .motor-swiper { overflow: visible; }
  .motor-swiper .swiper-wrapper { display: flex; flex-direction: column; transform: none !important; }
  .motor-swiper .swiper-slide { width: 100%; height: auto; }
}

/* ===== Desktop (≥768px) ===== */
@media (min-width: 768px) {
  /* Sección "El motor": acordeón → slider de tarjetas siempre abiertas */
  .acc-grid .acc-item + .acc-item { margin-top: 0; }
  .acc-grid .acc-item {
    box-shadow: 0 14px 34px -18px rgba(31, 31, 33, 0.4);
  }
  .acc-grid .acc-item.is-open {
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF8F2 100%);
  }
  /* Todas las cards muestran su contenido en desktop */
  .acc-grid .acc-body { max-height: none !important; }
  .acc-grid .acc-arrow { display: none; }
  .acc-grid .acc-header { cursor: default; padding-bottom: 0.5rem; }
  /* Slides del slider: cada card con su altura natural, alineadas arriba */
  .motor-swiper .swiper-wrapper { align-items: flex-start; }
  .motor-swiper .swiper-slide { height: auto; }
  .motor-swiper .swiper-pagination { position: relative; margin-top: 1.75rem; }
}

/* ===== Sección Marcas · muro de logos estático con fade abajo ===== */
.marcas-muro {
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

.marcas-muro img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  /* Los SVG de `marcas-svg-light/` ya vienen en tinta oscura */
  opacity: 0.85;
  transition: opacity 0.35s ease;
}

.marcas-muro img:hover {
  opacity: 1;
}

/* ===== Casos de estudio · card sin foto =====
   Las tres cards conviven en la misma fila: las dos primeras traen imagen
   propia, ésta se resuelve con color. Va en CSS y no en un `style` inline
   porque GSAP borra los inline al hacer clearProps con reduced-motion. */
.caso-oscuro {
  background:
    radial-gradient(135% 95% at 88% -10%, rgba(120, 55, 25, 0.55) 0%, rgba(31, 31, 33, 0.97) 55%),
    #1F1F21;
}

/* ===== Paginación premium (estilo Apple) ===== */
.motor-swiper .swiper-pagination,
.slider-frena .swiper-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.motor-swiper .swiper-pagination-bullet,
.slider-frena .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  margin: 0 !important;
  background: rgba(31, 31, 33, 0.2);
  opacity: 1;
  transition: width .5s var(--linear-ease), background .45s ease;
}

.motor-swiper .swiper-pagination-bullet-active,
.slider-frena .swiper-pagination-bullet-active {
  width: 26px;
  border-radius: 99px;
  background: var(--grad-marca);
}

/* ===== Menú del nav (desktop): link activo según sección visible (scrollspy) ===== */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 99px;
  background: var(--grad-marca);
  transition: width .4s var(--linear-ease);
}

.nav-link.active {
  color: #1F1F21;
}

.nav-link.active::after {
  width: 100%;
}

/* ============================================================
   Sección Testimonios · el video manda
   ============================================================ */
/* El fondo es EXACTAMENTE el blanco del body: sin gradiente de sección no
   puede haber costura contra las secciones vecinas. Todo el color lo pone
   .testi-mesh, que se desvanece a nada antes de tocar los bordes. */
.testi {
  background: var(--bg);
  isolation: isolate;
}

/* Capa 1 · el color de la sección (crema + halos de marca),
   desvanecido arriba y abajo para que el empalme sea invisible */
.testi-mesh {
  background:
    radial-gradient(58% 40% at 8% 22%, rgba(240, 94, 35, 0.16), transparent 70%),
    radial-gradient(52% 40% at 92% 82%, rgba(255, 218, 41, 0.20), transparent 72%),
    radial-gradient(85% 70% at 50% 50%, rgba(255, 240, 228, 0.95), transparent 78%);
  filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

/* Capa 2 · rejilla técnica, desvanecida hacia los bordes */
.testi-lines {
  background-image:
    linear-gradient(to right, rgba(31, 31, 33, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 31, 33, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 45%, #000 0%, transparent 100%);
  mask-image: radial-gradient(72% 62% at 50% 45%, #000 0%, transparent 100%);
  opacity: 0.7;
}

/* Capa 3 · grano, mata el look "plano digital".
   Se desvanece en los bordes: cortado en seco dibujaba una línea. */
.testi-noise {
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

/* Titular · fragmento en degradado de marca */
.testi-underline {
  background: var(--grad-texto);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Comilla tipográfica sobredimensionada */
.testi-quote {
  position: absolute;
  left: -0.35rem;
  top: -2.6rem;
  font-family: Gerline;
  font-size: 6rem;
  line-height: 1;
  background: linear-gradient(180deg, #E8900A, #F05E23);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

/* Halo giratorio detrás del video */
.testi-halo {
  position: absolute;
  inset: -12% -6%;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      rgba(240, 94, 35, 0.45),
      rgba(255, 218, 41, 0.5),
      rgba(240, 94, 35, 0) 55%,
      rgba(255, 218, 41, 0.4));
  filter: blur(60px);
  opacity: 0.55;
  animation: testi-spin 20s linear infinite;
}

@keyframes testi-spin {
  to { transform: rotate(360deg); }
}

/* Marco del video · ligeramente inclinado, se endereza al pasar el cursor */
.testi-frame {
  position: relative;
  z-index: 1;
  padding: 9px;
  border-radius: 34px;
  background: linear-gradient(160deg, #FFFFFF, #FFF3E9 45%, #FFFFFF);
  box-shadow:
    0 30px 70px -30px rgba(31, 31, 33, 0.45),
    0 0 0 1px rgba(31, 31, 33, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: rotate(-2deg);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.testi-frame:hover {
  transform: rotate(0deg) translateY(-6px);
}

/* Firma · el logo es ancho y negro: caja rectangular para que respire y
   object-fit para que NUNCA se deforme al ajustarse */
.testi-logo-caja {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 92px;
  height: 56px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 31, 33, 0.1);
  background: #FFFFFF;
  box-shadow: 0 4px 14px -8px rgba(31, 31, 33, 0.4);
}

.testi-logo {
  width: 100%;
  height: 26px;
  object-fit: contain;
  opacity: 0.9;
}

/* Portada sobre el video · desaparece al reproducir.
   Va SOBRE el video (siempre oscuro), así que conserva el tratamiento oscuro. */
.testi-cover {
  cursor: pointer;
  background: linear-gradient(180deg,
      rgba(13, 13, 20, 0.72) 0%,
      rgba(13, 13, 20, 0) 30%,
      rgba(13, 13, 20, 0) 52%,
      rgba(13, 13, 20, 0.9) 100%);
  transition: opacity 0.5s ease, visibility 0.5s;
}

.testi-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Botón de play · núcleo de cristal, aro de marca girando y onda al pulso */
.testi-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  height: 96px;
  width: 96px;
  transform: translate(-50%, -50%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Aro exterior en degradado, girando despacio */
.testi-play-aro {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #FFDA29, #F05E23, rgba(255, 255, 255, 0.15) 55%, #FFDA29);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
  mask: radial-gradient(circle, transparent 60%, #000 61%);
  animation: testi-spin 6s linear infinite;
}

/* Núcleo: cristal esmerilado, se llena de color al pasar el cursor */
.testi-play-nucleo {
  position: relative;
  display: grid;
  place-items: center;
  height: 68px;
  width: 68px;
  border-radius: 50%;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: background 0.45s ease, color 0.45s ease, box-shadow 0.45s ease;
}

/* Onda que sale del núcleo */
.testi-play-nucleo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 218, 41, 0.55);
  animation: testi-pulse 2.6s ease-out infinite;
}

.testi-frame:hover .testi-play {
  transform: translate(-50%, -50%) scale(1.06);
}

.testi-frame:hover .testi-play-nucleo {
  color: #1F1F21;
  background: linear-gradient(135deg, #FFDA29, #F05E23);
  box-shadow: 0 16px 44px rgba(240, 94, 35, 0.5);
}

@keyframes testi-pulse {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Punto indicador junto a "Ver testimonio" */
.testi-live {
  display: inline-block;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #FFDA29;
  animation: testi-blink 2s ease-in-out infinite;
}

@keyframes testi-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 218, 41, 0.55); }
  50%      { opacity: 0.45; box-shadow: 0 0 0 6px rgba(255, 218, 41, 0); }
}

/* Móvil · el marco se endereza y el play se recoge */
@media (max-width: 767px) {
  .testi-frame { transform: rotate(-1.5deg); }
  .testi-quote { font-size: 4.5rem; top: -1.9rem; }
  .testi-play { height: 84px; width: 84px; }
  .testi-play-nucleo { height: 60px; width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .testi-halo,
  .testi-play-aro,
  .testi-play-nucleo::before,
  .testi-live { animation: none; }
  .testi-frame { transform: none; }
}
