/* HAYVOY! Página de presentación (apps/landing)
   Estático, sin frameworks. Tokens de marca de DESIGN.md / --hv-*.
   Primero teléfono, después escritorio. Ligero: sin imágenes de mapa
   de bits en la primera carga (solo SVG y dos woff2 autoalojados). */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/sora-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  --hv-blue: #0066ff;
  --hv-blue-dark: #004ecc;
  --hv-turquoise: #00e5d1;
  --hv-turquoise-dark: #00bfae;
  --hv-text: #1f2126;
  --hv-text-muted: #5b6574;
  --hv-background: #f4f7fb;
  --hv-surface: #ffffff;
  --hv-surface-secondary: #edf3fa;
  --hv-border: #cbd5e1;
  --hv-success: #087f5b;
  --hv-success-text: #066b4c;
  --hv-focus-ring: rgba(0, 229, 209, 0.45);
  --hv-radius-lg: 16px;
  --hv-radius-md: 12px;
  --hv-radius-sm: 8px;
  --hv-shadow-card: 0 1px 2px rgba(31, 33, 38, 0.06), 0 4px 12px rgba(31, 33, 38, 0.06);
  --hv-shadow-float: 0 8px 22px rgba(0, 0, 0, 0.22);
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hv-blue: #2563eb;
    --hv-blue-dark: #93c5fd;
    --hv-text: #f3f4f6;
    --hv-text-muted: #cbd5e1;
    --hv-background: #111827;
    --hv-surface: #1f2937;
    --hv-surface-secondary: #293548;
    --hv-border: #536174;
    --hv-success: #6ee7b7;
    --hv-success-text: #6ee7b7;
    --hv-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--hv-background);
  color: var(--hv-text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--hv-blue-dark); }
a:hover { color: var(--hv-blue); }

:focus-visible {
  outline: 3px solid var(--hv-focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--hv-blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 0.6rem; color: #fff; }

.wrap {
  width: min(100% - 2rem, 1080px);
  margin-inline: auto;
}
.wrap.narrow { width: min(100% - 2rem, 720px); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: 2rem; margin: 0.75rem 0; }
h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.125rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--hv-blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead, .section-lead {
  color: var(--hv-text-muted);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.section-lead { margin-bottom: 1.5rem; }
.muted { color: var(--hv-text-muted); font-size: 0.875rem; }

/* Botones: píldora, una sola acción principal en azul. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.15rem; height: 1.15rem; }
.btn-primary { background: var(--hv-blue); color: #fff; }
.btn-primary:hover { background: var(--hv-blue-dark); color: #fff; }
.btn-secondary {
  background: var(--hv-surface);
  color: var(--hv-blue-dark);
  border-color: var(--hv-border);
}
.btn-secondary:hover { border-color: var(--hv-blue); color: var(--hv-blue); }

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--hv-background) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hv-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}
.brand { display: inline-flex; color: var(--hv-text); }
.brand-logo { width: 132px; height: auto; }
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hv-border);
  border-radius: 999px;
  background: var(--hv-surface);
  color: var(--hv-text);
  cursor: pointer;
}
.menu-btn svg { width: 1.35rem; height: 1.35rem; }
.site-nav {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem 1rem;
  background: var(--hv-surface);
  border-bottom: 1px solid var(--hv-border);
  box-shadow: var(--hv-shadow-float);
}
.site-nav.open { display: flex; }
.site-nav a:not(.btn) {
  padding: 0.65rem 0.5rem;
  border-radius: var(--hv-radius-sm);
  color: var(--hv-text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { background: var(--hv-surface-secondary); color: var(--hv-blue); }
.nav-cta { margin-top: 0.5rem; }

/* Secciones */
.section { padding: 3rem 0; scroll-margin-top: 72px; }
.section-soft { background: var(--hv-surface-secondary); }
.hero {
  padding: 2.25rem 0 2.75rem;
  background:
    radial-gradient(38rem 22rem at 85% -5%, rgba(0, 229, 209, 0.18), transparent 60%),
    radial-gradient(30rem 20rem at -10% 30%, rgba(0, 102, 255, 0.12), transparent 60%);
}
.hero-inner { display: grid; gap: 1.5rem; }
.hero h1 { font-size: 2.25rem; }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}
.hero-note { color: var(--hv-text-muted); font-size: 0.875rem; margin: 0; }
.hero-art { order: -1; }
.hero-svg { width: min(100%, 460px); height: auto; margin-inline: auto; }

/* Tarjetas */
.card {
  background: var(--hv-surface);
  border: 1px solid var(--hv-border);
  border-radius: var(--hv-radius-lg);
  box-shadow: var(--hv-shadow-card);
  padding: 1.25rem;
}
.steps, .places, .rate-cards, .checks { list-style: none; margin: 0; padding: 0; }
.steps {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
  counter-reset: step;
}
.steps .card { position: relative; padding-top: 1.5rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--hv-blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.step-icon { width: 3rem; height: 3rem; margin-bottom: 0.75rem; }
.steps p { margin-bottom: 0; color: var(--hv-text-muted); }
.rate p:not(.rate-num) { margin: 0; color: var(--hv-text-muted); }
.steps h3 { margin-top: 0.25rem; }

.subhead { font-size: 1.25rem; margin: 0 0 1rem; }
.places { display: grid; gap: 1rem; margin-bottom: 0.75rem; }
.place { display: flex; align-items: center; gap: 0.9rem; }
.place svg { width: 1.75rem; height: 1.75rem; flex: none; }
.place p { margin: 0; }
.place span { color: var(--hv-text-muted); }
.place-tag {
  margin-left: auto;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--hv-surface-secondary);
  color: var(--hv-success-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.duo { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.rate-cards { display: grid; gap: 1rem; }
.rate { display: flex; align-items: center; gap: 1rem; }
.rate-num {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--hv-blue);
  white-space: nowrap;
}
.rate p { margin: 0; }
.rate span { color: var(--hv-text-muted); }
.not-found-page { min-height: 100vh; display: grid; align-items: center; }
.not-found { max-width: 720px; padding-block: 3rem; }
.not-found-brand { display: inline-block; margin-bottom: 3rem; }
.not-found-brand img { width: min(190px, 55vw); height: auto; }
.not-found h1 { margin: 0.75rem 0; }
.not-found > p:not(.eyebrow) { max-width: 38rem; color: var(--hv-text-muted); }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.checks { display: grid; gap: 0.9rem; align-content: start; }
.checks li {
  position: relative;
  padding-left: 2rem;
  line-height: 1.45;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--hv-turquoise);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4 10-11' stroke='%231F2126' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 0.95rem;
  background-position: center;
  background-repeat: no-repeat;
}

/* Ubicador del inicio (como el paso de dirección de las apps de entrega) */
.locator { margin: 1.25rem 0 1rem; padding: 1rem; }
.locator-title {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 0 0.75rem; font-weight: 700;
}
.locator-title svg { width: 1.35rem; height: 1.35rem; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0.5rem 1rem;
  border-radius: 999px; border: 1px solid var(--hv-border);
  background: var(--hv-surface-secondary);
  color: var(--hv-text); font-weight: 600; text-decoration: none;
}
.chip:hover { border-color: var(--hv-blue); color: var(--hv-blue); }
.chip-soft { background: transparent; color: var(--hv-text-muted); }
.locator-text { color: var(--hv-text-muted); margin: 0 0 0.9rem; }

/* Categorías */
.cats { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.cat { display: flex; flex-direction: column; align-items: flex-start; }
.cat-icon { width: 3.25rem; height: 3.25rem; margin-bottom: 0.75rem; }
.cat p { color: var(--hv-text-muted); flex: 1; }
.cat .btn { margin-top: auto; }
.cat-note { flex: none !important; margin: 0.75rem 0 0; font-size: 0.8rem; }

/* Localidades próximas */
.places-soon .place { opacity: 0.9; }
.tag-soon { color: var(--hv-blue-dark); }

/* Beneficios en tarjetas */
.checks-grid { margin: 1.5rem 0; }
.checks-grid li.card { padding-left: 3rem; }
.checks-grid li.card::before { left: 1rem; top: 1.1rem; }

/* Banda de la app */
.app-band { background: var(--hv-blue); color: #fff; }
.app-band .eyebrow, .app-band .section-lead, .app-band .muted { color: #e0ecff; }
.app-band h2 { color: #fff; }
.app-band .btn-primary { background: #fff; color: var(--hv-blue); }
.app-band .btn-primary:hover { background: var(--hv-turquoise); color: var(--hv-text); }

/* Preguntas frecuentes */
.faq { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.faq details {
  background: var(--hv-surface);
  border: 1px solid var(--hv-border);
  border-radius: var(--hv-radius-lg);
  padding: 0.25rem 1.1rem;
  box-shadow: var(--hv-shadow-card);
}
.faq summary {
  padding: 0.9rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--hv-surface-secondary);
  color: var(--hv-blue-dark);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6rem;
  text-align: center;
  transition: transform 0.2s ease;
}
.faq details[open ] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--hv-text-muted); margin: 0 0 1rem; }

/* Cierre */
.cta-final { text-align: center; }
.cta-final .hero-ctas { justify-content: center; }

/* Pie */
.site-footer {
  background: var(--hv-text);
  color: #f3f4f6;
  padding: 2.5rem 0 1.5rem;
}
.site-footer a { color: #dbeafe; }
.site-footer a:hover { color: #fff; }
.footer-inner {
  display: grid;
  gap: 2rem;
}
.footer-brand { display: flex; gap: 0.9rem; align-items: flex-start; }
.footer-brand p { margin: 0; }
.footer-brand span { color: #cbd5e1; font-size: 0.875rem; }
.footer-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.site-footer nav p { margin: 0 0 0.6rem; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer nav li { color: #cbd5e1; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 0.875rem;
}
.footer-bottom p { margin: 0; }

/* Animación suave al hacer scroll, solo con CSS.
   Sin soporte de view-timeline, todo queda visible: la animación
   solo mejora, nunca esconde contenido. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise 0.6s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
  .hero-copy, .hero-art {
    animation: rise 0.7s ease-out both;
  }
  @keyframes rise {
    from { transform: translateY(14px); }
    to { transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Escritorio */
@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .places { grid-template-columns: repeat(2, 1fr); }
  .rate-cards { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .places-soon { grid-template-columns: repeat(3, 1fr); }
  .checks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .checks-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav-cta { margin-top: 0; margin-left: 0.75rem; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 3rem; }
  .hero { padding: 4rem 0 4.5rem; }
  .hero h1 { font-size: 2.75rem; }
  .hero-art { order: 0; }
  .hero-svg { width: 100%; }
  .section { padding: 4rem 0; }
  .duo { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
}

/* Iniciar sesión, invita y redes */
.site-nav a.nav-login { font-weight: 700; color: var(--hv-blue-dark); }
.invite { text-align: center; }
.invite .hero-ctas { justify-content: center; }
.social {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.9rem; font-weight: 600; text-decoration: none;
}
.social svg { width: 1.4rem; height: 1.4rem; }
