/* ═══════════════════════════════════════════════════════════════
   🌐 PÁGINAS DEL SITIO (lista de espera y legales)
   Mismos colores y tipografía que la app (css/styles.css), sin sus layouts.
   ═══════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  --bg: #000000;
  --bg2: #0d0d0d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.08);
  --ink: #ffffff;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.08);
  --green: #9cffc7;
  --green-2: #6ee7a0;
  --green-soft: rgba(156, 255, 199, 0.12);
  --red: #ff6b5d;
  --amber: #fbbf24;
  --green-line: rgba(156, 255, 199, 0.35);
  --glow: rgba(156, 255, 199, 0.1);
  --card-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  --legal-ink: #d6d6d6;
  --cta-ink: #000000;
  --option-bg: #0d0d0d;
  --radius: 10px;
  --radius-lg: 16px;
}

/* ═══ ☀️ TEMA CLARO ═══ (mismos colores que la app: css/styles.css) */
[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg2: #ffffff;
  --surface: rgba(16, 19, 24, 0.035);
  --surface2: rgba(16, 19, 24, 0.065);
  --ink: #101318;
  --muted: #4b5563;
  --line: rgba(16, 19, 24, 0.1);
  --green: #0b7a43;
  --green-2: #12924f;
  --green-soft: rgba(11, 122, 67, 0.09);
  --red: #c0392b;
  --amber: #a05a00;
  --green-line: rgba(11, 122, 67, 0.28);
  --glow: rgba(11, 122, 67, 0.08);
  --card-shadow: 0 1px 2px rgba(16, 19, 24, 0.04), 0 8px 24px rgba(16, 19, 24, 0.06);
  --legal-ink: #2b2f36;
  --cta-ink: #ffffff;
  --option-bg: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}

.site {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Barra superior ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  font-size: 17px;
  color: inherit;
  text-decoration: none;
}
/* ═══ 🔷 LOGO ═══
   El logo es una máscara: toma el color del texto (blanco en oscuro, negro en claro). */
.logo-wordmark {
  display: inline-block;
  height: 1em;
  aspect-ratio: 640 / 108;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url('/img/logo-quinex.png') center / contain no-repeat;
  mask: url('/img/logo-quinex.png') center / contain no-repeat;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-select {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--surface2);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.lang-select option {
  background: var(--option-bg);
  color: var(--ink);
}
.link-subtle {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.link-subtle:hover {
  color: var(--ink);
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 64px;
}
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--green-line);
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -1.5px;
}
.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 520px;
}

/* ── Formulario ── */
.wl-form {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  max-width: 500px;
}
.wl-form input[type='email'] {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.wl-form input[type='email']:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.btn-cta {
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: var(--cta-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
/* ── Página de presentación: botón principal a la app + aviso de banco ── */
.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 16px 32px;
  font-size: 17px;
  text-decoration: none;
}
.landing-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.bank-notify {
  margin-top: 36px;
  padding: 20px;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.bank-notify-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}
.bank-notify-text {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.bank-notify .wl-form {
  margin-top: 14px;
}
.bank-notify .wl-message:empty {
  min-height: 0;
  margin-top: 6px;
}
.btn-secondary {
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: var(--green);
}
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-secondary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.btn-cta:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn-cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.wl-hp {
  /* Campo trampa para bots: invisible sin desplazarlo (un 'left' negativo rompe el ancho en RTL) */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}
.wl-message {
  margin-top: 12px;
  min-height: 1.5em;
  font-size: 14px;
  font-weight: 600;
}
.wl-message.ok {
  color: var(--green);
}
.wl-message.error {
  color: var(--red);
}
.wl-consent {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  max-width: 500px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Tarjeta de ejemplo (decorativa) ── */
.preview-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(120% 80% at 50% 0%, var(--glow), transparent 60%), var(--bg2);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.preview-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.preview-number {
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  margin: 8px 0 4px;
}
.preview-unit {
  color: var(--muted);
  font-size: 18px;
}
.preview-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--surface2);
  margin: 20px auto 0;
  max-width: 220px;
  overflow: hidden;
}
.preview-bar span {
  display: block;
  height: 100%;
  width: 72%;
  border-radius: inherit;
  background: var(--green);
}

/* ── Funciones ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 64px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
}
.feature-icon {
  font-size: 22px;
}
.feature h2 {
  font-size: 15px;
  margin: 10px 0 6px;
}
.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* ── Pie ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.site-footer nav {
  display: flex;
  gap: 16px;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--ink);
}

/* ═══ 📣 REDES SOCIALES (pie de página) ═══ */
.social-links {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 14px;
  margin: 0;
  color: var(--muted);
}

/* ── Páginas legales ── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0 64px;
}
.legal h1 {
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.legal .updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 18px;
  margin: 28px 0 8px;
}
.legal p,
.legal li {
  color: var(--legal-ink);
  font-size: 15px;
}
.legal p + p {
  margin-top: 10px;
}
.legal ul {
  padding-inline-start: 20px;
  margin: 8px 0;
}
.legal li + li {
  margin-top: 6px;
}
.legal a {
  color: var(--green);
}

/* ── Móvil ── */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 24px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .wl-form {
    flex-direction: column;
  }
  .preview-number {
    font-size: 64px;
  }
}
/* ── Teléfono: campos de 16 px (sin zoom en iOS) y enlaces del tamaño del dedo ── */
@media (max-width: 760px) {
  .site {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .site-header {
    padding-top: calc(16px + env(safe-area-inset-top));
    flex-wrap: wrap;
    row-gap: 4px;
  }
  /* Tema + idioma + "Probar la app" en una fila que, si no cabe, baja completa bajo el logo */
  .site-header-actions {
    gap: 8px;
    margin-inline-start: auto;
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
  }
  .lang-select {
    max-width: 130px;
  }
  .lang-select,
  .wl-form input[type='email'] {
    font-size: 16px;
    min-height: 44px;
  }
  .site-logo,
  .link-subtle,
  .site-footer a,
  .wl-consent a,
  .legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .btn-cta,
  .btn-secondary {
    min-height: 52px;
  }
  .landing-cta {
    width: 100%;
  }
  .bank-notify {
    padding: 16px;
  }
  .site-footer {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ── Calculadora de runway ── */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
  max-width: 420px;
}
.calc-form label {
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}
.calc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 14px;
}
.calc-input:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.calc-input span {
  color: var(--muted);
  font-weight: 700;
}
.calc-input input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  outline: none;
}
.calc-form .btn-cta {
  margin-top: 12px;
}
.calc-form .wl-message:empty {
  display: none;
}
.calc-until {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink);
}
.calc-daily {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.calc-daily:empty {
  display: none;
}
.calc-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.calc-ctas .btn-cta {
  text-decoration: none;
  white-space: normal;
  text-align: center;
}
@media (max-width: 760px) {
  .calc-input input {
    font-size: 16px;
    min-height: 44px;
  }
  .calc-ctas .btn-cta {
    width: 100%;
  }
}
.calc-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.calc-select option,
.calc-select optgroup {
  background: var(--bg2);
  color: var(--ink);
}

/* Aviso en las traducciones de los textos legales */
.legal-note {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.legal-note a {
  color: var(--green);
}
