/* Fundación Chamariapa Ecológica — hoja de estilos principal
   Sistema de diseño: tokens en :root. Interfaz nítida, sin efectos de vidrio. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color de marca */
  --forest: #1f5d3a;
  --forest-dark: #143f27;
  --leaf: #4e9f3d;
  --sand: #faf6ec;
  --sand-2: #f1ead8;
  --terra: #c8663a;
  --terra-strong: #a9481f;
  --terra-strong-hover: #963f1a;
  --ink: #1b2a22;
  --muted: #4a5a50;
  --line: #e2d9c3;
  --white: #ffffff;
  --leaf-tint: #e6f0e4;
  --terra-tint: #f8e6da;
  --focus: #0b5cad;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.938rem);
  --fs-base: clamp(1.0625rem, 1.03rem + 0.15vw, 1.1875rem);
  --fs-lg: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --fs-h1: clamp(2.2rem, 1.6rem + 3vw, 3.9rem);

  /* Espaciado */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: clamp(3rem, 2rem + 4vw, 5.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);

  /* Forma y sombra */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(27, 42, 34, 0.08), 0 2px 8px rgba(27, 42, 34, 0.06);
  --shadow-2: 0 4px 10px rgba(27, 42, 34, 0.08), 0 12px 28px rgba(27, 42, 34, 0.1);

  --maxw: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 var(--s-4); color: var(--forest-dark); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--leaf-tint); color: var(--forest-dark); }
strong { font-weight: 800; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-8); }
.section--alt { background: var(--sand-2); }
.section--forest { background: var(--forest); color: #f4f1e6; }
.section--forest h2, .section--forest h3 { color: #fff; }
.section--forest a:not(.btn) { color: #fff; }
.section-head { max-width: 46rem; margin-bottom: var(--s-6); }
.section-head p { font-size: var(--fs-lg); color: var(--muted); }
.section--forest .section-head p { color: #dfe9da; }
.eyebrow { display: inline-block; font-size: var(--fs-sm); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terra-strong); margin-bottom: var(--s-3); }
.section--forest .eyebrow { color: #f5c9b0; }
.lead { font-size: var(--fs-lg); color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 200; background: var(--forest-dark); color: #fff; padding: 0.75rem 1.25rem; border-radius: var(--r-sm); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: var(--s-3); color: #fff; }

/* ---------- Grid utilities ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.split { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 1fr; gap: var(--s-7); }
  .split--rev > :first-child { order: 2; }
}
.stack > * + * { margin-top: var(--s-4); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.4rem;
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--r-pill); cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--primary { background: var(--terra-strong); color: #fff; }
.btn--primary:hover { background: var(--terra-strong-hover); color: #fff; }
.btn--forest { background: var(--forest); color: #fff; }
.btn--forest:hover { background: var(--forest-dark); color: #fff; }
.btn--outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: #fff; }
.section--forest .btn--outline { color: #fff; border-color: #fff; }
.section--forest .btn--outline:hover { background: #fff; color: var(--forest-dark); }
.btn--light { background: #fff; color: var(--forest-dark); }
.btn--light:hover { background: var(--leaf-tint); color: var(--forest-dark); }
.btn--sm { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--sand); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--forest-dark); min-height: 44px; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.brand__sub { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--leaf-text, #2f6b26); }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 2px solid var(--forest); background: transparent; color: var(--forest); border-radius: var(--r-sm); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sand); border-bottom: 1px solid var(--line); padding: var(--s-3) var(--gutter) var(--s-5); box-shadow: var(--shadow-2); }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s-3); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--r-sm); }
.site-nav a:not(.btn):hover { background: var(--leaf-tint); }
.site-nav a[aria-current="page"] { color: var(--forest); background: var(--leaf-tint); }
.site-nav .btn { width: 100%; margin-top: var(--s-3); }
@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; position: static; background: transparent; border: 0; box-shadow: none; padding: 0; gap: var(--s-3); }
  .site-nav ul { display: flex; gap: 0.15rem; }
  .site-nav a:not(.btn) { padding: 0 0.8rem; font-size: 0.98rem; }
  .site-nav .btn { width: auto; margin: 0; }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--s-7) var(--s-8); position: relative; overflow: hidden; }
.hero .split { align-items: center; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--forest); background-image: linear-gradient(transparent 68%, var(--leaf-tint) 68%); }
.hero__art img { width: 100%; height: auto; border-radius: var(--r-lg); }
.hero__note { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); padding: 0; list-style: none; font-weight: 700; color: var(--forest); font-size: var(--fs-sm); }
.hero__note li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero__note svg { width: 20px; height: 20px; color: var(--leaf); }

.page-hero { padding-block: var(--s-7); background: var(--leaf-tint); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem); max-width: 22ch; }
.page-hero .lead { margin-bottom: 0; }
.breadcrumb { font-size: var(--fs-sm); margin-bottom: var(--s-4); color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--muted); }
.breadcrumb a { color: var(--forest); }

/* ---------- Tarjetas ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: var(--s-3); }
.card__icon { width: 64px; height: 64px; border-radius: var(--r-md); background: var(--leaf-tint); color: var(--forest); display: grid; place-items: center; margin-bottom: var(--s-4); flex: none; }
.card__icon svg { width: 36px; height: 36px; }
.card__icon--terra { background: var(--terra-tint); color: var(--terra-strong); }
.card__link { margin-top: auto; padding-top: var(--s-3); font-weight: 800; color: var(--forest); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.card__link:hover { text-decoration: underline; }
.card__link svg { width: 1em; height: 1em; }
.card--flat { box-shadow: none; }
.card--tint { background: var(--leaf-tint); border-color: #cfe1cb; }
.card--terra { background: var(--terra-tint); border-color: #efcdb9; }
.program-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tag { display: inline-block; align-self: flex-start; font-size: 0.8rem; font-weight: 800; padding: 0.2rem 0.7rem; border-radius: var(--r-pill); background: var(--leaf-tint); color: var(--forest-dark); margin-bottom: var(--s-3); }
.tag--terra { background: var(--terra-tint); color: #7a3212; }
.tag--demo { background: #fff3c9; color: #5c4600; }

.help-grid .card { text-align: left; }
.checklist { list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: var(--s-3); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--leaf-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%231f5d3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* ---------- Uso del aporte (barra cualitativa) ---------- */
.usage { display: grid; gap: var(--s-4); }
.usage__bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 18px; border-radius: var(--r-pill); overflow: hidden; }
.usage__bar span:nth-child(1) { background: var(--forest); }
.usage__bar span:nth-child(2) { background: var(--leaf); }
.usage__bar span:nth-child(3) { background: var(--terra); }
.usage__bar span:nth-child(4) { background: #8a7a4f; }
.usage__list { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.usage__list li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); }
.usage__list strong { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; color: var(--forest-dark); }
.usage__list i { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.usage__list li:nth-child(1) i { background: var(--forest); }
.usage__list li:nth-child(2) i { background: var(--leaf); }
.usage__list li:nth-child(3) i { background: var(--terra); }
.usage__list li:nth-child(4) i { background: #8a7a4f; }

/* ---------- Línea de tiempo de impacto ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 3px solid var(--leaf); display: grid; gap: var(--s-5); }
.timeline li { position: relative; background: var(--white); border: 1px dashed #b9c9b3; border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }
.timeline li::before { content: ""; position: absolute; left: calc(-1.4rem - 9px); top: 1.4rem; width: 15px; height: 15px; border-radius: 50%; background: var(--sand); border: 3px solid var(--leaf); }
.timeline h3, .timeline h4 { margin-bottom: 0.25rem; font-size: 1.15rem; }
.timeline p { margin: 0; color: var(--muted); }

.impact { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.impact__item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); text-align: center; }
.impact__value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--forest); display: block; }
.impact__label { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Confianza / pasos ---------- */
.trust { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.trust__item { display: flex; gap: var(--s-3); align-items: flex-start; }
.trust__item svg { width: 40px; height: 40px; flex: none; color: #f5c9b0; }
.trust__item h3 { font-size: 1.15rem; margin-bottom: 0.2rem; }
.trust__item p { margin: 0; color: #dfe9da; font-size: var(--fs-sm); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: paso; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.steps li { counter-increment: paso; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); position: relative; }
.steps li::before { content: counter(paso); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: var(--s-3); }
.steps h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--s-3); max-width: 52rem; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq summary { cursor: pointer; padding: var(--s-4) var(--s-5); font-weight: 800; color: var(--forest-dark); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--terra-strong); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 var(--s-5) var(--s-4); color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: var(--s-4); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.form-row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label, .field legend { font-weight: 800; color: var(--forest-dark); font-size: 0.98rem; }
.field .hint { font-size: var(--fs-sm); color: var(--muted); }
.req { color: var(--terra-strong); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.9rem; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #b7aa8b; border-radius: var(--r-sm);
}
.textarea { min-height: 120px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--forest); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #a11d1d; background: #fff6f5; }
.error-msg { color: #a11d1d; font-size: var(--fs-sm); font-weight: 700; }
.error-msg:empty { display: none; }
.check.has-error label { color: #a11d1d; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check input { width: 24px; height: 24px; margin-top: 0.15rem; flex: none; accent-color: var(--forest); }
.check label { font-weight: 600; color: var(--ink); }
.form-status { padding: var(--s-4); border-radius: var(--r-sm); font-weight: 700; display: none; }
.form-status.is-ok { display: block; background: var(--leaf-tint); color: var(--forest-dark); border: 1px solid #b8d3b2; }
.form-status.is-error { display: block; background: #fdecea; color: #7d1a1a; border: 1px solid #efb8b2; }
.privacy-note { font-size: var(--fs-sm); color: var(--muted); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); box-shadow: var(--shadow-1); }
@media (min-width: 640px) { .form-card { padding: var(--s-6); } }

/* Selector de monto (informativo) */
.amounts { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 1.1rem; border: 2px solid var(--forest); border-radius: var(--r-pill); background: #fff; color: var(--forest); font: inherit; font-weight: 800; cursor: pointer; }
.chip:hover { background: var(--leaf-tint); }
.chip[aria-pressed="true"] { background: var(--forest); color: #fff; }

/* Notas y avisos */
.notice { border-left: 5px solid var(--leaf); background: var(--leaf-tint); padding: var(--s-4) var(--s-5); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.notice--terra { border-left-color: var(--terra); background: var(--terra-tint); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Biblioteca ---------- */
.book { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.book__cover { background: var(--sand-2); padding: var(--s-4) var(--s-4) 0; }
.book__cover img { width: min(100%, 220px); margin-inline: auto; border-radius: 6px 10px 10px 6px; box-shadow: var(--shadow-2); }
.book__body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.book__body h3 { font-size: 1.25rem; }
.book__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--s-3); }
.book__price { font-weight: 800; color: var(--forest); margin: auto 0 var(--s-3); }

/* ---------- Carnet ---------- */
.carnet-stage { display: grid; gap: var(--s-6); justify-items: center; }
.carnet { width: min(100%, 440px); aspect-ratio: 1.586 / 1; perspective: 1200px; }
.carnet:focus-visible { outline: 3px solid var(--terra-strong); outline-offset: 3px; border-radius: 18px; }
.carnet__inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s ease; transform-style: preserve-3d; }
.carnet.is-flipped .carnet__inner { transform: rotateY(180deg); }
.carnet__face { position: absolute; inset: 0; border-radius: 18px; padding: 5%; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.carnet__front { background: linear-gradient(135deg, #1f5d3a 0%, #256b41 60%, #2c7a49 100%); color: #fff; }
.carnet__back { background: #fffdf6; color: var(--ink); transform: rotateY(180deg); border: 2px solid var(--forest); }
.carnet__top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.carnet__org { font-family: var(--font-display); font-weight: 700; font-size: clamp(0.85rem, 3.2vw, 1.05rem); line-height: 1.1; }
.carnet__org small { display: block; font-family: var(--font-body); font-size: 0.62em; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.9; }
.carnet__leaf { width: 12%; min-width: 34px; }
.carnet__main { margin-top: auto; }
.carnet__label { font-size: clamp(0.6rem, 2.2vw, 0.72rem); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; opacity: 0.85; }
.carnet__name { font-family: var(--font-display); font-size: clamp(1.15rem, 5vw, 1.6rem); font-weight: 600; line-height: 1.1; margin: 0.15rem 0 0.5rem; color: #fff; }
.carnet__num { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: clamp(0.85rem, 3.4vw, 1.05rem); letter-spacing: 0.08em; font-weight: 700; }
.carnet__stamp { position: absolute; right: 5%; bottom: 5%; background: #fff3c9; color: #5c4600; font-size: clamp(0.55rem, 2vw, 0.7rem); font-weight: 800; padding: 0.25rem 0.6rem; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.06em; }
.carnet__back { display: grid; grid-template-columns: 1fr auto; gap: 4%; align-items: center; }
.carnet__data { display: grid; gap: 0.5rem; font-size: clamp(0.72rem, 2.6vw, 0.9rem); }
.carnet__data dt { font-size: 0.68em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.carnet__data dd { margin: 0; font-weight: 700; color: var(--forest-dark); }
.carnet__qr { width: clamp(90px, 34%, 150px); background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
.carnet__qr svg { display: block; width: 100%; height: auto; }
.carnet__back .carnet__stamp { position: absolute; left: 5%; right: auto; }
.carnet-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }
dialog.carnet-dialog { border: 0; padding: var(--s-5); border-radius: var(--r-lg); background: var(--sand); width: min(96vw, 620px); max-height: 96vh; overflow: auto; }
dialog.carnet-dialog::backdrop { background: rgba(20, 40, 28, 0.82); }
dialog.carnet-dialog .carnet { width: 100%; margin-bottom: var(--s-4); }
dialog.carnet-dialog .carnet-actions { margin-top: var(--s-3); }

/* ---------- Programas (secciones alternas) ---------- */
.program-block { display: grid; gap: var(--s-5); padding: var(--s-6) 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.program-block:first-of-type { border-top: 0; }
@media (min-width: 820px) { .program-block { grid-template-columns: 96px 1fr; gap: var(--s-6); } }
.program-block .card__icon { width: 80px; height: 80px; }
.program-block .card__icon svg { width: 46px; height: 46px; }

/* Valores */
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.values li { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.values h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.values p { margin: 0; color: var(--muted); }

/* Contacto */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.contact-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.contact-list svg { width: 28px; height: 28px; flex: none; color: var(--forest); margin-top: 0.15rem; }

/* Legal */
.prose { max-width: 48rem; }
.prose h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); margin-top: var(--s-6); }
.prose h3 { margin-top: var(--s-5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-dark); color: #d9e4d5; padding-block: var(--s-7) var(--s-5); margin-top: auto; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 1.1rem; color: #fff; font-family: var(--font-body); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-grid { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand__sub { color: #cfe5c9; }
.footer-bottom { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); justify-content: space-between; }

/* ---------- Botones flotantes ---------- */
.float-stack { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.float-btn { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 56px; padding: 0 1.1rem 0 0.9rem; border: 0; border-radius: var(--r-pill); font: inherit; font-weight: 800; font-size: 0.98rem; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-2); }
.float-btn svg { width: 28px; height: 28px; flex: none; }
.float-btn--wa { background: #0b6b3a; color: #fff; }
.float-btn--wa:hover { background: #084f2b; color: #fff; }
.float-btn--chat { background: var(--forest-dark); color: #fff; }
.float-btn--chat:hover { background: #0d2a1a; }
.float-btn--chat[aria-expanded="true"] { background: var(--terra-strong); }
@media (max-width: 520px) {
  .float-btn span.float-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .float-btn { width: 56px; padding: 0; justify-content: center; }
  .float-btn--chat span.float-label { position: static; width: auto; height: auto; clip: auto; }
  .float-btn--chat { width: auto; padding: 0 1rem 0 0.8rem; }
}

/* ---------- Chat ---------- */
.chat-panel { position: fixed; right: 16px; bottom: 156px; z-index: 95; width: min(392px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 180px)); display: none; flex-direction: column; background: #fff; border: 2px solid var(--forest); border-radius: var(--r-md); box-shadow: var(--shadow-2); overflow: hidden; }
.chat-panel.is-open { display: flex; }
.chat-head { background: var(--forest); color: #fff; padding: var(--s-3) var(--s-4); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.chat-head h2 { margin: 0; color: #fff; font-family: var(--font-body); font-size: 1.05rem; font-weight: 800; }
.chat-head small { display: block; font-weight: 600; font-size: 0.78rem; opacity: 0.92; }
.chat-close { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; cursor: pointer; border-radius: var(--r-sm); display: grid; place-items: center; }
.chat-close:hover { background: rgba(255, 255, 255, 0.16); }
.chat-close svg { width: 22px; height: 22px; }
.chat-log { flex: 1; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); background: var(--sand); min-height: 200px; }
.msg { max-width: 88%; padding: 0.6rem 0.9rem; border-radius: 16px; font-size: 0.98rem; line-height: 1.45; white-space: pre-line; }
.msg--bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--user { background: var(--forest); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg a { color: var(--forest); font-weight: 800; }
.msg--user a { color: #fff; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-self: flex-start; }
.chat-chip { min-height: 44px; padding: 0.3rem 0.85rem; border: 2px solid var(--forest); background: #fff; color: var(--forest); border-radius: var(--r-pill); font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chat-chip:hover { background: var(--leaf-tint); }
.chat-form { display: flex; gap: var(--s-2); padding: var(--s-3); border-top: 1px solid var(--line); background: #fff; }
.chat-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0.5rem 0.8rem; font: inherit; border: 2px solid #b7aa8b; border-radius: var(--r-pill); }
.chat-form button { min-height: 44px; min-width: 44px; border: 0; background: var(--terra-strong); color: #fff; font: inherit; font-weight: 800; border-radius: var(--r-pill); padding: 0 1rem; cursor: pointer; }
.chat-form button:hover { background: var(--terra-strong-hover); }
.chat-demo { font-size: 0.75rem; color: var(--muted); text-align: center; padding: 0.35rem; background: #fff; border-top: 1px solid var(--line); }

/* ---------- Estrategia ---------- */
.strategy-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: var(--s-5) 0 0; padding: 0; list-style: none; }
.strategy-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.strategy-nav a:hover { background: var(--leaf-tint); }
.strat-section { padding-block: var(--s-7); border-top: 1px solid var(--line); }
.strat-section:first-of-type { border-top: 0; }
.strat-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: #fff; font-family: var(--font-display); font-weight: 700; margin-right: 0.6rem; vertical-align: middle; flex: none; }
.strat-section h2 { display: flex; align-items: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--leaf-tint); color: var(--forest-dark); font-weight: 800; }
table.data tbody tr:last-child td { border-bottom: 0; }
.sitemap-art { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); }
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.funnel li { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); display: grid; gap: 0.25rem; }
.funnel li strong { color: var(--forest); }
.prio { display: inline-block; font-size: 0.78rem; font-weight: 800; padding: 0.15rem 0.6rem; border-radius: var(--r-pill); }
.prio--alta { background: var(--terra-tint); color: #7a3212; }
.prio--media { background: #fff3c9; color: #5c4600; }
.prio--baja { background: var(--leaf-tint); color: var(--forest-dark); }

/* Mapa del sitio (estrategia) */
.sitemap { display: grid; gap: var(--s-5); }
.sitemap__root { justify-self: center; background: var(--forest); color: #fff; border-radius: var(--r-md); padding: var(--s-4) var(--s-6); text-align: center; display: grid; gap: 0.2rem; max-width: 26rem; }
.sitemap__root span { font-size: var(--fs-sm); color: #dfe9da; }
.sitemap__cols { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.sitemap__col { border-radius: var(--r-md); padding: var(--s-4); display: grid; gap: var(--s-3); align-content: start; border: 1px solid var(--line); background: #fff; }
.sitemap__col h3 { font-size: 1.1rem; margin: 0; }
.sitemap__col--info { border-top: 6px solid var(--forest); }
.sitemap__col--action { border-top: 6px solid var(--terra-strong); }
.sitemap__col--trust { border-top: 6px solid var(--leaf); }
.sitemap__node { background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.6rem 0.9rem; display: grid; gap: 0.1rem; }
.sitemap__node span { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Movimiento ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carnet__inner, .btn, .program-card { transition: none; }
}

@media print {
  .site-header, .float-stack, .chat-panel, .site-footer { display: none; }
  body { background: #fff; }
}
