:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #0e1116;
  --muted: #5f6672;
  --line: #e2e5df;
  --deal: #e5484d;
  --good: #1f8a4c;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d11;
    --surface: #14171d;
    --ink: #eef0ea;
    --muted: #9aa1ad;
    --line: #252a33;
    --good: #45c27a;
    color-scheme: dark;
  }
}

/* ---------- Paletas de marca. La activa se elige con THEME en wrangler.jsonc. ---------- */
/* --accent: color de marca (botones, logo)  --accent-ink: texto sobre el acento  --header-*: cabecera */
:root, [data-theme="neon"] {
  --accent: #c6f432; --accent-ink: #0e1116;
  --header-bg: #0e1116; --header-ink: #ffffff; --header-muted: #c9ced6; --header-field: #252a33;
}
[data-theme="asfalto"] {
  --accent: #ff6b1a; --accent-ink: #0b1f3a;
  --header-bg: #0b1f3a; --header-ink: #ffffff; --header-muted: #b9c6da; --header-field: #1b3358;
}
[data-theme="bosque"] {
  --accent: #ffc93c; --accent-ink: #12372a;
  --header-bg: #12372a; --header-ink: #ffffff; --header-muted: #bcd3c6; --header-field: #1f4d3c;
}
[data-theme="maillot"] {
  --accent: #2563eb; --accent-ink: #ffffff;
  --header-bg: #ffffff; --header-ink: #0e1116; --header-muted: #4b5563; --header-field: #f1f3f6;
}
[data-theme="pista"] {
  --accent: #22d3ee; --accent-ink: #1e1b4b;
  --header-bg: #1e1b4b; --header-ink: #ffffff; --header-muted: #c7c4f0; --header-field: #312e6b;
}
@media (prefers-color-scheme: dark) {
  [data-theme="maillot"] { --accent: #5b8cff; --header-bg: #14171d; --header-ink: #eef0ea; --header-muted: #9aa1ad; --header-field: #252a33; }
}

* { box-sizing: border-box; }
/* El atributo hidden debe ganar a cualquier display (botones, tooltip…). */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.4em 0 0.3em; }
h2 { font-size: 1.4rem; margin: 2.2em 0 0.8em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

/* Aviso de datos de ejemplo */
.demo-banner { background: #ffd23f; color: #0e1116; text-align: center; font-size: 0.9rem; font-weight: 600; padding: 8px 16px; }

/* Cabecera */
.site-header { background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--header-ink); }
.logo-mark { width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--accent); box-shadow: inset 0 0 0 4px var(--header-bg), inset 0 0 0 11px var(--accent); }
.header-search { flex: 1; max-width: 460px; margin-left: auto; }
.header-search input { width: 100%; padding: 9px 14px; border-radius: 999px; border: 0; background: var(--header-field); color: var(--header-ink); font: inherit; }
.cat-nav { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; font-size: 0.92rem; scrollbar-width: none; }
.cat-nav a { color: var(--header-muted); text-decoration: none; white-space: nowrap; }
.cat-nav a:hover { color: var(--accent); }

/* Portada */
.hero { padding: 48px 0 8px; }
.hero h1 { max-width: 18ch; font-size: clamp(2rem, 5vw, 3.4rem); }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-top: 20px; }
.hero-search input { flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.hero-search button, .btn-primary {
  padding: 14px 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
.hero-search button:hover, .btn-primary:hover { filter: brightness(0.95); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.cat-card:hover { border-color: var(--ink); }
.how ol { padding-left: 1.2em; max-width: 70ch; }
.how li { margin-bottom: 0.5em; }

/* Tarjetas de producto */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.card-img { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; }
.product-photo { width: 100%; height: 100%; background: #fff no-repeat center / 42%; }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 12px; background: #fff; }
.product-img .product-photo img { padding: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.badge-deal { position: absolute; top: 10px; left: 10px; background: var(--deal); color: #fff; font-weight: 800; font-size: 0.85rem; padding: 3px 9px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.brand { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.card-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { margin-top: auto; display: flex; gap: 8px; align-items: baseline; padding-top: 6px; }
.price { font-weight: 800; font-size: 1.15rem; }

/* Herramientas */
.nav-tools { color: var(--header-ink) !important; font-weight: 600; }
.tool-teaser { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); text-decoration: none; max-width: 640px; }
.tool-teaser:hover { border-color: var(--ink); }
.tool-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.tool-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.tool-form input, .tool-form select { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; }
.tool-form .muted { font-weight: 400; }
.tool-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.tool-form label.check input { width: 18px; height: 18px; }
.pressure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.pressure-grid > div { background: var(--bg); border-radius: 12px; padding: 14px; }
.pressure-grid .result-size { margin: 2px 0; }
.tool-result { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 20px; }
.tool-result p { margin: 0.4em 0; }
.result-size { font-size: 2rem; }
.row-active td { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; }

.guide { max-width: 75ch; }
.tip h3 { font-size: 1.05rem; margin: 1.2em 0 0.3em; }
.tip p { margin: 0; }
.tool-teaser { max-width: none; }

/* Tarjetas con botón de Mi radar */
.card { position: relative; }
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.fav {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 999px; border: 0;
  background: rgb(255 255 255 / .92); box-shadow: 0 1px 4px rgb(0 0 0 / .15); cursor: pointer;
  display: grid; place-items: center; transition: transform .15s;
}
.fav svg { width: 20px; height: 20px; fill: none; stroke: #0e1116; stroke-width: 2; transition: fill .15s; }
.fav[aria-pressed="true"] svg { fill: var(--deal); stroke: var(--deal); }
.fav:active { transform: scale(0.9); }
.fav-labeled {
  position: static; width: auto; height: auto; display: inline-flex; gap: 8px; align-items: center;
  padding: 12px 18px; margin: 10px 0 0 8px; font: inherit; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: none;
}
.fav-labeled[aria-pressed="true"] { border-color: var(--deal); }
.price-change { font-size: 0.82rem; font-weight: 700; margin-top: 4px; }
.price-change.down { color: var(--good); }
.price-change.up { color: var(--deal); }

.share-btn { margin: 10px 0 0 8px; padding: 12px 18px; }
.target { padding: 0 14px 14px; }
.target label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.target-row { display: flex; gap: 6px; }
.target input { flex: 1; min-width: 0; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.target button { padding: 7px 12px; border-radius: 8px; border: 0; background: var(--ink); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.card.target-hit { border-color: var(--good); box-shadow: 0 0 0 2px var(--good); }
.target-flag { color: var(--good); font-weight: 700; font-size: 0.82rem; margin-top: 4px; }

/* Enlace Mi radar en la cabecera */
.radar-link { display: flex; align-items: center; gap: 6px; color: var(--header-ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.radar-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.radar-count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 0.75rem; font-weight: 800; padding: 1px 7px; }
.empty-state { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Sugerencias del buscador */
.suggest-wrap { position: relative; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgb(0 0 0 / .18); max-height: 70vh; overflow-y: auto; min-width: 280px;
}
.suggest li a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; }
.suggest li[aria-selected="true"] a, .suggest li a:hover { background: var(--bg); }
.s-img { flex: none; width: 42px; height: 42px; border-radius: 8px; background: #fff no-repeat center / 60%; overflow: hidden; }
.s-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.s-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-title { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-brand { font-size: 0.78rem; color: var(--muted); }
.s-price { font-weight: 800; font-size: 0.92rem; display: flex; flex-direction: column; align-items: flex-end; }
.s-deal { color: var(--deal); font-size: 0.75rem; }
.suggest-all a { justify-content: center; font-weight: 600; font-size: 0.88rem; }
.suggest-empty { padding: 10px; color: var(--muted); font-size: 0.9rem; }

/* Gráfico interactivo */
.chart svg { touch-action: pan-y; cursor: crosshair; }
.hover-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.hover-dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.chart-tip {
  position: absolute; top: 8px; transform: translateX(-50%); pointer-events: none; background: var(--ink); color: var(--bg);
  border-radius: 10px; padding: 6px 10px; font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; white-space: nowrap;
}
.chart-tip span { opacity: .75; font-size: 0.78rem; }

/* Filtros de categoría */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.filters select, .filters input[type=number] { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; min-width: 120px; }
.filters input[type=number] { width: 120px; }
.filters label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 0.92rem; padding-bottom: 8px; }
.filters label.check input { width: 18px; height: 18px; }
.btn-secondary { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.clear-filters { font-size: 0.88rem; padding-bottom: 10px; }

/* Aviso breve */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Listados */
.crumbs { font-size: 0.88rem; color: var(--muted); margin-top: 20px; }
.crumbs a { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 20px 0 14px; font-size: 0.92rem; }
.sorts { display: flex; flex-wrap: wrap; gap: 14px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 28px 0; }

/* Ficha de producto */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; margin-top: 12px; }
.product-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.big-price { font-size: 2.4rem; font-weight: 800; margin: 0.2em 0 0.1em; letter-spacing: -0.02em; }
.verdict { display: inline-block; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; margin: 6px 0 18px; background: var(--line); }
.verdict-deal { background: var(--deal); color: #fff; }
.verdict-good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.verdict-high { background: color-mix(in srgb, var(--deal) 14%, transparent); color: var(--deal); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stats dt { font-size: 0.8rem; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-weight: 700; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart figcaption { font-size: 0.85rem; margin-top: 8px; }
.grid-line { stroke: var(--line); }
.avg-line { stroke: var(--muted); stroke-dasharray: 5 5; }
.price-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.price-dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.axis { fill: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .axis { font-size: 20px; } }
.key { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 4px; border-top: 2.5px solid var(--ink); }
.key-avg { border-top: 2px dashed var(--muted); margin-left: 12px; }
.offers { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.offers th, .offers td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.offers th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.offers tr:last-child td { border-bottom: 0; }
.offers tr.out { color: var(--muted); }
.description { max-width: 75ch; white-space: pre-line; }

.legal-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.legal-links a { color: var(--muted); }
.legal { max-width: 75ch; }
.legal h2 { font-size: 1.15rem; margin: 1.8em 0 0.5em; }
.legal li { margin-bottom: 0.6em; }

.site-footer { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 0.92rem; }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 16px; }
  .header-search { display: none; }
  .radar-link { margin-left: auto; }
  .radar-text { display: none; }
  .filters { gap: 10px; }
  .filters label:not(.check) { flex: 1 1 40%; }
  .filters select, .filters input[type=number] { width: 100%; min-width: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .offers th:nth-child(3), .offers td:nth-child(3) { display: none; }
}

.launch { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 4px 20px 16px; }
.launch h2 { margin-top: 0.8em; }
.launch-list { padding-left: 1.2em; margin: 0; }
.launch-list li { margin-bottom: 0.5em; }

.table-scroll { overflow-x: auto; margin: 12px 0; }
.gear-table { width: 100%; border-collapse: collapse; background: var(--bg); border-radius: 12px; font-variant-numeric: tabular-nums; }
.gear-table th, .gear-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gear-table th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.gear-table tr:last-child td { border-bottom: 0; }

/* ---------- Portada estilo "producto": bandas a todo el ancho, tipografía grande, mucho aire ---------- */
.site-header { background: color-mix(in srgb, var(--header-bg) 86%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom-color: color-mix(in srgb, var(--header-ink) 10%, transparent); }
main.bleed { max-width: none; padding: 0; }
.band { padding: clamp(64px, 10vw, 120px) 0; }
.band-soft { background: var(--surface); }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 12px; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; color: var(--accent); }
.display { font-size: clamp(2.8rem, 7.5vw, 5.6rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 750; margin: 0 0 24px; max-width: none; }
.display-sm { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 40px; max-width: 22ch; }
.section-title .muted, .statement .muted { color: var(--muted); }
.link-more { color: var(--accent-link, var(--good)); font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-more::after { content: " ›"; }
.link-more:hover { text-decoration: underline; }

/* Hero */
.band-hero { background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--accent) 16%, var(--header-bg)) 0%, var(--header-bg) 60%); color: var(--header-ink); padding-top: clamp(56px, 9vw, 110px); overflow: hidden; }
.band-hero .accent-text { color: var(--accent); }
.band-hero .link-more { color: var(--accent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.45; color: var(--header-muted); max-width: 40ch; margin: 0 0 32px; }
.band-hero .hero-search input { border: 0; }
.cta-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn-primary { padding: 14px 26px; font-size: 1.02rem; transition: transform .2s ease, filter .2s ease; }
.btn-primary:hover { transform: scale(1.03); }

.hero-visual { margin: 0; background: color-mix(in srgb, var(--header-ink) 6%, transparent); border: 1px solid color-mix(in srgb, var(--header-ink) 12%, transparent); border-radius: 28px; padding: 28px 22px 22px; box-shadow: 0 30px 80px rgb(0 0 0 / .35); }
.hero-visual svg { display: block; width: 100%; height: auto; overflow: visible; }
.hv-line { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hv-avg { stroke: var(--header-muted); stroke-width: 1.5; stroke-dasharray: 6 7; opacity: .7; }
.hv-label { fill: var(--header-muted); font-size: 15px; font-weight: 600; }
.hv-dot { fill: var(--accent); stroke: var(--header-bg); stroke-width: 3; }
.hv-pulse { fill: var(--accent); opacity: .25; transform-origin: 600px 204px; }
.hero-visual figcaption { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--header-muted); font-size: 0.95rem; flex-wrap: wrap; }
.hv-pill { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .hv-line { stroke-dashoffset: 1; animation: hv-draw 2.2s cubic-bezier(.65,0,.35,1) .2s forwards; }
  .hv-dot, .hv-pulse { opacity: 0; animation: hv-in .5s ease 2.2s forwards; }
  .hv-pulse { animation: hv-in .5s ease 2.2s forwards, hv-pulse 2.4s ease-out 2.7s infinite; }
}
@keyframes hv-draw { to { stroke-dashoffset: 0; } }
@keyframes hv-in { to { opacity: 1; } }
@keyframes hv-pulse { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(2.4); opacity: 0; } }

/* Declaración + cifras */
.statement { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 20ch; margin: 0 0 clamp(48px, 7vw, 88px); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.figure { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.figure strong { font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 750; }
.figure small { font-size: 0.38em; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.figure span { color: var(--muted); font-size: 1.05rem; max-width: 30ch; }

/* Herramientas en cuadrícula tipo "bento" */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento-tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 280px; padding: 32px; border-radius: 28px; background: var(--bg); text-decoration: none; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.bento-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgb(0 0 0 / .12); }
.bento-tile strong { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.15; margin-top: auto; }
.bento-text { color: var(--muted); max-width: 36ch; }
.bento-tile .link-more { margin-top: 8px; }
.bento-glyph { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--ink); opacity: .9; }
.bento-main { grid-column: span 2; grid-row: span 2; background: var(--header-bg); color: var(--header-ink); min-height: 420px; }
.bento-main .bento-glyph { font-size: clamp(4rem, 11vw, 8.5rem); color: var(--accent); }
.bento-main strong { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.bento-main .bento-text { color: var(--header-muted); font-size: 1.1rem; }
.bento-main .link-more { color: var(--accent); }
.bento-radar .bento-glyph { color: var(--deal); }
.bento-radar { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 28px; }
.bento-radar strong { margin: 0; }
.bento-radar .bento-text { grid-column: 2; }
.bento-radar .bento-glyph { grid-row: 1 / span 2; }
.bento-radar .link-more { grid-column: 3; grid-row: 1 / span 2; margin: 0; }

/* Carril horizontal de guías */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 340px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(16px, calc((100vw - 1180px) / 2 + 16px)); padding: 4px max(16px, calc((100vw - 1180px) / 2 + 16px)) 24px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card { scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; padding: 26px; min-height: 340px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.rail-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgb(0 0 0 / .10); }
.rail-card strong { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2; }
.rail-card .muted { font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rail-art { display: grid; place-items: center; height: 130px; margin-bottom: 8px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }

/* Categorías (con productos) */
.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 14px; border-radius: 22px; background: var(--bg); text-decoration: none; transition: transform .3s; }
.cat-tile:hover { transform: translateY(-3px); }

/* Cierre oscuro */
.band-dark { background: var(--header-bg); color: var(--header-ink); text-align: center; }
.closing { display: flex; flex-direction: column; align-items: center; }
.closing .display-sm { max-width: 18ch; }
.closing .hero-sub { margin-inline: auto; }

/* Aparición suave al hacer scroll (solo con JS y si el sistema no pide reducir movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-main { grid-column: auto; grid-row: auto; min-height: 320px; }
  .bento-tile { min-height: 220px; padding: 26px; }
  .bento-radar { grid-template-columns: auto 1fr; min-height: 0; }
  .bento-radar .link-more { grid-column: 2; grid-row: auto; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
}
main.bleed + .site-footer { margin-top: 0; }
.guide-icon { display: block; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.rail-card:hover .guide-icon, .guide-card:hover .guide-icon { transform: scale(1.08) rotate(-3deg); }
.guide-card .rail-art { height: 110px; }
