/* ============================================================
   MAKRO INVESTMENT — Sistema de diseño compartido (core)
   Consumido por las variantes theme-hagase.css / theme-smart.css
   Sin dependencias. HTML estático. Lighthouse ≥ 90.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display, inherit); line-height: 1.12; font-weight: 700; letter-spacing: var(--display-tracking, 0); color: var(--c-heading, var(--c-ink)); text-wrap: balance; }
p { text-wrap: pretty; }
:target { scroll-margin-top: 90px; }

/* ---------- Tokens estructurales ---------- */
:root {
  --container: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(10, 20, 30, .06), 0 8px 24px rgba(10, 20, 30, .07);
  --shadow-2: 0 2px 6px rgba(10, 20, 30, .08), 0 18px 48px rgba(10, 20, 30, .14);
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem;
  --space-4: 2.5rem; --space-5: 4rem; --space-6: 6.5rem;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.container--narrow { max-width: 860px; }
.section { padding-block: clamp(3.2rem, 8vw, var(--space-6)); }
.section--tight { padding-block: clamp(2.2rem, 5vw, 4rem); }
.section--alt { background: var(--c-surface-alt, var(--c-surface)); }
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.8rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); }
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1.05fr .95fr; }
.split--rev { grid-template-columns: .95fr 1.05fr; }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split, .split--rev { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Tipografía utilitaria ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--c-accent);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--c-accent); }
.h-xl { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
.h-lg { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
.h-md { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--c-muted); }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head > * + * { margin-top: .9rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head--center .kicker::before { display: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--c-header-bg);
  color: var(--c-header-ink, #fff);
  border-bottom: 1px solid var(--c-header-line, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.nav__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: .02em; }
.nav__brand img, .nav__brand svg { width: 44px; height: 44px; }
.nav__brand small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .62rem; letter-spacing: .22em; opacity: .75; text-transform: uppercase; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; list-style: none; padding: 0; align-items: center; }
.nav__links a { text-decoration: none; font-size: .95rem; font-weight: 600; opacity: .88; }
.nav__links a:hover { opacity: 1; color: var(--c-accent); }
.nav__toggle { display: none; margin-left: auto; background: none; border: 0; color: inherit; width: 44px; height: 44px; }
.nav__toggle svg { width: 26px; height: 26px; margin: auto; }
@media (max-width: 920px) {
  .nav__toggle { display: grid; place-items: center; }
  .nav__links {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0; margin: 0; padding: .6rem 1.2rem 1.2rem; background: var(--c-header-bg);
    border-bottom: 1px solid var(--c-header-line, rgba(255,255,255,.12));
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: .8rem 0; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .82em 1.65em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent, #fff); }
.btn--dark { background: var(--c-primary); color: #fff; }
.btn--outline { border-color: currentColor; background: transparent; color: inherit; }
.btn--ghost { background: transparent; color: var(--c-accent); padding-inline: .4em; }
.btn--lg { font-size: 1.08rem; padding: .95em 2em; }
.btn--whatsapp { background: #1faf5a; color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--c-hero-ink, #fff); background: var(--c-hero-bg, var(--c-primary)); }
.hero__inner { position: relative; z-index: 2; padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.hero .kicker { color: var(--c-hero-kicker, var(--c-accent)); }
.hero .kicker::before { background: currentColor; }
.hero h1 { color: inherit; }
.hero .lead { color: var(--c-hero-muted, rgba(255,255,255,.82)); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero__art { position: relative; }
.hero__art img, .hero__art svg { width: min(430px, 78vw); margin-inline: auto; filter: drop-shadow(0 24px 48px rgba(0,0,0,.35)); }

/* ---------- Banda de estadísticas ---------- */
.stat-band { background: var(--c-statband-bg, var(--c-surface)); border-block: 1px solid var(--c-line); }
.stat-band__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; padding-block: 1.6rem; }
.stat { text-align: center; padding: .4rem 1rem; }
.stat__num { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; color: var(--c-accent); line-height: 1; }
.stat__label { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); margin-top: .45rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: clamp(1.4rem, 2.5vw, 2rem);
  box-shadow: var(--shadow-1);
  color: var(--c-ink); /* autocontenida: no hereda el blanco de heros/banners */
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--c-accent); }
.card--flat:hover { transform: none; box-shadow: var(--shadow-1); border-color: var(--c-line); }
.card__icon { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: var(--c-icon-bg, color-mix(in srgb, var(--c-accent) 12%, transparent)); color: var(--c-accent); margin-bottom: 1.1rem; }
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.card p { color: var(--c-muted); font-size: .98rem; }

/* Tarjeta de marca con sello */
.brand-card {
  text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 1rem;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 2rem 1.4rem 1.7rem; box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.brand-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: var(--brand, var(--c-accent)); }
.brand-card img, .brand-card svg { width: min(168px, 60vw); height: auto; }
.brand-card h3 { font-size: 1.14rem; }
.brand-card p { color: var(--c-muted); font-size: .92rem; }
.brand-card .brand-card__cta { margin-top: auto; font-weight: 700; font-size: .92rem; color: var(--brand, var(--c-accent)); letter-spacing: .04em; }
.brand-card .brand-card__cta::after { content: " →"; }

/* ---------- Planes / precios ---------- */
.plan { position: relative; display: flex; flex-direction: column; gap: 1.1rem; }
.plan__tier { font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent); }
.plan__price { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; line-height: 1; }
.plan__price small { font-size: 1rem; font-weight: 600; color: var(--c-muted); }
.plan ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .96rem; }
.plan ul li { padding-left: 1.6em; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--c-accent); }
.plan ul li.no::before { content: "—"; color: var(--c-muted); }
.plan--featured { border: 2px solid var(--c-accent); box-shadow: var(--shadow-2); }
.plan__flag {
  position: absolute; top: -14px; left: 50%; translate: -50% 0;
  background: var(--c-accent); color: var(--c-on-accent, #fff);
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: .35em 1.1em; border-radius: 999px; white-space: nowrap;
}

/* ---------- FAQ (sin JS) ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 1.05rem 1.3rem; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--c-accent); transition: rotate .2s ease; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details[open] { border-color: var(--c-accent); }
.faq details p { margin-top: .75rem; color: var(--c-muted); }

/* ---------- Testimonios ---------- */
.quote { display: flex; flex-direction: column; gap: 1rem; }
.quote__stars { color: #eab308; letter-spacing: .1em; font-size: .95rem; }
.quote blockquote { font-size: 1.02rem; line-height: 1.6; }
.quote figcaption { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.quote__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--c-accent) 16%, transparent); color: var(--c-accent); font-size: .9rem; }
.quote figcaption b { display: block; font-size: .95rem; }
.quote figcaption span { font-size: .84rem; color: var(--c-muted); }

/* ---------- CTA banner ---------- */
.cta-banner { background: var(--c-cta-bg, var(--c-primary)); color: #fff; border-radius: calc(var(--radius) + 6px); padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center; position: relative; overflow: hidden; }
.cta-banner h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-banner p { color: rgba(255,255,255,.85); max-width: 46em; margin: 1rem auto 0; }
.cta-banner .hero__actions { justify-content: center; }

/* ---------- Steps / proceso ---------- */
.step { position: relative; padding-top: .4rem; }
.step__num { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: color-mix(in srgb, var(--c-accent) 32%, transparent); }
.step h3 { margin-top: .5rem; font-size: 1.15rem; }
.step p { color: var(--c-muted); font-size: .97rem; margin-top: .4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-footer-bg, var(--c-primary)); color: var(--c-footer-ink, rgba(255,255,255,.85)); font-size: .95rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 2.2rem; padding-block: var(--space-5) var(--space-4); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img, .footer-brand svg { width: 72px; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; opacity: .85; max-width: 30em; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--font-body); font-weight: 800; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.16); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; font-size: .84rem; opacity: .8; }
.footer-hierarchy { background: var(--c-footer-deep, rgba(0,0,0,.25)); text-align: center; padding: .85rem 1rem; font-size: .86rem; letter-spacing: .05em; }
.footer-hierarchy a { font-weight: 700; text-decoration: none; }
.footer-hierarchy a:hover { text-decoration: underline; color: #fff; }

/* ---------- Utilidades ---------- */
.badge { display: inline-flex; align-items: center; gap: .45em; padding: .38em 1em; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .05em; background: color-mix(in srgb, var(--c-accent) 14%, transparent); color: var(--c-accent); }
.badge--solid { background: var(--c-accent); color: var(--c-on-accent, #fff); }
.pill-list { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; }
.pill-list li { border: 1px solid var(--c-line); border-radius: 999px; padding: .35em 1em; font-size: .88rem; font-weight: 600; background: var(--c-surface); }
.checklist { list-style: none; padding: 0; display: grid; gap: .6rem; }
.checklist li { padding-left: 1.7em; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--c-accent); }
.center { text-align: center; }
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); }
.muted { color: var(--c-muted); }

/* Botón flotante WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 56px; height: 56px; border-radius: 50%; background: #1fad57;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.28);
  transition: transform .18s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Toggle de idioma */
.lang-switch { display: inline-flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; font-size: .8rem; font-weight: 800; letter-spacing: .06em; }
.lang-switch a { padding: .34em .9em; text-decoration: none; opacity: .75; }
.lang-switch a.is-active { background: var(--c-accent); color: var(--c-on-accent, #fff); opacity: 1; }
.lang-switch a:hover { opacity: 1; }

/* Revelado on-scroll (progresivo: sin JS todo es visible; site.js añade html.js) */
html.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .6s ease, translate .6s ease; }
html.js .reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; translate: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Skip link accesible */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--c-accent); color: #fff; padding: .7em 1.2em; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
