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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

/* Lenis (js/vendor/lenis.min.js, main.js) drives wheel scrolling; its own
   stylesheet inlined here instead of a separate request. Native smooth
   scrolling would fight Lenis's per-frame scrollTo, so it steps aside. */
html.lenis {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 350ms var(--ease-out);
}

img[loading="lazy"].is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  img[loading="lazy"] {
    transition: none;
  }
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  /* Drop movement, keep fades: every hero (home and inner pages) swaps its
     zoom/rise for the same 400ms fade the scroll reveal uses. */
  .hero__media img,
  .hero__media video,
  .hero__content,
  .booking,
  .page-hero__media img,
  .page-hero__content {
    animation: hero-fade 400ms var(--ease-out) both !important;
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
  }
}

/* assumption: skip link not shown in design; standard accessibility convention */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  color: var(--color-ink);
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* ---------- Page transitions ----------
   Moving between pages cross-fades instead of cutting through a blank frame,
   the same on every page. The header and the WhatsApp float are named so
   they hold their place while the page underneath changes; the new page's
   hero plays its own entrance on top of the fade. Browsers without
   cross-document view transitions navigate as before. */
@view-transition {
  navigation: auto;
}

.header {
  view-transition-name: site-header;
}

.whatsapp-float {
  view-transition-name: whatsapp-float;
}

::view-transition-old(root) {
  animation: page-out var(--dur-page) var(--ease-out) both;
}

::view-transition-new(root) {
  animation: page-in var(--dur-page) var(--ease-out) both;
}

::view-transition-group(site-header),
::view-transition-group(whatsapp-float) {
  animation-duration: var(--dur-page);
  animation-timing-function: var(--ease-out);
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

/* Reduced motion: the fade stays (shorter), the header does not travel. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) {
    animation-duration: 0s;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 150ms;
  }
}
