/* Inicio · sección 1 (hero) y fondo dinámico de toda la página (velas en canvas fijo, .ix-fondo; la luz que sigue al
   puntero es la global, de base.css) y escudo animado.
   El hero ocupa todo el ancho y sube por detrás del navegador flotante. */
main { overflow-x: clip; }
.hx { --sube: calc(36px + 12px + var(--nav-h, 68px)); position: relative; isolation: isolate; overflow: hidden;
      margin: calc(-1 * var(--sube)) calc(50% - var(--ancho) / 2) 0; padding: calc(var(--sube) + 34px) 0 76px;
      background: radial-gradient(60% 70% at 78% 42%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
                  radial-gradient(40% 50% at 8% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%); }
.ix-fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 6%, #000 38%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 6%, #000 38%, #000 84%, transparent 100%); }
.hx-velo { position: absolute; inset: 0; z-index: -2; pointer-events: none;          /* da lectura al texto; se desvanece abajo para no marcar el borde */
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 34%, transparent 62%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); }

.hx-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; }

/* texto */
.hx-chip { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 12px; margin-bottom: 22px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--text); }
.hx-chip .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: hx-latido 2.4s ease-in-out infinite; }
.hx h1 { font-size: clamp(38px, 5.2vw, 60px); line-height: 1.03; letter-spacing: -0.045em; font-weight: 500; margin: 0 0 18px; max-width: 15ch; }
.hx-sub { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.hx-acc { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.hx-acc .btn { gap: 10px; height: 48px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.hx-acc .btn.cta { gap: 10px; background: #1c1a16; color: #f3ead6; box-shadow: inset 0 0 0 1px rgba(215, 172, 88, .55); font-weight: 600; }
:root[data-theme="dark"] .hx-acc .btn.cta { background: #222125; box-shadow: inset 0 0 0 1px #d7ac58; }
.hx-acc .btn.cta .punto { width: 7px; height: 7px; border-radius: 50%; background: #d7ac58; }
.hx-acc .btn.cta:hover { box-shadow: inset 0 0 0 1px #d7ac58, 0 8px 22px rgba(0, 0, 0, .25); }
.hx-acc .btn.ghost { background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(6px); }
.hx-acc .btn svg { width: 16px; height: 16px; }

.hx-pilares { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 600px; }
.hx-pilares a { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; height: 100%; padding: 12px; border-radius: 14px; text-decoration: none;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(8px); transition: border-color .18s, transform .18s; }
.hx-pilares a:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: translateY(-2px); }
.hx-pilares i { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.hx-pilares i .ico { width: 18px; height: 18px; }
.hx-pilares b { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.hx-pilares span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.hx-nota { margin: 22px 0 0; font-size: 12px; color: var(--muted); max-width: 560px; }

/* escudo animado */
.hx-logo { position: relative; justify-self: center; width: min(420px, 100%); aspect-ratio: 1; display: grid; place-items: center; perspective: 900px; }
.hx-halo { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 68%); filter: blur(28px); animation: hx-respira 6s ease-in-out infinite; }
.hx-aro { position: absolute; inset: 4%; border-radius: 50%; padding: 1.5px;
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--accent) 85%, transparent) 78%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: hx-gira 14s linear infinite; }
.hx-aro.dos { inset: 12%; border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); background: none; -webkit-mask: none; mask: none; padding: 0; animation-duration: 40s; animation-direction: reverse; }
.hx-escudo { position: relative; width: 74%; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; transform-style: preserve-3d; }
.hx-flota { position: relative; animation: hx-entra 1.1s cubic-bezier(.2, .8, .2, 1) both, hx-flota 7s ease-in-out 1.1s infinite; }
.hx-flota img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 44px rgba(0, 0, 0, .35)) drop-shadow(0 0 30px color-mix(in srgb, var(--accent) 25%, transparent)); }
.hx-brillo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 248, 225, .75) 48%, rgba(255, 248, 225, .15) 53%, transparent 60%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; animation: hx-brilla 5.5s ease-in-out 1.6s infinite; }

/* entrada escalonada del texto */
.hx-texto > * { animation: hx-sube .8s cubic-bezier(.2, .8, .2, 1) both; }
.hx-texto > :nth-child(2) { animation-delay: .08s; } .hx-texto > :nth-child(3) { animation-delay: .16s; }
.hx-texto > :nth-child(4) { animation-delay: .24s; } .hx-texto > :nth-child(5) { animation-delay: .32s; } .hx-texto > :nth-child(6) { animation-delay: .4s; }

.hx-bajar { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  color: var(--muted); border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent); animation: hx-baja 2.4s ease-in-out infinite; }
.hx-bajar:hover { color: var(--accent); border-color: var(--accent); } .hx-bajar svg { width: 16px; height: 16px; }

@keyframes hx-entra { from { opacity: 0; transform: scale(.86) translateY(14px); } to { opacity: 1; transform: none; } }   /* sin filtro: en iPhone deja una capa recortada */
@keyframes hx-flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes hx-gira { to { rotate: 360deg; } }
@keyframes hx-respira { 0%, 100% { opacity: .75; scale: 1; } 50% { opacity: 1; scale: 1.06; } }
@keyframes hx-brilla { 0%, 55% { background-position: 160% 0; } 85%, 100% { background-position: -60% 0; } }
@keyframes hx-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hx-latido { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent); } }
@keyframes hx-baja { 0%, 100% { translate: -50% 0; } 50% { translate: -50% 5px; } }

@media (prefers-reduced-motion: reduce) {
  .hx *, .hx *::before, .hx *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  .hx { padding: calc(var(--sube) + 22px) 0 64px; }
  .hx-in { grid-template-columns: 1fr; gap: 8px; }
  .hx-logo { order: -1; width: min(260px, 72%); }
  .hx-velo { background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, transparent 100%); }
  .hx h1 { max-width: none; }
}
@media (max-width: 560px) {
  .hx-pilares { grid-template-columns: 1fr; }
  .hx-acc .btn { flex: 1 1 100%; }
  .hx-sub { font-size: 16.5px; }
  .hx-bajar { display: none; }
}
#servicios { scroll-margin-top: 96px; }
@media print { .ix-fondo { display: none; } }

/* Táctil (celular/tableta): sin inclinación 3D ni filtros de sombra sobre el escudo. En Safari/iPhone esa combinación se
   dibuja como un cuadro oscuro al recomponer la página (p. ej. al cerrar el aviso de cookies). La sombra se hace con
   degradados, que se ven igual y no generan capas recortadas. */
@media (hover: none), (pointer: coarse) {
  .hx-logo { perspective: none; }
  .hx-escudo { transform: none !important; transform-style: flat; transition: none; }
  .hx-halo { filter: none; inset: 4%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, transparent) 0%, color-mix(in srgb, var(--accent) 12%, transparent) 45%, transparent 70%); }
  .hx-flota img { filter: none; }
  .hx-flota::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: -6%; height: 22%; z-index: -1; border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .32), transparent 70%); }
  .hx-brillo { mix-blend-mode: normal; opacity: .6; }
}

