/* ============================================================
   TRIBU ANIMAL — home_v2.css
   Exclusivo de la home: hero, product-grid 4col, value,
   news-featured, community-section.
   Los componentes compartidos (product-card, news-card,
   thread-card, avatar, section-header) están en common_v2.css
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */

/* Keyframes para animaciones de entrada */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero {
  background: var(--c-cream);
  overflow: hidden;
  position: relative;
}

/* Grain texture — pseudo-element sobre el hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 42%;
  gap: var(--space-xl);
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 540px;
  padding: 56px 0 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Animaciones escalonadas — cada elemento entra con delay */
.hero-eyebrow {
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp 0.55s ease forwards;
  animation-delay: 0.05s;
}

.hero-title {
  font-family: var(--f-display);
  font-size: 56px;
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.15s;
}

.hero-title em {
  font-style: italic;
  color: var(--c-moss);
}

.hero-subtitle {
  font-size: 14px;
  line-height: 1.85;
  color: var(--c-ink-mid);
  margin-bottom: var(--space-lg);
  max-width: 420px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.27s;
}

.hero-stats {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 0.38s;
}

.hero-stat {
  flex: 1;
  border-left: 0.5px solid var(--c-cream-border);
  padding: 0 var(--space-md);
}

.hero-stat-num {
  font-family: var(--f-numeric);
  font-size: 24px;
  font-weight: 600;
  color: var(--c-ink);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 300;
  color: var(--c-ink-light);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.55s ease forwards;
  animation-delay: 0.48s;
}

.hero-image {
  position: relative;
  overflow: hidden;
  background: var(--c-cream2);
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
  animation-delay: 0.2s;
}

.hero-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.7s ease;
  display: block;
}

.hero-image:hover img { transform: scale(1.04); }

/* ============================================================
   PRODUCT-GRID — 4 columnas (exclusivo home)
   La tienda usa .shop-grid de 3 col definido en shop.css
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* ============================================================
   PROPUESTA DE VALOR
   ============================================================ */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.value-card {
  background: var(--c-cream);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(61,92,58,0.08);
}

/* Número decorativo de fondo */
.value-num {
  position: absolute;
  top: -8px;
  right: 12px;
  font-family: var(--f-numeric);
  font-size: 72px;
  font-weight: 700;
  color: var(--c-cream-border);
  line-height: 1;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

/* Tercera card — acento moss para romper uniformidad */
.value-card:last-child {
  background: var(--c-moss);
}

.value-card:last-child h3 {
  color: var(--c-moss-light);
}

.value-card:last-child p {
  color: rgba(255,255,255,0.72);
}

.value-card:last-child .value-icon {
  color: var(--c-moss-light);
}

.value-card:last-child .value-num {
  color: rgba(255,255,255,0.10);
}

.value-icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-md);
  color: var(--c-moss);
}

.value-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-card h3 {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--c-ink-soft);
  margin-bottom: var(--space-sm);
}

.value-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-ink-mid);
}

/* ============================================================
   NOTICIAS HOME — bloque destacado asimétrico
   La news-card compartida está en common_v2.css
   ============================================================ */

.news-featured {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: var(--space-lg);
  align-items: start;
  background: var(--c-cream);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.news-featured:hover {
  box-shadow: 0 4px 24px rgba(61,92,58,0.07);
}

.news-featured-body .eyebrow { margin-bottom: var(--space-md); }

.news-featured-title {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 400;
  color: var(--c-ink-soft);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  transition: color var(--transition);
}

.news-featured:hover .news-featured-title { color: var(--c-moss); }

.news-featured-excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-ink-mid);
  margin-bottom: var(--space-md);
}

.news-featured-thumb {
  width: 140px;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.news-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ============================================================
   COMUNIDAD HOME — layout de sección
   Los thread-card y avatar están en common_v2.css
   ============================================================ */

.community-section {
  background: var(--c-moss-light);
  position: relative;
  padding: 64px 0 96px;
  overflow: hidden;
}

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.community-content .eyebrow { margin-bottom: var(--space-lg); }

.community-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.community-title em {
  font-style: italic;
  color: var(--c-moss);
}

.community-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--c-ink-mid);
  margin-bottom: var(--space-lg);
}

.community-avatars {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.community-count {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 300;
  color: var(--c-ink-mid);
  margin-left: var(--space-md);
}

.community-count strong {
  font-weight: 500;
  color: var(--c-ink-soft);
}

.threads-list { display: flex; flex-direction: column; gap: 10px; }

/* Ola SVG */
.community-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
  pointer-events: none;
}

.community-wave svg { display: block; width: 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {
  .hero-grid          { grid-template-columns: 1fr; }
  .hero-image         { display: none; }
  .hero-content       { max-width: 100%; padding: 40px var(--space-md) 48px; }
  .hero-title         { font-size: 34px; }
  .hero-subtitle      { font-size: 13px; }
  .hero-stat          { padding: 0 var(--space-sm); }
  .hero-stat-num      { font-size: 18px; }
  .hero-actions       { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }

  .product-grid       { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .value-grid         { grid-template-columns: 1fr; }

  .news-featured      { grid-template-columns: 1fr; }
  .news-featured-thumb { display: none; }
  .news-grid-secondary { grid-template-columns: 1fr; }
  .section-title      { font-size: 18px; }

  .community-section  { padding: 48px 0 80px; }
  .community-grid     { grid-template-columns: 1fr; gap: var(--space-lg); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-grid          { grid-template-columns: 1fr 40%; }
  .hero-content       { max-width: 100%; }
  .hero-title         { font-size: 40px; }
  .product-grid       { grid-template-columns: repeat(2, 1fr); }
  .value-grid         { grid-template-columns: repeat(3, 1fr); }
  .news-grid-secondary { grid-template-columns: 1fr 1fr; }
}
