@view-transition { navigation: auto }
@keyframes vp-entrada { from { opacity:0; transform:translateY(6px) } }
@keyframes vp-salida { to { opacity:0 } }
@media (prefers-reduced-motion:no-preference) {
  ::view-transition-old(root) {animation:vp-salida .15s ease-out both}
  ::view-transition-new(root) {animation:vp-entrada .24s ease-out both}
  :where(.pill,.contacto-wa,.essence-links a,.button,.text-link,.docs a,.documento nav a,.gallery-controls button,.mapfooter button) {
    transition:translate .18s ease,box-shadow .18s ease,background-color .18s ease
  }
  @media (hover:hover) {
    :where(.pill,.contacto-wa,.essence-links a,.button,.docs a,.documento nav a,.gallery-controls button,.mapfooter button):hover {
      translate:0 -2px;box-shadow:0 4px 12px #122c221f
    }
    .nature-card img {transition:scale .45s ease}
    .nature-card:hover img {scale:1.035}
  }
  :where(.pill,.button,.contacto-wa):active {translate:0 1px}
  dialog[open] {animation:vp-entrada .22s ease-out}
  details[open] > :not(summary,template,script) {animation:vp-entrada .2s ease-out}
}
@media (prefers-reduced-motion:reduce) {
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*) {animation:none!important}
}

/* Ambient accents keep moving while the copy and click targets stay still. */
@keyframes vp-orbit { to { rotate:1turn } }
@keyframes vp-pan { from { scale:1.015; translate:-.45% 0 } to { scale:1.09; translate:.75% -.6% } }
@keyframes vp-arrow { 0%,65%,100% {translate:0 0} 32% {translate:4px -2px} }
@keyframes vp-down { 0%,100% {translate:0 -2px} 50% {translate:0 4px} }
@keyframes vp-signal { from {transform:scale(.68);opacity:.9} to {transform:scale(1.9);opacity:0} }
@keyframes vp-glint { from {transform:translateX(-80%) skewX(-22deg)} to {transform:translateX(470%) skewX(-22deg)} }

@media (prefers-reduced-motion:no-preference) {
  .hero-copy .kicker {position:relative;padding-inline-start:21px}
  .hero-copy .kicker::before,.hero-copy .kicker::after {
    content:"";position:absolute;inset-inline-start:1px;top:calc(50% - 4px);
    width:8px;height:8px;border-radius:50%;background:#f8d89d
  }
  .hero-copy .kicker::after {animation:vp-signal 2.4s ease-out infinite}
  .hero-enlaces .sun span {display:inline-block;animation:vp-down 1.8s ease-in-out infinite}
  .tiny-sun svg {animation:vp-orbit 24s linear infinite}
  .gallery-image>img {animation:vp-pan 9s ease-in-out infinite alternate}
  .gallery:has(button[aria-label="Reanudar galería"]) .gallery-image>img {animation-play-state:paused}
  .essence-links a span,a.contacto-wa span {display:inline-block;animation:vp-arrow 2.6s ease-in-out infinite}
  :is(a.pill,a.contacto-wa,.essence-links a,a.button,header a.contact) {
    position:relative;isolation:isolate;overflow:hidden;
    transition:translate .24s ease,box-shadow .24s ease,background-color .24s ease
  }
  @media(hover:hover) and (pointer:fine) {
    :is(a.pill,a.contacto-wa,.essence-links a,a.button,header a.contact):hover {
      translate:0 -3px;box-shadow:0 8px 18px #10322738,inset 0 0 0 2px #dab67c
    }
    :is(a.pill,a.contacto-wa,.essence-links a,a.button,header a.contact):hover::before {
      content:"";position:absolute;pointer-events:none;inset:-30% auto -30% -10%;width:35%;
      background:linear-gradient(90deg,transparent,#ffe4b28a,transparent);
      animation:vp-glint .65s ease-out both
    }
  }
}

/* Drift the cards in alternating phases, leaving space between their paths. */
@keyframes vp-card-drift {
  from { transform:translateY(var(--vp-rise)) rotate(var(--vp-angle)) }
  to { transform:translateY(calc(-1 * var(--vp-rise))) rotate(calc(-1 * var(--vp-angle))) }
}
@media (prefers-reduced-motion:no-preference) {
  .amenity-grid,.nature-grid {
    --vp-rise:12px;
    --vp-angle:.45deg;
    padding-block:18px;
  }
  .amenity-grid article,.nature-card {
    animation:vp-card-drift 3.8s ease-in-out infinite alternate;
    animation-delay:-.6s;
  }
  .amenity-grid article:nth-child(even),.nature-card:nth-child(even) {
    animation-direction:alternate-reverse;
  }
  .amenity-grid article:nth-child(n+3) {animation-delay:-1.8s}
  .nature-card:nth-child(n+3) {--vp-rise:4px;--vp-angle:.2deg}
  .amenity-grid article:hover,.nature-card:hover,.nature-card:focus-visible {
    animation-play-state:paused;
  }
  @media(max-width:900px) {
    .nature-grid,.amenity-grid {--vp-rise:6px;--vp-angle:.22deg;row-gap:22px}
    .amenity-grid article {margin-bottom:20px}
  }
  @media(max-width:700px) {
    .nature-grid {--vp-rise:9px}
    .nature-card:nth-child(n+3) {--vp-rise:9px}
  }
}

@media(max-width:800px) {
  header:has(> .contact) {
    display:grid;grid-template-columns:minmax(0,1fr) auto;
    gap:0 10px;padding:8px 4vw 4px;
  }
  header:has(> .contact) > a:first-child {justify-self:start}
  header:has(> .contact) img {width:98px;height:46px}
  header > .contact {grid-column:2;grid-row:1;padding:9px 12px;font-size:13px}
  header:has(> .contact) nav {
    grid-column:1/-1;grid-row:2;display:flex;justify-content:space-between;
    gap:4px;width:100%;padding:0;
  }
  header:has(> .contact) nav a {display:inline-flex;align-items:center;min-height:44px;font-size:clamp(12px,3.35vw,14px);white-space:nowrap}
  .hero:has(.hero-enlaces) {
    box-sizing:border-box;height:auto;min-height:85svh;
    padding:calc(120px + env(safe-area-inset-top,0px)) 0 76px;
  }
  .hero:has(.hero-enlaces) .hero-copy {width:90%;margin:0 auto}
  .hero-enlaces a.pill {min-height:44px;box-sizing:border-box}
  .hero-actions {bottom:14px}
  #reserva-original {max-width:100%;overflow-x:clip}
  #lotes .tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  #lotes .tools label:first-child {grid-column:1/-1}
  #lotes .tools select {min-height:44px;font-size:16px}
  #lotes .mapfooter button {min-width:44px;min-height:44px}
}
@media(max-width:480px) {
  .hero:has(.hero-enlaces) h1 {font-size:clamp(42px,11vw,53px);text-wrap:balance}
  .hero:has(.hero-enlaces) .hero-enlaces {display:grid;justify-items:stretch;gap:8px}
  .hero-enlaces a.pill {justify-content:center;text-align:center}
}
