/* LOFELIA — estilos globales */
:root {
  --cream: #f7f3ec;
  --cream-2: #efe8dc;
  --ink: #12302f;
  --ink-2: #1c4543;
  --sage: #b4c4b8;
  --sage-2: #8fa399;
  --orange: #f5b335;
  --text: #33413f;
  --muted: #5f6d6a;
  --white: #fff;
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1160px;
  --shadow: 0 10px 30px rgba(18, 48, 47, .08);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage-2); margin-bottom: .8em;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.hl { background: var(--ink); color: var(--orange); padding: 0 .18em; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mark { background: var(--orange); color: var(--ink); padding: 0 .2em; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
  font-family: inherit; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #ffc24d; }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.center .btn-row { justify-content: center; }

/* Cabecera */
.site-header { background: var(--ink); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav .btn { color: var(--ink); padding: .6em 1.2em; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 30px; height: 3px; background: var(--orange); margin: 6px 0; border-radius: 2px; transition: .2s; }
@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--ink);
    flex-direction: column; align-items: flex-start; padding: 12px 20px 28px; gap: 18px;
    display: none; border-top: 1px solid var(--ink-2);
  }
  .nav.open { display: flex; }
}

/* Hero */
.hero { padding: clamp(64px, 10vw, 130px) 0 clamp(48px, 7vw, 90px); }
.hero h1 { line-height: 1.25; }
.hero .lead { margin-top: 1em; }
.hero--dark { background: var(--ink); color: var(--cream); }
.hero--dark h1, .hero--dark h2 { color: var(--cream); }
.hero--dark .lead { color: var(--sage); }
.hero--image { position: relative; background: var(--ink) center/cover no-repeat; color: var(--cream); }
.hero--image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,48,47,.92) 0%, rgba(18,48,47,.65) 60%, rgba(18,48,47,.35) 100%); }
.hero--image .container { position: relative; }
.hero--image h1 { color: var(--cream); }
.hero--image .lead { color: #dfe7e1; }
.breadcrumb { font-size: .85rem; margin-bottom: 1.4em; color: var(--sage); }
.breadcrumb a { color: var(--sage); }

/* Rejillas y tarjetas */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }

.card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card--dark { background: var(--ink); color: #d9e2dc; box-shadow: none; }
.card--dark h2, .card--dark h3 { color: var(--cream); }
.card--sage { background: var(--sage); box-shadow: none; }
.card .icon { width: 56px; height: 56px; margin-bottom: 14px; }
.panel { background: var(--ink); color: #d9e2dc; border-radius: calc(var(--radius) + 8px); padding: clamp(28px, 5vw, 60px); }
.panel h2, .panel h3 { color: var(--cream); }
.panel .eyebrow { color: var(--orange); }
.media { border-radius: var(--radius); overflow: hidden; }

/* Pasos */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding: 16px 18px 16px 70px;
  background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--orange);
  font-weight: 700; display: grid; place-items: center;
}

/* Lista con check */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 32px; margin-bottom: .7em; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2312302f' stroke-width='3' d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/13px no-repeat;
}
.panel .checks li, .card--dark .checks li { color: #d9e2dc; }

/* Chips de municipios */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0; }
.chips a, .chips span {
  display: inline-block; padding: .45em 1em; border-radius: 999px; background: var(--white);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; box-shadow: var(--shadow);
}
.chips a:hover { background: var(--orange); }
.panel .chips span, .panel .chips a { background: var(--ink-2); color: var(--cream); box-shadow: none; }

/* Testimonios */
.quote { display: flex; flex-direction: column; gap: 16px; }
.quote blockquote { margin: 0; font-size: 1rem; }
.quote footer { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--sage); color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.quote cite { font-style: normal; font-weight: 600; color: var(--ink); display: block; }
.quote small { color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 18px 28px 18px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.5rem; color: var(--orange); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 18px; }

/* Equipo */
.person { text-align: center; }
.person img { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; margin: 0 auto 16px; }
.person p { color: var(--muted); }

/* Formulario */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid #d6d0c4; background: var(--white); color: var(--text);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: .35em; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 10px; display: none; }
.form-status.ok { display: block; background: #e3efe6; color: var(--ink); }
.form-status.err { display: block; background: #fbe6df; color: #7a2a14; }

/* CTA final */
.cta { text-align: center; }
.cta .panel { background: var(--ink) url("../img/logo-blanco.png") no-repeat right -60px bottom -40px / 360px; }

/* Prosa (páginas legales y artículos) */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid #ddd5c7; padding: 8px 10px; text-align: left; vertical-align: top; }

/* Pie */
.site-footer { background: var(--ink); color: var(--sage); padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.site-footer h4 { color: var(--cream); font-size: 1rem; margin-bottom: 1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-funding { background: var(--white); border-radius: var(--radius-sm); padding: 14px; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: center; }
.footer-funding img { height: 38px; width: auto; }
.footer-bottom { border-top: 1px solid var(--ink-2); margin-top: 32px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; }

/* WhatsApp / contacto flotante */
.float-cta {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; background: var(--orange); color: var(--ink);
  border-radius: 999px; padding: 12px 18px; font-weight: 600; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: inline-flex; gap: 8px; align-items: center; font-size: .95rem;
}
.float-cta svg { width: 20px; height: 20px; }

/* Utilidades */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.muted { color: var(--muted); }
.bg-white { background: var(--white); }
.bg-sage { background: var(--sage); }
.note { font-size: .88rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
