/* =============================================================
   VacuumIQ — styles.css
   1. Tokens  2. Reset & base  3. Utilities  4. Typography
   5. Components  6. Sections  7. Effects  8. Responsive
   9. Reduced motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f6f7fa;
  --bg-alt: #ffffff;
  --ink: #0f1720;
  --muted: #5b6472;
  --muted-2: #8a93a3;
  --border: #e3e7ee;
  --card: #ffffff;

  --navy: #0a0a0b;
  --navy-2: #1a1a1c;
  --on-navy: #f3f6fb;
  --on-navy-muted: #a3a3a8;

  --accent: #2dd4bf;
  --accent-ink: #04302c;
  --accent-strong: #14b8a6;
  --accent-soft: #e5fbf8;

  --deal: #ef4444;
  --deal-soft: #fee2e2;
  --gold: #f59e0b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 32, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 32, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 32, 0.14);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Sora", var(--sans);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1180px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); }
.muted { color: var(--muted); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.divider { height: 1px; background: var(--border); border: 0; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: 0.6rem 1rem; background: var(--accent); color: var(--accent-ink);
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 700;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-strong); color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn[disabled], .btn.is-sample { opacity: 0.9; }

/* --- Nav --- */
.site-header { background: var(--navy); color: var(--on-navy); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 0.9rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--on-navy); }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-strong)); flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--on-navy-muted); font-weight: 600; font-size: 0.92rem; transition: color 0.2s var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-navy); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover {
  color: var(--accent-ink); background: var(--accent); padding: 0.55rem 1.1rem; border-radius: 999px; font-weight: 700;
}
.nav-toggle { display: none; }

/* --- Cards --- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm); transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.product-card { display: flex; flex-direction: column; gap: 0.75rem; position: relative; }
.product-card .thumb-wrap { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1 / 1; background: var(--navy); }
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .badge-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.product-card h3 { font-size: 1.05rem; }
.product-card .price-row { display: flex; align-items: baseline; gap: 0.5rem; }
.price-now { font-size: 1.3rem; font-weight: 800; }
.price-was { font-size: 0.9rem; color: var(--muted-2); text-decoration: line-through; }
.rating-row { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 1px; }

/* --- Badges / chips --- */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.28rem 0.65rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge-tier { background: var(--accent-soft); color: var(--accent-ink); }
.badge-deal { background: var(--deal-soft); color: var(--deal); }
.badge-sample { background: #fff7e6; color: #92650a; border: 1px solid #f4d38f; }
.badge-featured { background: var(--navy); color: var(--on-navy); }
.chip {
  display: inline-flex; align-items: center; padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 600; color: var(--muted); background: var(--bg-alt); transition: all 0.2s var(--ease-out);
}
.chip[aria-pressed="true"], .chip:hover { border-color: var(--accent-strong); color: var(--accent-ink); background: var(--accent-soft); }

/* --- Spec table --- */
.spec-table { width: 100%; font-size: 0.92rem; }
.spec-table caption { text-align: left; font-weight: 700; padding-block: 0.6rem; color: var(--ink); }
.spec-table th, .spec-table td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.spec-table th { width: 42%; color: var(--muted); font-weight: 600; }
.spec-table tr.spec-group td { font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); padding-block: 0.5rem; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.spec-table .val-null { color: var(--muted-2); }
.spec-table .val-best { color: var(--accent-strong); font-weight: 800; }
.spec-table td svg, .ico { width: 1.15em; height: 1.15em; flex: none; }
.ico-yes { color: var(--accent-strong); }
.ico-no { color: var(--muted-2); }

/* --- Radar chart --- */
.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.radar-legend { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.radar-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.35rem; }

/* --- Pros/cons --- */
.pros-cons { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.pros-cons ul { display: flex; flex-direction: column; gap: 0.5rem; }
.pros-cons li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.95rem; }
.pros-cons svg { width: 1.15em; height: 1.15em; flex: none; margin-top: 0.15em; }
.pros li svg { color: var(--accent-strong); }
.cons li svg { color: var(--deal); }

/* --- Comparator --- */
.compare-picker { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.compare-table-wrap { overflow-x: auto; overflow-y: visible; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }
.compare-table { min-width: 640px; }
.compare-table th.product-col { min-width: 220px; }
.compare-table .remove-slot { position: relative; }
.compare-col-head { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; align-items: center; text-align: center; }
.compare-col-head .thumb-wrap { position: relative; width: 140px; max-width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; background: var(--navy); }
.remove-badge {
  position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* --- Review card --- */
.review-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: var(--bg-alt); }
.review-card .review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--muted); }

/* --- Filter bar --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.filter-bar select {
  padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-alt); font: inherit; color: var(--ink);
}

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Hero --- */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--on-navy); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: -40% -10% -60% -10%;
  background: radial-gradient(45% 35% at 65% 30%, rgba(45,212,191,0.28), transparent 70%);
  filter: blur(80px); pointer-events: none;
}
.hero-inner { position: relative; padding-block: clamp(3rem, 7vw, 6rem); display: grid; gap: 1.25rem; max-width: 46rem; }
.hero .lede { color: var(--on-navy-muted); }
.hero-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.hero-stats { display: flex; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--accent); }
.hero-stat span { font-size: 0.82rem; color: var(--on-navy-muted); }

/* --- Trust strip --- */
.trust-strip { background: var(--bg-alt); border-block: 1px solid var(--border); }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; padding-block: 1.75rem; }
.trust-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.trust-item svg { width: 1.6em; height: 1.6em; flex: none; color: var(--accent-strong); }
.trust-item h3 { font-size: 0.98rem; margin-bottom: 0.2rem; }
.trust-item p { font-size: 0.86rem; color: var(--muted); }

/* --- Grids --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

/* --- Category entry cards --- */
.cat-card { background: var(--navy); color: var(--on-navy); border-radius: var(--radius-lg); padding: 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; position: relative; overflow: hidden; }
.cat-card::after { content: ""; position: absolute; inset: -30% -10% -50%; background: radial-gradient(40% 40% at 80% 20%, rgba(45,212,191,0.3), transparent 70%); }
.cat-card h3 { position: relative; font-size: 1.3rem; }
.cat-card p { position: relative; color: var(--on-navy-muted); font-size: 0.9rem; }
.cat-card a.link-arrow { position: relative; color: var(--accent); font-weight: 700; font-size: 0.9rem; }

/* --- Ficha (product page) --- */
.ficha-head { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 2rem; align-items: start; }
.ficha-galeria .thumb-wrap { border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 1/1; max-width: 440px; margin-inline: auto; }
.ficha-thumbs { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-top: 0.85rem; max-width: 440px; margin-inline: auto; }
.ficha-thumbs button {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; padding: 0; flex: none;
  border: 2px solid transparent; opacity: 0.6; transition: opacity 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.ficha-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ficha-thumbs li.is-active button, .ficha-thumbs button:hover { opacity: 1; border-color: var(--accent-strong); }
.ficha-galeria img { width: 100%; height: 100%; object-fit: cover; }
.ficha-marca { color: var(--accent-strong); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.ficha-nombre { margin-bottom: 0.5rem; }
.ficha-precio { display: flex; align-items: baseline; gap: 0.6rem; margin-block: 0.75rem; flex-wrap: wrap; }
.ficha-precio .precio-actual { font-size: 2rem; font-weight: 800; font-family: var(--display); }
.precio-nota { font-size: 0.8rem; color: var(--muted-2); width: 100%; }
.ficha-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }

.ficha-section { padding-block: 2rem; border-top: 1px solid var(--border); }
.editorial-cuerpo p { margin-bottom: 1rem; color: var(--ink); max-width: 70ch; }
.ideal-para { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin-top: 1rem; }

.aviso-afiliados { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-block: 1.25rem; }

/* --- Footer --- */
.site-footer { background: var(--navy); color: var(--on-navy-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-block: 3rem 2rem; }
.footer-grid h4 { color: var(--on-navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.footer-grid a { display: block; padding-block: 0.3rem; font-size: 0.9rem; transition: color 0.2s var(--ease-out); }
.footer-grid a:hover { color: var(--on-navy); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-block: 1.25rem; font-size: 0.78rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-disclosure { font-size: 0.78rem; max-width: 60ch; color: var(--on-navy-muted); padding-bottom: 1rem; }

/* =============================================================
   7. Effects
   ============================================================= */
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (max-width: 959px) {
  .nav-links { position: fixed; inset: 64px 0 0 0; background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 1.5rem; gap: 0.25rem; transform: translateX(100%); transition: transform 0.3s var(--ease-out); overflow-y: auto; }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { padding-block: 0.75rem; width: 100%; }
  .nav-toggle { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; }
  .nav-toggle svg { width: 22px; height: 22px; }
  .ficha-head { grid-template-columns: 1fr; }
}
@media (min-width: 720px) {
  .hero-inner { padding-block: 4rem 5rem; }
}
@media (min-width: 1280px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; }
}
