/* ============ Tu Mascota Perfecta — estilos globales ============ */

:root {
  /* Paleta tomada del logo: crema de fondo, azul marino y rosa mauve */
  --bg: #fdf9f4;
  --bg-alt: #f7ecec;
  --surface: #ffffff;
  --text: #232838;
  --muted: #726f80;
  --primary: #a3496a;
  --primary-dark: #863953;
  --primary-soft: #f5e2e8;
  --secondary: #16213f;
  --secondary-soft: #e8eaf2;
  --accent: #d98fa0;
  --wa: #25d366;
  --wa-dark: #1eb254;
  --border: #e8dfe1;
  --shadow: 0 10px 30px rgba(22, 33, 63, 0.08);
  --shadow-lg: 0 18px 50px rgba(22, 33, 63, 0.14);
  --radius: 22px;
  --radius-sm: 12px;
  --max-w: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a2b;
    --bg-alt: #1b2338;
    --surface: #202a44;
    --text: #f2eef2;
    --muted: #a8adc4;
    --primary: #dd93ac;
    --primary-dark: #e8acc0;
    --primary-soft: #3a2a38;
    --secondary: #93a6d9;
    --secondary-soft: #1c2540;
    --border: #2e3654;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); }

.contenedor { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }

.seccion { padding: 4.5rem 0; }
.seccion-alt { background: var(--bg-alt); }

.seccion-titulo { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.6rem; }
.seccion-sub { color: var(--muted); max-width: 42rem; margin-bottom: 2.2rem; font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primario { background: var(--primary); color: #fff; }
.btn-primario:hover { background: var(--primary-dark); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-suave { background: var(--primary-soft); color: var(--primary-dark); }
.btn-borde { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-borde:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1.25rem; max-width: var(--max-w); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; }
.logo img { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: color 0.15s; }
.nav a:hover { color: var(--primary-dark); }
.header .btn { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

/* Buscador compacto de la barra superior */
.header-buscar {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 0.35rem 0.9rem; transition: border-color 0.15s ease;
}
.header-buscar:focus-within { border-color: var(--primary); }
.header-buscar input {
  border: none; outline: none; background: none; font-family: inherit;
  font-size: 0.9rem; color: var(--text); width: 130px;
}
.header-buscar input::placeholder { color: var(--muted); }

@media (max-width: 760px) { .nav { display: none; } }
@media (max-width: 560px) {
  .header-buscar input { width: 90px; }
  .header .btn { padding: 0.5rem 0.8rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 5.5rem 0 4.5rem; }
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; pointer-events: none;
}
.hero-blob.b1 { width: 480px; height: 480px; background: var(--accent); top: -160px; right: -120px; }
.hero-blob.b2 { width: 380px; height: 380px; background: var(--primary); bottom: -180px; left: -120px; opacity: 0.22; }
.hero-inner { position: relative; text-align: center; max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.hero-logo {
  display: block; margin: 0 auto 1.6rem; width: clamp(200px, 26vw, 320px); height: auto;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--secondary-soft); color: var(--secondary);
  font-weight: 700; font-size: 0.85rem; padding: 0.35rem 0.95rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { font-size: 1.15rem; color: var(--muted); margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero-sellos { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; margin-top: 2.6rem; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.hero-sellos span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- Tarjetas de mascotas ---------- */
.grid-mascotas {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.5rem;
}
.tarjeta {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.tarjeta:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tarjeta-foto { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.tarjeta-foto img {
  width: 100%; height: 100%; object-fit: cover;
  /* Sesgo hacia arriba: en fotos verticales la cabeza casi siempre está en el tercio superior */
  object-position: 50% 22%;
  transition: transform 0.35s ease;
}
.tarjeta:hover .tarjeta-foto img { transform: scale(1.05); }
.badge-estado {
  position: absolute; top: 0.8rem; left: 0.8rem;
  font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.75rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--secondary);
}
.badge-estado.no-disponible { color: var(--muted); }
.tarjeta-cuerpo { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.tarjeta-cuerpo h3 { font-size: 1.22rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-size: 0.76rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
}
.tarjeta-acciones { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.tarjeta-acciones .btn { justify-content: center; padding: 0.7rem 1rem; font-size: 0.92rem; }
.enlace-ficha { text-align: center; font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 0.2rem; }
.enlace-ficha:hover { color: var(--primary-dark); }

/* ---------- Quiz ---------- */
.quiz-caja {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2rem; max-width: 46rem; margin: 0 auto;
}
.quiz-pregunta { margin-bottom: 1.6rem; }
.quiz-pregunta > p { font-weight: 700; margin-bottom: 0.7rem; }
.quiz-opciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quiz-opciones label {
  cursor: pointer; border: 2px solid var(--border); border-radius: 999px;
  padding: 0.5rem 1.1rem; font-weight: 600; font-size: 0.93rem; color: var(--muted);
  transition: all 0.15s ease; user-select: none;
}
.quiz-opciones input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-opciones label:has(input:checked) {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.quiz-opciones label:hover { border-color: var(--primary); }
.quiz-caja .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.quiz-resultados { margin-top: 2rem; display: none; }
.quiz-resultados.visible-res { display: block; }
.quiz-resultados h3 { margin-bottom: 1.2rem; font-size: 1.3rem; text-align: center; }
.quiz-vacio { text-align: center; color: var(--muted); }

/* ---------- Sellos / Por qué nosotros ---------- */
.grid-sellos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.sello { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.sello-icono {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.6rem; background: var(--primary-soft); margin-bottom: 1rem;
}
.sello h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.sello p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Testimonios ---------- */
.grid-testimonios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.testimonio { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.testimonio p { font-size: 1rem; margin-bottom: 1rem; }
.testimonio-foto {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.testimonio-video iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius-sm); margin-bottom: 1rem;
}
.testimonio footer { font-weight: 700; color: var(--primary-dark); font-size: 0.92rem; }
.testimonio footer small { display: block; color: var(--muted); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem 1.3rem; margin-bottom: 0.7rem;
}
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--primary); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 0.7rem; color: var(--muted); }

/* ---------- Banda CTA final ---------- */
.banda-cta { background: linear-gradient(120deg, var(--primary), var(--accent)); border-radius: var(--radius); padding: 3rem 2rem; text-align: center; color: #fff; }
.banda-cta h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 0.7rem; }
.banda-cta p { opacity: 0.92; margin-bottom: 1.6rem; }
.banda-cta .btn { background: #fff; color: var(--primary-dark); }

/* ---------- Ficha de raza ---------- */
.ficha-top { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; padding-top: 3rem; }
@media (max-width: 820px) { .ficha-top { grid-template-columns: 1fr; } }
.ficha-foto { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.ficha-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 22%; }
.ficha-info h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: 0.5rem 0 0.9rem; }
.ficha-info .chips { margin-bottom: 1.4rem; }
.datos-rapidos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1.6rem; }
.dato { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; }
.dato dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.dato dd { font-weight: 700; font-size: 0.95rem; }
.ficha-ctas { display: flex; flex-direction: column; gap: 0.6rem; }
.ficha-ctas .btn { justify-content: center; }
.aviso-nodisponible {
  background: var(--bg-alt); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem; color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem;
}

.prosa { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem; font-size: 1.06rem; }
.prosa h2 { font-size: 1.5rem; margin: 2.2rem 0 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.prosa h2::before { content: "🐾"; font-size: 1.1rem; }
.prosa p { margin-bottom: 1rem; }
.prosa > p:first-child { font-size: 1.18rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 5.5rem; background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer p { color: var(--muted); font-size: 0.92rem; max-width: 26rem; }
.footer-redes { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.footer-redes a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--secondary);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.footer-redes a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-redes svg { width: 19px; height: 19px; fill: currentColor; }
.footer-num { font-weight: 800; color: var(--text); font-size: 1.05rem; text-decoration: none; }
.footer-aviso { font-size: 0.8rem !important; margin-top: 0.4rem; }
.footer-legal { margin-top: 0.5rem; }
.footer-legal a { font-size: 0.68rem; color: var(--muted); opacity: 0.7; text-decoration: none; }
.footer-legal a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-flotante {
  position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease;
}
.wa-flotante:hover { transform: scale(1.08); }
.wa-flotante svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Splash de bienvenida ---------- */
.splash {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-soft) 55%, var(--secondary-soft) 100%);
  place-items: center; text-align: center;
  opacity: 1; transition: opacity 0.6s ease;
}
.splash.activo { display: grid; }
.splash.salir { opacity: 0; pointer-events: none; }
.splash-centro { position: relative; padding: 1rem; }
.splash-centro h2 { font-size: clamp(1.6rem, 5vw, 2.6rem); margin: 1.1rem 0 0.4rem; }
.splash-centro h2 em { font-style: normal; color: var(--primary); }
.splash-centro p { color: var(--muted); font-size: 1.05rem; }
.splash-marca { border-radius: 14px; margin-bottom: 0.9rem; animation: splash-pop 0.45s backwards; }
.splash-fotos { display: flex; justify-content: center; gap: -1rem; }
.splash-fotos img {
  width: clamp(64px, 13vw, 104px); height: clamp(64px, 13vw, 104px);
  border-radius: 50%; object-fit: cover; object-position: 50% 25%;
  border: 4px solid var(--surface); box-shadow: var(--shadow-lg);
  margin: 0 -0.55rem;
  animation: splash-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.splash-fotos img:nth-child(2) { animation-delay: 0.08s; transform: translateY(-10px); }
.splash-fotos img:nth-child(3) { animation-delay: 0.16s; }
.splash-fotos img:nth-child(4) { animation-delay: 0.24s; transform: translateY(-10px); }
.splash-fotos img:nth-child(5) { animation-delay: 0.32s; }
.splash-fotos img:nth-child(6) { animation-delay: 0.4s; transform: translateY(-10px); }
@keyframes splash-pop {
  from { opacity: 0; transform: scale(0.3) translateY(30px); }
}
.splash-huellas { font-size: 1.4rem; letter-spacing: 0.6rem; margin-top: 1.2rem; animation: splash-pop 0.5s 0.5s backwards; }
.splash-saltar {
  margin-top: 1.6rem; background: none; border: none; color: var(--muted);
  font-size: 0.85rem; cursor: pointer; text-decoration: underline; font-family: inherit;
}

/* ---------- Buscador de razas ---------- */
.seccion-buscador { padding: 3rem 0 0; }
.buscador {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
  padding: 0.8rem 1.4rem; max-width: 34rem; margin: 0 auto;
  box-shadow: var(--shadow); transition: border-color 0.15s ease;
  font-size: 1.05rem;
}
.buscador:focus-within { border-color: var(--primary); }
.buscador input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 1.02rem; color: var(--text); font-family: inherit;
}
.buscador input::placeholder { color: var(--muted); }
.buscador-resumen { text-align: center; color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-top: 0.8rem; min-height: 1.4em; }

/* ---------- Filtros del catálogo ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; align-items: center; }
.filtros button {
  cursor: pointer; border: 2px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 0.45rem 1rem; font-weight: 600; font-size: 0.88rem;
  color: var(--muted); transition: all 0.15s ease; font-family: inherit;
}
.filtros button:hover { border-color: var(--primary); color: var(--primary-dark); }
.filtros button.activo { background: var(--primary); border-color: var(--primary); color: #fff; }
.filtros .contador { margin-left: auto; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.sin-resultados { color: var(--muted); padding: 1.5rem 0; display: none; }

/* ---------- Collage del hero ---------- */
.hero-fotos { position: absolute; inset: 0; pointer-events: none; }
.hero-fotos img {
  position: absolute; border-radius: 50%; object-fit: cover; object-position: 50% 25%;
  border: 5px solid var(--surface); box-shadow: var(--shadow-lg);
  animation: flotar 6s ease-in-out infinite;
}
.hero-fotos img:nth-child(1) { width: 120px; height: 120px; top: 12%; left: 6%; }
.hero-fotos img:nth-child(2) { width: 88px; height: 88px; top: 58%; left: 12%; animation-delay: 1.2s; }
.hero-fotos img:nth-child(3) { width: 130px; height: 130px; top: 15%; right: 6%; animation-delay: 0.6s; }
.hero-fotos img:nth-child(4) { width: 90px; height: 90px; top: 62%; right: 11%; animation-delay: 1.8s; }
@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (max-width: 900px) { .hero-fotos { display: none; } }

.nota-envios { font-size: 0.88rem; color: var(--muted); text-align: center; }

.ficha-video { max-width: 46rem; margin: 2.5rem auto 0; }
.ficha-video iframe {
  width: 100%; aspect-ratio: 16 / 9; border: none;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tarjeta, .tarjeta-foto img, .btn { transition: none; }
  .splash-fotos img, .splash-huellas, .hero-fotos img { animation: none; }
  .splash { transition: none; }
}
