/* ==========================================================================
   edwinortiz.net — main.css v2 (componentes bajo el primer pantallazo)
   Los tokens y la estructura están en critical.css.
   ========================================================================== */

.section--flush { padding-block: 0 clamp(48px, 7vw, 96px); }
.section--top0 { padding-top: 0; }

/* ---------- Foco de luz que sigue al cursor (data-spotlight) ---------- */
[data-spotlight] { position: relative; }
[data-spotlight]::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 14%, transparent), transparent 45%);
}
[data-spotlight]:hover::before { opacity: 1; }

/* ---------- Estadísticas ---------- */
.stats { position: relative; z-index: 2; margin-top: -42px; }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; padding: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--line); box-shadow: var(--shadow); max-width: calc(var(--wrap) - 2 * var(--gutter)); }
.stat { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 2px; margin: 0; padding: 20px 22px; background: var(--surface); }
.stat__n { font-family: var(--font-head); font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat__suffix { font-family: var(--font-head); font-size: var(--step-2); font-weight: 800; color: var(--accent-strong); }
.stat__label { grid-column: 1 / -1; margin-top: 6px; font-size: .9rem; color: var(--muted); font-weight: 550; }
@media (min-width: 800px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Bento de perfiles ---------- */
.bento { display: grid; gap: 18px; }
.bento__card {
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-height: 230px; padding: 26px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.bento__card > * { position: relative; z-index: 1; }
.bento__card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.bento__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: var(--grad); box-shadow: 0 10px 22px -10px rgba(35, 80, 240, .7); }
.bento__icon .icon { width: 26px; height: 26px; }
.bento__card--2 .bento__icon { background: linear-gradient(135deg, #0fb89a, #2350f0); }
.bento__card--3 .bento__icon { background: linear-gradient(135deg, #ff6a2b, #f5a524); box-shadow: 0 10px 22px -10px rgba(255, 106, 43, .7); }
.bento__title { font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.bento__text { color: var(--muted); }
.bento__go { justify-self: end; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); color: var(--brand); transition: transform .3s var(--ease), background-color .3s, color .3s; }
.bento__card:hover .bento__go { transform: translateX(4px) rotate(-30deg); background: var(--brand); color: var(--on-brand); }
@media (min-width: 860px) {
  .bento { grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; }
  .bento__card--1 { grid-row: span 2; background: radial-gradient(ellipse 90% 70% at 100% 100%, var(--brand-soft), transparent 70%), var(--surface); }
  .bento__card--1 .bento__title { font-size: var(--step-3); }
}

/* ---------- Carrusel ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 340px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 6px 4px 22px; margin-inline: -4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain; }
.carousel:focus-visible { outline-offset: 6px; }
.carousel__item { scroll-snap-align: start; display: flex; }
.carousel__item > * { flex: 1; }
.carousel .product-card { flex-direction: column; }
.carousel .product-card__media { flex: none; aspect-ratio: 16 / 10; }
.carousel-nav { display: flex; align-items: center; gap: 8px; }
.btn-round { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: all .2s var(--ease); }
.btn-round:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-round[disabled] { opacity: .4; cursor: default; }
.carousel-nav .link-more { margin-left: 8px; }
@media (min-width: 1000px) { .carousel { grid-auto-columns: calc((100% - 60px) / 4); } }

/* ---------- Tarjetas de herramientas ---------- */
.tool-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tool-cards > li { display: flex; }
.tool-card {
  position: relative; overflow: hidden; flex: 1; display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.tool-card > * { position: relative; z-index: 1; }
.tool-card:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tool-card__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; transition: transform .35s var(--ease); }
.tool-card:hover .tool-card__icon { transform: rotate(-8deg) scale(1.08); }
.tool-card--words .tool-card__icon { background: var(--accent-soft); color: var(--accent-strong); }
.tool-card--fundales .tool-card__icon { background: color-mix(in srgb, var(--action) 16%, var(--surface)); color: var(--action-hover); }
.tool-card__tag { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); }
.tool-card__title { font-family: var(--font-head); font-size: var(--step-1); font-weight: 750; letter-spacing: -.015em; line-height: 1.15; }
.tool-card__text { color: var(--muted); }
.tool-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; color: var(--brand); }
.tool-card__go .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.tool-card:hover .tool-card__go .icon { transform: translateX(4px); }
.tool-cards--large .tool-card { padding: 30px; }

/* ---------- Fundales ---------- */
.fundales {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 24px; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg);
  color: #e9eeff; background: linear-gradient(135deg, #0e1730 0%, #10224f 55%, #0b4d55 100%); box-shadow: var(--shadow-lg); margin: 2em 0;
}
.fundales__glow { position: absolute; inset: auto -20% -60% auto; width: 420px; height: 420px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(52, 227, 193, .45), transparent 65%); filter: blur(30px); }
.fundales__badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .8rem; font-weight: 700; color: #bff5ea; }
.fundales__badge .icon { width: 16px; height: 16px; }
.fundales__title { font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; line-height: 1.12; color: #fff; margin: 0 0 .4em; }
.fundales__text { color: #c3cde8; margin-bottom: 14px; }
.fundales__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fundales__list li { display: flex; gap: 8px; align-items: flex-start; color: #dfe7ff; font-weight: 550; }
.fundales__list .icon { width: 20px; height: 20px; color: #34e3c1; margin-top: 2px; }
.fundales__actions { display: grid; gap: 10px; align-content: center; justify-items: start; }
.fundales__note { margin: 0; font-size: .85rem; color: #a7b3d6; }
.fundales .btn .icon { width: 18px; height: 18px; }
.prose .fundales { font-size: 1rem; }
@media (min-width: 860px) { .fundales--banner { grid-template-columns: 1.4fr 1fr; align-items: center; gap: 40px; } }

/* ---------- Página de Fundales ---------- */
.hero--page { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 7vw, 96px); }
.hero__title--wide { max-width: 18ch; }
.mock-quiz { border-radius: 20px; padding: 22px; background: rgba(13, 20, 38, .8); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); color: #dfe7ff; }
.mock-quiz__top { display: flex; justify-content: space-between; margin: 0 0 14px; font-size: .8rem; font-weight: 700; color: #8f9bc2; text-transform: uppercase; letter-spacing: .08em; }
.mock-quiz__timer { display: inline-flex; gap: 6px; align-items: center; color: #34e3c1; }
.mock-quiz__timer .icon { width: 16px; height: 16px; }
.mock-quiz__q { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.3; }
.mock-quiz__opt { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); font-size: .92rem; }
.mock-quiz__opt--ok { border-color: #34e3c1; background: rgba(52, 227, 193, .12); color: #bff5ea; font-weight: 700; }
.mock-quiz__opt .icon { width: 18px; height: 18px; color: #34e3c1; }
.mock-quiz__bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: 16px; overflow: hidden; }
.mock-quiz__bar span { display: block; height: 100%; width: 70%; border-radius: inherit; background: linear-gradient(90deg, #2350f0, #34e3c1); }
.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.feature { position: relative; overflow: hidden; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feature > * { position: relative; z-index: 1; }
.feature__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; margin-bottom: 14px; }
.feature__title { font-size: var(--step-1); margin-bottom: .3em; }
.feature__text { color: var(--muted); margin: 0; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.role { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.role__n { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }

/* ---------- Pestañas de últimos artículos ---------- */
.tabs-hubs__list { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 26px; border-radius: 999px; background: var(--surface-2); }
.tabs-hubs__list button { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--muted); cursor: pointer; transition: all .25s var(--ease); }
.tabs-hubs__list button:hover { color: var(--text); }
.tabs-hubs__list button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs-hubs__panel + .tabs-hubs__panel { margin-top: 40px; }
.js .tabs-hubs__panel + .tabs-hubs__panel { margin-top: 0; }
.js .tabs-hubs__panel[data-inactive] { display: none; }
.js .tabs-hubs__nojs { display: none; }
.tabs-hubs__nojs { font-size: var(--step-1); margin-bottom: 16px; }
.tabs-hubs__more { margin: 20px 0 0; }
.post-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (prefers-reduced-motion: no-preference) { .js .tabs-hubs__panel:not([data-inactive]) { animation: fade-up .45s var(--ease); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Autor y suscripción ---------- */
.author-box { position: relative; display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.author-box__avatar { width: 72px; height: 72px; padding: 3px; border-radius: 50%; background: var(--grad); }
.author-box__avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--night); color: #fff; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.author-box__name { font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; margin-bottom: 2px; }
.author-box__role { color: var(--accent-strong); font-weight: 700; margin-bottom: .8em; }
.author-box p:last-child { margin: 0; }
.author-box__facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; list-style: none; margin: 8px 0 0; padding: 0; }
.author-box__facts li { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 2px; }
.author-box__facts strong { font-family: var(--font-head); font-size: var(--step-1); }
.author-box__facts span { font-size: .88rem; color: var(--muted); }
@media (min-width: 600px) { .author-box { grid-template-columns: auto 1fr; } .author-box--large .author-box__avatar { width: 104px; height: 104px; } }
.author-box--large .author-box__avatar span { font-size: 2.1rem; }
.subscribe-box { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 22px; padding: clamp(26px, 4vw, 48px); border-radius: var(--radius-lg); background: var(--grad-deep); color: #fff; box-shadow: var(--shadow-lg); }
.subscribe-box::after { content: ""; position: absolute; right: -80px; top: -80px; z-index: -1; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); }
.subscribe-box__title { font-size: var(--step-2); color: inherit; margin-bottom: .3em; }
.subscribe-box p { margin: 0; color: #e3ebff; }
.subscribe-box .form-note, .subscribe-box .form-status { color: #d3dcf5; }
.subscribe-box input[type="email"] { border-color: transparent; background: rgba(255, 255, 255, .95); color: #0a1124; }
.subscribe-box .btn--primary { background: #fff; color: #0a1124; box-shadow: none; }
.subscribe-box .btn--primary:hover { background: #fff; color: #0a1124; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); }
@media (min-width: 860px) { .subscribe-box { grid-template-columns: 1fr 1fr; align-items: center; } }
.subscribe-form__row { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe-form__row input { flex: 1 1 200px; }

/* ---------- Formularios ---------- */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: 50px; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand); }
input[type="color"] { width: 100%; height: 50px; padding: 4px; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); }
label { display: block; font-weight: 650; margin-bottom: 6px; }
.form { display: grid; gap: 18px; margin-block: 24px; }
.form__row { display: grid; gap: 4px; }
.form__row--inline { display: flex; align-items: center; gap: 10px; }
.form__row--inline label { margin: 0; font-weight: 500; }
.form__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.form-note { font-size: var(--step--1); color: var(--muted); margin: 8px 0 0; }
.form-status { margin: 8px 0 0; font-weight: 650; min-height: 1.4em; }
.form-status[data-state="error"] { color: var(--error); }
.form-status[data-state="ok"] { color: var(--ok); }
.subscribe-box .form-status[data-state] { color: #fff; }
.field-error { color: var(--error); font-size: var(--step--1); }
.search-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; }
.search-inline input { flex: 1 1 240px; }

/* ---------- Pie oscuro ---------- */
.site-footer { position: relative; margin-top: 56px; padding-block: 64px 28px; background: var(--night); color: #b8c3e3; font-size: .97rem; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.site-footer a { color: #dfe7ff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__top { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (min-width: 1000px) { .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr 1.5fr; } }
.brand--footer { color: #fff; margin-bottom: 12px; }
.brand--footer:hover { color: #fff; text-decoration: none !important; }
.brand--footer .brand__name span { color: #8f9bc2; }
.site-footer__links { display: flex; gap: 18px; }
.site-footer__title { font-family: var(--font-body); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #8f9bc2; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer ul a, .site-footer .link-button { display: inline-flex; min-height: 34px; align-items: center; color: #dfe7ff; text-decoration: none; }
.site-footer__subtext { font-size: .92rem; }
.site-footer input[type="email"] { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: #fff; }
.site-footer input[type="email"]::placeholder { color: #8f9bc2; }
.site-footer .form-note { color: #8f9bc2; }
.site-footer .btn--primary { box-shadow: none; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: var(--step--1); color: #8f9bc2; }
.site-footer__bottom p { margin: 0; }

/* ---------- Franja de idioma ---------- */
.lang-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--night); color: #fff; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .5); }
body:has(.lang-banner:not([hidden])) .whatsapp-float { bottom: 72px; }
.lang-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.lang-banner p { margin: 0; }
.lang-banner a { color: #fff; font-weight: 700; }
.lang-banner .btn-icon { color: #fff; }
.lang-banner .btn-icon:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Artículo ---------- */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; pointer-events: none; }
.reading-progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.toc__details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 4px 18px; box-shadow: var(--shadow-sm); }
.toc summary { cursor: pointer; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 0; }
.toc ol { margin: 0 0 14px; padding: 0; list-style: none; font-size: .94rem; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--brand); border-color: var(--brand); font-weight: 650; }
.article__footer { display: grid; gap: 44px; padding-bottom: 32px; max-width: calc(1040px + 2 * var(--gutter)); }
.article__product { margin-top: 2.6em; }
.article__product-title { font-size: var(--step-1); }
.article__hub-link { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); }
.siblings .post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.inline-posts { margin: 1.8em 0; padding: 20px 22px; border-radius: var(--radius); background: var(--surface-2); }
.inline-posts__title { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.inline-posts ul { margin: 0; padding-left: 1.1em; }
.product-inline { position: relative; display: grid; grid-template-columns: 88px 1fr; align-items: start; gap: 16px; margin: 2em 0; padding: 18px; border-radius: var(--radius-lg); border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--action), #f5a524 40%, var(--brand)) border-box; box-shadow: var(--shadow); }
.product-inline > :only-child { grid-column: 1 / -1; }
.product-inline__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.product-inline .eyebrow { margin-bottom: .3em; color: var(--action-hover); }
.product-inline__title { font-family: var(--font-head); font-size: var(--step-1); font-weight: 750; line-height: 1.15; margin-bottom: .4em; }
.product-inline__title a { color: var(--text); text-decoration: none; }
.product-inline__text { color: var(--muted); font-size: .97rem; }
.product-inline__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 640px) { .product-inline { grid-template-columns: 200px 1fr; align-items: center; } .product-inline__img { aspect-ratio: 16 / 10; } }
.product-grid--compact { margin: 1.8em 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.prose .product-grid img { border-radius: 0; }
.ad-slot { display: none; margin: 2em 0; min-height: 280px; background: var(--surface-2); border-radius: var(--radius); }
.consent-ok [data-adsense]:not([data-adsense=""]) .ad-slot { display: block; }
.btn-link, .prose .btn-link { display: inline-flex; align-items: center; min-height: 48px; padding: 11px 22px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 700; text-decoration: none; }
.btn-link:hover { background: var(--brand-strong); color: var(--on-brand); }
.embed-link a { font-weight: 700; }
.prose .gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.prose .video video { width: 100%; border-radius: var(--radius); background: #000; }
.table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 800; font-size: .88rem; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
caption { caption-side: top; text-align: left; padding: 14px; font-family: var(--font-head); font-size: var(--step-1); font-weight: 750; }

/* ---------- YouTube lite ---------- */
.lite-yt { position: relative; margin: 1.8em 0; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.lite-yt__link { position: absolute; inset: 0; display: block; }
.lite-yt img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; opacity: .9; transition: opacity .3s, transform .6s var(--ease); }
.lite-yt__link:hover img { opacity: 1; transform: scale(1.03); }
.lite-yt__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(0, 0, 0, .45); border: 1.5px solid rgba(255, 255, 255, .6); transition: transform .3s var(--ease), background-color .3s; }
.lite-yt__play::after { content: ""; position: absolute; left: 31px; top: 25px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.lite-yt__link:hover .lite-yt__play, .lite-yt__link:focus-visible .lite-yt__play { transform: translate(-50%, -50%) scale(1.1); background: #ff0033; border-color: #ff0033; }
.lite-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Hub ---------- */
.pillar { position: relative; display: grid; gap: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.pillar:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pillar__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pillar__body { display: flex; flex-direction: column; gap: 10px; padding: 26px; }
.pillar__title { font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; line-height: 1.12; letter-spacing: -.02em; }
.pillar__text { color: var(--muted); }
@media (min-width: 800px) { .pillar { grid-template-columns: 1.1fr 1fr; } .pillar__img { height: 100%; } .pillar__body { justify-content: center; padding: 36px 44px; } }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 10px; }
.faq__item { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.faq__item[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow-sm); }
.faq__q { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; font-weight: 700; font-size: 1.04rem; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; position: absolute; right: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; line-height: 1; transition: transform .3s var(--ease); }
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 20px 18px; color: var(--muted); }
.faq__a p { margin: 0; }

/* ---------- Ficha de producto ---------- */
.product__short { color: var(--muted); }
.gallery-thumbs { display: flex; gap: 10px; list-style: none; padding: 0; margin: 12px 0 0; overflow-x: auto; }
.gallery-thumbs__btn { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; transition: border-color .2s; }
.gallery-thumbs__btn[aria-current="true"] { border-color: var(--brand); }
.gallery-thumbs img { width: 96px; height: 64px; object-fit: cover; }
.product-details { display: grid; gap: 32px; padding-block: 16px 32px; }
.product-details > * { min-width: 0; }
.product-details a, .detail-card a { overflow-wrap: anywhere; }
.detail-block h2, .detail-card h2 { font-size: var(--step-1); }
.detail-card { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; font-size: .98rem; box-shadow: var(--shadow-sm); }
.detail-card ul { margin: 0; padding-left: 1.1em; }
.detail-card p:last-child { margin: 0; }
.pack-list { padding-left: 1.2em; }
.waitlist-form { margin-top: 16px; }
@media (min-width: 900px) { .product-details { grid-template-columns: minmax(0, 1fr) 340px; gap: 52px; } }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px -12px rgba(0, 0, 0, .25); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); }
.sticky-buy__inner { display: flex; align-items: center; gap: 12px; max-width: var(--wrap); margin: 0 auto; }
.sticky-buy__title { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-buy .price__ref { display: none; }
@media (min-width: 900px) { .sticky-buy { display: none !important; } }
body.has-sticky-buy .whatsapp-float { bottom: 84px; }

/* ---------- Tienda ---------- */
.shop__count { color: var(--muted); font-size: var(--step--1); font-weight: 600; margin-bottom: 16px; }
.shop__empty { padding: 36px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.filters__back { margin: 0; }
.compare { background: var(--surface); }
.compare td:first-child, .compare th[scope="row"] { min-width: 180px; }
.compare__price { white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; }
.link-list { padding-left: 1.2em; }
.link-list li { margin-bottom: 8px; }

/* ---------- Paginación ---------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 44px; }
.pagination ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 650; transition: all .2s; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* ---------- Carrito ---------- */
.cart-drawer { position: fixed; inset: 0; z-index: 60; }
.cart-drawer__backdrop { position: absolute; inset: 0; background: rgba(7, 11, 24, .55); animation: fade-in .25s ease; }
.cart-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100%); display: flex; flex-direction: column; background: var(--bg); box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .5); animation: drawer-in .35s var(--ease); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.cart-drawer__head h2 { font-size: var(--step-1); margin: 0; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.cart-drawer__empty { padding: 24px 22px; color: var(--muted); }
.cart-drawer__foot { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.cart-drawer__total { display: flex; justify-content: space-between; font-size: 1.12rem; margin-bottom: 14px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item__img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.cart-item__title { display: block; font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.cart-item__price { color: var(--muted); font-size: .95rem; }

/* ---------- Búsqueda ---------- */
.search-dialog { width: min(700px, calc(100% - 24px)); max-height: min(80vh, 660px); margin: 8vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg); }
.search-dialog[open] { animation: pop-in .25s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.search-dialog::backdrop { background: rgba(7, 11, 24, .6); }
.search-dialog__form { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.search-dialog__form input { border: 0; font-size: 1.15rem; box-shadow: none !important; background: transparent; }
.search-dialog__results { max-height: 55vh; overflow-y: auto; padding: 8px; }
.search-dialog__results h3 { font-family: var(--font-body); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 12px 10px 6px; }
.search-result { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 550; }
.search-result small { color: var(--muted); white-space: nowrap; }
.search-result[aria-selected="true"], .search-result:hover { background: var(--brand-soft); color: var(--text); }
.search-dialog__hint { margin: 0; padding: 8px 16px 12px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.search-dialog__empty { padding: 16px 12px; color: var(--muted); margin: 0; }
.result-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.result-list li { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.result-list p { margin: 4px 0 0; color: var(--muted); font-size: .96rem; }

/* ---------- WhatsApp y consentimiento ---------- */
.whatsapp-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #168a48; color: #fff; box-shadow: 0 12px 28px -8px rgba(22, 138, 72, .7); transition: transform .3s var(--ease); }
.whatsapp-float:hover { color: #fff; transform: scale(1.08) rotate(-6deg); }
.whatsapp-float .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; }
.consent__inner { max-width: 740px; margin: 0 auto; padding: 20px 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: fade-up .4s var(--ease); }
.consent__inner p { margin: 0 0 12px; font-size: .96rem; }
.consent__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* ---------- Herramientas ---------- */
.tool__app { margin-block: 24px; padding: clamp(18px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tool__privacy { font-size: var(--step--1); color: var(--muted); }
.tool__content { display: grid; gap: 28px; }
.qr-tool { display: grid; gap: 24px; }
.qr-tool__form { display: grid; gap: 16px; }
.qr-tool__preview { display: grid; gap: 12px; justify-items: center; align-content: start; }
.qr-tool__canvas { width: min(100%, 320px); aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--radius-lg); background: #fff; padding: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.qr-tool__canvas svg { width: 100%; height: 100%; }
.qr-tool__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (min-width: 820px) { .qr-tool { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.words-tool { display: grid; gap: 20px; }
.words-tool__result { padding: 22px; border-radius: var(--radius-lg); border: 1.5px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; }
.words-tool__label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.words-tool__output { display: block; font-family: var(--font-head); font-size: var(--step-1); font-weight: 650; line-height: 1.35; min-height: 1.4em; margin-bottom: 14px; overflow-wrap: anywhere; }

/* ---------- Pedido, pago, cuenta ---------- */
.checkout { display: grid; gap: 32px; padding-block: 24px 48px; }
@media (min-width: 960px) { .checkout { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; } .checkout__summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.summary-card { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.summary-card h2 { font-size: var(--step-1); }
.summary-list { list-style: none; margin: 0 0 16px; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; }
.gateway-options { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.gateway-options legend { font-weight: 750; margin-bottom: 8px; }
.gateway-option { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; margin: 0; font-weight: 700; background: var(--surface); transition: all .2s; }
.gateway-option:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.gateway-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.gateway-option small { display: block; font-weight: 500; color: var(--muted); }
legend.section__title { font-family: var(--font-head); font-weight: 750; line-height: 1.15; padding: 0; }
.order-status { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-2); margin-block: 16px; font-weight: 700; }
.order-status--approved { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.order-status--declined, .order-status--error, .order-status--voided { background: color-mix(in srgb, var(--error) 10%, var(--surface)); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.download-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.download-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.download-list small { color: var(--muted); }
.orders-table td, .orders-table th { white-space: nowrap; }
.message-page, .error-page { padding-block: clamp(48px, 9vw, 110px); }
.error-page h1 { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-alt { margin-top: 32px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface-2); }
.contact-alt h2 { font-size: var(--step-1); }
.about__grid { display: grid; gap: 36px; }
.about__card { position: relative; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 10px; aspect-ratio: 4 / 5; max-width: 320px; border-radius: var(--radius-lg); background: var(--grad-deep); color: #fff; padding: 24px; text-align: center; box-shadow: var(--shadow-lg); }
.about__initials { font-family: var(--font-head); font-size: 4.4rem; font-weight: 800; line-height: 1; }
.about__role { font-size: .95rem; opacity: .9; }
.about__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 900px) { .about__grid { grid-template-columns: 320px minmax(0, var(--measure)); gap: 60px; } .about__card { position: sticky; top: calc(var(--header-h) + 24px); } }

/* ---------- Rendimiento: omitir el trabajo fuera de pantalla ---------- */
.article__footer, .siblings, .product-details, .faq { content-visibility: auto; contain-intrinsic-size: auto 600px; }
.prose figure, .prose .product-inline, .prose .product-grid { content-visibility: auto; contain-intrinsic-size: auto 320px; }

/* ---------- Impresión ---------- */
@media print {
  .site-header, .site-footer, .whatsapp-float, .consent, .cart-drawer, .sticky-buy, .reading-progress, .toc, .subscribe-box, .ad-slot, .fundales { display: none !important; }
  body { background: #fff; color: #000; }
}
