/* COTO Booking — motion layer. Content, layout hierarchy and existing interactions remain unchanged. */
:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-teal: #0e9b9c;
  --motion-blue: #0877d6;
}

html { scroll-padding-top: 82px; }
.header {
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 4px 24px rgba(18,50,91,.045);
  transition: background .3s ease, box-shadow .3s ease;
}
.desktop-nav a:not(.active)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg,var(--motion-blue),var(--motion-teal));
  transition: right .35s var(--motion-ease);
}
.desktop-nav a:not(.active):hover::after,
.desktop-nav a:not(.active):focus-visible::after { right: 0; }
.desktop-nav a, .brand, .header-actions > * { transition: color .25s ease, transform .25s var(--motion-ease); }

.hero { isolation: isolate; }
.hero-overlay { animation: coto-overlay-breathe 12s ease-in-out infinite alternate; }
.hero-content { z-index: 1; }
.hero-content > .eyebrow,
.hero-content > h1,
.hero-content > p,
.hero-content > .search-box,
.hero-content > .search-message {
  animation: coto-rise-in .8s var(--motion-ease) both;
}
.hero-content > .eyebrow { animation-delay: .08s; }
.hero-content > h1 { animation-delay: .16s; }
.hero-content > p { animation-delay: .24s; }
.hero-content > .search-box { animation: coto-search-in .95s var(--motion-ease) .3s both; }
.hero-content > .search-message { animation-delay: .38s; }
.search-box {
  transition: box-shadow .35s var(--motion-ease), transform .35s var(--motion-ease);
}
.search-box:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0,34,72,.28), 0 0 0 3px rgba(14,155,156,.12);
}
.search-field { transition: background .25s ease; }
.search-field:focus-within { background: #f4fbff; }

.trust-grid > div { transition: transform .35s var(--motion-ease), background .3s ease; border-radius: 12px; }
.trust-grid > div:hover { transform: translateY(-3px); background: rgba(255,255,255,.82); }
.trust-grid span { transition: transform .35s var(--motion-ease), color .3s ease; }
.trust-grid > div:hover span { transform: scale(1.1) rotate(-5deg); color: var(--motion-teal); }

.stay-card, .destination, .premium-card {
  transition: transform .42s var(--motion-ease), box-shadow .42s var(--motion-ease), border-color .3s ease;
}
.stay-card:hover, .premium-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 38px rgba(21,53,89,.14);
  border-color: rgba(8,119,214,.28);
}
.stay-card .photo > img:not(.featured-badge),
.destination > img {
  transition: transform .8s var(--motion-ease), filter .6s ease;
}
.stay-card:hover .photo > img:not(.featured-badge),
.destination:hover > img { transform: scale(1.055); }
.destination:hover { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(12,43,74,.2); }
.heart { transition: transform .25s var(--motion-ease), color .25s ease, box-shadow .25s ease; }
.heart:hover { transform: scale(1.12); box-shadow: 0 5px 15px rgba(16,39,67,.16); }
.heart.on { animation: coto-heart-pop .38s var(--motion-ease); }

button, .tab, .signup, .detail, .cta button, .search-btn {
  transition: transform .22s var(--motion-ease), box-shadow .28s ease, filter .25s ease, background-color .25s ease;
}
button:not(:disabled):active { transform: scale(.975); }
.signup:hover, .detail:hover, .search-btn:hover, .cta button:hover {
  filter: brightness(1.045);
  box-shadow: 0 8px 20px rgba(8,119,214,.2);
}
.tab { transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s var(--motion-ease); }
.tab:hover { transform: translateY(-2px); }
:focus-visible { outline: 3px solid rgba(14,155,156,.45); outline-offset: 3px; }

.cta-inner { transition: background-position .7s ease, box-shadow .4s var(--motion-ease); }
.cta-inner:hover { box-shadow: 0 18px 36px rgba(8,65,100,.18); }
.place-read, .section-heading, .trust-grid > div, .stay-card, .destination, .premium-card, .cta-inner {
  scroll-margin-top: 92px;
}

/* Scroll reveals are progressive-enhancement only; JS adds the class after the page is ready. */
html.motion-enabled .motion-reveal {
  opacity: 0;
  transform: translate3d(0,22px,0) scale(.99);
  transition: opacity .72s var(--motion-ease), transform .72s var(--motion-ease);
  transition-delay: var(--motion-delay, 0ms);
  will-change: opacity, transform;
}
html.motion-enabled .motion-reveal.motion-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@keyframes coto-rise-in {
  from { opacity: 0; transform: translate3d(0,18px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes coto-search-in {
  from { opacity: 0; transform: translate3d(0,22px,0) scale(.985); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}
@keyframes coto-overlay-breathe {
  from { filter: saturate(.96); }
  to { filter: saturate(1.08); }
}
@keyframes coto-heart-pop {
  0% { transform: scale(.8); }
  65% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@media (hover: none) {
  .stay-card:hover, .destination:hover, .premium-card:hover { transform: none; }
  .stay-card:hover .photo > img:not(.featured-badge), .destination:hover > img { transform: none; }
}
@media (max-width: 900px) {
  .trust-grid > div:hover { transform: none; }
  .stay-card:hover, .premium-card:hover { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html.motion-enabled .motion-reveal { opacity: 1; transform: none; }
}
