/* Interaction polish — loaded on every page. Entrance motion lives in
   js/page-entry.js. Nothing here is tied to scrolling. */

/* Buttons: a fill sweeps up from the bottom edge on hover. */
.button { position: relative; overflow: hidden; isolation: isolate; }
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dark);
  transform: translateY(101%);
  transition: transform 700ms cubic-bezier(.16, 1, .3, 1);
}
.button-outline-light::before { background: var(--ivory); }
@media (hover: hover) and (pointer: fine) {
  .button:hover::before { transform: none; }
  .button-gold:hover { background: #ad8c60; color: var(--ivory); }
  .button-outline-light:hover { color: var(--dark); }
}

/* Text links: an underline draws in from the left. */
.result-action,
.result-explore,
.le-text-link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 650ms cubic-bezier(.16, 1, .3, 1);
}
@media (hover: hover) and (pointer: fine) {
  .result-action:hover,
  .result-explore:hover,
  .le-text-link:hover { background-size: 100% 1px; }
}

/* Photos ease in a touch closer on hover. */
@media (hover: hover) and (pointer: fine) {
  .result-media img,
  .about-portrait img { transition: transform 1200ms cubic-bezier(.16, 1, .3, 1); }
  .result-item:hover .result-media img,
  .about-portrait:hover img { transform: scale(1.035); }
}

/* Page-to-page: a soft crossfade (browsers with cross-document view transitions). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: motion-fade-out 260ms ease both; }
::view-transition-new(root) { animation: motion-fade-in 520ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes motion-fade-out { to { opacity: 0; } }
@keyframes motion-fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .button::before, .result-action, .result-explore, .le-text-link { transition: none; }
}

/* Phone menu: fills the screen under the header; large serif links come into
   focus one after another; booking, phone and Instagram close the list. */
.nav-extras { display: none; }
@media (max-width: 800px) {
  html.menu-open { overflow: hidden; }
  .enhanced #main-navigation {
    position: fixed;
    top: var(--menu-top, var(--header-height));
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: none;
    padding: 12px max(24px, 6vw) calc(28px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(185, 154, 109, .22);
  }
  .enhanced #main-navigation > a,
  .enhanced #main-navigation .nav-trigger {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: space-between;
    text-align: left;
    padding-block: 15px;
    border-bottom: 1px solid rgba(245, 237, 224, .08);
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: .02em;
    line-height: 1.15;
    color: #f5ede0;
  }
  .enhanced #main-navigation.is-open > * { animation: menu-in 520ms cubic-bezier(.22, 1, .36, 1) both; }
  .enhanced #main-navigation.is-open > :nth-child(2) { animation-delay: 40ms; }
  .enhanced #main-navigation.is-open > :nth-child(3) { animation-delay: 80ms; }
  .enhanced #main-navigation.is-open > :nth-child(4) { animation-delay: 120ms; }
  .enhanced #main-navigation.is-open > :nth-child(5) { animation-delay: 160ms; }
  .enhanced #main-navigation.is-open > :nth-child(6) { animation-delay: 200ms; }
  .enhanced #main-navigation.is-open > :nth-child(7) { animation-delay: 240ms; }
  .enhanced #main-navigation.is-open > :nth-child(n+8) { animation-delay: 300ms; }
  .nav-extras {
    display: grid;
    align-self: stretch;
    width: 100%;
    gap: 18px;
    margin-top: auto;
    padding-top: 32px;
  }
  .enhanced #main-navigation .nav-extras .button { display: flex; width: 100%; max-width: none; min-height: 54px; justify-content: center; border: 0; font-family: var(--sans); font-size: 12px; letter-spacing: .14em; color: var(--dark); }
  .nav-extras-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
  .enhanced #main-navigation .nav-extras-row a {
    padding: 6px 0;
    border: 0;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .16em;
    color: #cfc0a6;
  }
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .enhanced #main-navigation.is-open > * { animation: none; }
}
