:root {
  --green-900: #1f3d14;
  --green-700: #2f5d1e;
  --green-500: #4c8a2b;
  --green-100: #e8f2df;
  --yellow-400: #f4c430;
  --yellow-100: #fff6d6;
  --wa: #1fa855;
  --wa-hover: #178a45;

  --bg: #fbfaf5;
  --surface: #ffffff;
  --surface-alt: #f3f1e7;
  --text: #1d2318;
  --muted: #5a6352;
  --border: #dcd9c9;
  --accent: var(--green-700);
  --accent-contrast: #ffffff;
  --promo-bg: var(--green-900);
  --promo-text: #ffffff;
  --error: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 6px 20px rgb(0 0 0 / .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141811;
    --surface: #1c2218;
    --surface-alt: #182014;
    --text: #eef1e8;
    --muted: #a8b29d;
    --border: #33402b;
    --accent: #7fbf52;
    --accent-contrast: #0f1a0a;
    --green-100: #23331a;
    --yellow-100: #2e2913;
    --promo-bg: #24401a;
    --error: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141811; --surface: #1c2218; --surface-alt: #182014; --text: #eef1e8;
  --muted: #a8b29d; --border: #33402b; --accent: #7fbf52; --accent-contrast: #0f1a0a;
  --green-100: #23331a; --yellow-100: #2e2913; --promo-bg: #24401a; --error: #ff8a80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-contrast);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .1s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--yellow-400); outline-offset: 2px;
}
.btn--small { min-height: 38px; padding: 0 16px; font-size: .95rem; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); filter: none; }
.btn--light { background: var(--yellow-400); color: #1d2318; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.logo strong { color: var(--accent); }
.topbar__nav { display: flex; align-items: center; gap: 18px; }
.topbar__nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; }
@media (max-width: 560px) { .topbar__nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: 48px 0 40px; background: linear-gradient(180deg, var(--green-100), var(--bg)); }
.hero__inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero__inner { grid-template-columns: 1.15fr .85fr; } .hero { padding: 72px 0 56px; } }
.eyebrow { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 38em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.hero__facts li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.hero__facts strong { display: block; }
.hero__facts span { color: var(--muted); font-size: .92rem; }
.hero__art img { margin: 0 auto; max-width: 400px; width: 100%; filter: drop-shadow(0 12px 28px rgb(0 0 0 / .18)); }
@media (max-width: 859px) { .hero__art { order: -1; } .hero__art img { max-width: 200px; } }
.logo img { width: 44px; height: 44px; }

/* Promo */
.promo { background: var(--promo-bg); color: var(--promo-text); padding: 28px 0; }
.promo__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.promo h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.promo p { margin: 0 0 .4em; max-width: 46em; opacity: .95; }
.promo__tag { display: inline-block; background: var(--yellow-400); color: #1d2318; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px !important; }
.promo__meta { font-weight: 700; }

/* Secciones */
.section { padding: 56px 0; }
section[id] { scroll-margin-top: 64px; }
.section--alt { background: var(--surface-alt); }
.section__title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.section__lead { color: var(--muted); max-width: 42em; margin-bottom: 28px; }
.subhead { margin-top: 36px; font-size: 1.2rem; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card img { margin-bottom: 12px; }
.card p { color: var(--muted); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.tags li { background: var(--yellow-100); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: .88rem; font-weight: 600; }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.steps h3 { font-size: 1.08rem; margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }
.steps__n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast); display: grid; place-items: center; font-weight: 800; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.zones { width: 100%; border-collapse: collapse; min-width: 480px; }
.zones th, .zones td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.zones th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.zones tr:last-child td { border-bottom: 0; }
.zones td:first-child { font-weight: 700; }
.note { margin-top: 16px; color: var(--muted); }

.segments { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.segments li { background: var(--green-100); border-radius: 10px; padding: 12px 14px; font-weight: 600; }

/* Formulario */
.section--form { background: var(--surface-alt); }
.form-wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .form-wrap { grid-template-columns: .8fr 1.2fr; align-items: start; } }
.form-intro p { color: var(--muted); }
.form, .thanks { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.form { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; min-height: 46px; width: 100%;
}
textarea { resize: vertical; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; font-weight: 500; cursor: pointer; background: var(--bg); }
.choices input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--green-100); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.consent input { width: auto; min-height: 0; margin-top: 4px; accent-color: var(--accent); }
.is-invalid { border-color: var(--error) !important; }
.form__status { margin: 10px 0 0; min-height: 1.4em; font-size: .95rem; }
.form__status.is-error { color: var(--error); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks h3 { color: var(--accent); }

/* Pie */
.footer { padding: 32px 0 96px; border-top: 1px solid var(--border); color: var(--muted); }
.footer p { margin: 0 0 .5em; }
.footer__small { font-size: .85rem; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.wa-float:hover { background: var(--wa-hover); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
