/* =========================================
   FUENTES
   ========================================= */
@font-face {
  font-family: 'Bugaki';
  src: url('../bugaki/Bugaki.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bugaki';
  src: url('../bugaki/Bugaki Oblique.ttf') format('truetype');
  font-weight: normal;
  font-style: oblique;
  font-display: swap;
}

/* =========================================
   ACCESIBILIDAD
   ========================================= */
.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;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --azul:       #2D2DE4;
  --amarillo:   #FFB70D;
  --blanco:     #FFFFFF;
  --gris-texto: #94A3B8;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  background-color: var(--blanco);
  font-family: 'Inter', sans-serif;
}

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

a {
  text-decoration: none;
}

/* =========================================
   ANIMACIONES — KEYFRAMES
   ========================================= */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes gradienteHero {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

@keyframes latirPatita {
  0%, 100% { transform: scale(1)    rotate(-10deg); }
  50%       { transform: scale(1.35) rotate(10deg); }
}

@keyframes flotarHuella {
  0%   { transform: translateY(0)      rotate(0deg);  opacity: 0;    }
  10%  { opacity: 0.13; }
  90%  { opacity: 0.08; }
  100% { transform: translateY(-110vh) rotate(25deg); opacity: 0;    }
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInBottom {
  from { opacity: 0; transform: translateY(44px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulsarDonar {
  0%, 100% { box-shadow: 0 0 0 0    rgba(255, 183, 13, 0.55); }
  60%       { box-shadow: 0 0 0 13px rgba(255, 183, 13, 0); }
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(48px, 7vh, 90px);
  overflow: hidden;
  background: linear-gradient(-45deg, #ffffff, #f8f7ff, #fffdf0, #f0f4ff, #ffffff);
  background-size: 400% 400%;
  animation: gradienteHero 12s ease infinite;
}

/* --- Centro: casa + botón --- */
.hero-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 2;
  position: relative;
}

/* --- Casa --- */
.casa-wrapper {
  width: clamp(340px, 36vw, 560px);
  animation: fadeInScale 0.65s ease both;
  animation-delay: 0.1s;
}

.casa-svg {
  width: 100%;
  height: auto;
  animation: float 3.8s ease-in-out infinite;
  animation-delay: 0.75s;
}

/* --- Botón DONAR --- */
.botones-wrapper {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  align-items: center;
  animation: slideUp 0.5s ease both;
  animation-delay: 0.5s;
}

.btn-donar {
  display: inline-block;
  background-color: var(--amarillo);
  color: var(--azul);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.85rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 18px 0;
  width: 200px;
  text-align: center;
  border: none;
  border-radius: 50px;
  transition: opacity 0.2s ease, transform 0.22s ease, box-shadow 0.22s ease;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-donar:hover {
  opacity: 0.92;
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(255, 183, 13, 0.38);
}

.btn-donar:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* Pulso de llamada de atención en el botón SER SOCIO */
#btn-socio {
  animation: pulsarDonar 2.4s ease-in-out infinite;
}

#btn-socio:hover {
  animation-play-state: paused;
}

/* --- Perros full desktop --- */
.perros-full {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
  animation: slideInBottom 0.9s ease both;
  animation-delay: 0.3s;
}

/* Perros móvil: oculto en desktop */
.perros-movil {
  display: none;
}


/* =========================================
   FOOTER
   ========================================= */
.footer {
  background-color: var(--blanco);
  padding: 48px 60px 24px;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.footer.footer-oculto {
  opacity: 0;
  transform: translateY(24px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
}

/* --- Logo + descripción --- */
.footer-col--left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo-circular {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.footer-descripcion {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--gris-texto);
  line-height: 1.7;
  text-align: left;
}

/* --- Redes sociales --- */
.footer-col--center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 16px;
}

.footer-redes {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-redes a img {
  width: 28px;
  height: 28px;
  filter: brightness(0) saturate(100%) invert(18%) sepia(96%) saturate(4000%) hue-rotate(230deg) brightness(90%);
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.footer-redes a:hover img {
  opacity: 1;
  transform: scale(1.18);
  /* Filtro calibrado para producir exactamente #FFB70D */
  filter: brightness(0) saturate(100%) invert(73%) sepia(90%) saturate(900%) hue-rotate(3deg) brightness(104%);
}

/* --- Contacto --- */
.footer-col--right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 16px;
}

.footer-contacto {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-style: normal;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contacto-item img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(77%) sepia(93%) saturate(629%) hue-rotate(345deg) brightness(103%);
}

.contacto-item span {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gris-texto);
  letter-spacing: 0.04em;
}

/* --- Créditos --- */
.footer-creditos {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--gris-texto);
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

/* =========================================
   RESPONSIVE — MÓVIL
   ========================================= */
@media (max-width: 768px) {

  /* Hero */
  .hero {
    height: auto;
    min-height: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 32px;
    overflow: visible;
  }

  .hero-centro {
    gap: 24px;
    width: 100%;
    padding: 0 16px;
    position: relative;
    z-index: 2;
  }

  .casa-wrapper {
    width: 88vw;
  }

  .botones-wrapper {
    width: 100%;
  }

  .btn-donar {
    flex: 1;
    width: auto;
    padding: 16px 20px;
    font-size: 0.95rem;
  }

  /* Perros desktop: oculto en móvil */
  .perros-full {
    display: none;
  }

  /* Perros móvil: visible, en flujo normal bajo el botón */
  .perros-movil {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 24px;
    position: relative;
    z-index: 1;
    animation: slideInBottom 0.9s ease both;
    animation-delay: 0.3s;
  }

  /* Footer */
  .footer {
    padding: 40px 24px 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-col--left {
    order: 1;
  }

  .footer-col--right {
    order: 2;
    justify-content: flex-start;
  }

  .footer-col--center {
    order: 3;
    justify-content: center;
    padding-top: 0;
  }

  .footer-redes {
    gap: 32px;
    justify-content: center;
  }

  .footer-redes a img {
    width: 32px;
    height: 32px;
  }
}

/* =========================================
   INSTAGRAM SECTION
   ========================================= */
.instagram-section {
  padding: 72px 24px 80px;
  background: #fff;
  text-align: center;
}

.instagram-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.instagram-icono {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-radius: 14px;
  width: 52px;
  height: 52px;
  padding: 12px;
  margin-bottom: 4px;
}

.instagram-icono img {
  filter: brightness(0) invert(1);
  width: 100%;
  height: 100%;
}

.instagram-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--azul);
}

.instagram-handle {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--gris-texto);
  text-decoration: none;
  transition: color 0.2s;
}
.instagram-handle:hover { color: var(--azul); }

.instagram-feed {
  max-width: 1100px;
  margin: 0 auto 36px;
  min-height: 300px;
}

.instagram-btn {
  display: inline-block;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.instagram-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .instagram-section { padding: 52px 16px 60px; }
}

/* =========================================
   LOADING SCREEN
   ========================================= */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-patita {
  font-size: 3rem;
  animation: latirPatita 0.7s ease-in-out infinite;
}


/* =========================================
   HUELLAS FLOTANTES
   ========================================= */
.huella-flotante {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  animation: flotarHuella linear infinite;
  user-select: none;
}

/* =========================================
   RIPPLE EN BOTONES
   ========================================= */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  transform: scale(0);
  animation: rippleAnim 0.6s linear forwards;
  pointer-events: none;
}

/* =========================================
   CONFETI
   ========================================= */
@keyframes caerConfeti {
  0%   { transform: translateY(-10px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.confeti-pieza {
  position: fixed;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  animation: caerConfeti linear forwards;
}

/* =========================================
   CURSOR PATITA
   ========================================= */
.patita-cursor {
  position: fixed;
  pointer-events: none;
  font-size: 1.3rem;
  z-index: 99999;
  opacity: 0;
  transform: translate(6px, -90%) rotate(-20deg);
  transition: opacity 0.15s ease;
  line-height: 1;
  user-select: none;
}
.patita-cursor.visible { opacity: 1; }

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