/* ===== Tipografías (autoalojadas, licencia OFL) ===== */
@font-face { font-family: "Wix Madefor Display"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/wix-madefor-display-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Wix Madefor Text"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/wix-madefor-text-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("../fonts/playfair-display-latin-wght-italic.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/caveat-latin-wght-normal.woff2") format("woff2"); }

/* ===== Variables ===== */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #2b2f33;
  --muted: #5f666d;
  --primary: #4f7a6f;
  --primary-dark: #3b5e55;
  --accent: #e9dfd2;
  --border: #e4ded5;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 50, 45, 0.08);
  --font: "Wix Madefor Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Wix Madefor Display", "Wix Madefor Text", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); }
a:hover { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; color: #243029; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.05; }
h3 { font-size: 1.25rem; line-height: 1.4; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.section { padding: 4rem 0; }
.section--alt { background: var(--accent); }
.section__head { max-width: 640px; margin-bottom: 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .28em; font-size: .78rem; line-height: 1.6; color: var(--primary); font-weight: 600; margin-bottom: .8rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary-dark); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid #b9d5cc; outline-offset: 2px; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 245, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; text-decoration: none; color: #243029; }
.brand span { color: var(--primary); }
.nav__links { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav__links a { text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav__links a:hover, .nav__links a[aria-current="page"] { border-color: var(--primary); }
.nav__toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: .45rem .7rem; font-size: 1rem; cursor: pointer; color: var(--text); }

/* ===== Botones ===== */
.btn { display: inline-block; padding: .85rem 1.5rem; border-radius: 999px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 500; border: 2px solid var(--primary); cursor: pointer; font-size: 1rem; font-family: inherit; transition: background .2s, transform .2s; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--primary-dark); }
.btn--ghost:hover { background: var(--primary); color: #fff; }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ===== Hero ===== */
.hero { padding: 4.5rem 0 3.5rem; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero__lead { font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.45; color: var(--muted); max-width: 540px; }
.hero__img { aspect-ratio: 4/5; border-radius: 200px 200px var(--radius) var(--radius); background: linear-gradient(160deg, #cfe0d9, #e9dfd2); display: grid; place-items: center; color: var(--primary-dark); font-size: .95rem; text-align: center; padding: 1rem; box-shadow: var(--shadow); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ===== Cards ===== */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; }
.price { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; color: var(--primary-dark); }

/* ===== Lista de pasos ===== */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; padding-left: 3.2rem; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ===== FAQ ===== */
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .8rem; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: .6rem; }

/* ===== Blog ===== */
.blog-tools { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 2rem; }
.blog-tools input[type="search"] { flex: 1 1 240px; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .4rem 1rem; cursor: pointer; font-family: inherit; font-size: .92rem; color: var(--text); }
.chip[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.post-card { display: flex; flex-direction: column; }
.post-card__meta { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.tag { display: inline-block; background: var(--accent); padding: .1rem .7rem; border-radius: 999px; font-size: .8rem; margin-right: .4rem; }
.post-card a.more { margin-top: auto; font-weight: 600; text-decoration: none; }
.empty { display: none; color: var(--muted); }

.article { max-width: 720px; margin-inline: auto; }
.article h1 { margin-bottom: .3em; }
.article__meta { color: var(--muted); font-size: .92rem; margin-bottom: 2rem; }
.article h2 { margin-top: 1.8em; font-size: 1.5rem; }
.article ul { padding-left: 1.2rem; }
.callout { background: var(--accent); border-left: 4px solid var(--primary); padding: 1rem 1.2rem; border-radius: 8px; margin: 1.8rem 0; font-size: .98rem; }

/* ===== Formulario ===== */
.form { display: grid; gap: 1rem; }
label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: .3rem; }
input, select, textarea { width: 100%; padding: .8rem 1rem; border: 1px solid #cfc8bd; border-radius: 10px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 140px; resize: vertical; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; font-weight: 400; }
.checkbox input { width: auto; margin-top: .35rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-msg { padding: .8rem 1rem; border-radius: 10px; display: none; }
.form-msg.ok { display: block; background: #e3f1ea; color: #1f5a3f; }
.form-msg.err { display: block; background: #fbe6e3; color: #8a2a1f; }
.note { font-size: .88rem; color: var(--muted); }
.crisis { background: #fff4e5; border: 1px solid #f0d3a6; padding: 1rem 1.2rem; border-radius: 12px; font-size: .95rem; }

/* ===== Footer ===== */
.site-footer { background: #243029; color: #d9e2dd; padding: 3rem 0 2rem; margin-top: 2rem; }
.site-footer a { color: #cfe3da; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; font-family: var(--font); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer__bottom { border-top: 1px solid #3d4c43; margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: #aebdb5; }

.wa-float { position: fixed; right: 1rem; bottom: 1rem; background: #25a35a; color: #fff; text-decoration: none; padding: .8rem 1.1rem; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); z-index: 60; font-size: .95rem; }
.wa-float:hover { background: #1d8a4a; color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hero__grid, .grid--3, .grid--2, .footer__grid { grid-template-columns: 1fr; }
  .hero__img { max-width: 340px; order: -1; }
  .nav__toggle { display: block; }
  .nav__links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); gap: 1rem; align-items: flex-start; }
  .nav__links.open { display: flex; }
  .section { padding: 3rem 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== Utilidades (sin estilos en línea, por el CSP) ===== */
.container--narrow { max-width: 760px; }
.post-card h2, .post-card h3 { font-size: 1.35rem; }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: inherit; }
.footer__bottom--plain { border: 0; margin: 0; padding: 0; }

/* ===== Acentos tipográficos ===== */
h1 em, h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: 0; color: var(--primary-dark); }
.hand { font-family: var(--font-hand); font-weight: 700; font-size: clamp(1.9rem, 4.2vw, 2.7rem); line-height: 1.1; color: var(--primary-dark); margin: 1.2rem 0 0; }
.callout { font-family: var(--font-serif); font-style: italic; font-size: 1.12rem; line-height: 1.55; }
.article__meta, .post-card__meta, .note { letter-spacing: .01em; }

/* Botón del menú: mantiene texto claro (la regla .nav__links a lo oscurecía) */
.nav__links a.btn { color: #fff; padding: .55rem 1.2rem; border: 2px solid var(--primary); }
.nav__links a.btn:hover { border-color: var(--primary-dark); color: #fff; }

/* ===== Fotos y contenido dinámico ===== */
.hero__img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.about-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.post-card__cover { display: block; margin: -1.6rem -1.6rem 1.2rem; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.post-card__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article__cover { margin: 0 0 2rem; }
.article__cover img, .article figure img { width: 100%; height: auto; border-radius: var(--radius); }
.article figure { margin: 1.8rem 0; }
.article figcaption { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
.article hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.article code { background: var(--accent); padding: .1em .4em; border-radius: 6px; font-size: .92em; }
.article ol { padding-left: 1.3rem; }
