/* ==========================================================================
   BASE COMPARTIDA — estructura, accesibilidad y componentes neutros.
   Sin colores ni tipografías de marca: eso vive en carinae.css, vesta.css
   y level-up.css. Cada página carga base.css + la hoja de su marca.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 400); line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* --- Accesibilidad -------------------------------------------------------- */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: var(--radius); text-decoration: none; font-weight: 700; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: min(100% - 32px, var(--max, 1200px)); margin-inline: auto; }
@media (min-width: 768px) { .wrap { width: min(100% - 64px, var(--max, 1200px)); } }
.section { padding-block: clamp(72px, 10vw, 140px); }
.grid { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-5-7 { grid-template-columns: 5fr 7fr; }
  .grid-7-5 { grid-template-columns: 7fr 5fr; }
}
.eyebrow { display: inline-block; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; }
.stack > * + * { margin-top: var(--stack, 20px); }
.measure { max-width: 62ch; }

/* --- Header --------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand-link { display: inline-flex; align-items: center; flex-shrink: 0; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.site-nav { display: none; }
.site-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg); border-bottom: 1px solid var(--line); padding: 8px 16px 24px; }
.site-nav ul { display: flex; flex-direction: column; gap: 4px; }
.site-nav a { display: block; padding: 12px 4px; text-decoration: none; font-weight: 500; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; padding: 0; border: 0; background: none; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 28px; }
  .site-nav a { padding: 8px 0; }
}

/* --- Botones -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border: 2px solid transparent; border-radius: var(--radius); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Imágenes pendientes (placeholder neutro) ----------------------------- */
.media { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-lg, 0); background: #d9d9d6; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media[data-ratio="16/9"] { aspect-ratio: 16 / 9; }
.media[data-ratio="4/5"] { aspect-ratio: 4 / 5; }
.media[data-ratio="3/2"] { aspect-ratio: 3 / 2; }
.media[data-ratio="21/9"] { aspect-ratio: 21 / 9; }
.media-pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; color: #5b5b58; text-align: center; font: 500 .8125rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: repeating-linear-gradient(135deg, #dcdcd9 0 14px, #d4d4d1 14px 28px); }
.media-pending strong { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }

/* --- Formularios ---------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; }
.field .req { color: var(--req, currentColor); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--field-line); border-radius: var(--radius); background: var(--field-bg); color: var(--field-text); font-size: 1rem; }
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: .875rem; opacity: .8; }
.field-error { font-size: .875rem; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .9375rem; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--focus); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 16px 18px; border-radius: var(--radius); font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-type="ok"] { background: var(--ok-bg); color: var(--ok-text); }
.form-status[data-type="error"] { background: var(--error-bg); color: var(--error-text); }
.form-legal { font-size: .8125rem; line-height: 1.5; opacity: .85; }
.form-success { display: none; }
.form.is-done { display: none; }
.form.is-done + .form-success { display: block; }

/* --- WhatsApp flotante ---------------------------------------------------- */
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }
[data-wa][hidden] { display: none !important; }

/* --- Aviso de cookies ----------------------------------------------------- */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70; max-width: 560px; padding: 20px; border-radius: 12px; background: #111; color: #f4f4f4; box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: .9375rem; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin-bottom: 14px; }
.cookie-bar a { color: #fff; }
.cookie-bar .btn { min-height: 44px; padding: 10px 18px; font-size: .9375rem; }
.cookie-bar .btn-accept { background: #fff; color: #111; }
.cookie-bar .btn-reject { background: transparent; color: #fff; border-color: #fff; }
.cookie-bar ~ .wa-float { bottom: 16px; }

/* --- Pie ------------------------------------------------------------------ */
.footer-legal { font-size: .875rem; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; }
.social svg { width: 18px; height: 18px; }
.parent-brand { font-size: .875rem; text-decoration: none; }
.parent-brand:hover { text-decoration: underline; }

/* --- Revelado sobrio (solo si hay JS) ------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transition-duration: .01s; transform: none; } html { scroll-behavior: auto; } }

/* --- Pendientes visibles (solo durante el desarrollo) --------------------- */
.pendiente { display: inline; padding: 2px 6px; border-radius: 4px; background: #ffe24a; color: #1a1a1a; font: 600 .8125em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.pendiente-bloque { display: block; margin: 16px 0; padding: 14px 16px; border-left: 4px solid #e0a800; background: #fff6cc; color: #1a1a1a; font-size: .9375rem; }
