/* ==========================================================================
   PERRITOS FELICES (www.perritosfelices.com) — "LADRIDOS QUE INSPIRAN"
   Dirección de Arte: Editorial Swiss Grid + Neo-Brutalismo Cálido de Estudio
   Hardening & Optimización: Core Web Vitals (LCP/CLS/INP) + WCAG 2.2 AA
   ========================================================================== */

:root {
  /* Colores Oficiales del Logo Perritos Felices */
  --logo-blue: #2241C8;          /* rgb(34, 65, 200) */
  --logo-blue-dark: #162C96;
  --logo-blue-deep: #0D1747;
  --logo-blue-light: #E6ECFF;
  --logo-blue-soft: #F0F4FF;

  --logo-yellow: #FFBE58;        /* rgb(255, 190, 88) */
  --logo-yellow-dark: #E89D24;
  --logo-yellow-light: #FFF1D6;
  --logo-yellow-pale: #FAF5EA;

  /* Superficies Papel Algodón & Estudio */
  --bg-cream: #F6F4EE;
  --bg-sand: #ECE8DF;
  --bg-sand-deep: #DFD9CC;
  --surface-white: #FFFFFF;
  --surface-dark: #10152B;

  /* Tinta & Textos */
  --ink-primary: #10152B;
  --ink-secondary: #3D4463;
  --ink-muted: #6C7391;

  /* Variables semánticas de compatibilidad */
  --brand-orange: var(--logo-blue);
  --brand-orange-dark: var(--logo-blue-dark);
  --brand-orange-light: var(--logo-blue-light);
  --brand-yellow: var(--logo-yellow);
  --brand-yellow-light: var(--logo-yellow-light);
  --brand-brown: var(--ink-primary);
  --brand-brown-mid: var(--ink-secondary);
  --brand-brown-muted: var(--ink-muted);

  --brand-sage: #007A56;
  --brand-sage-light: #DFF5ED;
  --brand-coral: #D9381E;

  /* Líneas de Construcción y Bordes */
  --grid-line: rgba(16, 21, 43, 0.14);
  --border-strong: #10152B;
  --border-warm: rgba(16, 21, 43, 0.16);
  --border-subtle: rgba(16, 21, 43, 0.1);
  --border-gold: #E8A63A;

  /* Sombras Táctiles / Studio */
  --shadow-sm: 0 2px 0 rgba(16, 21, 43, 0.08);
  --shadow-md: 5px 5px 0 #10152B;
  --shadow-lg: 8px 8px 0 #10152B;
  --shadow-blue: 5px 5px 0 #10152B;
  --shadow-yellow: 5px 5px 0 #2241C8;

  /* Radios Refinados */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Sistema Tipográfico de 3 Familias */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Curvas Expresivas y Física de Resortes (web-mobile-motion-graphics) */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-tactile: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-snappy: linear(
    0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017,
    1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%,
    1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%,
    0.997 69.8%, 1.003 76.9%, 1
  );
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--ink-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Textura Analógica de Grano Fractal en CSS Puro */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease-out-expo);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* Contenedores con Líneas de Construcción Sutiles */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Sistema Tipográfico Editorial y Monospace
   ========================================================================== */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--ink-primary);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding-right: 0.08em;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-variant-numeric: tabular-nums;
}

/* Indicador tipo LED (Hardware / Studio) */
.led-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--logo-blue);
  box-shadow: 0 0 0 2px rgba(34, 65, 200, 0.2);
  flex-shrink: 0;
}

.led-dot.led-gold {
  background-color: var(--logo-yellow-dark);
  box-shadow: 0 0 0 2px rgba(255, 190, 88, 0.35);
}

.led-dot.led-green {
  background-color: var(--brand-sage);
  box-shadow: 0 0 0 2px rgba(0, 122, 86, 0.25);
}

/* Etiqueta de Sección Editorial */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--surface-white);
  color: var(--ink-primary);
  border: 1.5px solid var(--border-strong);
  box-shadow: 3px 3px 0 var(--logo-yellow);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-xs);
  margin-bottom: 1.15rem;
}

/* Cabecera de Sección Asimétrica con Numeración Gigante */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 820px;
  margin: 0 0 3.25rem 0;
  position: relative;
}

.section-header-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 3.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1.5px solid var(--grid-line);
}

.section-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--logo-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.section-index::before {
  content: "";
  width: 24px;
  height: 2px;
  background-color: var(--logo-blue);
}

.section-title {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}

.section-subtitle {
  color: var(--ink-secondary);
  font-size: 1.12rem;
  max-width: 620px;
}

/* Cruces de Registro en Esquinas (+) */
.reg-cross {
  position: relative;
}

.reg-cross::after {
  content: "+";
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-muted);
  opacity: 0.5;
  pointer-events: none;
}

/* ==========================================================================
   Botones con Intención Táctil y Barrido Magnético
   ========================================================================== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 0.9rem 1.65rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  transition: transform 0.25s var(--ease-tactile), box-shadow 0.25s var(--ease-tactile), background-color 0.25s var(--ease-out-expo), color 0.25s var(--ease-out-expo);
  white-space: nowrap;
  z-index: 1;
}

.btn .arrow-diag {
  display: inline-block;
  font-family: var(--font-mono);
  transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover .arrow-diag {
  transform: translate(3px, -3px);
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn:active {
  transform: translate(1px, 1px);
}

.btn-primary {
  background-color: var(--logo-blue);
  color: #FFFFFF;
  box-shadow: 4px 4px 0 var(--border-strong);
}

.btn-primary:hover {
  background-color: var(--logo-blue-dark);
  color: #FFFFFF;
  box-shadow: 6px 6px 0 var(--logo-yellow);
}

.btn-secondary {
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
  box-shadow: 4px 4px 0 var(--border-strong);
}

.btn-secondary:hover {
  background-color: #FFD07B;
  color: var(--ink-primary);
  box-shadow: 6px 6px 0 var(--logo-blue);
}

.btn-outline {
  background-color: var(--surface-white);
  color: var(--ink-primary);
  border: 1.5px solid var(--border-strong);
  box-shadow: 3px 3px 0 rgba(16, 21, 43, 0.14);
}

.btn-outline:hover {
  background-color: var(--logo-yellow-light);
  border-color: var(--border-strong);
  box-shadow: 4px 4px 0 var(--logo-blue);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   Barra de Progreso de Lectura (Artículos)
   ========================================================================== */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(16, 21, 43, 0.08);
  z-index: 1100;
}

.reading-progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--logo-blue), var(--logo-yellow));
  transition: transform 0.1s linear;
}

@supports (animation-timeline: scroll()) {
  .reading-progress-bar {
    animation: scroll-progress-fill linear both;
    animation-timeline: scroll(root);
  }
  @keyframes scroll-progress-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* ==========================================================================
   Topbar Técnica & Header Editorial
   ========================================================================== */
.topbar {
  background-color: var(--ink-primary);
  color: var(--bg-cream);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar strong {
  color: var(--logo-yellow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(246, 244, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--border-strong);
  transition: box-shadow 0.25s var(--ease-out-expo);
}

.site-header.scrolled {
  box-shadow: 0 6px 24px rgba(16, 21, 43, 0.08);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  color: var(--logo-blue);
}

.brand-logo-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--logo-yellow);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  box-shadow: 3px 3px 0 var(--border-strong);
  transition: transform 0.35s var(--ease-bounce);
  flex-shrink: 0;
}

.brand-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo:hover .brand-logo-icon {
  transform: rotate(-8deg) scale(1.06);
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.02;
}

.brand-logo-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--logo-blue);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.brand-logo-slogan {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--surface-white);
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-xs);
  transition: all 0.2s var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
  color: var(--surface-white);
  background-color: var(--logo-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  background-color: var(--logo-yellow);
  border: 1.5px solid var(--border-strong);
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  font-weight: 700;
}

/* ==========================================================================
   Hero Section Editorial Asimétrico (Index)
   ========================================================================== */
.hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  border-bottom: 1.5px solid var(--border-strong);
  background-image:
    linear-gradient(to right, rgba(16, 21, 43, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 21, 43, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.32fr 0.68fr;
  align-items: stretch;
  gap: 3rem;
}

.hero-editorial-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-coords {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.75rem, 5.6vw, 5.1rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  color: var(--ink-primary);
}

.hero-title .highlight {
  color: var(--logo-blue);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  background: linear-gradient(180deg, transparent 62%, var(--logo-yellow) 62%);
  padding: 0 0.12em;
}

.hero-description {
  font-size: 1.18rem;
  color: var(--ink-secondary);
  margin-bottom: 2.25rem;
  max-width: 600px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Métricas Tabulares de Estudio */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1.5px solid var(--border-strong);
  border-left: 1.5px solid var(--border-strong);
  background-color: var(--surface-white);
  box-shadow: 4px 4px 0 var(--border-strong);
}

.stat-item {
  padding: 1.15rem 1.25rem;
  border-right: 1.5px solid var(--border-strong);
  border-bottom: 1.5px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--logo-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.3;
}

/* Tarjeta Poster del Emblema Oficial en el Hero */
.hero-visual {
  position: relative;
  display: flex;
}

.hero-illustration-card {
  width: 100%;
  background-color: var(--surface-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--logo-blue);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--grid-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-brand-showcase {
  max-width: 320px;
  width: 100%;
  margin: 1.5rem auto;
  transition: transform 0.45s var(--ease-bounce);
}

.hero-illustration-card:hover .hero-brand-showcase {
  transform: scale(1.04) rotate(-2deg);
}

.poster-footer {
  padding-top: 1rem;
  border-top: 1px dashed var(--grid-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

/* Cinta Editorial (Ticker) */
.editorial-ticker {
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
  border-bottom: 1.5px solid var(--border-strong);
  padding: 0.75rem 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  justify-content: center;
  flex-wrap: wrap;
}

.ticker-sep {
  color: var(--logo-blue);
}

/* ==========================================================================
   Mosaico de Servicios / Bento Grid con Jerarquía Real (Regla 3)
   ========================================================================== */
.services-section {
  padding: 5.5rem 0;
  background-color: var(--bg-sand);
  border-bottom: 1.5px solid var(--border-strong);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-md);
  padding: 2.15rem;
  border: 1.5px solid var(--border-strong);
  box-shadow: 5px 5px 0 var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s var(--ease-tactile), box-shadow 0.3s var(--ease-tactile);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--logo-blue);
}

.bento-col-7 { grid-column: span 7; }
.bento-col-5 { grid-column: span 5; }
.bento-col-4 { grid-column: span 4; }

.bento-card.accent-blue {
  background-color: var(--logo-blue);
  color: #FFFFFF;
}

.bento-card.accent-blue h3,
.bento-card.accent-blue p,
.bento-card.accent-blue .bento-link {
  color: #FFFFFF;
}

.bento-card.accent-yellow {
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
}

.bento-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bento-svg-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-strong);
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  box-shadow: 3px 3px 0 var(--border-strong);
}

.bento-card h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-bottom: 0.75rem;
}

.bento-card p {
  color: var(--ink-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--logo-blue);
  padding-top: 1rem;
  border-top: 1px solid var(--grid-line);
}

.bento-link .arrow-diag {
  transition: transform 0.25s var(--ease-out-expo);
}

.bento-card:hover .bento-link .arrow-diag {
  transform: translate(4px, -4px);
}

/* Barra técnica nutricional en Bento */
.macro-bar {
  display: grid;
  grid-template-columns: 6fr 2.5fr 1.5fr;
  height: 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0 0.5rem;
}

.macro-seg-1 { background-color: var(--logo-blue); }
.macro-seg-2 { background-color: var(--logo-yellow); }
.macro-seg-3 { background-color: var(--brand-sage); }

/* ==========================================================================
   Tarjetas del Directorio Canino (Estilo Ficha Técnica Verificada)
   ========================================================================== */
.directory-preview-section {
  padding: 5.5rem 0;
  border-bottom: 1.5px solid var(--border-strong);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

.business-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  padding: 1.75rem;
  box-shadow: 5px 5px 0 var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s var(--ease-tactile), box-shadow 0.25s var(--ease-tactile);
  position: relative;
}

.business-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--logo-yellow);
}

.business-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--grid-line);
}

.business-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--logo-blue);
  background-color: var(--logo-blue-soft);
  border: 1px solid var(--logo-blue);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.business-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.68rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-strong);
}

.badge-verified {
  background-color: var(--brand-sage-light);
  color: var(--brand-sage);
  border-color: var(--brand-sage);
}

.badge-category {
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
}

.badge-city {
  background-color: var(--bg-cream);
  color: var(--ink-secondary);
  border-color: var(--grid-line);
}

.business-title {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.business-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.rating-pill {
  background-color: var(--ink-primary);
  color: var(--logo-yellow);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.business-desc {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
}

.business-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-secondary);
  padding: 0.9rem 0;
  border-top: 1px dashed var(--grid-line);
  border-bottom: 1px dashed var(--grid-line);
  margin-bottom: 1.15rem;
}

.business-meta span {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.meta-key {
  color: var(--logo-blue);
  font-weight: 700;
  min-width: 42px;
}

.business-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ==========================================================================
   Tarjetas de Artículos / Blog (Diseño Editorial con Arte SVG Geométrico)
   ========================================================================== */
.articles-section {
  padding: 5.5rem 0;
  background-color: var(--bg-sand);
  border-bottom: 1.5px solid var(--border-strong);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.85rem;
}

.article-card {
  background-color: var(--surface-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: 5px 5px 0 var(--border-strong);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-tactile), box-shadow 0.3s var(--ease-tactile);
}

.article-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--logo-blue);
}

.article-thumb {
  height: 195px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-bottom: 1.5px solid var(--border-strong);
}

.article-thumb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.article-doc-id {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-primary);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}

.article-svg-art {
  position: absolute;
  right: -10px;
  bottom: -14px;
  width: 140px;
  height: 140px;
  opacity: 0.9;
  transition: transform 0.4s var(--ease-out-expo);
}

.article-card:hover .article-svg-art {
  transform: scale(1.08) rotate(-4deg);
}

.article-body {
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.article-title {
  font-size: 1.32rem;
  margin-bottom: 0.75rem;
  line-height: 1.22;
}

.article-card:hover .article-title {
  color: var(--logo-blue);
}

.article-excerpt {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

.article-readmore {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 0.9rem;
  border-top: 1px solid var(--grid-line);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-primary);
  font-size: 0.78rem;
}

.article-card:hover .article-readmore {
  color: var(--logo-blue);
}

/* ==========================================================================
   CTA Final de Alto Impacto
   ========================================================================== */
.cta-banner-section {
  padding: 5.5rem 0;
}

.cta-banner {
  background-color: var(--logo-blue);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: 10px 10px 0 var(--logo-yellow);
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 2.5rem;
}

.cta-banner h2 {
  color: #FFFFFF;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Página Blog (blog.html)
   ========================================================================== */
.page-hero {
  padding: 3.75rem 0 3rem;
  background-color: var(--bg-sand);
  border-bottom: 1.5px solid var(--border-strong);
  background-image:
    linear-gradient(to right, rgba(16, 21, 43, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 21, 43, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
  padding: 1.25rem;
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--border-strong);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.category-pill {
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--bg-cream);
  color: var(--ink-secondary);
  border: 1px solid var(--border-strong);
  transition: all 0.2s var(--ease-out-expo);
}

.category-pill:hover,
.category-pill.active {
  background-color: var(--logo-blue);
  color: #FFFFFF;
  border-color: var(--border-strong);
  box-shadow: 2px 2px 0 var(--logo-yellow);
}

.search-input-wrap {
  position: relative;
  min-width: 270px;
}

.search-input {
  width: 100%;
  background-color: var(--bg-cream);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 0.6rem 1rem 0.6rem 2.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  transition: border-color 0.2s, background-color 0.2s;
}

.search-input:focus {
  outline: none;
  background-color: var(--surface-white);
  border-color: var(--logo-blue);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  pointer-events: none;
}

/* Artículo Destacado */
.featured-post {
  background-color: var(--surface-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.25rem;
  align-items: center;
  box-shadow: 7px 7px 0 var(--logo-yellow);
}

.featured-post-visual {
  height: 100%;
  min-height: 260px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: linear-gradient(135deg, var(--logo-yellow) 0%, #FFE2AD 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--ink-primary);
}

/* Layout Blog con Sidebar */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 5rem;
}

.blog-sidebar {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-widget {
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 4px 4px 0 var(--border-strong);
}

.newsletter-widget {
  background-color: var(--logo-yellow-light);
}

.sidebar-widget h3 {
  font-size: 1.3rem;
  margin-bottom: 0.65rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 0.75rem 0.95rem;
  font-size: 0.92rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--logo-blue);
  box-shadow: 3px 3px 0 var(--logo-yellow);
}

/* ==========================================================================
   Página Directorio (directorio.html)
   ========================================================================== */
.directory-controls {
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 5px 5px 0 var(--border-strong);
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.filter-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--logo-blue);
  margin-bottom: 0.4rem;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Páginas de Artículo Individual (10 Guías)
   ========================================================================== */
.article-header {
  padding: 3.5rem 0 2.5rem;
  background-color: var(--bg-sand);
  border-bottom: 1.5px solid var(--border-strong);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--logo-blue);
}

.article-hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.25rem);
  margin-bottom: 1rem;
  max-width: 860px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 1.25rem;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--logo-yellow);
  border: 1.5px solid var(--border-strong);
  color: var(--ink-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.article-page-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 5rem;
}

.toc-sidebar {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.toc-card {
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 4px 4px 0 var(--border-strong);
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--grid-line);
  color: var(--logo-blue);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toc-link {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: all 0.2s var(--ease-out-expo);
}

.toc-link:hover,
.toc-link.active {
  background-color: var(--logo-yellow-light);
  color: var(--ink-primary);
  border-left-color: var(--logo-blue);
  font-weight: 600;
}

.share-card {
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 4px 4px 0 var(--logo-yellow);
}

.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background-color: var(--bg-cream);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s var(--ease-out-expo);
}

.share-btn:hover {
  background-color: var(--logo-blue);
  color: #FFFFFF;
  transform: translate(-1px, -1px);
}

/* Contenido Editorial del Artículo */
.article-content {
  background-color: var(--surface-white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 3rem;
  box-shadow: 6px 6px 0 var(--border-strong);
}

.article-content h2 {
  font-size: 1.75rem;
  margin: 2.25rem 0 0.9rem;
  padding-top: 0.5rem;
  scroll-margin-top: 110px;
  color: var(--logo-blue);
}

.article-content h2:first-of-type {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.6rem;
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--ink-primary);
  font-size: 1.06rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.25rem;
}

.article-content li {
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 0.5rem;
}

.article-content ul li::marker {
  color: var(--logo-blue);
  content: "■ ";
}

.article-content ol {
  list-style: decimal;
}

.callout-box {
  background-color: var(--logo-yellow-light);
  border: 1.5px solid var(--border-strong);
  border-left: 6px solid var(--logo-blue);
  border-radius: var(--radius-xs);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}

.callout-box.tip-sage {
  background-color: var(--logo-blue-soft);
  border-left-color: var(--logo-blue);
}

.callout-box.alert-orange {
  background-color: var(--logo-yellow-light);
  border-left-color: var(--brand-coral);
}

.callout-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1.5px solid var(--border-strong);
}

.info-table th, .info-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-strong);
}

.info-table th {
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Modal y Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 21, 43, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  z-index: 2000;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  background-color: var(--bg-cream);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-strong);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: 10px 10px 0 var(--logo-yellow);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border-strong);
  background-color: var(--logo-yellow);
  color: var(--ink-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--ink-primary);
  color: #FFFFFF;
  border: 2px solid var(--logo-yellow);
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  box-shadow: 6px 6px 0 var(--logo-blue);
  z-index: 3000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s var(--ease-bounce);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Footer Editorial
   ========================================================================== */
.site-footer {
  background-color: var(--ink-primary);
  color: var(--bg-cream);
  padding: 4.5rem 0 2rem;
  border-top: 3px solid var(--logo-yellow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--logo-yellow);
  font-size: 0.82rem;
  margin-bottom: 1.1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: rgba(246, 244, 238, 0.82);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--logo-yellow);
}

.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: rgba(246, 244, 238, 0.65);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .section-header-split,
  .featured-post,
  .cta-banner,
  .blog-layout,
  .article-page-layout {
    grid-template-columns: 1fr;
  }

  .bento-col-7, .bento-col-5, .bento-col-4 {
    grid-column: span 12;
  }

  .directory-controls {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toc-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    background-color: var(--bg-cream);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-stats,
  .directory-controls,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-content {
    padding: 1.75rem;
  }

  .cta-banner {
    padding: 2.25rem;
  }
}

/* ==========================================================================
   Accesibilidad WCAG 2.2 Nivel AA & Movimiento Reducido
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -120%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background-color: var(--ink-primary);
  color: var(--logo-yellow);
  border: 2px solid var(--logo-yellow);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  box-shadow: 4px 4px 0 var(--logo-blue);
  transition: top 0.2s var(--ease-out-expo);
}

.skip-link:focus {
  top: 1rem;
}

/* Indicador de Foco de Alto Contraste (WCAG 2.2 SC 2.4.11) */
:focus-visible {
  outline: 2.5px solid var(--logo-blue);
  outline-offset: 3px;
}

/* Tamaño mínimo de objetivos interactivos (WCAG 2.2 SC 2.5.8 + Ergonomía 18-65 años) */
button,
[role="button"],
a,
input,
select,
textarea {
  min-height: 24px;
  min-width: 24px;
}

.btn,
.category-pill,
.form-input,
.form-select,
.search-input,
.share-btn {
  min-height: 44px;
}

/* ==========================================================================
   Sistema Cinético 60/120fps (web-mobile-motion-graphics)
   ========================================================================== */

/* 1. Revelado Editorial por Máscara (LCP-Safe & Staggered) */
.kinetic-line-mask {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}

.kinetic-line {
  display: inline-block;
  transform: translate3d(0, 18%, 0);
  animation: line-reveal 0.75s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--line-index, 0) * 70ms);
}

@keyframes line-reveal {
  to {
    transform: translate3d(0, 0, 0);
  }
}

/* 2. Trazado Vectorial SVG con pathLength="1" (Zero-JS Math) */
.svg-draw-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-stroke 1.5s var(--ease-out-expo) 0.15s forwards;
}

@keyframes draw-stroke {
  to {
    stroke-dashoffset: 0;
  }
}

/* 3. Animaciones Vinculadas al Scroll en el Hilo Compositor (view()) */
@supports (animation-timeline: view()) {
  .bento-card,
  .article-card,
  .business-card {
    animation: card-enter linear both;
    animation-timeline: view();
    animation-range: entry 6% cover 24%;
  }

  @keyframes card-enter {
    from {
      opacity: 0.75;
      transform: translate3d(0, 22px, 0) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }
}

/* 4. Separación Desktop (Hover fino) vs. Mobile (Respuesta táctil inmediata) */
@media (hover: hover) and (pointer: fine) {
  .bento-card,
  .article-card,
  .business-card {
    transition: transform 0.38s var(--ease-out-expo), box-shadow 0.38s var(--ease-out-expo);
  }
}

@media (hover: none) and (pointer: coarse) {
  .bento-card,
  .article-card,
  .business-card,
  .btn,
  .category-pill,
  .share-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.14s var(--ease-out-quart);
  }

  .bento-card:hover,
  .article-card:hover,
  .business-card:hover {
    transform: none;
  }

  .bento-card:active,
  .article-card:active,
  .business-card:active,
  .btn:active,
  .category-pill:active,
  .share-btn:active {
    transform: scale(0.975);
  }

  /* Carrusel horizontal nativo para píldoras de categorías en móvil */
  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    touch-action: pan-x;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: 0.4rem;
    max-width: 100%;
    scrollbar-width: none;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .category-pill {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Respeto estricto a usuarios sensibles al movimiento (WCAG 2.3.3) */
@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;
  }

  .kinetic-line {
    transform: none !important;
  }

  .svg-draw-path {
    stroke-dashoffset: 0 !important;
  }
}


