:root {
  --bg: #F6F5F0;
  --surface: #FFFFFF;
  --ink: #1B2420;
  --ink-2: #3E4843;
  --muted: #6B736E;
  --line: #D9D8CF;
  --green: #2E5E4E;
  --green-soft: #DCE8E1;
  --gold: #B8892B;
  --danger: #A33A2A;
  --hill-1: #7FA58F;
  --hill-2: #4E7A66;
  --hill-3: #2E5E4E;
  --shadow: 0 1px 2px rgba(27,36,32,.06), 0 24px 48px -20px rgba(27,36,32,.35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141A17;
    --surface: #1C2420;
    --ink: #ECEDE8;
    --ink-2: #C9CEC8;
    --muted: #8F9891;
    --line: #2F3A34;
    --green: #7FB59A;
    --green-soft: #22352D;
    --gold: #D4A64A;
    --danger: #E5897A;
    --hill-1: #3F6653;
    --hill-2: #2F4F41;
    --hill-3: #22392F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.7);
  }
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.55;
}
.wrap { width: 100%; max-width: 880px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); flex: 1; }
h1, h2 { font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(34px, 5.6vw, 60px); font-weight: 800; }
h1 span { display: block; color: var(--green); margin-top: .15em; }
h2 { font-size: 26px; font-weight: 700; }
p { margin: 0; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

header { padding-block: 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.idiomas { display: flex; gap: 4px; }
.idiomas a { font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.idiomas a:hover { color: var(--green); }
.idiomas a[aria-current] { color: var(--green); background: var(--green-soft); font-weight: 700; }
.brand { font-family: "Bricolage Grotesque", Arial, sans-serif; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: .04em; margin-left: 6px; }

.hero { padding-block: clamp(40px, 8vh, 88px) 40px; display: grid; gap: 24px; }
.eyebrow { font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.lede { font-size: 20px; color: var(--ink-2); max-width: 56ch; }

.estado {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  font-family: "IBM Plex Mono", monospace; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px 7px 12px; background: var(--surface);
}
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.estado.on { border-color: var(--green); color: var(--green); }
.estado.on .punto { background: #2FA36B; box-shadow: 0 0 0 0 rgba(47,163,107,.6); animation: pulso 2s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 9px rgba(47,163,107,0); } 100% { box-shadow: 0 0 0 0 rgba(47,163,107,0); } }
@media (prefers-reduced-motion: reduce) { .estado.on .punto { animation: none; } }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.cta-row small { color: var(--muted); font-size: 15px; }
.btn {
  display: inline-block; font-family: "Bricolage Grotesque", Arial, sans-serif; font-weight: 700; font-size: 17px;
  padding: 15px 26px; border-radius: 6px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #1B1408; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; font-size: 15px; padding: 11px 18px; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.confianza { list-style: none; margin: 8px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; color: var(--ink-2); font-size: 16px; }
.confianza li { padding-left: 26px; position: relative; }
.confianza li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }

.pie { padding-block: 22px 28px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pie nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.pie a { color: var(--ink-2); text-decoration: none; font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 14px; font-weight: 500; }
.pie a:hover { color: var(--green); }

/* Páginas de contenido */
.prosa { padding-block: clamp(32px, 6vh, 64px) 40px; display: grid; gap: 18px; max-width: 720px; }
.prosa h1 { font-size: clamp(30px, 4.6vw, 46px); }
.prosa h2 { font-size: 24px; margin-top: 18px; }
.prosa h3 { font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 18px; margin: 0; }
.prosa p, .prosa li { color: var(--ink-2); font-size: 17px; }
.prosa ul, .prosa ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.prosa strong { color: var(--ink); }
.prosa .lede { font-size: 20px; }
.prosa .cta-row { margin-top: 12px; }
.prosa table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prosa th, .prosa td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.prosa th { font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.meta-legal { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); }
.aviso-legal { background: var(--green-soft); border-radius: 8px; padding: 14px 18px; font-size: 15px; color: var(--ink-2); }
.articulo { display: grid; gap: 14px; }
.articulo h2 { font-size: 24px; margin-top: 14px; }
.articulo h3 { font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 18px; margin: 6px 0 0; }
.articulo hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.articulo em { color: var(--muted); }
.lista-articulos { display: grid; gap: 28px; margin-top: 10px; }
.resumen { display: grid; gap: 6px; }
.resumen h2 { font-size: 22px; margin: 0; }
.resumen h2 a { color: var(--ink); text-decoration: none; }
.resumen h2 a:hover { color: var(--green); }
.mas { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 10px; }
.mas h2 { font-size: 18px; margin: 0 0 10px; }
.mas ul { list-style: none; padding: 0; }
.equipo { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 6px; }
.persona { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: grid; gap: 8px; align-content: start; }
.persona h2 { font-size: 20px; margin: 0; }
.persona .rol { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--green); }
.persona p { font-size: 15px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-family: "Bricolage Grotesque", Arial, sans-serif; font-weight: 800; font-size: 18px; }
.hills { display: block; width: 100%; height: clamp(90px, 16vh, 200px); }
.hills .h1 { fill: var(--hill-1); } .hills .h2 { fill: var(--hill-2); } .hills .h3 { fill: var(--hill-3); }

/* Formulario */
dialog {
  border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--ink);
  width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20,26,23,.55); backdrop-filter: blur(2px); }
dialog form, .gracias { padding: 26px 28px 28px; display: grid; gap: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.cerrar { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
label { display: grid; gap: 6px; font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 13px; font-weight: 500; color: var(--ink-2); }
input, select {
  font-family: "Source Serif 4", Georgia, serif; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; width: 100%;
}
input:focus, select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.error { color: var(--danger); font-size: 13px; font-weight: 500; min-height: 0; }
.error:empty { display: none; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: grid; gap: 10px; }
.form-foot .btn { width: 100%; }
.form-foot small { color: var(--muted); font-size: 13px; font-family: "Source Serif 4", Georgia, serif; }
.gracias p { color: var(--ink-2); }
.gracias[hidden], form[hidden], .btn[hidden] { display: none; }
.gracias .btn { text-align: center; }

/* Agenda */
.horarios { display: grid; gap: 12px; max-width: 520px; }
.horarios .btn { text-align: left; font-size: 16px; padding: 15px 20px; }
.aviso { background: var(--green-soft); border-radius: 6px; padding: 12px 16px; }
.nota { color: var(--muted); font-size: 15px; }
