/* ==========================================================================
   Veterinaria Dr. Peirone
   Paleta tomada del logo y de los posts de Instagram de la clínica.
   ========================================================================== */

:root {
  --burgundy: #750f1a;
  --burgundy-deep: #4e0a12;
  --terracotta: #b4513a;       /* botones: contraste 5:1 con texto blanco */
  --terracotta-soft: #d1734f;  /* solo decoración */
  --sand: #e7c393;
  --cream: #f5ece0;
  --paper: #f8f4ee;
  --ink: #3a2624;
  --ink-soft: #5e4a46;
  --charcoal: #4b3b38;
  --night: #2e1b1a;

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --font-mark: "Lora", Georgia, "Times New Roman", serif;

  --header-h: 96px;
  --wrap: 1180px;
  --radius: 4px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--night);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .7rem 1.1rem;
  background: var(--night);
  color: #fff;
  border-radius: var(--radius);
  transition: top .15s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn-accent { background: var(--terracotta); color: #fff; }
.btn-accent:hover { background: #9c432e; }
.btn-burgundy { background: var(--burgundy); color: #fff; }
.btn-burgundy:hover { background: var(--burgundy-deep); }
.btn-sand { background: var(--sand); color: var(--night); }
.btn-sand:hover { background: #f1d6ae; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, .85); color: #fff; background: transparent; }
.btn-outline-light:hover { background: #fff; color: var(--burgundy); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  padding: 0 clamp(1rem, 2.5vw, 2.25rem);
  background: #fff;
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(58, 38, 36, .12), 0 8px 24px -16px rgba(58, 38, 36, .35); }

.brand { display: block; line-height: 0; }
.brand img { width: auto; height: 74px; mix-blend-mode: multiply; }

.nav { justify-self: center; }
.nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem clamp(1rem, 2vw, 1.9rem); }
.nav-link {
  position: relative;
  display: inline-block;
  padding: .5rem 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .15rem;
  height: 2px;
  background: var(--burgundy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .35rem; }
.icon-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: 50%;
  transition: background-color .18s, color .18s;
}
.icon-link:hover { background: var(--cream); color: var(--burgundy); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Mosaico de inicio ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, clamp(250px, 20.8vw, 360px));
  gap: 3px;
  background: #fff;
  grid-template-areas:
    "pig   pig   brand   brand   golden  siamese"
    "pig   pig   husky   british sheep   sheep";
}
.tile { position: relative; overflow: hidden; min-width: 0; background: var(--cream); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tile-pig     { grid-area: pig; }
.tile-golden  { grid-area: golden; }
.tile-siamese { grid-area: siamese; }
.tile-husky   { grid-area: husky; }
.tile-british { grid-area: british; }
.tile-sheep   { grid-area: sheep; }

/* Punto de enfoque de cada foto para que el recorte conserve la cara */
.tile-pig img     { object-position: 50% 45%; }
.tile-golden img  { object-position: 50% 30%; }
.tile-siamese img { object-position: 35% 50%; }
.tile-husky img   { object-position: 88% 40%; }
.tile-british img { object-position: 52% 50%; }
.tile-sheep img   { object-position: 40% 55%; }

.tile-brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--burgundy);
  color: #fff;
  text-align: center;
}
.wordmark {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  color: #fff;
  font-family: var(--font-mark);
  font-style: italic;
  font-weight: 700;
  line-height: 1.05;
}
.wordmark-small { font-size: clamp(1.25rem, 1.7vw, 1.6rem); color: var(--sand); }
.wordmark-big { font-size: clamp(2rem, 3.3vw, 3.15rem); }
.tile-place { margin: -.35rem 0 .1rem; color: rgba(255, 255, 255, .86); font-size: 1rem; }
.tile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* ---------- Nosotros ---------- */

.welcome { padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem); }
.welcome-inner {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: var(--wrap);
  margin: 0 auto;
}

.contact-card {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--burgundy);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 22px 40px -26px rgba(78, 10, 18, .65);
}
.contact-card-title {
  margin-bottom: .75rem;
  color: #fff;
  font-size: 1.75rem;
}
.contact-card-sub { margin-top: 1.75rem; font-size: 1.375rem; color: var(--sand); }
.contact-line { margin: 0 0 .6rem; font-size: 1.0625rem; }
.contact-key { display: block; font-size: .95rem; color: rgba(255, 255, 255, .78); }
.contact-line a { font-weight: 600; text-underline-offset: 3px; }

.section-title { font-size: clamp(2rem, 3.4vw, 2.75rem); margin-bottom: 1.1rem; }
.section-title-center { text-align: center; }
.welcome-text p { max-width: 62ch; }

.rule { display: block; width: 52px; height: 3px; margin: 0 0 1.4rem; background: var(--terracotta-soft); }
.rule-center { margin-left: auto; margin-right: auto; }

/* ---------- Invitación ---------- */

.invite {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 3vw, 2rem);
  background: var(--burgundy) url("img/ondas.svg") center / cover no-repeat;
}
.invite-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  max-width: var(--wrap);
  margin: 0 auto;
}
.invite-tab {
  justify-self: center;
  width: min(100%, 300px);
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .55);
}
.invite-card {
  padding: clamp(1.75rem, 3.5vw, 3rem);
  background: rgba(255, 255, 255, .96);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6);
}
.invite-card p { max-width: 46ch; margin-bottom: 1.5rem; }

/* ---------- Servicios ---------- */

.services { padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 3vw, 2rem); }
.services-inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: var(--wrap);
  margin: 0 auto;
}
.services-intro p { max-width: 44ch; margin-bottom: 1.75rem; }

.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.service {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px -22px rgba(58, 38, 36, .6);
}
.service-icon { margin-bottom: 1.5rem; }
.service-title { margin: 0 0 .6rem; font-size: 1.5rem; font-weight: 600; color: inherit; }
.service p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }

.service-cream { background: var(--cream); color: var(--ink-soft); }
.service-cream .service-title { color: var(--ink); }
.service-cream .service-icon { color: var(--burgundy); }
.service-charcoal { background: var(--charcoal); color: #fff; }
.service-accent { background: var(--terracotta); color: #fff; }
.service-burgundy { background: var(--burgundy); color: #fff; }

/* ---------- Nuestros pacientes ---------- */

.cases { padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 3vw, 2rem); background: var(--paper); text-align: center; }
.cases-inner { max-width: 1000px; margin: 0 auto; }
.cases-lead { max-width: 56ch; margin: 0 auto 2.5rem; }
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); margin-bottom: 2.5rem; }
.case img { width: 100%; border-radius: var(--radius); box-shadow: 0 20px 36px -24px rgba(58, 38, 36, .7); }

/* ---------- Productos ---------- */

.products { padding: clamp(3.5rem, 7vw, 6rem) 0 0; }
.products-head { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) clamp(2rem, 4vw, 3rem); }
.products-head p { max-width: 58ch; margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.product { position: relative; display: block; overflow: hidden; line-height: 0; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; transform: scale(1.07); transition: transform .35s ease; }
.product:hover img { transform: scale(1.11); }
.product-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 1rem .9rem;
  background: linear-gradient(to top, rgba(46, 27, 26, .92), rgba(46, 27, 26, 0));
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.product:hover .product-label,
.product:focus-visible .product-label { opacity: 1; transform: none; }

/* ---------- Contacto (pie) ---------- */

.contact {
  background: linear-gradient(rgba(46, 27, 26, .93), rgba(46, 27, 26, .93)), url("img/ondas.svg") center / cover no-repeat;
  color: #fff;
}
.contact-inner { max-width: 1060px; margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem) clamp(2.5rem, 5vw, 4rem); }
.contact-title { max-width: 24ch; color: #fff; font-size: clamp(2rem, 3.8vw, 3.1rem); }
.contact-sub { margin: 1rem 0 0; font-size: 1.25rem; color: rgba(255, 255, 255, .92); }
.contact-rule { margin: 2rem 0 2.25rem; border: 0; border-top: 2px solid rgba(255, 255, 255, .28); }

.contact-cols { display: grid; grid-template-columns: 1.15fr 1fr auto; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.contact-col p { margin: 0 0 .35rem; }
.contact-h { margin: 0 0 .5rem; color: var(--sand); font-size: 1.375rem; font-weight: 600; }
.contact-col .contact-h:not(:first-child) { margin-top: 1.6rem; }
.contact-col a { text-underline-offset: 3px; }
.contact-actions { display: flex; flex-direction: column; gap: .75rem; min-width: 190px; }

.legal { padding: 1.25rem clamp(1rem, 3vw, 2rem); background: rgba(0, 0, 0, .3); }
.legal p { max-width: 1060px; margin: 0 auto; font-size: .95rem; color: rgba(255, 255, 255, .72); }

/* ---------- WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: clamp(.9rem, 2vw, 1.5rem);
  bottom: clamp(.9rem, 2vw, 1.5rem);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: #1f9d55;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .55);
  transition: transform .18s, background-color .18s;
}
.wa-float:hover { background: #17824a; transform: translateY(-2px); }

/* ---------- Pantallas medianas ---------- */

@media (max-width: 1100px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    padding: .5rem clamp(1rem, 4vw, 2rem) 1.25rem;
    background: #fff;
    box-shadow: 0 18px 30px -20px rgba(58, 38, 36, .5);
  }
  .nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { display: block; padding: .85rem 0; font-size: 1.2rem; border-bottom: 1px solid #efe6db; }
  .nav-link::after { display: none; }
  .nav-link.is-active { color: var(--burgundy); }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "brand   brand"
      "pig     pig"
      "golden  siamese"
      "husky   british"
      "sheep   sheep";
  }
  .tile-pig { aspect-ratio: 1; }
  .tile-golden,
  .tile-siamese,
  .tile-husky,
  .tile-british { aspect-ratio: 4 / 5; }
  .tile-sheep { aspect-ratio: 8 / 5; }
  .tile-brand { padding: 2.75rem 1.5rem; }
}

@media (max-width: 900px) {
  .welcome-inner,
  .services-inner,
  .invite-inner { grid-template-columns: 1fr; }
  .invite-tab { width: min(100%, 220px); }
  .contact-cols { grid-template-columns: 1fr 1fr; }
  .contact-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-label { opacity: 1; transform: none; font-size: 1rem; padding-top: 1.25rem; }
}

@media (max-width: 600px) {
  :root { --header-h: 80px; }
  .brand img { height: 58px; }
  .tile-pig { aspect-ratio: 4 / 5; }
  .service-grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .cases-grid { grid-template-columns: 1fr; }
  .contact-cols { grid-template-columns: 1fr; }
  .contact-actions { flex-direction: column; }
  .btn-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
