/* ==========================================================
   GoodFactura · Landing
   Oscuro moderno: azul marino + verde lima
   ========================================================== */

:root {
  --bg: #0B1426;
  --bg-alt: #0E1A31;
  --surface: #111D35;
  --surface-2: #16244A;
  --border: #22335A;
  --text: #F1F5F9;
  --muted: #A3B1C6;
  --lime: #A3E635;
  --lime-hover: #BEF264;
  --lime-ink: #0B1426;
  --wa: #25D366;
  --danger: #F87171;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --header-h: 64px;

  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

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

img, svg { display: block; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hover); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--lime-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 820px; }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 12px;
  font: 600 15px/1.2 var(--font-body);
  cursor: pointer; text-align: center;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lime); color: var(--lime-ink); }
.btn--primary:hover { background: var(--lime-hover); color: var(--lime-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn--wa { background: var(--wa); color: #06260F; }
.btn--wa:hover { background: #3BE07A; color: #06260F; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 20, 38, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 12px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__icon { width: 36px; height: 36px; }
.brand__name { font: 800 20px/1 var(--font-head); letter-spacing: -.02em; }
.brand__name span { color: var(--lime); }

.header__cta { margin-left: auto; }

.menu-btn {
  width: 44px; height: 44px; padding: 0; margin-right: -6px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer;
}
.menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil */
.nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav.is-open { transform: none; opacity: 1; visibility: visible; }
.nav a:not(.btn) { color: var(--text); font-weight: 500; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.nav a:not(.btn):hover { color: var(--lime); }
.nav__cta { margin-top: 12px; }

.header .btn { white-space: nowrap; }
@media (max-width: 420px) {
  .header__inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand__icon { width: 32px; height: 32px; }
  .brand__name { font-size: 18px; }
  .header__cta { padding: 8px 12px; font-size: 13.5px; }
}
@media (max-width: 340px) {
  .header__cta { display: none; }
  .menu-btn { margin-left: auto; }
}

@media (min-width: 900px) {
  .menu-btn, .header__cta { display: none; }
  .nav {
    position: static; margin-left: auto;
    flex-direction: row; align-items: center; gap: 4px;
    padding: 0; background: none; border: 0; box-shadow: none;
    transform: none; opacity: 1; visibility: visible;
  }
  .nav a:not(.btn) { padding: 8px 12px; border: 0; font-size: 15px; color: var(--muted); }
  .nav a:not(.btn):hover { color: var(--text); }
  .nav__cta { margin: 0 0 0 10px; min-height: 42px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 640px; height: 640px; right: -260px; top: -200px;
  background: radial-gradient(closest-side, rgba(163, 230, 53, .16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  pointer-events: none;
}
.hero__grid { display: grid; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin-bottom: 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(17, 29, 53, .7);
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(163, 230, 53, .18); }

.hero h1 { font-size: clamp(2.1rem, 8.5vw, 3.6rem); font-weight: 800; }
.hl { color: var(--lime); white-space: nowrap; }
.hero__lead { margin-top: 18px; color: var(--muted); font-size: 1.075rem; max-width: 560px; }

.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.hero__tags li { display: inline-flex; align-items: center; gap: 6px; }
.hero__tags .ico { width: 16px; height: 16px; color: var(--lime); stroke-width: 2.6; }

@media (min-width: 520px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
}

/* Ilustración */
.hero__art { position: relative; max-width: 440px; width: 100%; margin: 0 auto; padding: 18px 8px 30px; }
.invoice {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 20px;
  padding: 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.invoice__head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); }
.invoice__logo { width: 40px; height: 40px; flex: none; }
.invoice__title { font: 700 15px/1.2 var(--font-head); }
.invoice__sub { color: var(--muted); font-size: 13px; }
.chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip .ico { width: 14px; height: 14px; stroke-width: 3; }
.chip--ok { background: rgba(163, 230, 53, .14); color: var(--lime); }

.invoice__meta { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px dashed var(--border); }
.invoice__meta div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; }
.invoice__meta span { color: var(--muted); font-size: 12px; }
.invoice__rows { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--border); }
.invoice__rows .row { display: flex; justify-content: space-between; gap: 12px; }
.invoice__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; font: 700 14px var(--font-head); }

.bar { display: block; height: 8px; border-radius: 6px; background: #2A3B5F; }
.bar--lime { height: 12px; background: var(--lime); }
.w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w45 { width: 45%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; }

.float {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.float .ico { width: 18px; height: 18px; color: var(--lime); }
.float--a { right: -4px; top: 0; }
.float--b { left: -4px; bottom: 4px; }

@media (min-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .float--a { right: -28px; top: -4px; }
  .float--b { left: -36px; bottom: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  .float--a { animation: bob 6s ease-in-out infinite; }
  .float--b { animation: bob 6s ease-in-out -3s infinite; }
}
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid #15223F; }
.section__head { max-width: 640px; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; }
.section__head p:not(.kicker) { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.kicker { color: var(--lime); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }

@media (min-width: 960px) {
  .section { padding: 104px 0; }
  .section__head { margin-bottom: 48px; }
}

.grid { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

/* Funciones */
.feature { transition: border-color .2s, transform .2s; }
.feature:hover { border-color: rgba(163, 230, 53, .45); }
.feature__ico, .who__ico {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 12px; background: rgba(163, 230, 53, .12); color: var(--lime);
}
.feature__ico svg, .who__ico svg, .contact__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.06rem; font-weight: 700; }
.feature p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

@media (min-width: 600px) { .grid--features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1120px) { .grid--features { grid-template-columns: repeat(4, 1fr); } }

/* Para quién */
.who { padding: 26px; }
.who__ico { width: 52px; height: 52px; border-radius: 14px; }
.who__ico svg { width: 26px; height: 26px; }
.who h3 { font-size: 1.2rem; font-weight: 700; }
.who p { margin-top: 8px; color: var(--muted); }

@media (min-width: 600px) { .grid--who { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid--who { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* Planes */
.grid--plans { max-width: 880px; }
.plan { display: flex; flex-direction: column; padding: 28px; }
.plan__tag {
  align-self: flex-start; padding: 5px 12px; margin-bottom: 16px;
  border-radius: 999px; border: 1px solid var(--border);
  font: 700 13px var(--font-head); color: var(--lime);
}
.plan h3 { font-size: 1.45rem; font-weight: 800; }
.plan > p:not(.plan__tag) { margin-top: 10px; color: var(--muted); }
.plan__list { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.plan__list li { display: flex; align-items: flex-start; gap: 10px; }
.plan__list .ico { color: var(--lime); stroke-width: 2.6; margin-top: 2px; }
.plan .btn { margin-top: auto; }
.plan--featured {
  border-color: rgba(163, 230, 53, .55);
  background: linear-gradient(180deg, rgba(163, 230, 53, .07), var(--surface) 55%);
}
.plan--featured .plan__tag { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

@media (min-width: 720px) { .grid--plans { grid-template-columns: repeat(2, 1fr); gap: 20px; } }

/* Preguntas frecuentes */
.faq { display: grid; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s; }
.faq__item[open] { border-color: rgba(163, 230, 53, .45); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; cursor: pointer; list-style: none;
  font: 600 1rem/1.4 var(--font-head);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .ico { color: var(--lime); transition: transform .25s; }
.faq__item[open] summary .ico { transform: rotate(45deg); }
.faq__body { padding: 0 20px 20px; color: var(--muted); }
.faq__body p + p, .faq__body ul + p { margin-top: 10px; }
.faq__body ul { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.faq__body strong { color: var(--lime); font-weight: 600; margin-right: 6px; }

/* Contacto */
.contact { display: grid; gap: 36px; }
.contact__info h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; }
.contact__info > p:not(.kicker) { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.contact__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__ico {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; background: rgba(163, 230, 53, .12); color: var(--lime);
}
.contact__list small { display: block; color: var(--muted); font-size: 13px; }
.contact__list a, .contact__list span { color: var(--text); font-weight: 600; word-break: break-word; }
.contact__list a:hover { color: var(--lime); }

.form { padding: 24px; }
.form h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.req { color: var(--lime); }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: 16px/1.4 var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3B1C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.field select option { background: var(--surface); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #6B7B95; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(163, 230, 53, .2);
}
#f-rfc { text-transform: uppercase; }
#f-rfc::placeholder { text-transform: none; }
.field__error { display: none; margin-top: 6px; color: var(--danger); font-size: 13px; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }
.field.is-invalid .field__error { display: block; }
.field-row { display: grid; gap: 0 14px; }
.form__note { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }

@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } .form { padding: 32px; } }
@media (min-width: 960px) { .contact { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; } }

/* ---------- Pie ---------- */
.footer { padding: 56px 0 96px; border-top: 1px solid var(--border); background: #091122; }
.footer__grid { display: grid; gap: 32px; }
.footer__tag { margin-top: 14px; color: var(--muted); font-size: 14px; max-width: 320px; }
.footer__links, .footer__contact { display: grid; gap: 10px; align-content: start; font-size: 15px; }
.footer__links a, .footer__contact a { color: var(--muted); }
.footer__links a:hover, .footer__contact a:hover { color: var(--lime); }
.footer__contact span { color: var(--muted); }
.footer__bottom {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
}
.footer__bottom p:first-child { color: var(--text); font-weight: 500; }

@media (min-width: 720px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 24px -6px rgba(37, 211, 102, .55);
  transition: transform .2s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { color: #fff; transform: scale(1.06); }
@media (min-width: 900px) { .wa-float { right: 24px; bottom: 24px; } }

/* ---------- Animación al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
