/* ============================================================
   ALQUICON — Base: reset, tipografía, utilidades, navegación,
   botones, cursor, loader, WhatsApp y footer.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; background: var(--ink-2); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.032em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--aqua); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .62); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--ink1 { background: var(--ink-1); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-modal);
  background: var(--aqua); color: var(--ink);
  padding: .8rem 1.2rem; border-radius: 0 0 var(--r) 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Cabeceras de sección ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: currentColor; opacity: .75;
}
.section--paper .eyebrow { color: var(--aqua-1); }

.h-section { font-size: var(--t-3xl); }
.h-lead {
  margin-top: 1.15rem;
  max-width: 58ch;
  color: var(--mute);
  font-size: var(--t-lg);
  line-height: 1.6;
  font-weight: 400;
}
.section--paper .h-lead { color: var(--mute-2); }

.em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.012em;
  color: var(--aqua);
}
.section--paper .em { color: var(--aqua-1); }

.head-row {
  display: grid; gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(2.2rem, 1.4rem + 2.4vw, 4rem);
}
@media (min-width: 900px) {
  .head-row { grid-template-columns: 1.35fr .65fr; }
  .head-row > :last-child { justify-self: end; text-align: right; }
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.section--paper .rule { background: rgba(8,11,13,.12); }

/* ---------- Botones ---------- */

.btn {
  --btn-bg: var(--aqua);
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem 1.7rem;
  min-height: 52px;
  border: 0; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--t-sm); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-2) var(--ease),
              color var(--dur-2) var(--ease);
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 160% at 50% 120%, rgba(255,255,255,.42), transparent 62%);
  opacity: 0; transition: opacity var(--dur-2) var(--ease);
}
.btn:hover { box-shadow: 0 14px 34px -14px var(--aqua-glow); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.975); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(245,246,244,.3);
}
.btn--ghost:hover {
  --btn-bg: rgba(245,246,244,.08);
  box-shadow: inset 0 0 0 1px rgba(245,246,244,.55);
}
.section--paper .btn--ghost {
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(8,11,13,.22);
}
.section--paper .btn--ghost:hover {
  --btn-bg: rgba(8,11,13,.05);
  box-shadow: inset 0 0 0 1px rgba(8,11,13,.45);
}

.btn--lg { padding: 1.25rem 2.3rem; min-height: 62px; font-size: var(--t-base); }
.btn--block { width: 100%; }

.btn__ico { width: 17px; height: 17px; flex: none; transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .btn__ico { transform: translateX(3px); }

/* Enlace con subrayado que crece */
.link-u {
  position: relative; display: inline-block; font-weight: 500;
  padding-bottom: 2px;
}
.link-u::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform-origin: right; transform: scaleX(0);
  transition: transform var(--dur-2) var(--ease-out);
}
.link-u:hover::after { transform-origin: left; transform: scaleX(1); }

/* ---------- Revelado al hacer scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .62s var(--ease-out), transform .62s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal='left']  { transform: translate3d(-30px, 0, 0); }
[data-reveal='right'] { transform: translate3d(30px, 0, 0); }
[data-reveal='scale'] { transform: scale(.955); }
[data-reveal='mask']  { transform: none; clip-path: inset(0 0 100% 0); transition: clip-path .85s var(--ease-out), opacity .5s var(--ease-out); }

.is-in[data-reveal] { opacity: 1; transform: none; }
.is-in[data-reveal='mask'] { clip-path: inset(0 0 0 0); }

/* Texto que aparece por líneas */
.reveal-lines { display: block; }
.reveal-lines .ln { display: block; overflow: hidden; }
.reveal-lines .ln > span {
  display: block;
  transform: translateY(105%);
  transition: transform .82s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 95ms);
}
.is-in .reveal-lines .ln > span,
.reveal-lines.is-in .ln > span { transform: translateY(0); }

/* ---------- Imagen con carga progresiva ---------- */

.ph { position: relative; overflow: hidden; background: var(--ink-2); }
.ph > img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .55s var(--ease);
}
.ph > img.is-loaded { opacity: 1; }
.ph--lqip::before {
  content: ''; position: absolute; inset: -2%;
  background: var(--lqip) center/cover no-repeat;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.06);
  transition: opacity .6s var(--ease);
}
.ph.is-ready::before { opacity: 0; }

/* ---------- Navegación ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: height var(--dur-3) var(--ease), background-color var(--dur-3) var(--ease),
              box-shadow var(--dur-3) var(--ease), backdrop-filter var(--dur-3) var(--ease);
}
.nav::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,11,13,.62), transparent);
  opacity: 1; transition: opacity var(--dur-3) var(--ease);
  pointer-events: none;
}
.nav.is-stuck {
  height: calc(var(--nav-h) - 14px);
  background: rgba(8, 11, 13, .72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(245,246,244,.09);
}
.nav.is-stuck::before { opacity: 0; }

.nav__in {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
}

.brand { display: inline-flex; align-items: center; gap: .62rem; flex: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__tx { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-size: 1.02rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.brand__name::first-letter { color: var(--aqua); }
.brand__sub {
  font-size: .56rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--mute); margin-top: 4px; font-weight: 500;
}

.nav__links { display: none; }
@media (min-width: 1060px) {
  .nav__links { display: flex; align-items: center; gap: clamp(1.1rem, .4rem + 1.3vw, 2.2rem); }
  .nav__links a {
    position: relative; font-size: var(--t-sm); font-weight: 500;
    color: rgba(245,246,244,.82);
    transition: color var(--dur-1) var(--ease);
  }
  .nav__links a::after {
    content: ''; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%;
    background: var(--aqua); transform: scaleX(0); transform-origin: right;
    transition: transform var(--dur-2) var(--ease-out);
  }
  .nav__links a:hover, .nav__links a[aria-current='true'] { color: var(--paper); }
  .nav__links a:hover::after,
  .nav__links a[aria-current='true']::after { transform: scaleX(1); transform-origin: left; }
}

.nav__cta { display: none; }
@media (min-width: 1060px) { .nav__cta { display: inline-flex; padding: .78rem 1.4rem; min-height: 44px; } }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 0 11px;
  background: rgba(245,246,244,.07); border: 0; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(245,246,244,.16);
  cursor: pointer;
}
.burger span {
  display: block; height: 1.5px; width: 100%; background: var(--paper); border-radius: 2px;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) var(--ease);
}
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 1060px) { .burger { display: none; } }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: calc(var(--z-nav) - 1);
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 2rem) var(--pad-x) 2rem;
  clip-path: circle(0% at calc(100% - 46px) 38px);
  transition: clip-path .68s var(--ease-out);
  visibility: hidden;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 46px) 38px); visibility: visible; }
.menu__list { display: flex; flex-direction: column; gap: .1rem; }
.menu__list a {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .55rem 0;
  font-size: clamp(1.9rem, 1.1rem + 4.4vw, 3.2rem);
  font-weight: 700; letter-spacing: -.035em;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), color var(--dur-1) var(--ease);
}
.menu.is-open .menu__list a { opacity: 1; transform: none; transition-delay: calc(var(--i) * 55ms + 130ms); }
.menu__list a:hover { color: var(--aqua); }
.menu__list em {
  font-family: var(--font-display); font-style: normal;
  font-size: .62rem; letter-spacing: .2em; color: var(--mute-2); font-weight: 600;
}
.menu__foot {
  margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: grid; gap: 1rem;
}
.menu__foot .btn { width: 100%; }
.menu__tel { font-size: var(--t-lg); font-weight: 600; color: var(--aqua); }

/* ---------- WhatsApp flotante ---------- */

.wa {
  position: fixed; right: clamp(.9rem, .4rem + 1.2vw, 1.7rem);
  bottom: clamp(.9rem, .4rem + 1.2vw, 1.7rem);
  z-index: var(--z-float);
  display: inline-flex; align-items: center; gap: .7rem;
  height: 58px; padding: 0 20px 0 17px;
  background: #1FAF54; color: #fff;
  border-radius: var(--r-pill);
  box-shadow: 0 16px 34px -14px rgba(31,175,84,.75), var(--shadow-1);
  font-size: var(--t-sm); font-weight: 600;
  opacity: 0; transform: translateY(18px) scale(.94); pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out),
              box-shadow var(--dur-2) var(--ease);
}
.wa.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wa:hover { box-shadow: 0 20px 42px -12px rgba(31,175,84,.9); }
.wa:active { transform: scale(.97); }
.wa svg { width: 26px; height: 26px; flex: none; }
.wa__tx { display: none; white-space: nowrap; }
@media (min-width: 560px) { .wa__tx { display: block; } }
@media (max-width: 559px) { .wa { padding: 0; width: 58px; justify-content: center; } }

.wa__pulse {
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(31,175,84,.55);
  animation: wa-pulse 3.4s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,175,84,.5); }
  55%  { box-shadow: 0 0 0 16px rgba(31,175,84,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,175,84,0); }
}

/* ---------- Cursor (solo escritorio con puntero fino) ---------- */

.cursor, .cursor-dot { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 1060px) {
  .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1px solid rgba(245,246,244,.5); border-radius: 50%;
    pointer-events: none;
    transition: width .28s var(--ease-out), height .28s var(--ease-out),
                margin .28s var(--ease-out), background-color .28s var(--ease),
                border-color .28s var(--ease), opacity .28s var(--ease);
    opacity: 0;
  }
  .cursor.is-on { opacity: 1; }
  .cursor.is-hot {
    width: 62px; height: 62px; margin: -31px 0 0 -31px;
    background: rgba(26,192,196,.16); border-color: var(--aqua);
  }
  .cursor.on-paper { border-color: rgba(8,11,13,.4); }
  .cursor-dot {
    display: block; position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
    width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
    background: var(--aqua); border-radius: 50%; pointer-events: none;
    opacity: 0; transition: opacity .28s var(--ease);
  }
  .cursor-dot.is-on { opacity: 1; }
}

/* ---------- Loader de apertura ---------- */

.loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  background: var(--ink);
  display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.loader__in { text-align: center; }
.loader__mark { width: 62px; height: 62px; margin: 0 auto 1.1rem; }
.loader__mark path, .loader__mark circle { opacity: 0; animation: mark-in .7s var(--ease-out) forwards; }
.loader__mark .m2 { animation-delay: .12s; }
.loader__mark .m3 { animation-delay: .24s; }
@keyframes mark-in { to { opacity: 1; } }

.loader__name {
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); font-weight: 800;
  letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; animation: mark-in .8s var(--ease-out) .3s forwards;
}
.loader__bar {
  width: min(220px, 52vw); height: 1px; margin: 1.3rem auto 0;
  background: rgba(245,246,244,.16); overflow: hidden;
}
.loader__bar i {
  display: block; height: 100%; width: 100%; background: var(--aqua);
  transform: scaleX(0); transform-origin: left;
  animation: bar 1.15s var(--ease-in-out) .18s forwards;
}
@keyframes bar { to { transform: scaleX(1); } }

.loader.is-done { opacity: 0; visibility: hidden; }

/* ---------- Footer ---------- */

/* El relleno inferior deja libre el botón flotante de WhatsApp. */
.foot { background: var(--ink); padding-block: clamp(3.2rem, 2rem + 3.6vw, 5.4rem) 6rem; }
.foot__grid {
  display: grid; gap: clamp(2rem, 1rem + 3vw, 3.4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .foot__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
@media (min-width: 1100px) { .foot__grid { grid-template-columns: 1.7fr .8fr .9fr 1.1fr; } }

.foot h4 {
  font-size: var(--t-xs); letter-spacing: .2em; text-transform: uppercase;
  color: var(--mute-2); font-weight: 600; margin-bottom: 1.15rem;
}
.foot__list { display: grid; gap: .62rem; }
.foot__list a, .foot__list span { color: var(--mute); font-size: var(--t-sm); }
.foot__list a { transition: color var(--dur-1) var(--ease); }
.foot__list a:hover { color: var(--aqua); }
.foot__desc { color: var(--mute); font-size: var(--t-sm); max-width: 40ch; margin-top: 1.1rem; }
.foot .brand { margin-bottom: .2rem; }

.foot__social { display: flex; gap: .55rem; margin-top: 1.4rem; }
.foot__social a {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out);
}
.foot__social a:hover { background: var(--aqua); box-shadow: none; transform: translateY(-2px); }
.foot__social a:hover svg { color: var(--ink); }
.foot__social svg { width: 18px; height: 18px; color: var(--mute); transition: color var(--dur-2) var(--ease); }

.foot__claim {
  margin-top: clamp(2.6rem, 1.6rem + 3vw, 4.4rem);
  padding-top: clamp(1.6rem, 1rem + 1.6vw, 2.4rem);
  border-top: 1px solid var(--line);
  font-size: clamp(1.5rem, .9rem + 2.9vw, 3.6rem);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.05;
}
.foot__legal {
  margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  align-items: center; justify-content: space-between;
  font-size: var(--t-xs); color: var(--mute-2);
}
.foot__legal a:hover { color: var(--aqua); }

/* ---------- Accesibilidad de movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .reveal-lines .ln > span { transform: none !important; }
  .loader { display: none; }
  .wa { opacity: 1; transform: none; pointer-events: auto; }
}
