/* =========================================================
   MY RED FLAG DETECTIVE — DESIGN SYSTEM
   Tono: investigación lúdica con calma zen
   Mobile-first, paleta tierra, tipografía con aire
   ========================================================= */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Paleta */
  --sage: #A3B18A;
  --sage-light: #CCD5AE;
  --cream: #F5EFE6;
  --cream-deep: #EBE4D5;
  --espresso: #3E2A20;
  --camello: #9B7B5B;
  --mostaza: #D4A72C;
  --terracota: #B55A30;

  /* Derivados */
  --espresso-soft: rgba(62, 42, 32, 0.08);
  --espresso-medium: rgba(62, 42, 32, 0.16);
  --shadow-soft: 0 4px 20px rgba(62, 42, 32, 0.08);
  --shadow-medium: 0 10px 40px rgba(62, 42, 32, 0.12);
  --shadow-card: 0 2px 12px rgba(62, 42, 32, 0.06);

  /* Tipografía */
  --font-display: 'Space Grotesk', 'Archivo', -apple-system, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radios */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Espaciado */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Transiciones */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t: 250ms var(--ease);
  --t-slow: 400ms var(--ease);

  /* Layout */
  --max-w: 1200px;
  --max-w-readable: 680px;
}

/* ---------- BASE ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--espresso);
  background: var(--cream);
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  /* Safe area para dispositivos con notch inferior */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

main {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

h1, h2, h3, h4, p, li, span, a, button, summary, div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--espresso);
}

h1 { font-size: clamp(40px, 8vw, 64px); line-height: 1.05; }
h2 { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; font-weight: 600; }
h3 { font-size: clamp(24px, 4vw, 32px); line-height: 1.2; font-weight: 500; }
h4 { font-size: clamp(18px, 3vw, 22px); line-height: 1.3; font-weight: 600; }

p { font-size: 16px; line-height: 1.6; }
@media (min-width: 768px) { p { font-size: 18px; } }

.small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--camello); }

/* ---------- FOCUS ---------- */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  /* 16px dinámico: mismo padding en todos los teléfonos y navegadores.
     max() asegura que si el dispositivo tiene notch/safe-area más grande,
     se respete en lugar de cortar contenido. */
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
/* A partir de tablet/desktop sí aumentamos un poco para aprovechar el ancho */
@media (min-width: 768px) {
  .container {
    padding-left: max(var(--sp-6), env(safe-area-inset-left));
    padding-right: max(var(--sp-6), env(safe-area-inset-right));
  }
}
@media (min-width: 1000px) {
  .container {
    padding-left: max(var(--sp-7), env(safe-area-inset-left));
    padding-right: max(var(--sp-7), env(safe-area-inset-right));
  }
}
.container--narrow { max-width: var(--max-w-readable); }

/* ---------- HEADER ---------- */
.site-header {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--espresso-soft);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--espresso);
  transition: opacity var(--t);
}
.logo:hover { opacity: 0.8; }
.logo__flag { width: 32px; height: 32px; flex-shrink: 0; }
.logo__text { white-space: nowrap; }
@media (max-width: 480px) {
  .logo__text { font-size: 16px; }
  .logo__flag { width: 28px; height: 28px; }
}

.site-header__tagline {
  display: none;
  font-size: 14px;
  color: var(--camello);
}
@media (min-width: 900px) { .site-header__tagline { display: block; } }

/* ---------- LANGUAGE TOGGLE ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  min-height: 36px;
  background: transparent;
  color: var(--espresso);
  border: 1.5px solid var(--espresso-soft);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  flex-shrink: 0;
  margin-left: auto;
}
.lang-toggle:hover {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
}
.lang-toggle svg { opacity: 0.75; }
.lang-toggle:hover svg { opacity: 1; }
.lang-toggle__label { font-weight: 700; }
@media (min-width: 900px) {
  .site-header__tagline + .lang-toggle { margin-left: var(--sp-3); }
}

/* ---------- HERO ---------- */
.hero {
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-5);
  text-align: center;
}
@media (min-width: 768px) { .hero { padding-top: var(--sp-7); padding-bottom: var(--sp-6); } }

.hero__detective {
  width: 96px;
  height: auto;
  margin: 0 auto var(--sp-4);
  display: block;
  filter: drop-shadow(0 6px 18px rgba(62, 42, 32, 0.12));
}
@media (min-width: 768px) {
  .hero__detective { width: 120px; }
}

.hero__title {
  max-width: 18ch;
  margin: 0 auto var(--sp-4);
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.1;
  padding: 0 var(--sp-2);
}
.hero__subtitle {
  font-size: 16px;
  color: var(--camello);
  max-width: 42ch;
  margin: 0 auto;
  padding: 0 var(--sp-2);
  line-height: 1.5;
}
@media (min-width: 768px) { .hero__subtitle { font-size: 18px; } }

/* ---------- GRID DE SOSPECHAS ---------- */
.suspicion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  padding: var(--sp-5) 0 var(--sp-8);
}
@media (min-width: 640px) {
  .suspicion-grid { gap: var(--sp-4); }
}
@media (min-width: 1000px) {
  .suspicion-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
}

.s-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t);
  border: 1px solid transparent;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) {
  .s-card { padding: var(--sp-5); min-height: 160px; gap: var(--sp-4); border-radius: var(--r-lg); }
}
.s-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, var(--sage-light) 100%);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.s-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
  border-color: var(--sage-light);
}
.s-card:hover::before { opacity: 0.25; }
.s-card:hover .s-card__icon { transform: rotate(-6deg); }
.s-card__icon {
  width: 36px;
  height: 36px;
  color: var(--espresso);
  transition: transform var(--t);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .s-card__icon { width: 44px; height: 44px; }
}
.s-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) { .s-card__title { font-size: 16px; line-height: 1.3; } }
@media (min-width: 1000px) { .s-card__title { font-size: 17px; } }
.s-card__cta {
  margin-top: auto;
  font-size: 13px;
  color: var(--sage);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.s-card__cta::after { content: '→'; transition: transform var(--t); }
.s-card:hover .s-card__cta::after { transform: translateX(4px); }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  border: 2px solid transparent;
  text-align: center;
  min-height: 48px;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--sage);
  color: var(--cream);
}
.btn--primary:hover { background: #92a07a; box-shadow: var(--shadow-soft); }
.btn--secondary {
  background: transparent;
  color: var(--espresso);
  border-color: var(--espresso);
}
.btn--secondary:hover { background: var(--espresso); color: var(--cream); }
.btn--ghost {
  background: transparent;
  color: var(--camello);
}
.btn--ghost:hover { color: var(--espresso); }
.btn--large {
  padding: 18px 32px;
  font-size: 18px;
  min-height: 56px;
}
.btn--block { width: 100%; }

/* ---------- PROGRESS BAR ---------- */
.progress {
  width: 100%;
  height: 6px;
  background: var(--espresso-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: var(--sp-7);
}
.progress__fill {
  height: 100%;
  background: var(--sage);
  border-radius: var(--r-pill);
  width: 0%;
  transition: width var(--t-slow);
}

/* ---------- QUIZ ---------- */
/* Solo padding vertical — el horizontal lo aporta .container (16px) */
.quiz {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-9);
  min-height: 60vh;
}
@media (min-width: 768px) {
  .quiz { padding-top: var(--sp-7); }
}
.quiz__header {
  margin-bottom: var(--sp-6);
}
.quiz__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
}
.quiz__title {
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.25;
  max-width: 22ch;
}
.question {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity var(--t-slow), transform var(--t-slow);
  display: none;
}
.question.is-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}
.question__number {
  font-size: 14px;
  font-weight: 600;
  color: var(--camello);
  margin-bottom: var(--sp-3);
}
.question__text {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: var(--sp-5);
  min-height: 2.5em;
  padding: 0 var(--sp-1);
}
@media (min-width: 640px) {
  .question__text { margin-bottom: var(--sp-6); min-height: 3em; padding: 0; }
}
.question__answers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-3);
  max-width: 520px;
}
@media (min-width: 480px) {
  .question__answers { gap: var(--sp-4); }
}
.answer-btn {
  padding: var(--sp-5) var(--sp-3);
  background: #fff;
  border-radius: var(--r-lg);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--espresso);
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
  transition: background var(--t), transform var(--t), border-color var(--t), color var(--t);
  min-height: 72px;
  word-break: break-word;
}
@media (min-width: 480px) {
  .answer-btn { padding: var(--sp-6) var(--sp-4); font-size: 19px; min-height: 80px; }
}
@media (min-width: 768px) {
  .answer-btn { font-size: 20px; }
}
.answer-btn:hover {
  border-color: var(--sage-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.answer-btn.is-selected {
  background: var(--sage);
  color: var(--cream);
  border-color: var(--sage);
}

/* ---------- ANALYZING / LOADING ---------- */
.analyzing {
  display: none;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-5);
  text-align: center;
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}
.analyzing.is-active { display: flex; }
.analyzing__visual {
  width: 160px;
  height: 160px;
  position: relative;
}
.analyzing__magnifier {
  width: 100%;
  height: 100%;
  animation: scanCircle 2.4s var(--ease) infinite;
  color: var(--espresso);
}
@keyframes scanCircle {
  0%   { transform: translate(-12%, -12%) rotate(-6deg); }
  25%  { transform: translate(12%, -8%) rotate(4deg); }
  50%  { transform: translate(8%, 10%) rotate(-3deg); }
  75%  { transform: translate(-8%, 8%) rotate(6deg); }
  100% { transform: translate(-12%, -12%) rotate(-6deg); }
}
.analyzing__scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mostaza), transparent);
  top: 50%;
  animation: scanVertical 2s linear infinite;
  opacity: 0.8;
}
@keyframes scanVertical {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}
.analyzing__text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--espresso);
  min-height: 1.4em;
  animation: fadeTextIn 300ms var(--ease);
}
@keyframes fadeTextIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- RESULT ---------- */
/* Solo padding vertical — el horizontal lo aporta .container (16px) */
.result {
  display: none;
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-9);
  animation: fadeUp 500ms var(--ease);
}
@media (min-width: 768px) {
  .result { padding-top: var(--sp-7); }
}
.result.is-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.result__header {
  text-align: center;
  margin-bottom: var(--sp-7);
}
.result__range-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-3);
}
.result__percentage {
  font-family: var(--font-display);
  font-size: clamp(84px, 22vw, 160px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--espresso);
  margin-bottom: var(--sp-3);
  padding: 0 var(--sp-2);
  overflow: visible;
}
.result__percentage--high { color: var(--terracota); }
.result__percentage--mid { color: var(--mostaza); }
.result__suspicion {
  font-size: 16px;
  color: var(--camello);
  margin-bottom: var(--sp-5);
}
.result__verdict {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  max-width: 26ch;
  margin: 0 auto var(--sp-6);
  padding: 0 var(--sp-2);
}
@media (min-width: 768px) {
  .result__verdict { max-width: 22ch; margin-bottom: var(--sp-7); padding: 0; }
}
.result__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 400px;
  margin: 0 auto var(--sp-7);
}
@media (min-width: 600px) {
  .result__actions { flex-direction: row; }
  .result__actions .btn { flex: 1; }
}

/* ---------- VEREDICTOS RÁPIDOS ---------- */
.verdicts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-3);
  max-width: 680px;
  margin: 0 auto var(--sp-8);
  padding: var(--sp-4);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
@media (min-width: 480px) {
  .verdicts { padding: var(--sp-5); }
}
@media (min-width: 640px) {
  .verdicts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-6); }
}
.verdict {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--espresso-soft);
}
@media (min-width: 640px) {
  .verdict { border-bottom: none; padding: 0; }
  .verdict:nth-child(1), .verdict:nth-child(2) { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--espresso-soft); }
}
.verdict__q {
  font-size: 13px;
  color: var(--camello);
  font-weight: 500;
}
.verdict__a {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--espresso);
}

/* ---------- SEO CONTENT (embedded) ---------- */
.seo-content {
  max-width: var(--max-w-readable);
  margin: 0 auto;
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}
.seo-content h2 { margin: var(--sp-7) 0 var(--sp-4); }
.seo-content h3 { margin: var(--sp-6) 0 var(--sp-3); }
.seo-content p { margin-bottom: var(--sp-4); color: var(--espresso); }
.seo-content ul { margin: var(--sp-4) 0; padding-left: var(--sp-5); }
.seo-content ul li {
  margin-bottom: var(--sp-3);
  padding-left: var(--sp-3);
  position: relative;
  line-height: 1.6;
}
.seo-content ul li::before {
  content: '•';
  color: var(--sage);
  font-weight: bold;
  position: absolute;
  left: -8px;
}
.seo-content a {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t);
}
.seo-content a:hover { color: var(--espresso); }

/* ---------- SEO SECTION (collapsible) ---------- */
/* Cada sección SEO va envuelta por JS en <details class="seo-section">
   para que en móvil el porcentaje se vea sin tener que hacer scroll largo. */
.seo-section {
  border-top: 1px solid var(--espresso-soft);
  margin: 0;
  padding: var(--sp-3) 0;
}
.seo-section[open] {
  padding-bottom: var(--sp-4);
}
.seo-section__summary {
  cursor: pointer;
  list-style: none;
  font-family: "Space Grotesk", "Archivo", sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--espresso);
  padding: var(--sp-3) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  transition: color var(--t);
}
.seo-section__summary::-webkit-details-marker { display: none; }
.seo-section__summary::after {
  content: '+';
  font-family: "Space Grotesk", "Archivo", sans-serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--sage);
  transition: transform var(--t);
  flex: none;
  line-height: 1;
}
.seo-section[open] > .seo-section__summary::after {
  content: '−';
}
.seo-section__summary:hover { color: var(--terracota); }
.seo-section > p,
.seo-section > ul,
.seo-section > details {
  margin-top: var(--sp-3);
}

/* ---------- ARTICLE ---------- */
.article {
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-9);
}
.article__meta {
  font-size: 13px;
  color: var(--camello);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.article__title {
  max-width: 22ch;
  margin-bottom: var(--sp-6);
}
.article__body { max-width: var(--max-w-readable); }
.article__body p { margin-bottom: var(--sp-4); }
.article__body h2 { margin: var(--sp-7) 0 var(--sp-4); }
.article__body h3 { margin: var(--sp-6) 0 var(--sp-3); }
.article__body ul { margin: var(--sp-4) 0 var(--sp-4) var(--sp-5); }
.article__body li { margin-bottom: var(--sp-2); }

/* ---------- BLOG HUB ---------- */
.blog-hub {
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-9);
}
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
@media (min-width: 768px) { .blog-list { grid-template-columns: 1fr 1fr; } }
.blog-card {
  padding: var(--sp-5);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-medium); }
.blog-card__cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.blog-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}
.blog-card__excerpt { font-size: 15px; color: var(--camello); }

/* ---------- FOOTER ---------- */
.site-footer {
  padding: var(--sp-7) 0 var(--sp-5);
  border-top: 1px solid var(--espresso-soft);
  background: var(--cream-deep);
  margin-top: var(--sp-8);
}
.site-footer__disclaimer {
  max-width: 60ch;
  font-size: 14px;
  color: var(--camello);
  line-height: 1.5;
  margin-bottom: var(--sp-5);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  font-size: 14px;
}
.site-footer__links a {
  color: var(--espresso);
  transition: color var(--t);
}
.site-footer__links a:hover { color: var(--sage); }
.site-footer__copy {
  font-size: 13px;
  color: var(--camello);
}

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
  position: fixed;
  bottom: var(--sp-4);
  left: var(--sp-4);
  right: var(--sp-4);
  background: var(--espresso);
  color: var(--cream);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-medium);
  display: none;
  flex-direction: column;
  gap: var(--sp-3);
  z-index: 100;
  max-width: 520px;
  margin: 0 auto;
  animation: slideUp 400ms var(--ease);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner.is-visible { display: flex; }
@media (min-width: 600px) {
  .cookie-banner { flex-direction: row; align-items: center; }
}
.cookie-banner__text { font-size: 14px; line-height: 1.5; flex: 1; }
.cookie-banner__text a { color: var(--sage-light); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }
.cookie-banner .btn {
  padding: 8px 16px;
  min-height: 40px;
  font-size: 14px;
}
.cookie-banner .btn--primary { background: var(--sage); color: var(--espresso); }
.cookie-banner .btn--secondary {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}
.cookie-banner .btn--secondary:hover { background: var(--cream); color: var(--espresso); }

/* ---------- ADSENSE SLOTS ---------- */
.ad-slot {
  margin: var(--sp-6) auto;
  text-align: center;
  min-height: 90px;
  max-width: 728px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.ad-slot--placeholder {
  background: var(--cream-deep);
  border: 1px dashed var(--espresso-medium);
  border-radius: var(--r-md);
  color: var(--camello);
  font-size: 13px;
  padding: var(--sp-5);
}

/* ---------- FAQ ACCORDION ---------- */
.faq-item {
  border-bottom: 1px solid var(--espresso-soft);
  padding: var(--sp-4) 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--camello);
  transition: transform var(--t);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: var(--sp-3); color: var(--camello); }

/* ---------- CTA BOX ---------- */
.cta-box {
  background: var(--sage-light);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  text-align: center;
  margin: var(--sp-7) 0;
}
.cta-box h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: var(--sp-3);
}
.cta-box p { margin-bottom: var(--sp-4); font-size: 15px; }
/* Botón dentro del CTA box: texto oscuro sobre verde para máxima legibilidad */
.cta-box .btn--primary {
  background: var(--sage);
  color: var(--espresso);
  font-weight: 700;
}
.cta-box .btn--primary:hover {
  background: #92a07a;
  color: var(--espresso);
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- CONFETTI ---------- */
.confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

/* ---------- DETECTIVE MASCOT (inline SVG container) ---------- */
.detective {
  width: 120px;
  height: auto;
  margin: 0 auto var(--sp-4);
}
.detective--large { width: 200px; }

/* ---------- HERO DETECTIVE VARIANT ---------- */
.hero__detective {
  width: 180px;
  margin: 0 auto var(--sp-5);
}

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* ---------- 404 ---------- */
.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-4);
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}

/* ---------- LEGAL PAGES ---------- */
.legal {
  max-width: var(--max-w-readable);
  margin: 0 auto;
  /* Solo padding vertical — el horizontal lo aporta .container (16px) */
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-9);
}
.legal h1 { margin-bottom: var(--sp-3); }
.legal__updated {
  font-size: 13px;
  color: var(--camello);
  font-style: italic;
  margin-bottom: var(--sp-6);
}
.legal h2 {
  font-size: 22px;
  margin: var(--sp-6) 0 var(--sp-3);
}
.legal p, .legal ul { margin-bottom: var(--sp-4); font-size: 16px; }
.legal ul { padding-left: var(--sp-5); }
.legal ul li { margin-bottom: var(--sp-2); }
.legal a { color: var(--sage); text-decoration: underline; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
