*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --g-dark:   #0d7a3a;
  --g-mid:    #13994C;
  --g-light:  #3BAA61;
  --g-pale:   #d4f0df;
  --g-ultra:  #f0faf4;
  --white:    #ffffff;
  --off:      #f8faf9;
  --ink:      #0b1f13;
  --ink2:     #1e3a27;
  --muted:    #4d7a5e;
  --muted2:   #7fa892;
  --border:   rgba(19,153,76,0.15);
  --borderS:  rgba(19,153,76,0.3);
}
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--white); color: var(--ink); overflow-x: hidden; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 64px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.nav-logo-txt { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--g-mid); letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--g-mid); }
.nav-cta { background: var(--g-mid) !important; color: var(--white) !important; padding: 9px 20px; border-radius: 100px; font-weight: 600 !important; transition: background 0.2s !important; }
.nav-cta:hover { background: var(--g-dark) !important; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 5vw; flex-direction: column; gap: 16px; z-index: 199; }
.mobile-menu a { font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* ── SANDBOX BANNER — solo visible cuando IS_SANDBOX=true ── */
.sandbox-banner {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #78350f;
  text-align: center;
  padding: 9px 5vw;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: none; /* oculto por defecto; JS lo muestra si is_sandbox */
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sandbox-banner.visible { display: flex; }

/* ── HERO ── */
.plans-hero {
  padding: 72px 5vw 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--g-ultra) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
}
.plans-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g-mid); margin-bottom: 16px; }
.plans-h1 { font-family: 'Syne', sans-serif; font-size: clamp(32px, 5vw, 56px); font-weight: 800; color: var(--ink); letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 18px; }
.plans-h1 .acc { color: var(--g-mid); }
.plans-sub { font-size: 16px; color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.75; font-weight: 300; }
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; }
.billing-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.billing-badge { font-size: 11px; font-weight: 700; background: var(--g-ultra); color: var(--g-dark); border: 1px solid var(--borderS); padding: 2px 10px; border-radius: 100px; }

/* ── PLANS GRID ── */
.plans-section { padding: 64px 5vw 100px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 1100px; margin: 0 auto; }

.plan-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 32px 26px 28px;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex; flex-direction: column;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(19,153,76,0.1); }
.plan-card.featured { border-color: var(--g-mid); border-width: 2px; }
.plan-card.featured:hover { box-shadow: 0 16px 48px rgba(19,153,76,0.18); }

.plan-popular { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--g-mid); color: var(--white); font-size: 11px; font-weight: 700; padding: 4px 16px; border-radius: 100px; white-space: nowrap; letter-spacing: 0.04em; }

.plan-icon { font-size: 28px; margin-bottom: 16px; display: block; }
.plan-name { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.plan-tagline { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; font-weight: 300; }

.plan-price-block { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.plan-price { font-family: 'Syne', sans-serif; font-size: 40px; font-weight: 800; color: var(--g-mid); line-height: 1; letter-spacing: -1px; }
.plan-price .price-cur { font-size: 20px; font-weight: 600; vertical-align: super; }
.plan-price .price-per { font-size: 14px; color: var(--muted); font-weight: 400; font-family: 'DM Sans', sans-serif; }
.plan-price-note { font-size: 12px; color: var(--muted2); margin-top: 5px; }

.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; flex: 1; }
.plan-features li { font-size: 13px; color: var(--muted); display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.feat-check { color: var(--g-mid); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.feat-x { color: var(--muted2); opacity: 0.5; flex-shrink: 0; margin-top: 1px; }
.plan-features li.na { opacity: 0.45; }

.btn-plan { display: block; text-align: center; padding: 14px; border-radius: 100px; font-size: 14px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: background 0.2s, transform 0.15s, box-shadow 0.2s; font-family: 'DM Sans', sans-serif; }
.btn-outline { border: 1.5px solid var(--borderS); color: var(--g-mid); background: transparent; }
.btn-outline:hover { background: var(--g-ultra); border-color: var(--g-mid); }
.btn-solid { background: var(--g-mid); color: var(--white); }
.btn-solid:hover { background: var(--g-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(19,153,76,0.25); }

/* ── COMPARISON TABLE ── */
.comparison-section { background: var(--off); padding: 72px 5vw; border-top: 1px solid var(--border); }
.comparison-inner { max-width: 900px; margin: 0 auto; }
.comparison-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g-mid); margin-bottom: 12px; }
.comparison-h2 { font-family: 'Syne', sans-serif; font-size: clamp(24px, 3vw, 36px); font-weight: 800; color: var(--ink); letter-spacing: -1px; margin-bottom: 40px; }
.comp-table { width: 100%; border-collapse: collapse; }
.comp-table th { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--ink); padding: 12px 16px; text-align: center; border-bottom: 2px solid var(--border); }
.comp-table th:first-child { text-align: left; }
.comp-table td { font-size: 13px; color: var(--muted); padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.comp-table td:first-child { text-align: left; font-weight: 500; color: var(--ink); }
.comp-table tr:last-child td { border-bottom: none; }
.comp-table .check { color: var(--g-mid); font-size: 15px; font-weight: 700; }
.comp-table .dash { color: var(--muted2); opacity: 0.4; }
.comp-table .featured-col { background: var(--g-ultra); }
.comp-table th.featured-col { color: var(--g-mid); }
.comp-table .cat-row td { background: var(--g-ultra); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-dark); }
.comp-table .cat-row td:first-child { text-align: left; }

/* ── FAQ ── */
.plans-faq { padding: 72px 5vw; border-top: 1px solid var(--border); }
.faq-inner { max-width: 700px; margin: 0 auto; }
.faq-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g-mid); margin-bottom: 12px; }
.faq-h2 { font-family: 'Syne', sans-serif; font-size: clamp(24px, 3vw, 36px); font-weight: 800; color: var(--ink); letter-spacing: -1px; margin-bottom: 36px; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; text-align: left; gap: 16px; }
.faq-qt { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.5; }
.faq-ico { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--borderS); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted2); font-size: 16px; transition: background 0.2s, border-color 0.2s, transform 0.3s; }
.faq-item.open .faq-ico { background: var(--g-mid); border-color: var(--g-mid); color: var(--white); transform: rotate(45deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; }
.faq-ai { padding: 0 0 20px; font-size: 14px; color: var(--muted); line-height: 1.8; font-weight: 300; }
.faq-item.open .faq-a { max-height: 300px; }

/* ── CTA ── */
.plans-cta { background: var(--g-mid); padding: 72px 5vw; text-align: center; }
.plans-cta h2 { font-family: 'Syne', sans-serif; font-size: clamp(24px, 3.5vw, 40px); font-weight: 800; color: var(--white); letter-spacing: -1px; margin-bottom: 12px; }
.plans-cta p { font-size: 15px; color: rgba(255,255,255,0.75); margin-bottom: 28px; font-weight: 300; }
.btn-white { display: inline-flex; align-items: center; gap: 10px; background: var(--white); color: var(--g-dark); padding: 15px 30px; border-radius: 100px; font-size: 15px; font-weight: 700; text-decoration: none; transition: background 0.2s, transform 0.15s; }
.btn-white:hover { background: var(--g-ultra); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════
   MODAL — 2 pasos: 1) Email  2) PayPal
══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11,31,19,0.6);
  backdrop-filter: blur(7px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: 24px;
  padding: 36px;
  max-width: 440px; width: 100%;
  position: relative;
  box-shadow: 0 40px 100px rgba(11,31,19,0.22);
  transform: translateY(24px);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--off); border: none;
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 18px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--border); }

/* Cabecera compartida entre los 2 pasos */
.modal-plan-tag  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--g-mid); margin-bottom: 6px; }
.modal-plan-name { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -0.8px; margin-bottom: 4px; }
.modal-plan-price { font-size: 14px; color: var(--muted); margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }

/* ── Paso 1: email ── */
#step-email { display: block; }
#step-paypal { display: none; }

.email-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: block; }
.email-hint  { font-size: 12px; color: var(--muted2); margin-bottom: 14px; line-height: 1.5; }
.email-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--borderS);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--off);
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}
.email-input:focus { border-color: var(--g-mid); background: var(--white); }
.email-error { font-size: 12px; color: #b91c1c; min-height: 18px; margin-bottom: 16px; display: block; }
.btn-continue {
  width: 100%;
  padding: 14px;
  background: var(--g-mid);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-continue:hover { background: var(--g-dark); transform: translateY(-1px); }
.btn-continue:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Paso 2: PayPal ── */
.modal-info { font-size: 13px; color: var(--muted2); line-height: 1.6; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 8px; }
.modal-info svg { flex-shrink: 0; margin-top: 1px; }
.modal-back { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-bottom: 18px; padding: 0; font-family: 'DM Sans', sans-serif; transition: color 0.2s; }
.modal-back:hover { color: var(--ink); }
.modal-email-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--g-ultra); border: 1px solid var(--borderS); border-radius: 100px; padding: 5px 12px; font-size: 12px; color: var(--g-dark); font-weight: 500; margin-bottom: 18px; }

/* PayPal button wrapper */
.paypal-btn-wrap { min-height: 50px; }
.paypal-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; font-size: 13px; color: var(--muted2);
}
.spinner { width: 18px; height: 18px; border: 2px solid rgba(19,153,76,0.2); border-top-color: var(--g-mid); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Country notice */
#country-notice { display:none; font-size:12px; color:var(--muted2); background:var(--off); border:1px solid var(--border); border-radius:10px; padding:9px 13px; margin-bottom:16px; line-height:1.5; }

/* ── TOAST ── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--white); padding: 12px 22px; border-radius: 100px; font-size: 14px; font-weight: 500; z-index: 600; display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; white-space: nowrap; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--g-dark); }
.toast.error   { background: #b91c1c; }

/* ── FOOTER ── */
footer { background: var(--ink2); padding: 36px 5vw; text-align: center; }
footer p { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.7; }
footer a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--g-light); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .plans-grid { grid-template-columns: 1fr; }
  .comp-table { font-size: 12px; }
  .comp-table th, .comp-table td { padding: 10px 8px; }
  .modal { padding: 28px 22px; }
}

/* ── FADE ── */
.fade-in { opacity: 0; transform: translateY(18px); animation: fadeIn 0.55s ease forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
