/* Tipografías alojadas en este servidor (variables, subconjunto latino): no se envían datos a Google. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/montserrat-latin.woff2) format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/open-sans-latin.woff2) format('woff2'); }
:root {
  --forest: #173d2b;
  --green: #316b39;
  --institutional: #3c7732;
  --bright: #4a9e57;
  --mint: #e9f2e9;
  --soft: #f4f8f3;
  --ink: #1d2d23;
  --muted: #526359;
  --line: #dbe6dc;
  --white: #fff;
  --ribbon: linear-gradient(90deg, #d6456b 16.66%, #6a4c9c 16.66% 33.33%, #3f9ad8 33.33% 50%, #3fae9d 50% 66.66%, #6bb24a 66.66% 83.33%, #f0a03a 83.33%);
  --heading: "Montserrat", "Open Sans", Arial, sans-serif;
  --body: "Open Sans", Arial, sans-serif;
  --shadow: 0 16px 42px rgba(23, 61, 43, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font: 400 1rem/1.65 var(--body); color: var(--ink); background: var(--white); }
h1, h2, h3 { margin: 0; font-family: var(--heading); }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 64px, 1200px); margin-inline: auto; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 80; padding: 8px 14px; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid #90702c; outline-offset: 4px; }

.gov { background: var(--forest); color: #edf6ee; font-size: .8125rem; }
.gov__in { min-height: 35px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gov a { text-underline-offset: 3px; }
.gov a:hover { color: #c8e7c9; }
.head { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.head__in { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 13px; max-width: 75%; color: var(--forest); text-decoration: none; }
.logo img { width: 37px; height: 50px; object-fit: contain; flex: 0 0 37px; }
.logo__txt { display: flex; flex-direction: column; line-height: 1.3; }
.logo strong { font: 800 1.02rem/1.3 var(--heading); letter-spacing: -.025em; }
.logo small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.menu { display: flex; align-items: center; gap: 6px; }
.menu a { padding: 8px 12px; border-radius: 8px; color: var(--forest); font-size: .925rem; font-weight: 700; white-space: nowrap; text-decoration: none; transition: background .2s; }
.menu a:hover { background: var(--mint); }
.burger { display: none; width: 44px; height: 44px; flex-shrink: 0; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--forest); cursor: pointer; }
.burger span, .burger span::before, .burger span::after { width: 18px; height: 2px; border-radius: 1px; background: currentColor; }
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }

.hero { overflow: clip; padding: clamp(52px, 7.1vw, 108px) 0 74px; background: radial-gradient(ellipse at 88% 0, #e2efe1 0%, transparent 62%), var(--soft); }
.hero__in { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(34px, 6vw, 96px); }
.eyebrow { margin-bottom: 14px; color: var(--institutional); font: 800 .78rem/1.45 var(--heading); letter-spacing: .115em; text-transform: uppercase; }
.hero h1 { max-width: 12ch; font-size: clamp(2.65rem, 5.25vw, 4.7rem); line-height: 1.03; letter-spacing: -.075em; color: var(--forest); }
.hero h1 em { color: var(--green); font-style: normal; }
.hero__lead { max-width: 48ch; margin-top: 22px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 19px; border: 1px solid transparent; border-radius: 10px; background: var(--green); color: var(--white); text-align: center; text-decoration: none; font: 700 .925rem/1.35 var(--heading); cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); background: var(--forest); box-shadow: 0 6px 16px rgba(23, 61, 43, .15); }
.btn:active { transform: none; }
.btn--outline { background: rgba(255, 255, 255, .65); color: var(--forest); border-color: #bed2c0; }
.btn--outline:hover { background: var(--mint); }
.btn--light { background: var(--white); color: var(--forest); }
.btn--light:hover { background: var(--mint); }
.btn--sm { min-height: 42px; padding-inline: 13px; font-size: .85rem; }

.hero__visual { position: relative; min-width: 0; margin: 0; padding-bottom: 32px; }
.hero__photo { position: relative; aspect-ratio: 1.35; overflow: hidden; border-radius: 22px; background: var(--mint); box-shadow: var(--shadow); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.hero__visual figcaption { position: absolute; top: 16px; right: 16px; padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px; background: rgba(21, 52, 36, .88); color: var(--white); font-size: .8125rem; font-weight: 600; }
.preview { position: absolute; bottom: 0; left: -16px; width: min(310px, 87%); padding: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 32px rgba(23, 61, 43, .16); }
.preview__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.preview__icon, .chat__avatar { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; background: var(--mint); color: var(--green); border-radius: 9px; }
.preview__brand strong, .chat__identity strong { display: block; font: 800 1rem/1.35 var(--heading); }
.preview__brand small, .chat__identity small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.preview__question { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--forest); text-align: left; font-size: .875rem; font-weight: 700; cursor: pointer; transition: background .2s; }
.preview__question:hover { background: var(--mint); }
.ribbon { height: 5px; background: var(--ribbon); }

.sec { padding: clamp(53px, 6.2vw, 88px) 0; }
.sec--soft { background: var(--soft); }
.sec__head { margin-bottom: 29px; max-width: 62ch; }
h2 { color: var(--forest); font-size: clamp(1.85rem, 3.55vw, 3rem); line-height: 1.1; letter-spacing: -.047em; }
.sec__head > p:last-child, .contact p:last-child { margin-top: 12px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card { display: flex; min-height: 224px; flex-direction: column; align-items: flex-start; padding: 23px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: border-color .23s ease, box-shadow .23s ease; }
.card:hover, .card:focus-within { border-color: #9dc19f; box-shadow: var(--shadow); }
.ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 17px; border-radius: 10px; background: var(--mint); color: var(--green); transition: transform .23s ease; }
.card:hover .ico, .card:focus-within .ico { transform: translateY(-3px); }
.symbol { position: relative; display: block; width: 18px; height: 17px; border: 1.7px solid currentColor; border-radius: 3px; }
.symbol::before, .symbol::after { content: ""; position: absolute; }
.symbol--file { width: 14px; height: 18px; }
.symbol--file::after { top: 5px; left: 2px; width: 7px; height: 5px; border-top: 1.5px solid; border-bottom: 1.5px solid; }
.symbol--benefit { height: 14px; margin-top: 4px; }
.symbol--benefit::before { top: -5px; left: 3px; width: 9px; height: 4px; border: 1.5px solid; border-radius: 5px 5px 0 0; }
.symbol--benefit::after { inset: 2px 0 0; border-top: 1.5px solid; background: linear-gradient(90deg, transparent 44%, currentColor 44% 55%, transparent 55%); }
.symbol--case { height: 13px; margin-top: 4px; }
.symbol--case::before { top: -5px; left: 4px; width: 7px; height: 4px; border: 1.5px solid; border-radius: 2px 2px 0 0; }
.symbol--case::after { left: 0; top: 4px; width: 100%; border-top: 1.5px solid; }
.symbol--people { height: 8px; width: 18px; border-radius: 8px 8px 0 0; margin-top: 9px; }
.symbol--people::before, .symbol--people::after { top: -10px; width: 6px; height: 6px; border: 1.5px solid; border-radius: 50%; }
.symbol--people::before { left: 0; }
.symbol--people::after { right: 0; }
.card h3, .news h3 { font-size: 1.12rem; line-height: 1.3; color: var(--forest); }
.card p, .news article > p:last-child { margin-top: 8px; color: var(--muted); font-size: .95rem; }
.text-button { margin-top: auto; padding: 12px 0 0; border: 0; background: none; color: var(--green); font-weight: 700; font-size: .9rem; text-align: left; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }

.mentor { position: relative; color: #ecf5ec; background: radial-gradient(ellipse at 100% 5%, #2c6241, transparent 65%), var(--forest); }
.mentor__in { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(28px, 7.5vw, 112px); align-items: center; }
.eyebrow--light { color: #c9e8ca; }
.mentor h2 { color: var(--white); }
.mentor__intro { margin: 15px 0 24px; max-width: 43ch; font-size: 1.0625rem; }
.mentor__topics { padding: 24px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; }
.mentor__topics h3 { font-size: 1.05rem; }
.mentor__topics ul { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.mentor__topics button { width: 100%; min-height: 43px; padding: 7px 12px; text-align: left; color: var(--forest); font-size: .9rem; font-weight: 700; border: 0; border-radius: 8px; background: #f5faf4; cursor: pointer; transition: background .2s; }
.mentor__topics button:hover { background: #d5ecd4; }
.mentor__topics p { font-size: .875rem; }

.faq { display: grid; grid-template-columns: .72fr 1.28fr; gap: 45px; }
.faq__list { display: grid; align-content: start; gap: 10px; }
details { padding-inline: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); transition: border-color .2s, background .2s; }
details[open] { border-color: #a6c5a8; background: var(--soft); }
summary { position: relative; list-style: none; padding: 14px 28px 14px 0; font-weight: 700; color: var(--forest); cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::before, summary::after { content: ""; width: 12px; height: 2px; position: absolute; top: 50%; right: 3px; background: var(--green); border-radius: 3px; }
summary::after { rotate: 90deg; transition: rotate .22s ease; }
details[open] summary::after { rotate: 0deg; }
details p { margin-bottom: 16px; color: var(--muted); }
details p a { color: var(--green); text-underline-offset: 3px; }

.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news article { border: 1px solid var(--line); border-top: 3px solid #70a878; border-radius: 12px; padding: 21px; background: var(--white); }
.news__label { margin-bottom: 8px; color: var(--green); font-weight: 700; font-size: .875rem; }
.contact { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: clamp(24px, 4vw, 50px); border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.contact h2 { max-width: 22ch; font-size: clamp(1.55rem, 3vw, 2.5rem); }
.contact .btn { flex-shrink: 0; }
.foot { background: #123424; color: #dcebe0; padding: 33px 0 79px; }
.foot__in { display: flex; justify-content: space-between; gap: 25px; align-items: center; flex-wrap: wrap; }
.foot__brand { display: flex; align-items: center; gap: 13px; }
.foot__logo { background: var(--white); border-radius: 7px; padding: 5px 8px; }
.foot__logo img { width: auto; height: 62px; }
.foot strong { color: var(--white); font: 800 .95rem var(--heading); }
.foot p, .foot a { font-size: .85rem; }
.foot__note { max-width: 54ch; }
.foot a { display: inline-block; margin-top: 4px; text-underline-offset: 3px; }

.fab { position: fixed; z-index: 35; right: max(22px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 10px 18px; background: var(--forest); color: var(--white); border: 1px solid #597f64; border-radius: 12px; box-shadow: 0 9px 25px rgba(23, 61, 43, .25); font: 800 .875rem var(--heading); cursor: pointer; transition: background .2s, transform .2s; }
.fab:hover { background: var(--green); transform: translateY(-2px); }
.chat { position: fixed; z-index: 40; right: max(22px, env(safe-area-inset-right)); bottom: max(83px, calc(env(safe-area-inset-bottom) + 63px)); width: min(420px, calc(100vw - 44px)); height: min(660px, calc(100vh - 105px)); height: min(564px, calc(100dvh - 105px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 20px 56px rgba(15, 52, 32, .24); transform-origin: bottom right; animation: panel-in .26s ease-out both; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; gap: 9px; padding: 13px; color: var(--white); background: var(--forest); border-bottom: 3px solid var(--bright); }
.chat__identity { min-width: 0; }
.chat__identity small { color: #dcebe0; }
.chat__tools { margin-left: auto; display: flex; gap: 3px; }
.icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; transition: background .2s; }
.chat__tools .icon:hover, .icon--sound[aria-pressed="true"] { background: rgba(255, 255, 255, .16); }
.icon--close { font-size: 1.65rem; }
.icon--sound { font-size: 0; }
.icon--sound::before { content: ""; width: 19px; height: 18px; background: currentColor; clip-path: polygon(0 34%, 32% 34%, 65% 8%, 65% 92%, 32% 66%, 0 66%); }
.icon--sound::after { content: ""; position: absolute; top: 12px; left: 24px; width: 7px; height: 16px; border-right: 2px solid; border-radius: 50%; opacity: .45; }
.icon--sound[aria-pressed="true"]::after { opacity: 1; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; padding: 12px 13px 10px; background: #f1f7f1; }
.chat__chips button { padding: 5px 10px; border: 1px solid #bccebf; border-radius: 7px; background: var(--white); color: var(--forest); font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .2s; }
.chat__chips button:hover { background: var(--mint); }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 12px 13px 16px; background: #f1f7f1; }
.msg { flex-shrink: 0; max-width: 89%; padding: 10px 12px; border-radius: 12px; font-size: .925rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; animation: message-in .22s ease-out both; }
.msg--bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg--user { align-self: flex-end; background: var(--green); color: var(--white); border-bottom-right-radius: 4px; }
.msg__src { display: block; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.chat__form { display: flex; align-items: center; gap: 7px; padding: 10px 11px; border-top: 1px solid var(--line); }
.chat__form input { flex: 1; min-width: 0; min-height: 42px; padding: 6px 10px; border: 1px solid #b8cbbd; border-radius: 8px; color: var(--ink); background: var(--white); font: inherit; }
.chat__form input::placeholder { color: var(--muted); }
.icon--mic { background: var(--mint); color: var(--forest); }
.icon--mic:hover { background: #d7ead8; }
.icon--mic:disabled { opacity: .5; cursor: not-allowed; }
.icon--mic span { position: relative; width: 9px; height: 13px; margin-top: -5px; border: 1.6px solid; border-radius: 6px; }
.icon--mic span::before { content: ""; position: absolute; width: 15px; height: 9px; left: -4.6px; top: 7px; border: 1.6px solid; border-top: 0; border-radius: 0 0 7px 7px; }
.icon--mic span::after { content: ""; position: absolute; top: 16px; left: 2px; width: 2px; height: 3px; background: currentColor; }
.icon--mic.rec { color: #fff; background: #a64036; animation: record 1.25s ease-in-out infinite; }
.chat__foot { padding: 0 10px 9px; text-align: center; color: var(--muted); font-size: .78rem; }

.hero__copy, .hero__visual { animation: arrive .65s cubic-bezier(.2,.65,.35,1) both; }
.hero__visual { animation-delay: .11s; }
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes record { 50% { box-shadow: 0 0 0 4px rgba(166, 64, 54, .19); } }

@media (max-width: 930px) {
  .wrap { width: min(100% - 48px, 1200px); }
  .hero__in { gap: 34px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 190px; }
  .menu { gap: 0; }
  .menu a { padding-inline: 9px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 75px; }
  .head__in { min-height: 64px; }
  .burger { display: grid; }
  .menu { display: none; position: absolute; inset: 100% 0 auto; padding: 10px 22px 14px; border-bottom: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
  .menu.open { display: grid; }
  .menu a { padding: 11px; }
  .hero { padding: 43px 0 42px; }
  .hero__in, .mentor__in, .faq { grid-template-columns: 1fr; }
  .hero__in { gap: 28px; }
  .hero h1 { max-width: 14ch; font-size: clamp(2.5rem, 8.2vw, 4rem); }
  .hero__lead { margin-top: 16px; }
  .hero__photo { max-height: 390px; aspect-ratio: 1.5; }
  .preview { left: 12px; }
  .mentor__in { gap: 25px; }
  .faq { gap: 0; }
  .faq .sec__head { margin-bottom: 20px; }
  .news { grid-template-columns: 1fr; }
  .contact { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
  .wrap { width: calc(100% - 36px); }
  .gov { font-size: .725rem; }
  .gov__in { gap: 8px; }
  .logo { gap: 8px; }
  .logo strong { font-size: .87rem; }
  .logo small { font-size: .75rem; }
  .actions { gap: 8px; margin-top: 22px; }
  .actions .btn { padding-inline: 12px; font-size: .8rem; }
  .hero__photo { border-radius: 14px; }
  .hero__visual figcaption { right: 10px; top: 10px; }
  .preview { padding: 10px; }
  .preview__brand { margin-bottom: 6px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { min-height: 0; padding: 17px; }
  .fab { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .chat { right: max(10px, env(safe-area-inset-right)); width: calc(100vw - 20px); bottom: max(73px, calc(env(safe-area-inset-bottom) + 61px)); height: min(620px, calc(100vh - 86px)); height: min(620px, calc(100dvh - 86px)); }
}

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

/* Chat: sugerencias ocultables, respuestas largas plegadas y fuentes compactas */
.chat__chips[hidden] { display: none; }
.msg__txt--short { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg__more { display: block; margin-top: 6px; padding: 4px 0; border: 0; background: none; color: var(--green); font: 700 .8125rem/1.3 var(--heading); text-decoration: underline; cursor: pointer; }
