/* AmaPay - sistema visual compartido (index, contacto, descarga, legales).
 * Estilo oficial tomado de la app (propuesta amapaytest.lovable.app):
 * azul de marca #4676f0, fondo claro, bordes calidos, Manrope y cifras en JetBrains Mono. */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca */
  /* --brand es el azul exacto de la app (bordes, iconos, detalles). Con texto blanco da 4.1:1,
     por eso las superficies y textos azules usan --primary (5:1, WCAG AA). */
  --brand: #4676f0;
  --primary: #3a67e2;
  --primary-strong: #2f58c8;
  --primary-deep: #24449c;
  --soft: #eff3fe; /* primary al 8% sobre blanco */
  --soft-2: #e2e9fd;

  /* Superficies y bordes (familia calida de la app) */
  --bg: #f8f8fa;
  --surface: #ffffff;
  --line: #e7e4e0;
  --line-strong: #d4cdc6;

  /* Texto */
  --text: #111111;
  --text-2: #3d3b38;
  --text-3: #55524e;

  /* Sobre azul */
  --on-dark: #ffffff;
  --on-dark-2: #ffffff; /* texto secundario sobre azul: blanco solido para AA */
  --on-dark-3: rgba(255, 255, 255, 0.92);
  --line-dark: rgba(255, 255, 255, 0.28);

  /* Apoyos de la app: naranja "proximamente", menta y verde de exito */
  --action: #ed8825;
  --action-soft: #fdf0e3;
  --action-text: #9a520c;
  --mint: #afd2b5;
  --ok: #205031;
  --danger: #cc272e;

  /* Alias para paginas que aun usan los nombres anteriores */
  --paper: var(--bg);
  --accent: var(--primary);
  --accent-strong: var(--primary-strong);

  --radius-sm: 8px;
  --radius: 14px; /* controles */
  --radius-lg: 18px; /* tarjetas */
  --radius-xl: 20px;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-card: 0 8px 24px -16px rgba(17, 17, 17, 0.2);
  --shadow-float: 0 24px 48px -24px rgba(23, 45, 110, 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out */

  --z-header: 50;
  --z-menu: 60;
}

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

html {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(58, 103, 226, 0.15);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid rgba(70, 118, 240, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.site-header :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tabular,
.money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- Tipografia ---------- */

/* Etiqueta tipo "chip", como el distintivo del encabezado de la app */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--soft);
  border: 1px solid var(--soft-2);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  justify-self: start;
  align-self: start;
}
.on-dark .eyebrow {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
}

.h-display {
  font-size: clamp(38px, 5.6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}

.h-section {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

.h-card {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--text-3);
  max-width: 60ch;
  text-wrap: pretty;
}
.on-dark .lead {
  color: var(--on-dark-2);
}

.muted {
  color: var(--text-3);
}

/* ---------- Botones (forma de la app: radio 14px) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.15s var(--ease);
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-strong);
}
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--soft);
}
.btn-light {
  background: #fff;
  color: var(--primary);
}
.btn-light:hover {
  background: var(--soft);
}
.btn-ghost-dark {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-accent {
  background: var(--primary);
  color: #fff;
}
.btn-accent:hover {
  background: var(--primary-strong);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
}
.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover::after {
  transform: translateX(3px);
}
.on-dark .link-arrow {
  color: #fff;
}

/* Botones de tiendas */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  border: 1.5px solid var(--text);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.store-btn:hover {
  background: #2a2a2a;
}
.store-btn:active {
  transform: translateY(1px);
}
.store-btn i {
  font-size: 24px;
  width: 26px;
  text-align: center;
}
.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  opacity: 0.75;
}
.store-btn strong {
  display: block;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.on-dark .store-btn {
  background: #fff;
  border-color: #fff;
  color: var(--text);
}
.on-dark .store-btn:hover {
  background: var(--soft);
  border-color: var(--soft);
}

/* ---------- Encabezado: banda azul, como en la app ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  color: #fff;
  background: var(--primary);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-solid {
  box-shadow: 0 8px 24px -16px rgba(23, 45, 110, 0.6);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand img {
  width: 132px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-dark-2);
  transition: color 0.2s var(--ease);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: #fff;
}
.nav-links a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #fff;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-actions .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--on-dark-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.lang-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
  content: "";
}
.menu-toggle span {
  top: 50%;
  margin-top: -1px;
}
.menu-toggle span::before {
  top: -6px;
  left: 0;
  margin-left: 0;
}
.menu-toggle span::after {
  top: 6px;
  left: 0;
  margin-left: 0;
}
.menu-open .menu-toggle span {
  background: transparent;
}
.menu-open .menu-toggle span::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-toggle span::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: var(--z-menu);
  background: var(--surface);
  padding: 12px var(--gutter) 40px;
  display: none;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu-open .mobile-menu {
  display: flex;
}
.mobile-menu a:not(.btn) {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn {
  margin-top: 20px;
}
.mobile-menu .btn-light {
  background: var(--primary);
  color: #fff;
}
.mobile-menu .lang-switch {
  align-self: flex-start;
  margin-top: 20px;
  border-color: var(--line-strong);
}
.mobile-menu .lang-switch button {
  color: var(--text-3);
}
.mobile-menu .lang-switch button[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 960px) {
  .nav-links,
  .nav-actions .btn,
  .nav-actions .lang-switch {
    display: none;
  }
  .menu-toggle {
    display: inline-block;
  }
}

/* ---------- Secciones ---------- */

.section {
  padding: clamp(72px, 9vw, 120px) 0 clamp(80px, 10vw, 132px);
}
.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 60px);
}

.on-dark {
  background: var(--primary);
  color: var(--on-dark);
}

/* Se conserva la clase; la app es plana, sin textura */
.grain {
  position: relative;
  isolation: isolate;
}

/* ---------- Pie de pagina ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--text-3);
  padding: 64px 0 32px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
}
.footer-about p {
  margin-top: 16px;
  max-width: 34ch;
}
.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-col a {
  color: var(--text-3);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--primary);
}
.social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--primary);
  background: var(--surface);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.social a:hover {
  background: var(--soft);
  border-color: var(--soft-2);
}
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Animacion de entrada ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
