/* ============================================================
   Hinch.ar — Landing
   Estética tipo Apple: aire, tipografía grande y apretada,
   vidrio líquido (blur + saturación) en nav/tarjetas, micro-
   animaciones suaves. Un solo acento (azul de marca). La app
   Expo mantiene su tema propio (lib/constants.ts).
   ============================================================ */

:root {
  --bg:        #fbfcfe;
  --bg-soft:   #f5f7fb;
  --ink:       #0b1220;
  --ink-soft:  #51596b;
  --muted:     #8a93a3;
  --line:      rgba(11, 18, 32, .08);

  --brand:       #1d4ed8;
  --brand-dark:  #1843b8;
  --brand-tint:  #eef3ff;
  --accent-blue: #3b82f6;

  --maxw: 1120px;
  --radius: 24px;

  /* Vidrio líquido */
  --glass-bg:     rgba(255, 255, 255, .55);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-shine:  inset 0 1px 0 rgba(255, 255, 255, .85);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 16px rgba(11, 18, 32, .05);
  --shadow-md: 0 8px 40px rgba(11, 18, 32, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: 88px; /* compensa el nav fijo */
}

/* Manchas de color fijas detrás de todo: le dan vida al blur del vidrio */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 12% 8%,  rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(32% 28% at 88% 12%, rgba(29, 78, 216, .08),  transparent 60%),
    radial-gradient(42% 38% at 72% 92%, rgba(59, 130, 246, .07), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Utilidad accesible (texto solo para lectores de pantalla / SEO) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Aparición al scrollear (JS agrega .in con IntersectionObserver).
   Usa la propiedad `translate` (no `transform`) para no pisar el tilt 3D. */
.reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .9s var(--ease), translate .9s var(--ease);
}
.reveal.in { opacity: 1; translate: 0 0; }
.grid  > *:nth-child(2), .steps > *:nth-child(2) { transition-delay: .08s; }
.grid  > *:nth-child(3), .steps > *:nth-child(3) { transition-delay: .16s; }
.steps > *:nth-child(4) { transition-delay: .24s; }

/* ===================== MARCA ===================== */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__tile {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease);
}
.brand:hover .brand__tile { transform: rotate(-8deg) scale(1.1); }
.brand__name { font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand__dot { color: var(--brand); }

/* ===================== BOTONES ===================== */
/* El transform se compone con variables: el imán del cursor (JS setea
   --mag-x/--mag-y) y la escala de hover/press conviven sin pisarse. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: -.01em;
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0) scale(var(--btn-s, 1));
  transition: transform .45s var(--ease), background .3s ease, box-shadow .45s var(--ease), border-color .3s ease;
  white-space: nowrap;
}
.btn:hover  { --btn-s: 1.04; }
.btn:active { --btn-s: .96; }

.btn--primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #2b62e8, var(--brand));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 18px rgba(29, 78, 216, .30);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #2456d6, var(--brand-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 30px rgba(29, 78, 216, .38);
}
/* Destello que cruza el botón cada tanto */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .35) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: sheen 6s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%   { transform: translateX(-130%); }
  26%  { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}

.btn--ghost {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  color: var(--ink);
  border: 1px solid rgba(11, 18, 32, .12);
  box-shadow: var(--glass-shine);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { padding: 9px 18px; font-size: .9rem; }
.btn--lg { padding: 14px 28px; font-size: 1.02rem; }

/* ===================== NAV (píldora de vidrio flotante) ===================== */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--maxw), calc(100% - 24px));
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shine), 0 10px 34px rgba(11, 18, 32, .08);
  transition: background .4s ease, box-shadow .4s ease;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--glass-shine), 0 16px 48px rgba(11, 18, 32, .13);
}
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a:not(.btn) {
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 500;
  transition: color .25s ease;
}
.nav__links a:not(.btn):hover { color: var(--ink); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* --- Desktop: el diseño completo como imagen, pixel-perfect --- */
.hero-shot {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  animation: rise 1s var(--ease) both;
  /* Tilt 3D que sigue al mouse (JS setea --rx/--ry) + parallax de scroll (--py) */
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--py, 0px));
  transition: transform .25s ease-out;
  will-change: transform;
}
.hero-shot__img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(11, 18, 32, .05),
    0 30px 80px rgba(11, 18, 32, .16);
}
/* Links transparentes clavados sobre los botones de la imagen */
.hero-shot__hit {
  position: absolute;
  top: 65.4%;
  height: 8.2%;
  border-radius: 999px;
  z-index: 2;
}
.hero-shot__hit--app { left: 8.9%;  width: 13.7%; }
.hero-shot__hit--how { left: 23.1%; width: 12.0%; }
.hero-shot__hit:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* --- Mobile: versión apilada y legible --- */
.hero-mobile { display: none; text-align: center; animation: rise 1s var(--ease) both; }
.hero-mobile .eyebrow { margin-top: 8px; }
.hero-mobile .hero__subtitle { margin-left: auto; margin-right: auto; }
.hero-mobile .hero__cta { justify-content: center; }
.hero-mobile__shot {
  margin: 32px auto 0;
  max-width: 420px;
}
.hero-mobile__shot img { width: 100%; height: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 22px;
}
.eyebrow small { font-size: .72rem; font-weight: 800; letter-spacing: .02em; opacity: .75; }
.hero__title {
  font-size: clamp(2.4rem, 9vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 900;
}
.hero__title .accent { color: var(--brand); }
.hero__subtitle {
  margin-top: 20px;
  max-width: 460px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.hero__subtitle strong { color: var(--ink); font-weight: 700; }
.hero__cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero__note { margin-top: 18px; color: var(--muted); font-size: .9rem; }

/* ===================== SECCIONES ===================== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 24px; }

/* Panel redondeado estilo Apple para la sección alternada */
.section--alt {
  width: min(var(--maxw), calc(100% - 24px));
  background: linear-gradient(180deg, var(--bg-soft), #eef2f9);
  border: 1px solid rgba(11, 18, 32, .05);
  border-radius: 36px;
  padding: 80px 48px;
}

.kicker {
  display: block;
  text-align: center;
  color: var(--brand);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 10px;
}
.kicker--left { text-align: left; }
.section__title {
  text-align: center;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.1;
  margin-bottom: 52px;
}
.section__title--left { text-align: left; margin-bottom: 26px; }

/* ===================== TARJETAS DE VIDRIO ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card, .step {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--glass-shine), 0 8px 30px rgba(11, 18, 32, .06);
  /* Tilt 3D con el mouse (JS setea --rx/--ry); la escala de hover va por var */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--zoom, 1));
  transition: transform .25s ease-out, box-shadow .5s var(--ease);
}
.card:hover, .step:hover {
  --zoom: 1.02;
  box-shadow: var(--glass-shine), 0 24px 60px rgba(11, 18, 32, .12);
}
/* Brillo que sigue al puntero (JS setea --mx / --my) */
.card::after, .step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, .13), transparent 65%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.card:hover::after, .step:hover::after { opacity: 1; }

/* Íconos propios (line icons). Escalan con font-size y heredan el color. */
.ic {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
}

.card__icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: linear-gradient(145deg, #ffffff, var(--brand-tint));
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.card__icon .ic { width: 27px; height: 27px; stroke-width: 1.6; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; letter-spacing: -.01em; }
.card p { color: var(--ink-soft); }

/* ===================== STEPS ===================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--accent-blue), var(--brand));
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px rgba(29, 78, 216, .30);
  margin-bottom: 16px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; letter-spacing: -.01em; }
.step p { color: var(--ink-soft); }

/* ===================== SPLIT (seguridad) ===================== */
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.checklist { list-style: none; display: grid; gap: 16px; }
.checklist li {
  position: relative;
  padding-left: 38px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--accent-blue), var(--brand));
  color: #fff;
  border-radius: 9px;
  font-weight: 800;
  font-size: .8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px rgba(29, 78, 216, .25);
}
.split__media { display: flex; justify-content: center; }
.badge-tile {
  position: relative;
  width: 180px;
  height: 180px;
}
.badge-tile img {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  box-shadow: var(--shadow-md);
}
.badge-tile__check {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 56px;
  height: 56px;
  background: linear-gradient(180deg, #34d97b, #22c55e);
  color: #fff;
  border: 4px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px rgba(34, 197, 94, .35);
}

/* ===================== CTA FINAL (vidrio oscuro) ===================== */
.cta-final { max-width: var(--maxw); margin: 0 auto; padding: 24px 24px 96px; }
.cta-final__box {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, #101a2e, var(--ink));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 36px;
  padding: 80px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 80px rgba(11, 18, 32, .25);
}
.cta-final__box::before {
  content: "";
  position: absolute;
  top: -55%;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 480px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(59, 130, 246, .30), transparent 70%);
  pointer-events: none;
}
.cta-final__box > * { position: relative; }
.cta-final__box h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -.035em; }
.cta-final__box p { color: #b9c0cc; margin: 14px 0 30px; font-size: 1.1rem; }
.cta-final__box .btn--primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 30px rgba(29, 78, 216, .5); }
.cta-final__box .cta-final__contact { margin: 26px 0 0; font-size: .95rem; color: #93a0b4; }
.cta-final__box .cta-final__contact a { color: #cfd9ea; text-decoration: underline; text-underline-offset: 3px; transition: color .25s ease; }
.cta-final__box .cta-final__contact a:hover { color: #fff; }

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 46px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--ink-soft); font-size: .95rem; transition: color .25s ease; }
.footer__links a:hover { color: var(--ink); }
.footer__copy { color: var(--muted); font-size: .85rem; }

/* ===================== CURSOR CUSTOM ===================== */
/* Solo en desktop con mouse: JS agrega .cursor-on al <html> cuando
   pointer:fine y sin prefers-reduced-motion. El punto sigue al mouse
   1:1 y el anillo lo persigue con inercia (lerp en rAF). */
html.cursor-on,
html.cursor-on a,
html.cursor-on button,
html.cursor-on .btn { cursor: none; }

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--brand);
  transition: opacity .25s ease;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 1.5px solid rgba(29, 78, 216, .55);
  background: rgba(29, 78, 216, 0);
  transition: opacity .25s ease, background .25s ease, border-color .25s ease;
}
.cursor-on .cursor-dot.is-active,
.cursor-on .cursor-ring.is-active { opacity: 1; }
/* Sobre un link/botón: el anillo se agranda y se llena apenas */
.cursor-ring.is-link {
  border-color: rgba(29, 78, 216, .9);
  background: rgba(29, 78, 216, .08);
}

/* ===================== BLOBS ANIMADOS DE FONDO ===================== */
/* Manchas de color que derivan lento detrás del vidrio. Solo transform,
   gradientes pre-suavizados (sin filter: blur, que es caro). */
.blob {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.blob--a {
  width: 56vmax;
  height: 56vmax;
  top: -24vmax;
  left: -16vmax;
  background: radial-gradient(circle at 40% 40%, rgba(59, 130, 246, .14), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob--b {
  width: 48vmax;
  height: 48vmax;
  right: -18vmax;
  bottom: -20vmax;
  background: radial-gradient(circle at 55% 45%, rgba(29, 78, 216, .12), transparent 62%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(10vmax, 7vmax, 0) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-9vmax, -6vmax, 0) scale(.94); }
}

/* ===================== BARRA DE PROGRESO DE SCROLL ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--brand), var(--accent-blue));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ===================== MARQUEE (eventos / rutas) ===================== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  padding: 13px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
}
.marquee__item .ic {
  width: 18px;
  height: 18px;
  color: var(--brand);
}
.marquee__item::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  opacity: .45;
  margin-left: 34px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ===================== RESPONSIVE ===================== */
/* Punto de quiebre del hero: arriba de 760px va la imagen completa
   (pixel-perfect); abajo, la versión apilada y legible. */
@media (max-width: 760px) {
  .hero-shot { display: none; }
  .hero-mobile { display: block; }
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  body { padding-top: 76px; }
  .nav__links { gap: 14px; }
  .nav__links a:not(.btn) { display: none; }
  .section { padding: 64px 20px; }
  .section--alt { padding: 56px 22px; border-radius: 28px; }
}

/* ===================== MOVIMIENTO REDUCIDO ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-shot, .hero-mobile { animation: none; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .btn, .card, .step { transition: none; }
  .btn--primary::after { animation: none; }
  .blob { animation: none; }
  .marquee__track { animation: none; }
  .brand__tile { transition: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
