@import 'tokens';

// Global safety net for full-bleed content (see @mixin slider-breakout,
// _mixins.scss) — components that intentionally bleed past .container's edge
// (testimonials, tab-component-2) rely on this instead of their own overflow:
// hidden, since a component's own box is exactly .container's width and can
// never be the correct clip boundary for something escaping .container itself.
// Both html and body are needed: body alone left document.documentElement's
// scrollWidth exceeding the viewport (verified live before landing on this).
html,
body {
  overflow-x: hidden;
}

// Reserve the vertical scrollbar's gutter permanently, so toggling
// overflow:hidden (the shared body-scroll lock, main.js) never changes the
// viewport's own rendered width — without this, any position:fixed element
// centered via left:50% (e.g. the booking widget's dock) visibly shifts a
// few px sideways and back each time the lock engages/releases, since 50%
// of a wider (scrollbar-gone) viewport lands in a different spot than 50%
// of the narrower (scrollbar-present) one. Support: Chrome/Edge 94+,
// Firefox 97+, Safari 18.2+ — older browsers just keep the old (shifting)
// behavior, no regression from today.
html {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text-primary);
  background-color: var(--color-pampas);
}


// ── Accessibility (EAA / WCAG 2.1 AA) ──────────────────────────────────────
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-text-primary);
  color: var(--color-pampas);
  text-decoration: none;

  &:focus {
    top: 1rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
