/* ═══════════════════════════════════════════
   AislaMe — Minisites municipales
   landing.css
   Sistema de diseño AislaMe v1.0
   Paleta: naranja #F97316 + azul #1E3A8A + oscuro #1C1C1C
══════════════════════════════════════════ */

/* ── Reset y variables ─────────────────── */
:root {
  --orange:         #F97316;
  --orange-dark:    #EA580C;
  --orange-light:   #FFF7ED;
  --orange-border:  #FED7AA;
  --blue:           #1E3A8A;
  --blue-mid:       #3B82F6;
  --blue-light:     #EFF6FF;
  --blue-border:    #BFDBFE;
  --blue-info:      #1E40AF;
  --dark:           #1C1C1C;
  --dark-text:      #FFFFFF;
  --dark-muted:     #A3A3A3;
  --dark-sep:       #2D2D2D;
  --text:           #111827;
  --text-2:         #374151;
  --text-3:         #6B7280;
  --text-4:         #9CA3AF;
  --bg:             #FFFFFF;
  --bg-alt:         #F8FAFF;
  --bg-card:        #F9FAFB;
  --border:         #E5E7EB;
  --border-input:   #D1D5DB;
  --success:        #059669;
  --error:          #DC2626;
  --font:           system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --radius-sm:      6px;
  --radius-md:      8px;
  --radius-lg:      12px;
  --radius-pill:    20px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --container:      960px;
  --container-narrow: 680px;
  --transition:     .15s ease;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration: underline; }
a:hover { color: var(--blue-mid); }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

/* ── Accesibilidad ──────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Layout ─────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-logo img { height: 36px; width: auto; }
.navbar-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.navbar-tel {
  font-size: .8125rem;
  color: var(--text-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}
.navbar-tel:hover { color: var(--orange); }
.navbar-tel svg { flex-shrink: 0; }
.btn-nav {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 600;
  padding: .45rem 1rem;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-nav:hover { background: var(--orange-dark); color: #fff; }
.btn-nav:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ── Pills / Badges ──────────────────────── */
.pill-orange {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.pill-blue {
  display: inline-flex;
  border: 1px solid var(--blue-border);
  color: var(--blue-info);
  background: var(--blue-light);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: .75rem;
}

/* ── Hero ────────────────────────────────── */
.hero {
  background: var(--bg);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow { margin-bottom: 1.25rem; }
.hero-title {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: .5rem;
}
.hero-municipio { color: var(--orange); }
.hero-sub {
  font-size: .9375rem;
  color: var(--text-3);
  margin-bottom: 2rem;
  max-width: 640px;
  line-height: 1.65;
}
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
  padding: .8rem 1.75rem;
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--orange-dark); color: #fff; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: #15803D;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
  padding: .8rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid #22C55E;
  transition: background var(--transition);
}
.btn-whatsapp:hover { background: #F0FDF4; color: #15803D; }
.icon-wa { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Dark Section ────────────────────────── */
.dark-section {
  background: var(--dark);
  padding: 3rem 0;
  color: var(--dark-text);
}
.dark-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--dark-sep);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.dark-kpi {
  background: var(--dark);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.dark-kpi-n {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--orange);
  line-height: 1.1;
}
.dark-kpi-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-top: .25rem;
}
.dark-kpi-sub {
  font-size: .6875rem;
  color: var(--dark-muted);
}
.dark-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
}
.dark-feature {}
.dark-icon {
  width: 36px;
  height: 36px;
  color: var(--orange);
  margin-bottom: .75rem;
  stroke: var(--orange);
}
.dark-feature h3 {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: .4rem;
}
.dark-feature p {
  font-size: .8125rem;
  color: var(--dark-muted);
  line-height: 1.65;
}
.dark-sep {
  width: 24px;
  height: 2px;
  background: var(--orange);
  margin-top: .875rem;
}

/* ── Secciones ───────────────────────────── */
.sec {
  padding: 4rem 0;
}
.sec-alt {
  background: var(--bg-alt);
}
.sec h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1rem;
  line-height: 1.25;
}
.sec p {
  font-size: .9375rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: .875rem;
}

/* ── Métricas ────────────────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.75rem 0;
}
.metric { text-align: center; }
.metric-n {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}
.metric-l {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-2);
  margin-top: .3rem;
}
.metric-s {
  display: block;
  font-size: .6875rem;
  color: var(--text-4);
  margin-top: .15rem;
}

/* ── Gráfico antigüedad ──────────────────── */
.chart-antigüedad { margin: 2rem 0; }
.chart-label {
  font-size: .8125rem;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.bars { display: flex; flex-direction: column; gap: .625rem; }
.bar-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.bar-lbl {
  font-size: .75rem;
  color: var(--text-3);
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  background: var(--border);
  border-radius: 4px;
  height: 24px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  width: 0;
  transition: width .9s cubic-bezier(.4,0,.2,1);
}
.bar-fill.elegible { background: var(--blue-mid); }
.bar-fill.no-elegible { background: #D1D5DB; }
.bar-val {
  font-size: .6875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.bar-fill.no-elegible .bar-val { color: var(--text-2); }
.chart-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: .75rem;
}
.legend-item {
  font-size: .75rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: .375rem;
}
.legend-item::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-item.elegible::before { background: var(--blue-mid); }
.legend-item.no-elegible::before { background: #D1D5DB; }

/* ── Blockquote ──────────────────────────── */
.blockquote {
  border-left: 3px solid var(--orange);
  background: var(--orange-light);
  padding: 1.125rem 1.375rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
}
.blockquote p {
  font-size: .9375rem;
  color: var(--text-2);
  font-style: italic;
  margin: 0;
  line-height: 1.65;
}

/* ── Cards ───────────────────────────────── */
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
.card-info {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
}
.card-info.white {
  background: var(--bg-card);
  border-color: var(--border);
}
.card-info h3 {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.card-info p {
  font-size: .8125rem;
  color: var(--text-3);
  line-height: 1.6;
  margin: 0;
}

/* ── Narrativa (HTML de la IA) ───────────── */
.narrativa {
  font-size: .9375rem;
  color: var(--text-2);
  line-height: 1.75;
  margin: 1.25rem 0;
}
.narrativa p { margin-bottom: .875rem; }
.narrativa strong { color: var(--text); font-weight: 600; }

/* ── Calculadora ─────────────────────────── */
.calc-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.25rem 0;
}
.calc-result {
  background: var(--dark);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-top: .875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
}
.result-n {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.1;
}
.result-s {
  font-size: .8125rem;
  color: var(--dark-muted);
  line-height: 1.5;
}

/* ── Pasos ───────────────────────────────── */
.steps-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.step { text-align: center; padding: .5rem; }
.step-n {
  width: 40px;
  height: 40px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 auto .75rem;
}
.step h3 {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .35rem;
}
.step p {
  font-size: .8125rem;
  color: var(--text-3);
  margin: 0;
}

/* ── Zero banner ─────────────────────────── */
.zero-banner {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.zero-n {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--blue);
}
.zero-s {
  font-size: .75rem;
  color: var(--blue-mid);
}

/* ── Formulario ──────────────────────────── */
.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: .375rem;
}
.req { color: var(--orange); margin-left: 2px; }
.form-row input,
.form-row select {
  width: 100%;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  padding: .625rem .875rem;
  font-size: .9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}
.form-row input[aria-invalid="true"],
.form-row select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}
.form-row .field-error {
  font-size: .75rem;
  color: var(--error);
  margin-top: .3rem;
}
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}
.rgpd-check {
  display: flex;
  gap: .625rem;
  align-items: flex-start;
  margin: 1.25rem 0;
}
.rgpd-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.rgpd-check label {
  font-size: .8125rem;
  color: var(--text-3);
  line-height: 1.5;
  cursor: pointer;
}
.rgpd-check a { color: var(--blue); }
.btn-submit {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: .9375rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-submit:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  background: var(--text-4);
  cursor: not-allowed;
  transform: none;
}
.btn-submit:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.form-feedback {
  margin-top: 1rem;
  padding: .875rem 1rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  text-align: center;
}
.form-feedback.success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.form-feedback.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* ── FAQ ─────────────────────────────────── */
.faq-list { margin: 1.25rem 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  transition: color var(--transition);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.25rem;
  font-weight: 400;
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--orange); }
.faq-body {
  padding: .25rem 0 1.125rem;
}
.faq-body p {
  font-size: .875rem;
  color: var(--text-3);
  line-height: 1.7;
  margin: 0;
}

/* ── Footer ──────────────────────────────── */
.footer {
  background: var(--blue);
  color: #E0E7FF;
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.25fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand img { filter: brightness(0) invert(1); margin-bottom: .875rem; }
.footer-brand p {
  font-size: .8125rem;
  color: #93C5FD;
  line-height: 1.65;
  margin-bottom: .5rem;
}
.footer-legal { font-size: .75rem; color: #7CB9F9; }
.footer-links h4,
.footer-contact h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #E0E7FF;
  margin-bottom: .875rem;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
  font-size: .8125rem;
  color: #93C5FD;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: .625rem; }
.footer-phone,
.footer-email,
.footer-wa {
  font-size: .875rem;
  color: #93C5FD;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-phone:hover,
.footer-email:hover,
.footer-wa:hover { color: #fff; }
.footer-wa {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.footer-metodologia {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1.25rem 0;
  margin-bottom: 1.25rem;
}
.footer-metodologia summary {
  font-size: .8125rem;
  color: #93C5FD;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.footer-metodologia summary::-webkit-details-marker { display: none; }
.footer-metodologia-body {
  padding-top: .875rem;
  font-size: .75rem;
  color: #7CB9F9;
  line-height: 1.65;
}
.footer-metodologia-body p { margin-bottom: .5rem; }
.footer-metodologia-body ul { margin: .5rem 0 .5rem 1.25rem; }
.footer-metodologia-body li { margin-bottom: .25rem; }
.footer-metodologia-body a { color: #93C5FD; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
}
.footer-bottom p { font-size: .75rem; color: #7CB9F9; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .navbar-tel { display: none; }

  .hero { padding: 2.25rem 0 2rem; }
  .hero-title { font-size: 1.625rem; }
  .hero-sub { font-size: .875rem; }
  .btn-primary, .btn-whatsapp { flex: 1; justify-content: center; }

  .dark-features { grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
  .dark-kpis { grid-template-columns: 1fr; }
  .dark-kpi { border-bottom: 1px solid var(--dark-sep); }
  .dark-kpi:last-child { border-bottom: none; }

  .metrics-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .metrics-row .metric:last-child { grid-column: 1 / -1; }

  .cards-2 { grid-template-columns: 1fr; }
  .steps-3 { grid-template-columns: 1fr; gap: 1.25rem; }
  .step { text-align: left; display: flex; gap: .875rem; align-items: flex-start; }
  .step-n { flex-shrink: 0; margin: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }

  .sec { padding: 2.5rem 0; }
  .bar-lbl { width: 68px; font-size: .7rem; }
}

@media (max-width: 480px) {
  .dark-features { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: 1fr; }
  .metrics-row .metric:last-child { grid-column: auto; }
  .hero-ctas { flex-direction: column; }
  .btn-primary, .btn-whatsapp { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Print (PDF) ─────────────────────────── */
@media print {
  .navbar, .hero-ctas, #formulario, .faq-list, .footer-metodologia { display: none; }
  .dark-section { background: #f5f5f5 !important; color: #111 !important; }
  .dark-kpi-n { color: #F97316 !important; }
  .dark-muted { color: #555 !important; }
  .dark-feature p { color: #444 !important; }
  .footer { background: #1E3A8A !important; }
  a { text-decoration: none; color: inherit; }
  .sec { padding: 1.5rem 0; }
  body { font-size: 11pt; }
}
