:root {
  --mobile-gutter: 16px;
  --mobile-panel-maxw: 240px;
  --mobile-cta-maxw: 320px;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* ============================================
   SECTION CONTAINMENT
   Prevent absolute overlays from bleeding into adjacent sections
   ============================================ */
section {
  position: relative;
  isolation: isolate;
}

section>.absolute {
  z-index: 1;
}

.min-h-screen-safe {
  min-height: 100vh;
}

@supports (height: 100svh) {
  .min-h-screen-safe {
    min-height: 100svh;
  }
}

@supports (height: 100dvh) {
  .min-h-screen-safe {
    min-height: 100dvh;
  }
}

@media (max-width: 768px) {

  /* Prevent horizontal overflow on mobile */
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Constrain containers properly */
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl {
    max-width: 100%;
    padding-left: var(--mobile-gutter);
    padding-right: var(--mobile-gutter);
  }

  /* Responsive text scaling - prevent overwhelming large text */
  .text-7xl,
  .text-6xl {
    font-size: clamp(1.75rem, 8vw, 3rem) !important;
    line-height: 1.1;
  }

  .text-5xl {
    font-size: clamp(1.5rem, 6vw, 2.25rem) !important;
    line-height: 1.15;
  }

  .text-4xl {
    font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
    line-height: 1.2;
  }

  .text-3xl {
    font-size: clamp(1.125rem, 4.5vw, 1.5rem) !important;
    line-height: 1.25;
  }

  /* Body text - reduce sizes for mobile readability */
  .text-lg {
    font-size: 0.9375rem !important;
    /* 15px instead of 18px */
    line-height: 1.6;
  }

  .text-base {
    font-size: 0.875rem !important;
    /* 14px */
    line-height: 1.6;
  }

  /* Paragraph text in content sections */
  p.leading-relaxed,
  .leading-relaxed {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  /* Intro/description text */
  .text-gray-500.text-lg,
  .text-gray-600.leading-relaxed {
    font-size: 0.875rem !important;
    line-height: 1.6;
  }

  /* Smaller text stays small */
  .text-sm {
    font-size: 0.8125rem !important;
    /* 13px */
  }

  .text-xs {
    font-size: 0.6875rem !important;
    /* 11px */
  }

  /* Reduce padding on dense content sections */
  .p-12 {
    padding: 1.5rem !important;
  }

  .p-20 {
    padding: 2rem !important;
  }

  .md\:p-20 {
    padding: 1.5rem;
  }

  :root {
    --mobile-gutter: clamp(12px, 4vw, 20px);
    --mobile-panel-maxw: clamp(200px, calc(100vw - (var(--mobile-gutter) * 2) - 80px), 240px);
    --mobile-cta-maxw: clamp(260px, calc(100vw - (var(--mobile-gutter) * 2)), 320px);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  button,
  a[href],
  input[type="button"],
  input[type="submit"] {
    min-height: 44px;
  }

  h1,
  h2,
  h3,
  h4 {
    word-break: break-word;
    hyphens: auto;
  }

  .cookie-content,
  .privacy-content,
  .disclaimer-content {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #mobile-menu {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #mobile-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  .bg-fixed {
    background-attachment: scroll !important;
  }

  .section-compact {
    padding-top: clamp(48px, 10vw, 72px);
    padding-bottom: clamp(48px, 10vw, 72px);
  }

  /* ============================================
     MOBILE COMPACTNESS OPTIMIZATION
     Target: iPhone XR (414x896) / iPhone 12 Pro (390x844)
     ============================================ */

  /* Section vertical padding - drastically reduced */
  .py-20 {
    padding-top: 2.5rem !important;
    /* 40px instead of 80px */
    padding-bottom: 2.5rem !important;
  }

  .py-24 {
    padding-top: 2.5rem !important;
    /* 40px instead of 96px */
    padding-bottom: 2.5rem !important;
  }

  .py-32 {
    padding-top: 3rem !important;
    /* 48px instead of 128px */
    padding-bottom: 3rem !important;
  }

  .py-16 {
    padding-top: 2rem !important;
    /* 32px instead of 64px */
    padding-bottom: 2rem !important;
  }

  /* Padding-top/bottom individual */
  .pt-20,
  .pt-24,
  .pt-32 {
    padding-top: 2.5rem !important;
  }

  .pb-20,
  .pb-24,
  .pb-32 {
    padding-bottom: 2.5rem !important;
  }

  /* Bottom margins - tightened */
  .mb-16 {
    margin-bottom: 2rem !important;
    /* 32px instead of 64px */
  }

  .mb-12 {
    margin-bottom: 1.5rem !important;
    /* 24px instead of 48px */
  }

  .mb-8 {
    margin-bottom: 1rem !important;
    /* 16px instead of 32px */
  }

  .mb-6 {
    margin-bottom: 0.75rem !important;
    /* 12px instead of 24px */
  }

  /* Top margins - tightened */
  .mt-16,
  .mt-20 {
    margin-top: 2rem !important;
  }

  .mt-12 {
    margin-top: 1.5rem !important;
  }

  /* Gap utilities - compact spacing */
  .gap-16 {
    gap: 2rem !important;
    /* 32px instead of 64px */
  }

  .gap-12 {
    gap: 1.5rem !important;
    /* 24px instead of 48px */
  }

  .gap-8 {
    gap: 1rem !important;
    /* 16px instead of 32px */
  }

  .gap-6 {
    gap: 0.75rem !important;
    /* 12px instead of 24px */
  }

  /* Space-y utilities - tighter vertical rhythm */
  .space-y-16>*+* {
    margin-top: 2rem !important;
  }

  .space-y-12>*+* {
    margin-top: 1.5rem !important;
  }

  .space-y-8>*+* {
    margin-top: 1rem !important;
  }

  .space-y-6>*+* {
    margin-top: 0.75rem !important;
  }

  /* Min-height reductions */
  .min-h-\[600px\] {
    min-height: 350px !important;
  }

  .min-h-\[500px\] {
    min-height: 300px !important;
  }

  .min-h-\[400px\] {
    min-height: 250px !important;
  }

  /* Height reductions for containers */
  .h-\[600px\] {
    height: auto !important;
    min-height: 300px;
  }

  .h-\[500px\] {
    height: auto !important;
    min-height: 280px;
  }

  .h-\[400px\] {
    height: 280px !important;
  }

  /* Grid gaps - compact */
  .grid.gap-16 {
    gap: 1.5rem !important;
  }

  .grid.gap-12 {
    gap: 1rem !important;
  }

  /* Border/divider spacing adjustments */
  .border-l-4 {
    padding-left: 0.75rem !important;
  }

  /* Compact content blocks */
  .md\:pl-8 {
    padding-left: 0 !important;
    padding-top: 1rem;
  }

  /* Section intro text - max width for readability */
  section p.max-w-3xl,
  section p.max-w-2xl {
    max-width: 100%;
  }

  .stats-rail,
  .feature-rail {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .stats-rail::-webkit-scrollbar,
  .feature-rail::-webkit-scrollbar {
    display: none;
  }

  .stats-rail>* {
    flex: 0 0 auto;
    min-width: 150px;
    scroll-snap-align: start;
  }

  .feature-rail>* {
    flex: 0 0 auto;
    min-width: 220px;
    scroll-snap-align: start;
  }

  .feature-rail>*+* {
    margin-top: 0 !important;
  }

  .feature-rail--dark>* {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0.75rem 1rem;
  }

  .feature-rail--light>* {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 0.75rem 1rem;
  }

  .rail-fade {
    position: relative;
    --rail-fade: #ffffff;
  }

  .rail-fade::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 100%;
    background: linear-gradient(to left, var(--rail-fade), rgba(255, 255, 255, 0));
    pointer-events: none;
  }

  .rail-fade--dark {
    --rail-fade: #0a0a0a;
  }
}

/* ============================================
   SKIP LINK - Accessibility
   ============================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: #D4B483;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Keep the full-screen menu above the mobile CTA but below the navbar button. */
#mobile-menu {
  z-index: 49;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open #navbar {
  background-color: #18181b !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.mobile-menu-open #navbar img {
  filter: brightness(0) invert(1);
}

body.lightbox-open {
  overflow: hidden;
}

#lightbox {
  z-index: 10001 !important;
}

body.cookie-banner-visible .sticky-mobile-cta {
  display: none !important;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  max-width: 100%;
}

.footer-legal-links > * + * {
  margin-left: 0 !important;
}

/* Accessible brand-colour variants on light surfaces. */
nav[class*="bg-white"] .text-beige,
.anchor-nav a.active,
.anchor-nav-dropdown a.active,
html body .privacy-content a,
html body .disclaimer-content a,
html body .cookie-content a {
  color: #735D3C !important;
}

footer .text-gray-600 {
  color: #9CA3AF !important;
}

footer input::placeholder {
  color: #9CA3AF !important;
  opacity: 1;
}

/* ============================================
   CONTACT FORM - Shared mailto replacement
   ============================================ */
body.contact-modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 220ms ease;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal.is-open {
  opacity: 1;
}

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(7px);
}

.contact-modal__panel {
  position: relative;
  width: min(100%, 680px);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: #f7f5f0;
  color: #161616;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  transform: translateY(18px);
  transition: transform 220ms ease;
}

.contact-modal.is-open .contact-modal__panel {
  transform: translateY(0);
}

.contact-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d8d2c8;
  background: transparent;
  color: #161616;
  font-size: 1.8rem;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

.contact-modal__close:hover {
  background: #161616;
  color: #fff;
}

.contact-modal__eyebrow {
  margin-bottom: 0.9rem;
  color: #735d3c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact-modal__title {
  max-width: calc(100% - 3rem);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.3rem, 7vw, 3.7rem);
  font-weight: 500;
  line-height: 0.96;
}

.contact-modal__intro {
  max-width: 34rem;
  margin-top: 1.15rem;
  color: #5f5b55;
  font-size: 0.93rem;
  line-height: 1.7;
}

.contact-modal__context {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 0.75rem;
  background: #ebe4d8;
  color: #5c482c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form {
  margin-top: 1.75rem;
}

.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form__field {
  display: block;
  margin-bottom: 1rem;
}

.contact-form__field > span {
  display: block;
  margin-bottom: 0.45rem;
  color: #3e3b37;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-form__field em {
  color: #8b3e2d;
  font-style: normal;
}

.contact-form__field small {
  color: #817b73;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  border: 1px solid #d5d0c7;
  border-radius: 0;
  background: #fff;
  color: #161616;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}

.contact-form__field input {
  min-height: 3.1rem;
  padding: 0.75rem 0.9rem;
}

.contact-form__field textarea {
  min-height: 7rem;
  padding: 0.8rem 0.9rem;
  resize: vertical;
}

.contact-form__field textarea::placeholder {
  color: #918b83;
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: #625e58;
  font-size: 0.74rem;
  line-height: 1.55;
}

.contact-form__consent input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.12rem;
  accent-color: #735d3c;
}

.contact-form__consent a {
  color: #735d3c;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-form__submit {
  width: 100%;
  min-height: 3.35rem;
  margin-top: 1.35rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease;
}

.contact-form__submit:hover:not(:disabled) {
  background: transparent;
  color: #171717;
}

.contact-form__submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.contact-form__status,
.newsletter-form-status {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  color: #625e58;
  font-size: 0.76rem;
  line-height: 1.5;
}

.contact-form__status.is-error,
.newsletter-form-status.is-error {
  color: #a5402d;
}

.newsletter-form-status.is-success {
  color: #b7cfad;
}

.contact-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.contact-form__success {
  padding: clamp(2.5rem, 8vw, 5rem) 0;
  text-align: center;
}

.contact-form__success-mark {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  border: 1px solid #735d3c;
  border-radius: 50%;
  color: #735d3c;
  font-size: 1.5rem;
}

.contact-form__success h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
}

.contact-form__success p {
  max-width: 28rem;
  margin: 0.8rem auto 1.7rem;
  color: #625e58;
  line-height: 1.7;
}

.contact-form__success button {
  padding: 0.8rem 1.8rem;
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-modal button:focus-visible,
.contact-modal a:focus-visible,
.contact-modal input:focus-visible,
.contact-modal textarea:focus-visible {
  outline: 2px solid #735d3c !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .contact-modal {
    align-items: end;
    padding: 0;
  }

  .contact-modal__panel {
    width: 100%;
    max-height: 94dvh;
    padding: 1.75rem 1.25rem 2rem;
  }

  .contact-form__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

html body .amenities-nav-btn {
  color: #4B5563;
}

html body #location .map-destination-item .dest-travel {
  color: #4B5563;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #111827 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px #D4B483 !important;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
