:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --text: #1d2321;
  --muted: #5b6662;
  --border: #e3e1da;
  --accent: #1f7a5a;
  --accent-strong: #17614a;
  --accent-soft: #e4f2ec;
  --on-accent: #ffffff;
  --bubble-in: #ffffff;
  --bubble-out: #d9f2e6;
  --radius: 16px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .04), 0 8px 24px rgba(20, 30, 25, .06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1a201e;
    --surface-2: #161b19;
    --text: #e8ecea;
    --muted: #a3aeaa;
    --border: #2b3330;
    --accent: #4fc196;
    --accent-strong: #6fd3ab;
    --accent-soft: #1d3029;
    --on-accent: #0d1513;
    --bubble-in: #232a27;
    --bubble-out: #1f4536;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Cabecera */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand span { color: var(--accent); }
header.site nav { display: flex; align-items: center; gap: 4px; }
header.site nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  padding: 6px 10px; border-radius: 999px;
}
header.site nav a:hover { color: var(--text); }
header.site nav a.nav-cta {
  background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 7px 16px; margin-left: 6px;
}
header.site nav a.nav-cta:hover { background: var(--accent-strong); }

/* Botones */
.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  padding: 13px 24px; border-radius: 999px; text-decoration: none; font-weight: 650;
  border: 1.5px solid var(--accent); transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn-light { background: #fff; color: #17614a; border-color: #fff; }
.btn-light:hover { background: #eaf6f0; border-color: #eaf6f0; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Portada */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; font-size: 0.85rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 18px; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 54ch; margin: 0 0 28px; }
.hero .lead strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 18px 0 0; font-size: 0.92rem; color: var(--muted); }

/* Teléfono de ejemplo */
.phone {
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  box-shadow: var(--shadow); padding: 14px; max-width: 360px; justify-self: center; width: 100%;
}
.phone-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px;
  border-bottom: 1px solid var(--border);
}
.phone-head small { display: block; color: var(--muted); font-size: 0.8rem; }
.phone-head strong { font-size: 0.95rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.phone-body {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 4px 6px;
}
.msg {
  margin: 0; padding: 9px 13px; border-radius: 16px; font-size: 0.93rem; line-height: 1.45;
  max-width: 85%; border: 1px solid var(--border);
}
.msg.in { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 4px; border-color: transparent; }
.phone-caption { margin: 8px 0 0; text-align: center; font-size: 0.75rem; color: var(--muted); }

/* Canales */
.channels { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.channels .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 28px; padding-top: 18px; padding-bottom: 18px;
}
.channels p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.channels ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.channels li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.channels svg, .icon svg {
  width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Bloques */
.block { padding: 80px 0; }
.block.alt { background: var(--surface-2); }
.block h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 0 0 12px; }
.section-lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 36px; max-width: 60ch; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--accent-soft); margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Para quién */
.tags { list-style: none; padding: 0; margin: 24px 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-weight: 550; font-size: 0.97rem;
}
.block.alt .section-lead { margin-bottom: 0; }

/* Pasos */
.steps {
  counter-reset: paso; list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.steps li {
  counter-increment: paso; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 64px 22px 22px;
}
.steps li::before {
  content: counter(paso); position: absolute; left: 22px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.95rem;
}
.steps h3 { margin: 0 0 6px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Modalidad */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mode {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
}
.mode h3 { margin: 0 0 8px; font-size: 1.2rem; }
.mode p { margin: 0; color: var(--muted); }

/* Preguntas frecuentes */
details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 20px; margin-bottom: 10px;
}
details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
summary {
  cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 600; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--accent);
}
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: var(--muted); }
#faq h2 { margin-bottom: 28px; }

/* Llamada final */
.cta { background: linear-gradient(135deg, #1f7a5a, #155943); color: #fff; }
.cta .section-lead { color: rgba(255,255,255,.85); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact-mail { margin: 24px 0 0; color: rgba(255,255,255,.85); }
.contact-mail a { color: #fff; }

/* Páginas legales */
.legal { padding: 48px 20px 64px; max-width: 760px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.01em; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 32px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.legal ul { padding-left: 1.2em; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* Pie */
footer.site {
  border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem;
  padding: 24px 0 40px;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.site a { color: var(--muted); }

/* Móvil */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .phone { justify-self: start; }
}
@media (max-width: 640px) {
  header.site nav a:not(.nav-cta) { display: none; }
  .hero { padding: 48px 0 40px; }
  .block { padding: 56px 0; }
  .two-col { grid-template-columns: 1fr; }
  .channels .wrap { justify-content: flex-start; }
  .hero-actions .btn, .contact-actions .btn { flex: 1 1 100%; text-align: center; }
}
