/* Mejoras visuales: reveal, progreso de pasos, hover, iconos y header */

/* ───────── Aparición al hacer scroll ───────── */
.fx-pre { opacity: 0; transform: translateY(18px); }
.fx-in {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.22,1,.36,1) var(--fx-d,0ms),
              transform .55s cubic-bezier(.22,1,.36,1) var(--fx-d,0ms);
}

/* ───────── Barra de progreso de los 5 pasos ───────── */
.fx-rail { position: relative; margin-top: 2.5rem; height: 28px; display: none; }
@media (min-width: 640px) { .fx-rail { display: block; } }
.fx-rail-line { position: absolute; left: 14px; right: 14px; top: 13px; height: 2px; background: var(--border, #dbe3ee); border-radius: 2px; }
.fx-rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--primary); border-radius: 2px; transition: width .15s linear; }
.fx-rail-dots { position: absolute; inset: 0 14px; display: flex; justify-content: space-between; }
.fx-dot {
  width: 28px; height: 28px; margin: 0 -14px; border-radius: 999px; display: grid; place-items: center;
  font: 700 12px/1 var(--font-display, inherit); background: var(--background, #fff); color: var(--foreground);
  border: 2px solid var(--border, #dbe3ee); transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.fx-dot.on { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.12); }
.fx-rail + .grid { margin-top: 1.25rem !important; }
#service article.fx-active .font-display.text-sm { color: var(--primary); }

/* ───────── Hover ───────── */
.image-card { overflow: hidden; }
.image-card img { transition: transform .9s cubic-bezier(.22,1,.36,1); will-change: transform; }
.image-card:hover img { transform: scale(1.06); }
main a[class*="bg-primary "], main button[class*="bg-primary "], header a[class*="bg-primary "] {
  position: relative; overflow: hidden; isolation: isolate;
}
main a[class*="bg-primary "]::after, main button[class*="bg-primary "]::after, header a[class*="bg-primary "]::after {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
}
main a[class*="bg-primary "]:hover::after, main button[class*="bg-primary "]:hover::after, header a[class*="bg-primary "]:hover::after {
  transform: translateX(120%) skewX(-20deg); transition: transform .7s ease;
}

/* ───────── Iconos de categoría (reemplazan emojis) ───────── */
.fx-ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; margin-right: .45em; }
.category-icon .fx-ico { margin: 0; width: 1.25rem; height: 1.25rem; color: var(--primary); }

/* ───────── Header al hacer scroll ───────── */
header.sticky { transition: box-shadow .3s ease, background-color .3s ease; }
header.sticky.fx-scrolled { box-shadow: 0 8px 30px -12px rgba(2,36,86,.28); background-color: color-mix(in oklab, var(--background) 94%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .fx-pre { opacity: 1; transform: none; }
  .fx-in, .image-card img, .fx-dot { transition: none; }
  .image-card:hover img { transform: none; }
}

.image-card-caption-stack span { display: flex; align-items: center; gap: .55rem; }
.image-card-caption-stack .fx-ico { margin: 0; color: var(--primary); }

/* ───────── Mazo de cartas (5 pasos) ───────── */
.fx-stack-hidden { display: none !important; }
.fx-stack-wrap { position: relative; margin-top: 1.25rem; }
.fx-stack-stage { position: sticky; }
.fx-stack-stage .fx-card {
  position: absolute; inset: 0; margin: 0 auto; width: min(100%, 860px); height: 100%;
  background: #fff; transform-origin: 50% 100%; will-change: transform;
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 18px 50px -18px rgba(2,36,86,.28), 0 2px 8px rgba(2,36,86,.06);
}
.fx-stack-stage .fx-card h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin-top: 0; }
.fx-stack-stage .fx-card p { font-size: clamp(.95rem, 1.6vw, 1.15rem); max-width: 56ch; }
.fx-stack-stage .fx-card .font-display.text-sm { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.fx-stack-stage .fx-card > div:first-child span.grid { width: 3.25rem; height: 3.25rem; }
.fx-stack-stage .fx-card > div:first-child span.grid svg { width: 1.5rem; height: 1.5rem; }
@media (min-width: 640px) { .fx-stack-stage .fx-card { transition: none; } }

/* overflow-x:hidden en el contenedor raíz rompe position:sticky; clip evita el scroll horizontal sin crear contenedor de scroll */
.overflow-x-hidden { overflow-x: clip !important; }
.fx-stack-stage { background: var(--background, #fff); padding-top: .25rem; }
.fx-stack-stage .fx-rail { display: block; margin-top: 0; margin-bottom: .75rem; }
.fx-cards { position: relative; clip-path: inset(-60px -60px -24px -60px); }
.fx-stack-stage .fx-card { inset: 0; }

/* ───────── Mazo horizontal: detalles ───────── */
.fx-cards { clip-path: none; }
.fx-stack-stage .fx-card { transform-origin: 50% 60%; backface-visibility: hidden; }
.fx-stack-stage .fx-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 5px; width: calc(var(--e3, 0) * 100%);
  background: linear-gradient(90deg, var(--primary), oklch(72% .17 150)); z-index: 2;
}
.fx-stack-stage .fx-card > div:first-child span.grid {
  transform: scale(calc(.5 + .5 * var(--e2, 1))) rotate(calc((1 - var(--e2, 1)) * -40deg));
}
.fx-stack-stage .fx-card h3 { transform: translateX(calc((1 - var(--e2, 1)) * 60px)); opacity: var(--e2, 1); position: relative; z-index: 1; }
.fx-stack-stage .fx-card p { transform: translateX(calc((1 - var(--e3, 1)) * 60px)); opacity: var(--e3, 1); position: relative; z-index: 1; }
.fx-ghost {
  position: absolute; right: clamp(.5rem, 2vw, 1.75rem); bottom: -0.18em; z-index: 0; pointer-events: none;
  font: 800 clamp(7rem, 20vw, 14rem)/1 var(--font-display, inherit); letter-spacing: -.05em; color: var(--primary);
  opacity: calc(.05 + .06 * var(--e3, 1)); transform: translateX(calc((1 - var(--e3, 1)) * 80px));
}
.fx-stack-stage .fx-card > div:first-child { position: relative; z-index: 1; }

/* ───────── Cartas 25% más chicas + ilustración de fondo ───────── */
.fx-stack-stage .fx-card { width: min(100%, 645px); padding: clamp(1rem, 2.4vw, 1.75rem); }
.fx-stack-stage .fx-rail { width: min(100%, 645px); margin-left: auto; margin-right: auto; }
.fx-stack-stage .fx-card h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
.fx-stack-stage .fx-card p { font-size: clamp(.85rem, 1.3vw, .95rem); max-width: 34ch; }
.fx-stack-stage .fx-card .font-display.text-sm { font-size: clamp(1.1rem, 2.2vw, 1.6rem); }
.fx-stack-stage .fx-card > div:first-child span.grid { width: 2.6rem; height: 2.6rem; }
.fx-ghost { display: none; }
.fx-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: 0; pointer-events: none;
  background-repeat: no-repeat; background-position: right center; background-size: auto 92%;
  opacity: calc(.18 + .4 * var(--e3, 1));
  transform: translateX(calc((1 - var(--e3, 1)) * 40px));
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42%);
          mask-image: linear-gradient(to right, transparent 0%, #000 42%);
}
@media (max-width: 639px) { .fx-art { width: 75%; opacity: calc(.06 + .2 * var(--e3, 1)); } }
.fx-stack-stage .fx-card > div:first-child, .fx-stack-stage .fx-card h3, .fx-stack-stage .fx-card p { position: relative; z-index: 1; }

/* Título de la sección dentro de la parte fija (mismo estilo que el original) */
.fx-stack-stage .fx-head { margin-bottom: 2rem; }

/* ───────── Mazo automático: sección en flujo normal (sin fijar) ───────── */
.fx-stack-wrap { margin-top: 2.5rem; }
.fx-stack-stage { position: relative; top: auto; height: auto !important; background: transparent; padding-top: 0; }
.fx-stack-stage .fx-rail { margin-bottom: 1.25rem; }
.fx-dot { cursor: pointer; padding: 0; appearance: none; -webkit-appearance: none; }
.fx-dot:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 50%, transparent); outline-offset: 2px; }
.fx-dot:hover:not(.on) { border-color: var(--primary); }
#service { padding-bottom: 3.5rem; }

/* ───────── Dos columnas: texto a la izquierda, mazo a la derecha ───────── */
.fx-rail { display: block; margin: 1.5rem 0 0; max-width: 28rem; }
.fx-stack-wrap { margin-top: 2rem; }
@media (min-width: 1024px) {
  .fx-split > div {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    column-gap: 3.5rem; align-items: center;
  }
  .fx-split > div > .max-w-2xl { grid-column: 1; grid-row: 1; align-self: end; }
  .fx-split > div > .fx-rail    { grid-column: 1; grid-row: 2; align-self: start; width: 100%; }
  .fx-split > div > .fx-stack-wrap { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .fx-split .fx-stack-stage .fx-card { margin: 0 0 0 auto; width: calc(100% - 2rem); max-width: 600px; }
}
.fx-split .max-w-2xl h2 { text-wrap: balance; }

/* ───────── Rubros: cintas de píldoras ───────── */
.fx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-rubros { padding-top: 4.5rem; padding-bottom: 4.5rem; overflow: hidden; }
.fx-marquee {
  position: relative; left: 50%; width: 100vw; margin: 2.25rem 0 0 -50vw;
  display: flex; flex-direction: column; gap: .9rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.fx-track { display: flex; width: max-content; will-change: transform; }
.fx-track-group { display: flex; gap: .9rem; padding-right: .9rem; flex: none; }
.fx-left  { animation: fx-marq 55s linear infinite; }
.fx-right { animation: fx-marq 62s linear infinite reverse; }
@keyframes fx-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fx-marquee:hover .fx-track { animation-play-state: paused; }
.fx-chip {
  display: inline-flex; align-items: center; gap: .75rem; flex: none; white-space: nowrap;
  padding: .55rem 1.35rem .55rem .55rem; border-radius: 999px;
  background: var(--surface, #f4f8fb); border: 1px solid var(--glass-border, #e3ebf3);
  font: 600 .95rem/1 var(--font-sans, inherit); color: var(--foreground);
  box-shadow: 0 1px 2px rgba(2,36,86,.05); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.fx-chip svg {
  width: 2.5rem; height: 2.5rem; padding: .6rem; flex: none; border-radius: 999px;
  background: var(--primary-soft, #e3f5ec); color: var(--primary);
}
.fx-chip:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 24px -10px rgba(15,138,99,.45); }
@media (max-width: 639px) { .fx-chip { font-size: .88rem; } .fx-chip svg { width: 2.2rem; height: 2.2rem; padding: .5rem; } }
@media (min-width: 1024px) {
  .fx-rubros .max-w-2xl { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); column-gap: 3rem; align-items: end; }
  .fx-rubros .max-w-2xl > .section-kicker { grid-column: 1; grid-row: 1; }
  .fx-rubros .max-w-2xl > h2 { grid-column: 1; grid-row: 2; }
  .fx-rubros .max-w-2xl > p:not(.section-kicker) { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; padding-bottom: .5rem; }
}
.fx-rubros .max-w-2xl h2 { text-wrap: balance; }

/* ───────── Formulario: estados de envío ───────── */
.fx-form-msg { margin-top: .9rem; font-size: .9rem; line-height: 1.45; color: #b42318; }
.fx-form-msg:empty { display: none; }
.fx-form-msg a { font-weight: 700; text-decoration: underline; }
.fx-form-ok {
  border-radius: .5rem; background: var(--background, #fff); color: var(--foreground);
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem); text-align: center;
  box-shadow: 0 25px 60px -25px rgba(0,0,0,.45); animation: fx-ok-in .5s cubic-bezier(.22,1,.36,1);
}
.fx-form-ok[hidden], form[hidden] { display: none !important; }
.fx-form-ok h3 { font: 700 1.6rem/1.2 var(--font-display, inherit); }
.fx-form-ok p { margin: .6rem auto 0; max-width: 28rem; color: var(--muted-foreground, #5b6b7f); line-height: 1.55; }
.fx-form-ok-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.fx-form-ok-actions .fx-wa, .fx-form-ok-actions .fx-again {
  cursor: pointer; border-radius: .5rem; padding: .8rem 1.25rem; font-weight: 600; font-size: .95rem; border: 1px solid var(--border, #dbe3ee); background: #fff; color: var(--foreground);
  transition: border-color .2s, color .2s;
}
.fx-form-ok-actions .fx-wa { background: var(--primary); color: #fff; border-color: var(--primary); }
.fx-form-ok-actions .fx-again:hover { border-color: var(--primary); color: var(--primary); }
@keyframes fx-ok-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fx-ok-check { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

/* ───────── Desplegables de región y comuna ───────── */
select.fx-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; background-color: #fff; color: var(--foreground);
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem;
}
select.fx-select:disabled { cursor: not-allowed; background-color: #f1f5f9; color: #8a99ab; }
select.fx-select:invalid { color: #6b7a8c; }
select.fx-select option { color: #0f2236; }

/* ───────── Header: navegación ───────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.fx-anchor { scroll-margin-top: 5rem; }
header nav a { position: relative; }
header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; border-radius: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
header nav a:hover::after, header nav a.fx-nav-active::after { transform: scaleX(1); }
header nav a.fx-nav-active { color: var(--foreground); }

.fx-header-actions { display: flex; align-items: center; gap: .6rem; }
.fx-burger {
  display: none; width: 2.75rem; height: 2.75rem; border-radius: .5rem; border: 1px solid var(--border, #dbe3ee);
  background: #fff; cursor: pointer; padding: 0; position: relative; flex: none;
}
.fx-burger span { position: absolute; left: .8rem; right: .8rem; height: 2px; background: var(--foreground); border-radius: 2px; transition: transform .25s ease, opacity .2s ease, top .25s ease; }
.fx-burger span:nth-child(1) { top: 1rem; } .fx-burger span:nth-child(2) { top: 1.33rem; } .fx-burger span:nth-child(3) { top: 1.66rem; }
.fx-burger.open span:nth-child(1) { top: 1.33rem; transform: rotate(45deg); }
.fx-burger.open span:nth-child(2) { opacity: 0; }
.fx-burger.open span:nth-child(3) { top: 1.33rem; transform: rotate(-45deg); }
.fx-burger:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 50%, transparent); outline-offset: 2px; }

.fx-menu {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--background, #fff); border-bottom: 1px solid var(--border, #dbe3ee);
  box-shadow: 0 20px 40px -20px rgba(2,36,86,.35); padding: .5rem 1.25rem 1.25rem; animation: fx-menu-in .25s ease;
}
.fx-menu[hidden] { display: none; }
.fx-menu > a { display: block; padding: .95rem .25rem; font-weight: 600; border-bottom: 1px solid var(--border, #e8eef5); color: var(--foreground); }
.fx-menu-contact { margin-top: .9rem; display: grid; gap: .55rem; font-size: .92rem; }
.fx-menu-contact a { color: var(--primary); font-weight: 600; }
@keyframes fx-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) { .fx-burger { display: block; } }

/* ───────── Envío del formulario: secuencia animada ───────── */
/* 1) los campos se retiran uno a uno */
@keyframes fx-field-out { to { opacity: 0; transform: translateY(-16px) scale(.96); filter: blur(2px); } }
.fx-leaving .grid > div, .fx-leaving button[type="submit"] {
  animation: fx-field-out .38s cubic-bezier(.4, 0, 1, 1) both; animation-delay: calc(var(--i, 0) * 28ms);
}
.fx-leaving .fx-form-msg { display: none; }

/* 2) tarjeta de estado centrada, del mismo alto que el formulario */
.fx-form-ok { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.fx-form-ok[hidden] { display: none; }
.fx-stage { position: relative; width: 240px; height: 170px; margin: 0 auto .5rem; }
.fx-env { width: 100%; height: 100%; overflow: visible; }
.fx-env-shadow { fill: rgba(11, 42, 85, .16); transform-box: fill-box; transform-origin: center; animation: fx-shadow 2.2s ease-in-out infinite; }
.fx-env-g { transform-box: fill-box; transform-origin: 50% 70%; animation: fx-env-in .55s cubic-bezier(.22, 1, .36, 1) both, fx-bob 2.2s 1.9s ease-in-out infinite; }
.fx-letter { animation: fx-letter 1s .35s cubic-bezier(.65, 0, .35, 1) both; }
.fx-flap { transform-box: fill-box; transform-origin: 50% 0; animation: fx-flap .5s 1.25s cubic-bezier(.4, 0, .2, 1) both; }
.fx-seal { transform-box: fill-box; transform-origin: center; animation: fx-seal .45s 1.7s cubic-bezier(.34, 1.8, .64, 1) both; }
@keyframes fx-env-in { from { opacity: 0; transform: translateY(18px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes fx-letter { from { transform: translateY(0); } to { transform: translateY(26px); } }
@keyframes fx-flap { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fx-seal { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fx-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.86); opacity: .7; } }

/* 3) confirmado: el sobre sale volando, aparece el check y estalla el confeti */
.fx-form-ok[data-state="done"] .fx-env-g { animation: fx-fly .8s cubic-bezier(.5, 0, .75, 0) both; }
.fx-form-ok[data-state="done"] .fx-env-shadow { animation: fx-fade-out .3s ease both; }
@keyframes fx-fly { to { opacity: 0; transform: translate(150px, -120px) rotate(26deg) scale(.5); } }
@keyframes fx-fade-out { to { opacity: 0; } }
.fx-badge {
  position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 999px;
  background: var(--primary); display: grid; place-items: center; transform: scale(0); pointer-events: none;
}
.fx-badge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 3px solid var(--primary); opacity: 0; }
.fx-badge svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.fx-form-ok[data-state="done"] .fx-badge { animation: fx-badge .55s .55s cubic-bezier(.34, 1.7, .64, 1) both; }
.fx-form-ok[data-state="done"] .fx-badge::after { animation: fx-ring .9s .7s ease-out both; }
.fx-form-ok[data-state="done"] .fx-badge svg { animation: fx-draw .45s .95s ease-out both; }
@keyframes fx-badge { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
@keyframes fx-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }

.fx-confetti { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.fx-confetti i {
  position: absolute; left: 0; top: 0; width: var(--s); height: calc(var(--s) * .55); margin: calc(var(--s) * -.3) 0 0 calc(var(--s) * -.5);
  background: var(--c); border-radius: 1px; opacity: 0; animation: fx-confetti 1.6s var(--d, 0ms) cubic-bezier(.15, .75, .35, 1) forwards;
}
.fx-confetti i.dot { height: var(--s); border-radius: 999px; }
@keyframes fx-confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.3); }
  30% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) * .5)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.12), calc(var(--y) + 190px)) rotate(var(--r)) scale(1); }
}

/* textos de la tarjeta */
.fx-ok-title, .fx-ok-text { text-align: center; }
.fx-form-ok[data-state="sending"] .fx-form-ok-actions { display: none; }
.fx-form-ok[data-state="done"] .fx-ok-title, .fx-form-ok[data-state="done"] .fx-ok-text, .fx-form-ok[data-state="done"] .fx-form-ok-actions {
  animation: fx-rise .5s 1.1s cubic-bezier(.22, 1, .36, 1) both;
}
.fx-form-ok[data-state="done"] .fx-ok-text { animation-delay: 1.2s; }
.fx-form-ok[data-state="done"] .fx-form-ok-actions { animation-delay: 1.35s; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fx-form-ok[data-state="sending"] .fx-ok-title::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: fx-dots 1.2s steps(4, end) infinite; }
@keyframes fx-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* sin animaciones: estado final directo */
@media (prefers-reduced-motion: reduce) {
  .fx-leaving .grid > div, .fx-leaving button[type="submit"] { animation: none; }
  .fx-env-g, .fx-letter, .fx-flap, .fx-seal, .fx-env-shadow, .fx-form-ok { animation: none !important; }
  .fx-form-ok[data-state="done"] .fx-env { display: none; }
  .fx-form-ok[data-state="done"] .fx-badge { transform: none; animation: none !important; }
  .fx-form-ok[data-state="done"] .fx-badge svg { stroke-dashoffset: 0; animation: none !important; }
  .fx-form-ok[data-state="done"] .fx-ok-title, .fx-form-ok[data-state="done"] .fx-ok-text, .fx-form-ok[data-state="done"] .fx-form-ok-actions { animation: none; }
}

/* ───────── Foto adjunta: vista previa ───────── */
.fx-file {
  display: flex; align-items: center; gap: .9rem; padding: .7rem .85rem; border-radius: .6rem;
  border: 1.5px solid var(--primary); background: color-mix(in oklab, var(--primary) 7%, #fff);
  animation: fx-file-in .35s cubic-bezier(.22, 1, .36, 1);
}
.fx-file[hidden] { display: none; }
.fx-file-thumb { width: 3.6rem; height: 3.6rem; object-fit: cover; border-radius: .45rem; flex: none; background: #e8eef5; border: 1px solid rgba(2,36,86,.1); }
.fx-file.loading .fx-file-thumb { visibility: hidden; }
.fx-file-info { min-width: 0; flex: 1; display: grid; gap: .15rem; }
.fx-file-name { font-size: .9rem; font-weight: 600; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-file-meta { font-size: .8rem; color: var(--primary); font-weight: 600; }
.fx-file.loading .fx-file-meta { color: var(--muted-foreground, #5b6b7f); font-weight: 500; }
.fx-file-btn {
  cursor: pointer; flex: none; font-size: .82rem; font-weight: 600; padding: .45rem .75rem; border-radius: .45rem;
  border: 1px solid var(--border, #dbe3ee); background: #fff; color: var(--foreground); transition: border-color .2s, color .2s;
}
.fx-file-btn:hover { border-color: var(--primary); color: var(--primary); }
.fx-file-remove:hover { border-color: #b42318; color: #b42318; }
.fx-file-err { margin-top: .5rem; font-size: .85rem; color: #b42318; }
.fx-file-err:empty { display: none; }
@keyframes fx-file-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 479px) { .fx-file { flex-wrap: wrap; } .fx-file-info { flex-basis: calc(100% - 4.5rem); } }

/* ───────── Zonas táctiles de al menos 44 px (sin cambiar el diseño) ───────── */
.fx-dot { position: relative; }
.fx-dot::before { content: ""; position: absolute; inset: -8px; border-radius: 999px; }   /* 28 px visibles, 44 px de toque */
footer a { min-height: 44px; }
header nav a { padding-block: .65rem; margin-block: -.65rem; }
header nav a::after { bottom: .15rem; }
.fx-menu > a { min-height: 48px; }
.fx-menu-contact a { display: block; padding: .5rem 0; }

/* La máscara de la cinta recorta lo que sobresale: margen interno para que la cápsula elevada y su sombra entren completas */
.fx-marquee { padding-block: 16px; margin-top: calc(2.25rem - 16px); margin-bottom: -16px; }

/* ───────── Preguntas frecuentes ───────── */
.fx-faq { padding: 5rem 1.25rem; background: var(--background, #fff); scroll-margin-top: 5rem; }
.fx-faq-wrap { max-width: 80rem; margin: 0 auto; display: grid; gap: 2.5rem; }
.fx-faq-lead { margin-top: 1rem; max-width: 26rem; color: var(--muted-foreground, #5b6b7f); line-height: 1.6; }
.fx-faq-cta {
  display: inline-flex; margin-top: 1.5rem; padding: .85rem 1.25rem; border-radius: .5rem; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--border, #dbe3ee); color: var(--foreground); background: #fff; transition: border-color .2s, color .2s;
}
.fx-faq-cta:hover { border-color: var(--primary); color: var(--primary); }
.fx-faq-list { display: grid; gap: .75rem; align-content: start; }
.fx-faq-item { border: 1px solid var(--border, #dbe3ee); border-radius: .75rem; background: #fff; transition: border-color .25s, box-shadow .25s; }
.fx-faq-item.open { border-color: var(--primary); box-shadow: 0 12px 30px -18px rgba(15, 138, 99, .45); }
.fx-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; cursor: pointer;
  padding: 1.1rem 1.25rem; min-height: 56px; background: none; border: 0; font: 600 1.02rem/1.35 var(--font-display, inherit); color: var(--foreground);
}
.fx-faq-q:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 50%, transparent); outline-offset: -3px; border-radius: .75rem; }
.fx-faq-ico { position: relative; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 999px; background: var(--primary-soft, #e3f5ec); transition: transform .3s ease, background .25s; }
.fx-faq-ico::before, .fx-faq-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: .8rem; height: 2px; margin: -1px 0 0 -.4rem; background: var(--primary); border-radius: 2px; transition: transform .3s ease; }
.fx-faq-ico::after { transform: rotate(90deg); }
.fx-faq-item.open .fx-faq-ico { background: var(--primary); transform: rotate(180deg); }
.fx-faq-item.open .fx-faq-ico::before, .fx-faq-item.open .fx-faq-ico::after { background: #fff; }
.fx-faq-item.open .fx-faq-ico::after { transform: rotate(0); }
.fx-faq-a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .35s cubic-bezier(.22, 1, .36, 1), visibility 0s .35s; }
.fx-faq-a > div { overflow: hidden; }
.fx-faq-a p { padding: 0 1.25rem 1.25rem; color: var(--muted-foreground, #5b6b7f); line-height: 1.65; }
.fx-faq-item.open .fx-faq-a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .35s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
@media (min-width: 1024px) {
  .fx-faq { padding: 6rem 2rem; }
  .fx-faq-wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; }
  .fx-faq-head { position: sticky; top: 7rem; }
}
@media (prefers-reduced-motion: reduce) { .fx-faq-a, .fx-faq-ico, .fx-faq-ico::before, .fx-faq-ico::after { transition: none; } }

/* ───────── Aviso de cookies ───────── */
.fx-cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 44rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; padding: 1rem 1.25rem; border-radius: .9rem;
  background: #fff; color: var(--foreground); border: 1px solid var(--border, #dbe3ee);
  box-shadow: 0 25px 60px -20px rgba(2, 36, 86, .45); transform: translateY(24px); opacity: 0; transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.fx-cookies.show { transform: none; opacity: 1; }
.fx-cookies p { flex: 1 1 18rem; font-size: .9rem; line-height: 1.5; color: var(--muted-foreground, #5b6b7f); margin: 0; }
.fx-cookies p strong { color: var(--foreground); }
.fx-cookies p a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.fx-cookies-actions { display: flex; gap: .6rem; flex: none; }
.fx-cookies-actions button {
  cursor: pointer; min-height: 44px; padding: 0 1.2rem; border-radius: .5rem; font-weight: 600; font-size: .92rem;
  border: 1px solid var(--border, #dbe3ee); background: #fff; color: var(--foreground); transition: border-color .2s, color .2s, background .2s;
}
.fx-cookies-actions button:hover { border-color: var(--primary); color: var(--primary); }
.fx-cookies-actions button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.fx-cookies-actions button.primary:hover { background: color-mix(in oklab, var(--primary) 88%, #000); color: #fff; }
.fx-cookies-actions button:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 50%, transparent); outline-offset: 2px; }
@media (min-width: 640px) { .fx-cookies { left: 1.5rem; right: auto; bottom: 1.5rem; margin: 0; } }
@media (prefers-reduced-motion: reduce) { .fx-cookies { transition: none; } }

/* ───────── Enlaces legales en el pie ───────── */
.fx-legal { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; font-size: .85rem; }
.fx-legal a, .fx-legal button { background: none; border: 0; padding: .5rem 0; cursor: pointer; color: var(--muted-foreground, #5b6b7f); text-decoration: underline; text-underline-offset: 3px; font: inherit; min-height: 44px; }
.fx-legal a:hover, .fx-legal button:hover { color: var(--primary); }
.fx-consent-note { margin-top: .9rem; font-size: .8rem; line-height: 1.5; color: var(--muted-foreground, #5b6b7f); text-align: center; }
.fx-consent-note a { color: var(--primary); font-weight: 600; text-decoration: underline; }
