.home-page .site-header {
  position: sticky;
}

.home-page .site-header .brand {
  min-width: 0;
  flex-shrink: 0;
}

.home-page #home-navigation { gap: clamp(12px, 1.4vw, 24px); }

.home-page .site-header .brand img {
  height: 76px;
}

.home-page .site-header.is-condensed .brand img {
  height: 60px;
}

.home-menu-toggle,
.home-menu-icon { display: none; }

.home-page :is(#nosotros, #mapa, #veterinarias, #preguntas-frecuentes) { scroll-margin-top: 88px; }

@media (max-width: 1000px) {
  .home-page .site-header.has-mobile-menu {
    flex-wrap: nowrap;
    padding-block: 0;
  }

  .has-mobile-menu .home-menu-toggle:not([hidden]) {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    margin-inline-start: auto;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--purple-dark);
    background: #f4edf7;
    cursor: pointer;
  }

  .home-menu-toggle[aria-expanded="true"] { border-color: var(--line); }
  .home-menu-toggle:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
  .home-menu-toggle[aria-expanded="false"] .home-menu-close,
  .home-menu-toggle[aria-expanded="true"] .home-menu-open { display: none; }

  .has-mobile-menu #home-navigation {
    position: absolute;
    inset: calc(100% + 8px) var(--page-gutter) auto auto;
    width: min(350px, calc(100% - 2 * var(--page-gutter)));
    margin: 0;
    display: none;
    max-height: calc(100svh - 96px);
    overflow: auto;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px #33204726;
    font-size: 16px;
  }

  .has-mobile-menu .home-menu-toggle[aria-expanded="true"] + #home-navigation,
  .has-mobile-menu .header-actions { display: grid; }

  .has-mobile-menu .header-actions { gap: 0; }

  .has-mobile-menu .desktop-nav .home-menu-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    gap: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    font-weight: 700;
    white-space: normal;
  }

  .has-mobile-menu .home-menu-link:is(:hover, :focus-visible) { background: #f4edf7; }
  .has-mobile-menu .desktop-nav a:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }
  .has-mobile-menu .home-menu-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }

  .has-mobile-menu .desktop-nav .home-menu-register {
    justify-content: space-between;
    min-height: 48px;
    margin-top: 6px;
    padding: 0 12px;
    box-shadow: none;
    white-space: normal;
  }
}

@media (max-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .home-menu-toggle[aria-expanded="true"] + .desktop-nav {
    animation: home-menu-in 180ms ease-out both;
  }
}

@keyframes home-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-page .hero {
  min-height: clamp(600px, calc(100svh - 194px), 880px);
  padding: 52px var(--section-gutter);
  background-color: #330d31;
}

.home-page .hero-media {
  inset: 0 0 0 auto;
  width: 76%;
  object-position: 52% 18%;
}

.hero-motion { opacity: 0; pointer-events: none; }
.hero-motion.is-ready { opacity: 1; }

.hero-motion-toggle:not([hidden]) {
  position: absolute;
  inset: 16px 16px auto auto;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  background: #330d31e6;
  color: #fff;
  cursor: pointer;
}

.hero-motion-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-motion-toggle svg { width: 19px; height: 19px; }
.hero-motion-toggle:not(.is-paused) .hero-motion-play,
.hero-motion-toggle.is-paused .hero-motion-pause { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-motion,
  .hero-motion-toggle:not([hidden]) { display: none; }
}

.home-page .hero-overlay {
  background: linear-gradient(90deg, #330d31 24%, #330d31e8 30%, #330d31ad 38%, #330d3100 62%);
}

.home-page .hero-content {
  color: #fff;
}

.home-page .hero h1 {
  max-width: 570px;
  font-size: 64px;
  line-height: 1.07;
  font-weight: 800;
}

.hero-type-line { white-space: nowrap; }

.hero-type-slot {
  display: inline-grid;
  vertical-align: baseline;
}

.hero-type-slot > span { grid-area: 1 / 1; }
.hero-type-slot > span:first-child { visibility: hidden; }
.hero-type-word { color: #ffd17e; }

.floating-registration:not([hidden]) {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, calc(env(safe-area-inset-bottom) + 10px)) auto;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  max-width: calc(100% - 32px);
  padding: 5px 14px 5px 5px;
  border: 1px solid #ffffff65;
  border-radius: 28px;
  background: #872364;
  color: #fff;
  box-shadow: 0 8px 22px #33204745;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.floating-registration img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
}

.floating-registration svg { flex: 0 0 18px; }
.floating-registration:hover { background: #722052; }
.floating-registration:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.home-page:has(.home-menu-toggle[aria-expanded="true"]) .floating-registration { visibility: hidden; }

.home-page .hero-copy {
  color: #fff;
  font-size: 22px;
  margin-top: 18px;
}

.home-page .hero-actions {
  margin-top: 24px;
}

.home-page .hero-actions .primary-button {
  background: #ca0060;
}

.home-page .hero-actions .primary-button::before,
.home-page .hero-actions .primary-button::after {
  content: none;
}

.home-page .trust-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
  border: 0;
  background: #fff;
}

.home-page .census-overview {
  background: #fff;
}

.home-page .trust-strip article {
  padding: 22px 18px;
}

.trust-strip article > a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
}

.trust-strip article > a:hover strong {
  text-decoration: underline;
}

.trust-strip svg {
  width: 40px;
  height: 40px;
  color: var(--purple);
}

@media (prefers-reduced-motion: no-preference) {
  .trust-strip .step-enter svg {
    animation: step-icon-in 560ms cubic-bezier(.2, .7, .3, 1) both;
  }

  .trust-strip .step-enter:nth-child(2) svg { animation-delay: 90ms; }
  .trust-strip .step-enter:nth-child(3) svg { animation-delay: 180ms; }
  .trust-strip a:is(:hover, :focus-visible) svg { color: var(--magenta-dark); }
}

@keyframes step-icon-in {
  0% { opacity: 0; transform: translateY(8px) scale(.85); }
  65% { opacity: 1; transform: translateY(-3px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.trust-strip a span {
  color: var(--magenta-dark);
  font-size: 13px;
  font-weight: 800;
}

.home-page .trust-strip strong {
  font-size: 20px;
}

.home-page .trust-strip p {
  margin: 4px 0 0;
  font-size: 15px;
}

.home-page .census-purpose {
  padding-block: clamp(60px, 7vw, 100px);
  background: #f4edf7;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.purpose-gallery { position: relative; min-width: 0; }

.purpose-gallery-photos {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  isolation: isolate;
}

.purpose-gallery-photos::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  background: linear-gradient(90deg, #f4edf7, transparent 13%, transparent 87%, #f4edf7);
  pointer-events: none;
}

.purpose-gallery-photos img {
  position: absolute;
  inset: 0 auto auto 13%;
  width: 74%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0;
}

.purpose-gallery-photos img[data-slide="current"] { z-index: 3; opacity: 1; }
.purpose-gallery-photos img[data-slide="previous"] { transform: translateX(-50%) scale(.82); }
.purpose-gallery-photos img[data-slide="next"] { transform: translateX(50%) scale(.82); }
.purpose-gallery-photos img:is([data-slide="previous"], [data-slide="next"]) { z-index: 2; opacity: .62; }
.purpose-gallery-photos img[data-slide="off-left"] { transform: translateX(-104%) scale(.76); }
.purpose-gallery-photos img[data-slide="off-right"] { transform: translateX(104%) scale(.76); }

@media (prefers-reduced-motion: no-preference) {
  .purpose-gallery-photos img:not(.is-repositioning) {
    transition: transform 690ms cubic-bezier(.22, .68, .26, 1), opacity 580ms ease;
  }

  .purpose-gallery.is-unveiled .purpose-gallery-photos {
    animation: gallery-unveil 820ms cubic-bezier(.22, .65, .3, 1) both;
  }
}

@keyframes gallery-unveil {
  from { clip-path: inset(100% 0 0 round 8px); }
  to { clip-path: inset(0 round 8px); }
}

.purpose-gallery-controls {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.purpose-gallery-controls[hidden] { display: none; }

.purpose-gallery-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--purple-dark);
  cursor: pointer;
  pointer-events: auto;
}

.purpose-gallery-controls svg {
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffffde;
}

.purpose-gallery-controls button:hover svg { background: #fff; }
.purpose-gallery-controls button:focus-visible { outline: 2px solid var(--purple); outline-offset: -4px; border-radius: 50%; }

.marquee-logos .logo-mercadovet { filter: brightness(0) saturate(100%); }

.carnet-promo {
  --carnet-travel: 165px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 32px 56px;
  background: #dccfe5;
}

.carnet-promo-backing,
.carnet-promo::after {
  position: absolute;
  pointer-events: none;
}

.carnet-promo-backing {
  z-index: -2;
  inset: calc(-195px - 10vw) -12%;
  background: url("/assets/censo-carnet-mosaico-varios-bandera.webp") center / 1060px auto repeat;
  rotate: -10deg;
}

.carnet-promo-backing video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.carnet-promo-backing video.is-playing { opacity: 1; }

.carnet-promo::after {
  content: "";
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, #f8f4fbec 13%, #f4edf8e0 43%, #f5edf88a 76%, #e7dbf0a0);
}

.carnet-promo h2 {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: 0;
}

.carnet-promo p {
  max-width: 44ch;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.45;
}

.carnet-promo-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 36px #33204726, 0 0 12px 2px #912dcc52;
}

@media (prefers-reduced-motion: no-preference) {
  .carnet-promo-image { animation: carnet-violet-glow 1.25s ease-in-out infinite; }

  @supports (animation-timeline: view()) {
    .carnet-promo { view-timeline-name: --carnet-promo; }

    .carnet-promo-backing {
      animation: carnet-backdrop-scroll linear both;
      animation-timeline: --carnet-promo;
      animation-range: cover 0% cover 100%;
    }

    .carnet-promo-image {
      animation: carnet-promo-in linear both, carnet-violet-glow 1.25s ease-in-out infinite;
      animation-timeline: view(), auto;
      animation-range: entry 0% entry 100%, normal;
    }
  }
}

@keyframes carnet-violet-glow {
  0%, 100% { box-shadow: 0 18px 36px #33204726, 0 0 12px 2px #912dcc52; }
  38% { box-shadow: 0 18px 36px #33204726, 0 0 27px 6px #a133d89e; }
  60% { box-shadow: 0 18px 36px #33204726, 0 0 18px 3px #a133d870; }
  77% { box-shadow: 0 18px 36px #33204726, 0 0 24px 5px #a133d888; }
}

@keyframes carnet-backdrop-scroll {
  from { translate: 0 calc(-1 * var(--carnet-travel)); }
  to { translate: 0 var(--carnet-travel); }
}

@keyframes carnet-promo-in {
  from { opacity: .38; transform: translateY(28px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.home-page .census-section {
  background: #fff;
  padding-block: 48px;
}

.census-faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: 24px 48px;
  background: #f5f1f7;
  scroll-margin-top: 140px;
}

.census-faq h2 {
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.census-faq-eyebrow {
  margin: 0 0 8px;
  color: var(--magenta-dark);
  font-size: 15px;
  font-weight: 800;
}

.census-faq-mascots {
  position: relative;
  display: block;
  max-width: 400px;
  margin: 18px 0 0 auto;
}

.census-faq-mascots canvas:not([hidden]) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
}

.census-faq-mascots:has(canvas:not([hidden])) img { visibility: hidden; }

.census-faq-mascots img {
  display: block;
  width: 100%;
  height: auto;
}

.census-faq-list details {
  border-top: 1px solid var(--line);
}

.census-faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.census-faq-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  list-style: none;
  cursor: pointer;
  color: var(--purple-dark);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.census-faq-list summary::-webkit-details-marker { display: none; }

.census-faq-list summary::after {
  content: "";
  justify-self: center;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.census-faq-list details[open] summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.census-faq-list summary:hover { color: var(--magenta-dark); }
.census-faq-list summary:focus-visible { outline: 2px solid var(--purple); outline-offset: -2px; }

.census-faq-list p {
  margin: 0;
  padding: 0 36px 16px 4px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.census-faq-list a {
  color: var(--purple-dark);
  text-decoration: underline;
}

.faq-chip-figure {
  width: min(450px, calc(100% - 8px));
  margin: 0 4px 18px;
}

.faq-chip-figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
.faq-chip-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.35; }

@media (max-width: 760px) {
  .census-faq { grid-template-columns: minmax(0, 1fr); }
  .census-faq h2 { font-size: 30px; }
  .census-faq-list summary { font-size: 18px; }
  .census-faq-mascots { display: none; }
}

.vet-affiliation {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 445px);
  grid-template-areas: "photo copy";
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 0 var(--section-gutter) 0 0;
  background: #2e142f;
  color: #fff;
}

.vet-affiliation-copy {
  grid-area: copy;
  min-width: 0;
  padding-block: clamp(38px, 4vw, 68px);
}

.vet-affiliation h2 {
  color: inherit;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: 0;
}

.vet-affiliation p,
.vet-benefits {
  color: #f4eaf6;
  font-size: 18px;
  line-height: 1.45;
}

.vet-affiliation p { margin: 14px 0 18px; }

.vet-benefits {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}

.vet-benefits li {
  display: block;
  position: relative;
  padding-inline-start: 24px;
}

.vet-benefits li::before {
  content: "";
  position: absolute;
  inset: .29em auto auto 3px;
  width: 6px;
  height: 11px;
  border: solid #ffd17e;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.vet-benefits strong { color: #fff; }

.vet-affiliation-media {
  --vet-travel: 74px;
  grid-area: photo;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 740px;
  overflow: hidden;
}

.vet-affiliation-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.vet-affiliation-media.is-parallax img {
  position: absolute;
  inset: calc(-1 * var(--vet-travel)) 0 auto;
  height: calc(100% + 2 * var(--vet-travel));
  transform: translate3d(0, var(--vet-offset, 0px), 0);
}

.vet-affiliation-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg, #2e142f, transparent 6%);
  pointer-events: none;
}

.vet-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.vet-dialog::backdrop { background: #27163299; }
.vet-dialog-content { padding: 24px; }
.vet-dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.vet-dialog-header h2 { margin: 0; font-size: 25px; line-height: 1.2; }

.vet-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 6px;
  background: #f4edf7;
  color: var(--purple-dark);
  cursor: pointer;
}

.vet-dialog-close:focus-visible { outline: 2px solid var(--purple); }
.vet-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.vet-field-wide { grid-column: 1 / -1; }
.vet-form-note { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.vet-form-error { color: #991f4c; margin: 0; font-size: 16px; }
.vet-form-error:not(:empty) { margin-top: 12px; }
.vet-dialog [type="submit"] { margin-top: 16px; }
.vet-dialog [type="submit"]:disabled { opacity: .7; cursor: wait; }
.vet-form-confirmation { padding-block: 12px; margin: 0; }

@media (max-width: 1020px) {
  .vet-affiliation {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "copy";
    gap: 0;
    padding: 0;
  }

  .vet-affiliation-copy { padding: 26px var(--page-gutter) 48px; }
  .vet-affiliation-media { --vet-travel: 38px; aspect-ratio: 1.65; max-height: 480px; }
  .vet-affiliation-media::after { background: linear-gradient(180deg, transparent 89%, #2e142f); }
  .vet-affiliation h2 { font-size: 32px; }
}

@media (max-width: 520px) {
  .vet-form-grid { grid-template-columns: minmax(0, 1fr); }
  .vet-dialog-content { padding: 18px; }
}

.home-page .supporting-brands {
  border-top: 1px solid var(--line);
}

.home-page .site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 24px 32px;
  padding-block: 42px 94px;
  background: #2e142e;
  align-items: start;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.site-footer .footer-brand p { color: inherit; max-width: 22ch; margin-top: 8px; }

.footer-offices address {
  font-style: normal;
  line-height: 1.45;
  margin-top: 10px;
}

.footer-offices strong,
.footer-navigation a,
.footer-contact a { display: block; }
.footer-navigation a + a,
.footer-contact a + a { margin-top: 6px; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .home-page .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .home-page .footer-brand, .home-page .footer-contact { grid-column: 1 / -1; }
  .site-footer .footer-brand p { max-width: none; }
}

.home-page .site-footer a {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
  .home-page main {
    isolation: isolate;
  }

  .home-page main > .hero {
    position: sticky;
    top: 0;
    z-index: 0;
  }

  .home-page main > :not(.hero) {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 1000px) {
  .home-page .hero h1 {
    max-width: 400px;
    font-size: 48px;
  }

  .home-page .hero {
    min-height: 570px;
  }
}

@media (max-width: 760px) {
  .home-page .hero {
    min-height: 0;
    padding-top: calc(min(64vw, 440px) + 12px);
    padding-bottom: 32px;
  }

  .home-page .hero-media {
    width: 100%;
    height: min(78vw, 520px);
    object-position: center 35%;
  }

  .home-page .hero-overlay {
    width: 100%;
    height: min(78vw, 520px);
    background: linear-gradient(0deg, #330d31, #330d3100 35%);
  }

  .home-page .hero h1 {
    max-width: 540px;
    font-size: 42px;
  }

  .home-page .trust-strip,
  .home-page .census-purpose,
  .carnet-promo {
    grid-template-columns: minmax(0, 1fr);
  }

  .carnet-promo h2 { font-size: 32px; }
  .carnet-promo { --carnet-travel: 115px; }
  .carnet-promo-backing { background-size: 730px auto; }
  .carnet-promo::after { background: linear-gradient(165deg, #f8f4fbea 24%, #f5edf8ae 80%); }

  .home-page .trust-strip article {
    padding-inline: 0;
    border-right: 0;
  }
}

@media (max-width: 380px) {
  .home-page .hero h1 { font-size: 36px; }
}
