/* ---------- Tokens ---------- */
:root {
  --brand: #B4592F;
  --brand-dark: #8C4423;
  --brand-light: #E8A87C;
  --sage: #7C9082;
  --cream: #FBF7F2;
  --surface: #FFFFFF;
  --ink: #2B2723;
  --ink-muted: #5F5750;
  --whatsapp: #25D366;

  --font-head: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1120px;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(43, 39, 35, 0.08);
  --header-h: 72px;
}

@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--alt { background: var(--surface); }
.eyebrow {
  font-family: var(--font-head); font-size: .82rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--brand); margin: 0 0 .6em;
}
.lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 62ch; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: #fff; padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 999px; text-decoration: none;
  background: var(--brand); color: #fff; border: 2px solid var(--brand);
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn--wa { background: var(--whatsapp); border-color: var(--whatsapp); color: #08301A; }
.btn--wa:hover { background: #1EBE5A; border-color: #1EBE5A; }
.btn--ghost { background: transparent; color: var(--brand-dark); }
.btn--ghost:hover { background: rgba(180, 89, 47, .08); transform: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  background: rgba(251, 247, 242, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43, 39, 35, .08);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 100%; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand strong { font-family: var(--font-head); font-size: 1.1rem; letter-spacing: 1px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: .96rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
.site-header .btn { padding: .6rem 1.1rem; font-size: .92rem; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header .wrap { justify-content: space-between; }
  .site-header .btn { margin-left: auto; }
}

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); border: 1px solid rgba(43, 39, 35, .05);
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-muted); margin-bottom: 1rem; }
.card img { border-radius: 10px; margin-bottom: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero .wrap { display: grid; gap: 2.5rem; grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero img { border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero-meta { margin-top: 1.4rem; color: var(--ink-muted); font-size: .95rem; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---------- Listas de valor ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px;
  border-radius: 50%; background: var(--sage);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.4rem;
  margin-bottom: .8rem; border: 1px solid rgba(43, 39, 35, .07);
}
.faq summary { font-family: var(--font-head); font-weight: 600; cursor: pointer; }
.faq details[open] summary { color: var(--brand); margin-bottom: .6rem; }

/* ---------- CTA final ---------- */
.cta-band { background: var(--brand); color: #fff; text-align: center; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.cta-band .btn:hover { background: var(--cream); border-color: var(--cream); }
/* El foco por defecto es del color de marca, igual que el fondo de esta franja:
   sin contraste para quien navega con teclado. Aquí el anillo se aclara. */
.cta-band :focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #D9D2CB; padding: 3rem 0 2rem; }
.site-footer a { color: #D9D2CB; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-brand img { width: 44px; height: 44px; margin-bottom: .8rem; }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .87rem; color: #A79E95;
}
/* El botón de preferencias vive junto a los enlaces legales y debe leerse como
   uno más de ellos, no como un botón con peso propio. */
.footer-legal button {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
}
.footer-legal button:hover { color: #fff; text-decoration: underline; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--whatsapp); color: #08301A; text-decoration: none;
  font-family: var(--font-head); font-weight: 600;
  padding: .8rem 1.15rem; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.wa-fab:hover { background: #1EBE5A; }
.wa-fab svg { width: 22px; height: 22px; fill: currentColor; }
@media (max-width: 520px) { .wa-fab span { display: none; } .wa-fab { padding: .9rem; } }

/* El aviso de cookies (centrado, máx. 560px) y el botón flotante (a la derecha)
   se solapan por debajo de ~900px: medido, no estimado. Por encima de ese ancho
   no se tocan y el botón se mantiene visible. Mientras el aviso está en pantalla
   se oculta el botón en vez de moverlo, porque la altura del aviso varía con el
   texto; el aviso es transitorio y la portada mantiene su propio CTA de WhatsApp. */
@media (max-width: 940px) {
  body:has(.cookie-banner) .wa-fab { display: none; }
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed; inset: auto 12px 12px 12px; z-index: 40;
  background: var(--surface); border: 1px solid rgba(43, 39, 35, .12);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  padding: 1.2rem 1.4rem; max-width: 560px; margin-inline: auto;
}
.cookie-banner p { font-size: .93rem; color: var(--ink-muted); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie-actions .btn { font-size: .92rem; padding: .6rem 1.2rem; }

/* ---------- Contenido legal ---------- */
.legal { max-width: 74ch; }
.legal h2 { margin-top: 2rem; }
.legal h3 { margin-top: 1.5rem; }
.legal table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  font-size: .93rem;
}
.legal th, .legal td {
  text-align: left; padding: .7rem .9rem; border-bottom: 1px solid rgba(43, 39, 35, .1);
  vertical-align: top;
}
.legal th { font-family: var(--font-head); font-weight: 600; background: rgba(180, 89, 47, .07); }
.legal tr:last-child td { border-bottom: 0; }
.legal code { background: rgba(43, 39, 35, .06); padding: .12em .4em; border-radius: 4px; font-size: .92em; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }

/* La tabla de cookies no cabe a lo ancho en móvil: se desplaza en su propio contenedor. */
@media (max-width: 560px) {
  .legal table { display: block; overflow-x: auto; white-space: nowrap; }
}

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