/* =========================================================================
   V2 — Mejoras high-end: acordeón de servicios, pilares, carrusel,
   zoom de galería, brillo en CTAs. Se carga DESPUÉS de styles.css.
   ========================================================================= */

:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- CTA primario con brillo interno animado ------------------------------ */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: '';
  position: absolute; top: -20%; bottom: -20%;
  width: 36%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45) 50%, transparent);
  transform: skewX(-22deg);
}
@media (prefers-reduced-motion: no-preference) {
  .btn-primary::after { animation: btnShine 3.4s var(--ease) infinite; }
}
@keyframes btnShine {
  0% { left: -60%; }
  46% { left: 130%; }
  100% { left: 130%; }
}

/* --- CTA estrella con micro-pulsación -------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .btn-pulse { animation: ctaPulse 2.8s infinite; }
}
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 45%, transparent), 0 14px 40px rgba(0,0,0,0.45); }
  60% { box-shadow: 0 0 0 18px transparent, 0 14px 40px rgba(0,0,0,0.45); }
  100% { box-shadow: 0 0 0 0 transparent, 0 14px 40px rgba(0,0,0,0.45); }
}

/* --- Acordeón de servicios --------------------------------------------------- */
.svc-acc { display: flex; flex-direction: column; gap: 14px; }
.acc-item { overflow: visible; }
.acc-head {
  display: flex; align-items: center; gap: 18px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font); color: var(--text);
  padding: 22px 26px;
}
.acc-head .svc-ic { flex: 0 0 52px; transition: background 0.4s, transform 0.5s var(--ease); }
.acc-item.open .acc-head .svc-ic {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0a0a0b;
}
.acc-head h3 { margin: 0; font-size: clamp(17px, 2.2vw, 21px); font-weight: 800; letter-spacing: -0.3px; flex: 1; }
.acc-head .acc-num {
  font-family: var(--font-display); font-size: 22px; color: var(--gold-dark);
  letter-spacing: 1px; flex: 0 0 auto;
}
.acc-head .acc-plus {
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.14); color: var(--gold);
  transition: transform 0.5s var(--ease), background 0.4s, border-color 0.4s;
}
.acc-item.open .acc-plus { transform: rotate(45deg); border-color: var(--line); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.acc-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.65s var(--ease);
}
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-inner { min-height: 0; overflow: hidden; }
.acc-content {
  padding: 2px 26px 26px 96px;
  display: flex; flex-direction: column; gap: 16px;
}
@media (max-width: 640px) { .acc-content { padding-left: 26px; } }
.acc-content p { margin: 0; color: var(--muted); font-size: 15px; max-width: 720px; text-wrap: pretty; }
.acc-garantia {
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 720px;
  font-size: 13.5px; color: var(--gold-light); font-weight: 600;
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 12px 16px;
}
.acc-garantia .ic { display: inline-flex; color: var(--gold); flex: 0 0 auto; margin-top: 1px; }
.acc-garantia strong { color: var(--gold); font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; font-size: 11.5px; display: block; margin-bottom: 2px; }
.acc-garantia span { display: block; color: var(--text); font-weight: 500; }

/* --- Marco geométrico flotante del retrato ------------------------------------ */
.portrait-wrap { position: relative; }
.portrait-wrap::before {
  content: ''; position: absolute; inset: -14px 14px 14px -14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  pointer-events: none;
}
.portrait-wrap::after {
  content: ''; position: absolute; right: -10px; bottom: -10px;
  width: 84px; height: 84px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  border-radius: 0 0 var(--radius) 0;
  pointer-events: none;
}

/* --- Pilares de cumplimiento ---------------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: clamp(36px, 5vw, 56px); }
.pillar { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; }
.pillar .svc-ic { width: 48px; height: 48px; }
.pillar h3 { margin: 0; font-size: 17.5px; font-weight: 800; letter-spacing: -0.2px; }
.pillar h3 em { font-style: normal; color: var(--gold); }
.pillar p { margin: 0; color: var(--muted); font-size: 14px; text-wrap: pretty; }

/* --- Galería de proyectos con zoom suave ------------------------------------------ */
.project-media { overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.project image-slot { transition: transform 0.9s var(--ease); will-change: transform; }
.project:hover image-slot { transform: scale(1.07); }
.project-hito {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  font-size: 12.5px; font-weight: 600; color: var(--gold-light);
}
.project-hito .ic { display: inline-flex; color: var(--gold); flex: 0 0 auto; }

/* --- Carrusel de testimonios -------------------------------------------------------- */
.testi-carousel { position: relative; max-width: 760px; margin: 40px auto 0; }
.testi-viewport { overflow: hidden; }
.testi-track {
  display: flex;
  transition: transform 0.8s var(--ease);
}
.testi-track .testi { flex: 0 0 100%; box-sizing: border-box; }
.testi-track .testi + .testi { margin-left: 24px; }
.testi-track .testi { flex-basis: 100%; }
.testi-nav {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 26px;
}
.testi-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); color: var(--gold);
  border: 1px solid rgba(255,255,255,0.14); cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.testi-arrow:hover { border-color: var(--line); background: color-mix(in srgb, var(--gold) 7%, transparent); transform: translateY(-2px); }
.testi-dots { display: flex; gap: 9px; }
.testi-dot {
  width: 8px; height: 8px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255,255,255,0.18); padding: 0;
  transition: background 0.3s, width 0.45s var(--ease);
}
.testi-dot.active { background: var(--gold); width: 26px; }
