/* Pulsar — efectos compartidos por todas las páginas */

/* ---------- Tipografía de títulos ---------- */
.fx-page h1, .fx-page h2 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif !important;
  font-weight: 300 !important;
  font-optical-sizing: auto;
  letter-spacing: -.025em !important;
}
.fx-page h1 em, .fx-page h2 em { font-style: italic; }

/* ---------- Texto con degradé animado ---------- */
@keyframes fx-flow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.fx-grad {
  background: linear-gradient(90deg, #7fc4b4, #c1dbc1, #eed9b2, #7fc4b4, #c1dbc1);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: fx-flow 6s linear infinite;
  padding-bottom: .08em;
}

/* ---------- Botón principal con borde de luz ---------- */
@property --fx-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes fx-spin { to { --fx-ang: 360deg; } }
.fx-btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, #44877a, #2f6360);
  box-shadow: 0 10px 30px -10px rgba(68,135,122,.9);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.fx-btn::before {
  content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: conic-gradient(from var(--fx-ang), #44877a, #c1dbc1, #eed9b2, #44877a);
  animation: fx-spin 3.5s linear infinite;
}
.fx-btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, #44877a, #2a5b58);
}
.fx-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(193,219,193,.18), 0 18px 40px -12px rgba(68,135,122,1); }
.fx-btn:focus-visible, .fx-ghost:focus-visible { outline: 2px solid #c1dbc1; outline-offset: 4px; }

/* ---------- Botón secundario con brillo ---------- */
.fx-ghost {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-weight: 700; font-size: 16px; color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .3s ease, background .3s ease, transform .35s ease;
}
.fx-ghost::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s ease;
}
.fx-ghost:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.12); transform: translateY(-2px); }
.fx-ghost:hover::after { transform: translateX(120%); }

/* ---------- Entrada al cargar ---------- */
@keyframes fx-up { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.fx-up { animation: fx-up .9s cubic-bezier(.2,.7,.2,1) both; }
.fx-d1 { animation-delay: .12s; } .fx-d2 { animation-delay: .24s; } .fx-d3 { animation-delay: .36s; } .fx-d4 { animation-delay: .5s; }

/* ---------- Puntito que late ---------- */
@keyframes fx-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(193,219,193,.7); } 60% { box-shadow: 0 0 0 8px rgba(193,219,193,0); } }
.fx-dot { width: 8px; height: 8px; border-radius: 999px; background: #c1dbc1; animation: fx-pulse 2.2s ease-in-out infinite; flex: 0 0 auto; }

/* ---------- Tarjetas bento ---------- */
.fx-tile {
  position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--line, #e4e4e2);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease, border-color .3s ease;
}
.fx-tile:hover { transform: translateY(-6px); box-shadow: 0 28px 60px -24px rgba(35,75,74,.45); border-color: rgba(68,135,122,.5); }
.fx-tile .fx-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: #234b4a; }
.fx-tile .fx-more span { transition: transform .35s ease; }
.fx-tile:hover .fx-more span { transform: translateX(5px); }
.fx-dots-bg { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(35,75,74,.16) 1px, transparent 1px); background-size: 18px 18px; }
@keyframes fx-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.fx-float { animation: fx-float 6s ease-in-out infinite; }

/* ---------- Aparición suave al bajar ---------- */
@supports (animation-timeline: view()) {
  @keyframes fx-reveal { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .fx-page section:not(.fx-hero) > div:not([aria-hidden]) {
    animation: fx-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

/* ---------- WhatsApp flotante ---------- */
@keyframes fx-wa-ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }
.fx-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 58px; height: 58px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff;
  box-shadow: 0 14px 30px -8px rgba(18,140,70,.6);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.fx-wa::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: #25d366; z-index: -1; animation: fx-wa-ring 2.4s ease-out infinite; }
.fx-wa:hover { transform: scale(1.08) translateY(-2px); }
.fx-wa:focus-visible { outline: 3px solid #234b4a; outline-offset: 4px; }
.fx-wa-tip {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(6px);
  white-space: nowrap; background: #1c1c1c; color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.fx-wa:hover .fx-wa-tip { opacity: 1; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  .fx-grad, .fx-btn::before, .fx-up, .fx-dot, .fx-float, .fx-wa::before { animation: none !important; }
  .fx-page section:not(.fx-hero) > div:not([aria-hidden]) { animation: none !important; }
}
