/* ============================================================
   AccesoriosEV — main.css
   Base styles, layout, header, hero, footer, cookie banner.
   ============================================================ */

:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-alt: #eeece5;
  --ink: #0b0b0b;
  --ink-soft: #4a4a46;
  --muted: #7a7972;
  --accent: #2a78d6;
  --accent-dark: #1d5aa3;
  --accent-soft: #e7f0fb;
  --green: #1baf7a;
  --green-soft: #e5f6ef;
  --yellow: #eda100;
  --red: #e34948;
  --border: #e3e1d8;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(11, 11, 11, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 11, 11, 0.09);
  --shadow-lg: 0 24px 60px rgba(11, 11, 11, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.25; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--surface-alt); }

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(42, 120, 214, 0.32);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(42, 120, 214, 0.4); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.btn-amazon {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px rgba(27, 175, 122, 0.3);
}
.btn-amazon:hover { background: #159264; transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(248, 247, 244, 0.86);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: rgba(248, 247, 244, 0.98); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(11, 11, 11, 0.05);
}
.header-inner {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand .logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.brand strong { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-soft);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.main-nav a:hover,
.main-nav a.is-active { background: var(--surface-alt); color: var(--ink); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #0f7a52;
  font-weight: 700;
  font-size: 0.86rem;
  margin-left: 4px;
  transition: transform 0.2s var(--ease);
}
.nav-badge:hover { transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--surface-alt); }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: rotate(45deg) translate(0); top: 0; }
.nav-toggle.is-open span::after { transform: rotate(-45deg); top: 0; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    padding: 20px;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
    border-top: 1px solid var(--border);
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a,
  .main-nav .nav-badge { width: 100%; padding: 16px; font-size: 1.05rem; margin: 0; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 80px;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 520px;
  background: radial-gradient(60% 60% at 30% 20%, rgba(42, 120, 214, 0.16), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(27, 175, 122, 0.14), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 16px; }
.hero-copy p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
}
.hero-stat span { font-size: 0.85rem; color: var(--muted); }

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, #1d5aa3 0%, #2a78d6 45%, #1baf7a 100%);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-end;
  padding: 26px;
  overflow: hidden;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 120px at 20% 15%, rgba(255,255,255,0.35), transparent 60%);
}
.hero-visual .plug-icon {
  width: 56%;
  max-width: 220px;
  opacity: 0.92;
  position: relative;
  z-index: 1;
  margin-inline: auto;
}
.hero-card {
  position: relative;
  z-index: 1;
  background: rgba(11, 11, 11, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-card strong { font-size: 1.4rem; }
.hero-card span { font-size: 0.78rem; opacity: 0.85; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/10; }
}

/* ---------- Categories ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.category-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-icon svg { width: 24px; height: 24px; }
.category-card h3 { margin-bottom: 4px; }
.category-card p { font-size: 0.92rem; margin-bottom: 0; }
.category-card .arrow {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .categories-grid { grid-template-columns: 1fr; }
}

/* ---------- Featured articles grid ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .articles-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .articles-grid { grid-template-columns: 1fr; } }

/* ---------- Trust section ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trust-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  border: 1px solid var(--border);
}
.trust-item .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d8d8d4;
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand strong { color: var(--accent); }
.footer-top p { color: #a9a9a3; font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col a {
  display: block;
  padding: 6px 0;
  color: #b9b9b3;
  font-size: 0.94rem;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #8c8c86;
}
.affiliate-notice {
  background: rgba(42, 120, 214, 0.14);
  border: 1px solid rgba(42, 120, 214, 0.28);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.88rem;
  color: #cfe0f5;
  margin: 28px 0;
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  max-width: 560px;
  margin-inline: auto;
  background: var(--ink);
  color: #f1f1ee;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  transition: transform 0.4s var(--ease);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p { color: #cfcfc9; font-size: 0.88rem; margin-bottom: 16px; }
.cookie-banner p a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }
