/* ==========================================================================
   soleares.css — base común del rediseño (rama rediseno-web)
   Sistema único: tokens + reset + layout + componentes.
   Sustituye a bootstrap.min.css + bootstrap-icons.css + templatemo-festava-live.css
   Paleta calibrada para cumplir contraste WCAG 2.1 AA.
   ========================================================================== */

/* --- Outfit (auto-alojada, OFL-1.1). Variable 100–900, sin CDN externo. ------ */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/outfit-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ---------------------------------------------------------------- */
:root {
  /* Marca */
  --navy:            #0e2a4f;   /* navbar, hero — texto blanco encima: ~14:1 */
  --navy-dark:       #0a1f3b;
  --orange:          #ee5007;   /* SOLO decorativo (bordes, franjas) */
  --orange-strong:   #bf360c;   /* texto/botones sobre claro — blanco: 5.6:1 */
  --orange-hover:    #9e2c08;
  --yellow:          #f8cb2e;   /* SOLO decorativo — nunca texto sobre blanco */
  --green:           #198754;   /* badge NUEVO — blanco: 4.5:1 */
  --wa-green:        #25d366;   /* WhatsApp — texto oscuro encima */
  --wa-ink:          #0a3d1f;

  /* Neutros */
  --ink:             #1c1d1f;   /* titulares */
  --text:            #4c4d50;   /* cuerpo — 8:1 sobre blanco */
  --muted:           #6b6c6f;   /* notas pequeñas — 5.3:1 sobre blanco */
  --ink-soft:        #43536b;   /* cuerpo destacado / leads — ~7:1 sobre blanco */
  --line:            #e6e6e8;
  --bg:              #ffffff;
  --bg-alt:          #f0f8ff;

  --link:            #1c5fb0;   /* enlaces — 6.3:1 sobre blanco */
  --focus:           #4c9aff;   /* anillo de foco visible en claro y oscuro */

  --radius:          10px;
  --radius-pill:     100px;
  --shadow:          0 2px 10px rgba(14, 42, 79, .08);

  /* Outfit auto-alojada (@font-face arriba, OFL-1.1); stack de sistema como fallback */
  --font-sans:       'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container:       1140px;
}

/* --- Reset ligero ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 18px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.6rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--orange-strong); }

/* Foco visible y consistente (WCAG 2.4.7) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* --- Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section-padding { padding: clamp(48px, 8vw, 96px) 0; }
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 2.5rem; }

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: var(--radius); z-index: 1000; transition: top .15s;
}
.skip-link:focus { top: 8px; color: #fff; }

/* --- Navbar ---------------------------------------------------------------- */
.site-nav { background: var(--navy); }
.site-nav .container { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand {
  color: #fff; font-size: 1.5rem; font-weight: 700; text-decoration: none;
  letter-spacing: .5px; margin-right: auto;
}
.brand:hover { color: #fff; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: auto;
  background: transparent; border: 2px solid rgba(255,255,255,.5);
  border-radius: 8px; cursor: pointer; color: #fff;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: #fff; text-decoration: none; font-weight: 400; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-menu a:hover, .nav-menu a:focus-visible { color: #fff; border-bottom-color: var(--orange); }

/* Botón CTA (naranja accesible) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1.1; text-decoration: none;
  padding: 12px 24px; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer; transition: background-color .2s, color .2s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-whatsapp { background: var(--wa-green); color: var(--wa-ink); }
.btn-whatsapp:hover { background: #1ebe5c; color: var(--wa-ink); }
.btn-whatsapp svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* Navbar responsive: menú colapsable con JS */
.nav-collapse { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
@media (max-width: 991px) {
  .nav-toggle { display: inline-flex; }
  .nav-collapse {
    display: none; flex-direction: column; align-items: flex-start;
    width: 100%; gap: .25rem; margin: .5rem 0 1rem;
  }
  .nav-collapse.open { display: flex; }
  .nav-menu { flex-direction: column; align-items: flex-start; gap: .25rem; width: 100%; }
  .nav-menu a { display: block; width: 100%; padding: 10px 0; }
  .site-nav .container { flex-wrap: wrap; }
  .nav-collapse .btn { margin-top: .5rem; }
}
@media (min-width: 992px) { .nav-toggle { display: none; } }

/* --- Hero de ficha --------------------------------------------------------- */
.ficha-hero { background: var(--navy); color: #fff; padding: clamp(40px, 7vw, 64px) 0 clamp(28px, 4vw, 40px); }
.ficha-hero h1 { color: #fff; margin-bottom: .35em; }
.ficha-hero h1::after { content: ""; display: block; width: 64px; height: 5px; background: var(--orange); border-radius: 3px; margin-top: .4rem; }
.ficha-hero .lead { color: #e7eefb; font-size: 1.15rem; max-width: 65ch; margin: 0; }

/* --- Título de subgrupo dentro de una ficha -------------------------------- */
.ficha-grupo { margin: 2.5rem 0 .75rem; font-size: 1.4rem; color: var(--navy); border-left: 5px solid var(--orange); padding-left: .6rem; }
.ficha-grupo:first-of-type { margin-top: 1rem; }

/* --- Tabla de ficha -------------------------------------------------------- */
.ficha-tabla { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.ficha-tabla caption { text-align: left; color: var(--muted); padding-bottom: .5rem; }
.ficha-tabla th, .ficha-tabla td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ficha-tabla thead th { background: var(--navy); color: #fff; font-size: .95rem; }
.ficha-tabla .col-precio { text-align: right; white-space: nowrap; }
.ficha-nombre { font-weight: 700; color: var(--ink); width: 30%; }
.ficha-precio { font-weight: 700; color: var(--orange-strong); text-align: right; white-space: nowrap; }
.ficha-nota { display: block; margin-top: .25rem; color: var(--muted); font-size: .9rem; }
.ficha-nuevo {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--green);
  border-radius: var(--radius-pill); padding: 2px 9px; margin-left: .4rem; vertical-align: middle;
  text-transform: uppercase; letter-spacing: .5px;
}
.tabla-scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .ficha-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ficha-tabla tr { display: block; border-bottom: 2px solid var(--line); padding: .75rem 0; }
  .ficha-tabla td { display: block; border: none; padding: .15rem 0; }
  .ficha-nombre { width: auto; font-size: 1.05rem; }
  .ficha-precio { text-align: left; }
  .ficha-precio::before { content: "Precio: "; color: var(--muted); font-weight: 400; }
}

/* --- Calculadoras relevantes (referenciadas en la ficha) ------------------- */
.tools-wrap { margin: 2rem 0 .5rem; }
.tool-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-card {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none;
  background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: 12px; padding: 16px 18px; color: var(--ink); transition: border-color .15s, background .15s;
}
.tool-card:hover, .tool-card:focus-visible { border-color: var(--orange); background: var(--bg); }
.tool-eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-strong); font-weight: 700; }
.tool-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.tool-desc { font-size: .9rem; color: var(--text); }
.tool-cta { font-weight: 700; color: var(--orange-strong); font-size: .9rem; margin-top: 2px; }

/* --- Paginador de fichas --------------------------------------------------- */
.ficha-pager { display: flex; gap: 12px; align-items: stretch; margin: 1.5rem 0; }
.ficha-pager a {
  flex: 1; display: flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink);
}
.ficha-pager a:hover, .ficha-pager a:focus-visible { border-color: var(--orange); background: #fff; }
.ficha-pager .next { justify-content: flex-end; text-align: right; }
.ficha-pager .home { justify-content: center; text-align: center; flex: 0 1 auto; }
.ficha-pager svg { width: 26px; height: 26px; fill: var(--orange); flex-shrink: 0; }
.ficha-pager .dir { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ficha-pager .name { display: block; font-weight: 700; }
@media (max-width: 640px) { .ficha-pager { flex-direction: column; } .ficha-pager .home { flex: 1; } }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #e7eefb; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .brand { color: #fff; margin: 0 0 .75rem; display: inline-block; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; }
.footer-legal { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-legal a { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.5rem; padding-top: 1rem; font-size: .9rem; color: #cfe; }
.footer-bottom .muted { color: #b9c9e6; }

/* ==========================================================================
   Home (portada orquestadora)
   ========================================================================== */
.hero-home { background: linear-gradient(160deg, var(--navy), var(--navy-dark)); color: #fff; padding: clamp(48px, 9vw, 84px) 0; }
.hero-home .hero-brand { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--yellow); }
.hero-home h1 { color: #fff; font-size: clamp(1.9rem, 5vw, 3rem); max-width: 20ch; margin: .5rem 0 .3rem; }
.hero-home h1 .accent { color: var(--orange); }
.hero-home .sub { color: #d7e3f4; font-size: 1.15rem; max-width: 58ch; margin: .6rem 0 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.7rem; }

.notice-bar { background: var(--orange-strong); color: #fff; }
.notice-bar .container { padding-top: 12px; padding-bottom: 12px; font-weight: 600; font-size: .95rem; }
.notice-bar a { color: #fff; text-underline-offset: 2px; }

/* --- Insignia GRATIS + banda "empieza gratis" (contadores) ----------------- */
.badge-free { display: inline-block; background: var(--green); color: #fff; font-weight: 700;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; border-radius: var(--radius-pill);
  padding: 2px 10px; vertical-align: middle; }
.free-band { background: var(--bg-alt); border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: 16px; padding: clamp(24px, 4vw, 40px); text-align: center; box-shadow: var(--shadow); }
.free-band .badge-free { font-size: .74rem; padding: 4px 14px; }
.free-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--ink); margin: .7rem 0 .4rem; text-wrap: balance; }
.free-band p { color: var(--ink-soft); max-width: 58ch; margin: 0 auto 1.3rem; }
.free-band .free-note { font-size: .9rem; color: var(--muted); margin: .9rem auto 0; }

.home-section { padding: clamp(44px, 7vw, 78px) 0; }
.home-section.alt { background: var(--bg-alt); }
.home-head { max-width: 64ch; margin: 0 0 1.9rem; }
.home-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); color: var(--ink); }
.home-head p { color: var(--ink-soft); font-size: 1.08rem; margin: .4rem 0 0; }

.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid.c2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .card-grid.c3 { grid-template-columns: 1fr 1fr; } }

.entry-card { display: block; text-decoration: none; background: var(--bg); border: 1px solid var(--line);
  border-top: 4px solid var(--orange); border-radius: 14px; padding: 20px; color: var(--ink);
  transition: box-shadow .15s, transform .15s; }
.entry-card:hover, .entry-card:focus-visible { box-shadow: 0 8px 22px rgba(14,42,79,.10); transform: translateY(-2px); }
.entry-card h3 { font-size: 1.12rem; margin: 0 0 .35rem; }
.entry-card p { margin: 0 0 .7rem; color: var(--text); font-size: .94rem; }
.entry-card .go { color: var(--orange-strong); font-weight: 700; font-size: .9rem; }

.pack-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pack-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .pack-grid { grid-template-columns: 1fr 1fr; } }
.pack-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.pack-card h3 { font-size: 1.08rem; margin: 0 0 .3rem; }
.pack-precio { font-size: 1.45rem; font-weight: 700; color: var(--navy); margin: .1rem 0 .7rem; }
.pack-precio small { display: block; font-size: .7rem; color: var(--muted); font-weight: 400; letter-spacing: .02em; }
.pack-tag { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--orange-strong); font-weight: 700; margin: .1rem 0 .8rem; }
.pack-card ul { margin: 0 0 1rem; padding-left: 1.1rem; font-size: .89rem; color: var(--ink-soft); flex: 1; }
.pack-card ul li { margin: .3rem 0; }

.pilar-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pilar-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pilar-grid { grid-template-columns: 1fr 1fr; } }
.pilar-card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.pilar-card h3 { font-size: 1.08rem; margin: 0 0 .35rem; }
.pilar-card p { font-size: .92rem; color: var(--ink-soft); margin: 0 0 .7rem; }
.pilar-card .go { color: var(--orange-strong); font-weight: 700; font-size: .9rem; text-decoration: none; }
.pilar-badge { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: var(--navy); border-radius: 100px; padding: 2px 8px; margin-left: .3rem; vertical-align: middle; }

.tech-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tech-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tech-grid { grid-template-columns: 1fr 1fr; } }
.tech-card { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 12px; padding: 16px 18px; }
.tech-card h4 { font-size: 1rem; margin: 0 0 .25rem; }
.tech-card p { font-size: .89rem; color: var(--ink-soft); margin: 0; }

.proof-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .proof-grid { grid-template-columns: 1fr 1fr; } }
.proof-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.proof-card .big { font-size: 1.05rem; font-weight: 700; color: var(--navy); display: block; margin-bottom: .3rem; }
.proof-card p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.note-navy { background: var(--navy); color: #fff; border-radius: 14px; padding: 22px 24px; }
.note-navy h3 { color: #fff; margin: 0 0 .4rem; }
.note-navy p { color: #e7eefb; margin-bottom: 0; }
.note-navy .hl { color: var(--yellow); font-weight: 700; }

.contact-band { background: var(--navy); color: #fff; text-align: center; }
.contact-band h2 { color: #fff; }
.contact-band a { color: #fff; }
.contact-band .big-mail { font-size: clamp(1.25rem, 3vw, 1.9rem); font-weight: 700; display: inline-block; margin: .3rem 0; }
.contact-band .muted { color: #b9c9e6; }

/* ==========================================================================
   Páginas legales + banner de cookies
   ========================================================================== */
.legal { padding: clamp(36px, 6vw, 60px) 0; }
.legal .container { max-width: 820px; }
.legal h2 { font-size: 1.4rem; color: var(--navy); margin: 2rem 0 .6rem; }
.legal h3 { font-size: 1.1rem; color: var(--ink); margin: 1.4rem 0 .4rem; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 1.2rem; }
.legal .updated { color: var(--muted); font-size: .9rem; }
.legal .datos { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 1rem 0; }
.legal .datos dt { font-weight: 700; color: var(--ink); }
.legal .datos dd { margin: 0 0 .5rem; color: var(--text); }
.legal .todo { background: #fff8f3; border: 1px solid #f0d9c8; border-radius: 8px; padding: 3px 8px; font-size: .92em; color: var(--orange-strong); }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.legal table th, .legal table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal table thead th { background: var(--navy); color: #fff; }
.legal-toc { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 1.5rem; }
.legal-toc a { font-size: .9rem; }

.link-btn { background: none; border: none; padding: 0; margin: 0; color: inherit; font: inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
