/* ==========================================================================
   Vilavelha Suites — design tokens
   Dark ("stone at dusk") is the default and primary brand expression, since
   the logo is a white-fill mark built for a dark ground. Light ("stone at
   noon") is offered as a manual toggle for readers who prefer it — same
   granite-neutral + river-teal palette, re-tuned for a light ground rather
   than inverted wholesale.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: local("Cormorant Garamond");
}

:root {
  /* color */
  --bg: #14161a;
  --bg-elevated: #1b1e23;
  --bg-elevated-2: #23272e;
  --stone-line: rgba(255, 255, 255, 0.06);
  --stone-line-strong: rgba(255, 255, 255, 0.1);
  --text: #f2efe8;
  --text-muted: #b7b7b3;
  --text-faint: #83837f;
  --accent: #76a2a1;
  --accent-dim: #47615f;
  --on-accent: #0a1615;
  /* The exact corporate hex, locked — used for solid fills (buttons,
     active pills, badges) so those read as the true brand teal in both
     themes, while --accent itself is free to shift lightness for
     text/icon contrast against whatever background is current. */
  --accent-solid: #76a2a1;
  --danger: #e2836f;
  --nav-scrim: rgba(20, 22, 26, 0.72);
  --shadow-stone: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  --logo-filter: none;
  --stone-panel-bg: #2b2f36;
  --stone-panel-grad: linear-gradient(135deg, #363b43 0%, #2b2f36 45%, #22262c 100%);

  /* type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", serif;
  --font-body: "Outfit", -apple-system, "Segoe UI", sans-serif;

  /* radius scale — locked: cards 16px, inputs 10px, buttons/pills full */
  --r-card: 16px;
  --r-input: 10px;
  --r-pill: 999px;

  /* spacing rhythm (density: airy / 3) */
  --section-pad: 8rem;
  --section-pad-mobile: 4rem;

  --container: 1280px;
}

:root[data-theme="light"] {
  --bg: #f3f1ec;
  --bg-elevated: #fbfaf7;
  --bg-elevated-2: #ece9e2;
  --stone-line: rgba(20, 20, 18, 0.09);
  --stone-line-strong: rgba(20, 20, 18, 0.16);
  --text: #1d201f;
  --text-muted: #52564f;
  --text-faint: #767a72;
  --accent: #3e5b5a;
  --accent-dim: #b3cbcb;
  --danger: #b2432e;
  --nav-scrim: rgba(243, 241, 236, 0.78);
  --shadow-stone: 0 24px 48px -22px rgba(30, 28, 20, 0.22);
  --logo-filter: invert(1);
  --stone-panel-bg: #e4e0d6;
  --stone-panel-grad: linear-gradient(135deg, #ece8dd 0%, #e4e0d6 45%, #d9d4c6 100%);
}

@media (max-width: 768px) {
  :root {
    --section-pad: 4.5rem;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 3rem;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding-block: var(--section-pad);
  position: relative;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 3.5rem;
}

.section-head h2 {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 42ch;
}

/* ==========================================================================
   Stone texture — illustrated ashlar masonry, standing in for photography.
   Layered gradients simulate cut granite blocks with mortar joints, plus a
   fine turbulence grain so it doesn't read as a flat CSS pattern.
   ========================================================================== */

.stone-panel {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background-color: var(--stone-panel-bg);
  background-image:
    linear-gradient(rgba(20, 22, 26, 0.35), rgba(20, 22, 26, 0.55)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05) 0px,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 64px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.28) 0px,
      rgba(0, 0, 0, 0.28) 2px,
      transparent 2px,
      transparent 128px
    ),
    var(--stone-panel-grad);
  background-blend-mode: overlay, normal, normal, normal;
}

.stone-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stone-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 10%, rgba(127, 201, 189, 0.16), transparent 55%);
}

.stone-panel > .stone-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.stone-panel > .stone-mark svg {
  width: 34%;
  min-width: 64px;
  max-width: 220px;
  opacity: 0.9;
}

/* Real photography sits inside the same stone-panel frame: the texture
   shows briefly while the photo loads (or if it 404s), the image then
   covers it, and the panel's teal radial glow (::after) glazes on top. */
.stone-panel > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.nav.is-scrolled {
  background: var(--nav-scrim);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--stone-line);
}

.nav__logo img,
.footer__brand img {
  filter: var(--logo-filter);
}

.nav-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

.nav .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  height: 76px;
}

.nav__logo img {
  height: 22px;
  width: auto;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Deliberately set apart from the Reservar/menu cluster, hugging the
   far edge of the bar on its own. */
.nav__theme-toggle {
  margin-left: 1.5rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-pill);
  padding: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-faint);
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-pill);
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--accent-solid);
  color: var(--on-accent);
}

/* Brand-mark menu trigger — replaces the generic three-line hamburger
   used by nearly every template nav. Same control opens the menu on
   both desktop and mobile. */
.nav__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stone-line-strong);
  background: transparent;
  border-radius: var(--r-pill);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__trigger:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* The brand-mark trigger reads in the true corporate teal at rest, not
   just on hover — it's the logo, not neutral UI text, so it uses the
   undimmed --accent-solid rather than the contrast-adjusted --accent
   (which goes quite dark in light theme and read as "black"). */
#menu-trigger {
  color: var(--accent-solid);
}

#theme-toggle .theme-icon--moon {
  display: none;
}

:root[data-theme="light"] #theme-toggle .theme-icon--sun {
  display: none;
}

:root[data-theme="light"] #theme-toggle .theme-icon--moon {
  display: block;
}

.nav__trigger[aria-expanded="true"] {
  transform: rotate(45deg);
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* ==========================================================================
   Full-screen menu
   ========================================================================== */

/* The full-screen menu is a deliberate constant: it stays in the dark
   "stone at night" treatment regardless of the page's light/dark toggle,
   by re-scoping the shared tokens locally rather than reading the root
   theme. This is a signature brand moment, not a themeable section. */
.site-menu {
  --bg-elevated: #1b1e23;
  --text: #f2efe8;
  --text-muted: #b7b7b3;
  --text-faint: #83837f;
  --stone-line: rgba(255, 255, 255, 0.06);
  --stone-line-strong: rgba(255, 255, 255, 0.1);
  --accent: #9ebdbc;
  --on-accent: #0a1615;

  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg-elevated);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  overflow-y: auto;
}

.site-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("../assets/azulejo-tile.png");
  background-size: 220px 220px;
  background-repeat: repeat;
  pointer-events: none;
}

.site-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.site-menu__inner {
  position: relative;
  min-height: 100dvh;
  padding-block: 7rem 3rem;
  display: flex;
  flex-direction: column;
}

.site-menu__topbar {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-menu__close,
.site-menu__theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-menu__theme-toggle:hover,
.site-menu__close:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.site-menu__theme-toggle .theme-icon--moon {
  display: none;
}

:root[data-theme="light"] .site-menu__theme-toggle .theme-icon--sun {
  display: none;
}

:root[data-theme="light"] .site-menu__theme-toggle .theme-icon--moon {
  display: block;
}

@media (min-width: 1024px) {
  .site-menu__topbar {
    top: 1.6rem;
    right: 3rem;
  }
}

.site-menu__links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: auto 0 3rem;
}

.site-menu__links a {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.15;
  padding-block: 0.15em;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.site-menu__links a:hover,
.site-menu__links a:focus-visible {
  color: var(--accent);
}

.site-menu.is-open .site-menu__links a {
  opacity: 1;
  transform: translateY(0);
}

.site-menu.is-open .site-menu__links a:nth-child(1) { transition-delay: 0.08s; }
.site-menu.is-open .site-menu__links a:nth-child(2) { transition-delay: 0.14s; }
.site-menu.is-open .site-menu__links a:nth-child(3) { transition-delay: 0.2s; }
.site-menu.is-open .site-menu__links a:nth-child(4) { transition-delay: 0.26s; }

.site-menu__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-line);
}

.site-menu__contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.site-menu__contact a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-menu__contact a:hover {
  color: var(--text);
}

/* Shrink the full-screen menu on shorter viewports (small laptop
   screens) so the whole thing fits without scrolling. */
@media (max-height: 820px) {
  .site-menu__inner {
    padding-block: 5.5rem 1.75rem;
  }

  .site-menu__links {
    gap: 0;
    margin: auto 0 1.25rem;
  }

  .site-menu__links a {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    padding-block: 0.1em;
  }

  .site-menu__foot {
    padding-top: 1.25rem;
    gap: 1rem;
  }
}

@media (max-height: 640px) {
  .site-menu__inner {
    padding-block: 4.5rem 1.25rem;
  }

  .site-menu__links a {
    font-size: clamp(1.35rem, 4.5vw, 2rem);
  }
}

body.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .site-menu__links a {
    transition: opacity 0.2s linear;
    transform: none;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--r-pill);
  padding: 0.9rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent-solid);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: #8cb1b0;
}

.btn--ghost {
  background: transparent;
  border-color: var(--stone-line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn--small {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Hero — asymmetric split
   ========================================================================== */

/* Full-bleed photo hero: the slider is the entire section background
   (not a boxed card beside the text), with content overlaid at the
   bottom over a scrim. Deliberately theme-invariant, like the
   site-menu — light text on a photo, regardless of the page's
   light/dark toggle. */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: 76px;
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__parallax {
  position: absolute;
  inset: 0;
}

/* Classic Ken Burns, but scoped to each slide's own time on screen
   (matches the 4.5s autoplay interval) instead of looping forever
   unsynced with the crossfade — it always starts fresh at scale(1)
   the moment a slide becomes active and drifts gently to scale(1.06)
   right as the next crossfade begins, so the motion never jump-cuts
   or freezes mid-zoom. */
.hero__parallax .slider__slide {
  transform: scale(1);
  transition: opacity 0.01s linear 1.1s;
}

.hero__parallax .slider__slide.is-active {
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__parallax .slider__slide.is-active {
    animation: hero-kenburns 4.5s ease-in-out forwards;
  }
}

@keyframes hero-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__parallax .slider__slide,
  .hero__parallax .slider__slide.is-active {
    transition: opacity 0.01s linear 1.1s;
    transform: none;
    animation: none;
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10, 13, 12, 0.1) 0%, rgba(10, 13, 12, 0.02) 32%, rgba(10, 13, 12, 0.5) 75%, rgba(10, 13, 12, 0.82) 100%);
  pointer-events: none;
}

/* Compound selector (not just .hero__dots) so this reliably beats the
   later, more generic .slider__dots rule at equal specificity. */
.slider__dots.hero__dots {
  left: auto;
  right: 1.5rem;
  bottom: 1.75rem;
  transform: none;
  z-index: 3;
}

@media (min-width: 1024px) {
  .slider__dots.hero__dots {
    right: 3rem;
    bottom: 2.5rem;
  }
}

.hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-block: 4rem 5.5rem;
}

.hero__content {
  max-width: 640px;
}

.hero__content h1 {
  color: #f5f4f1;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  margin-bottom: 1.25rem;
}

.hero__content p {
  color: rgba(245, 244, 241, 0.85);
  font-size: 1.125rem;
  max-width: 34ch;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__actions .btn--ghost {
  color: #f5f4f1;
  border-color: rgba(245, 244, 241, 0.4);
}

.hero__actions .btn--ghost:hover {
  border-color: rgba(245, 244, 241, 0.7);
  color: #fff;
  background: rgba(245, 244, 241, 0.08);
}

/* The nav sits directly on the hero photo until the page scrolls past
   it (.is-scrolled), so it borrows the hero's always-light treatment
   rather than the current page theme's colors. */
.nav:not(.is-scrolled) .nav__logo img {
  filter: none;
}

.nav:not(.is-scrolled) .nav__trigger {
  color: #f5f4f1;
  border-color: rgba(245, 244, 241, 0.4);
}

.nav:not(.is-scrolled) .nav__trigger:hover {
  color: #fff;
  border-color: rgba(245, 244, 241, 0.7);
}

.nav:not(.is-scrolled) #menu-trigger {
  color: #f5f4f1;
}

/* ==========================================================================
   About / history section
   ========================================================================== */

.about {
  position: relative;
  overflow: hidden;
}

/* The property's own commissioned engraving of the fortress, faded in
   as a quiet watermark rather than a loud illustration. */
.about__map-bg {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -12%;
  transform: translateY(-50%);
  width: 60%;
  max-width: 720px;
  opacity: 0.1;
  pointer-events: none;
}

:root[data-theme="light"] .about__map-bg {
  opacity: 0.16;
}

@media (max-width: 768px) {
  .about__map-bg {
    width: 90%;
    right: -30%;
  }
}

.about .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .about .container {
    grid-template-columns: 7fr 5fr;
    gap: 5rem;
  }
}

.about__visual {
  aspect-ratio: 4 / 3;
  order: -1;
}

@media (min-width: 1024px) {
  .about__visual {
    order: 2;
  }
}

.about__body h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.about__body p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-bottom: 1.25rem;
}

.about__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-line);
}

.about__fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--accent);
}

.about__fact span {
  color: var(--text-faint);
  font-size: 0.875rem;
}

/* ==========================================================================
   Suites
   ========================================================================== */

.suites-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .suites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .suites-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Cascade: cards reveal one after another instead of all at once. */
html.js .suite-card:nth-child(1) { transition-delay: 0ms; }
html.js .suite-card:nth-child(2) { transition-delay: 90ms; }
html.js .suite-card:nth-child(3) { transition-delay: 180ms; }
html.js .suite-card:nth-child(4) { transition-delay: 270ms; }
html.js .suite-card:nth-child(5) { transition-delay: 360ms; }

.suite-card {
  background: var(--bg-elevated);
  border: 1px solid var(--stone-line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.suite-card:hover {
  transform: translateY(-4px);
  border-color: var(--stone-line-strong);
}

.suite-card__visual {
  aspect-ratio: 16 / 11;
  border-radius: 0;
}

/* ==========================================================================
   Slider (suite card photo carousel)
   ========================================================================== */

[data-slider] {
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

[data-slider]:active {
  cursor: grabbing;
}

/* Backs up the JS draggable="false"/dragstart fix: without this,
   browsers try to pick the <img> up as a native ghost-image drag,
   which is what made mouse/trackpad dragging feel broken. */
.slider__slide {
  -webkit-user-drag: none;
  user-drag: none;
}

/* Light "grabbed" feedback while a drag is in progress, so the swipe
   reads as responsive even though the crossfade itself only commits
   once the drag ends. */
[data-slider].is-dragging .slider__slide.is-active {
  filter: brightness(0.94);
}

/* Crossfade, fixed so the panel texture never shows through: the
   outgoing slide holds full opacity until the incoming one has
   completely finished fading in (opacity transition delayed by the
   same 1.1s), then snaps to 0 invisibly underneath it. Without the
   delay, both slides are simultaneously translucent for the middle of
   the transition and the stone-panel texture bleeds through both,
   reading as the photo "splitting into parts". */
.slider__slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.01s linear 1.1s;
}

.slider__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specificity note: must beat ".stone-panel > img" (which sets
   position: relative for plain photo frames), otherwise slides stack
   in normal flow instead of overlapping and only the first is ever
   visible. */
.stone-panel > img.slider__slide {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .slider__slide,
  .slider__slide.is-active {
    transition: none;
  }
}

.slider__dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}

.slider__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.slider__dot.is-active {
  background: #fff;
  transform: scale(1.35);
}

.suite-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.suite-card__body h3 {
  font-size: 1.5rem;
}

.suite-card__amenities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

.suite-card__amenities li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.suite-card__amenities svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.suite-card__body .btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Trust bar (reviews)
   ========================================================================== */

.trust-bar {
  padding-block: 2rem;
  border-bottom: 1px solid var(--stone-line);
}

.trust-bar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .trust-bar__inner {
    justify-content: flex-end;
  }
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-card);
  padding: 0.65rem 1.35rem 0.65rem 0.65rem;
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.trust-badge:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-stone);
}

.trust-badge__score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.trust-badge__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.trust-badge__count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.trust-badge__source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.trust-badge__source svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery-grid {
  columns: 3 260px;
  column-gap: 1.25rem;
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 2 180px;
  }
}

.gallery-grid figure {
  margin: 0 0 1.25rem;
  break-inside: avoid;
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--stone-panel-bg);
}

.gallery-grid img {
  width: 100%;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 11, 13, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-stone);
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 22, 26, 0.5);
  color: #f2efe8;
  cursor: pointer;
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox__nav--prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .lightbox__nav {
    width: 38px;
    height: 38px;
  }
  .lightbox__nav--prev {
    left: 0.5rem;
  }
  .lightbox__nav--next {
    right: 0.5rem;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  max-width: 44rem;
}

.faq-item {
  border-bottom: 1px solid var(--stone-line);
}

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: transparent;
  border: none;
  text-align: left;
  padding-block: 1.5rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.faq-item__q svg {
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-item__q svg {
  transform: rotate(180deg);
}

.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.is-open .faq-item__a {
  grid-template-rows: 1fr;
}

.faq-item__a-inner {
  overflow: hidden;
}

.faq-item__a p {
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  max-width: 60ch;
}

/* ==========================================================================
   Modal (suite detail)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-card);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal__visual {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card) var(--r-card) 0 0;
}

.modal__body {
  padding: 2rem;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal__head h3 {
  font-size: 1.85rem;
}

.modal__close {
  background: transparent;
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-pill);
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

.modal__desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 60ch;
}

.modal__amenities {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal__amenities li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal__amenities svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.modal__extra {
  margin-bottom: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone-line);
}

.modal__extra-group + .modal__extra-group {
  margin-top: 1.25rem;
}

.modal__extra-group h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.6rem;
}

.modal__extra-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
}

.modal__extra-group li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal__extra-group svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

body.modal-open {
  overflow: hidden;
}

/* ==========================================================================
   Reservation form
   ========================================================================== */

.reserve .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .reserve .container {
    grid-template-columns: 4fr 8fr;
    gap: 5rem;
  }
}

.reserve__intro h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.reserve__intro p {
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: 1.5rem;
}

.reserve__contact-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.reserve__contact-line svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.reserve__or {
  margin: 1.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone-line);
  font-size: 0.9rem;
  color: var(--text-faint);
}

.form {
  background: var(--bg-elevated);
  border: 1px solid var(--stone-line);
  border-radius: var(--r-card);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--stone-line-strong);
  border-radius: var(--r-input);
  padding: 0.85rem 1rem;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127, 201, 189, 0.22);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

.field__error {
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1.1em;
}

.field__hint {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin: -0.5rem 0 1.25rem;
}

.field input[type="date"] {
  color-scheme: dark;
}

:root[data-theme="light"] .field input[type="date"] {
  color-scheme: light;
}

.form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* On narrow screens .form-row--split collapses to one column, so every
   field becomes its own full-width row — six stacked inputs plus the
   suite picker and message box add up to a lot of scroll. This block
   compresses the vertical rhythm, keeps name/surname, phone/email and
   the two dates paired up two-per-row even on a phone, and — for the
   plain text fields — drops the separate label line entirely in favor
   of the same text as a placeholder (see applyFieldPlaceholders() in
   main.js), which is the single biggest space saving. The <label>
   itself stays in the DOM (just visually hidden) so screen readers
   still get a real field/label association. */
@media (max-width: 640px) {
  .form {
    padding: 1.25rem 1rem;
  }

  .form-row {
    gap: 0.6rem;
  }

  .form-row--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field {
    gap: 0.3rem;
    margin-bottom: 0.6rem;
  }

  .field label {
    font-size: 0.78rem;
  }

  .field input,
  .field select,
  .field textarea {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  .field textarea {
    min-height: 64px;
  }

  .field__hint {
    font-size: 0.76rem;
    margin: -0.25rem 0 0.6rem;
  }

  .field[data-field="nome"] label,
  .field[data-field="sobrenome"] label,
  .field[data-field="telefone"] label,
  .field[data-field="email"] label,
  .field[data-field="mensagem"] label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .field[data-field="nome"],
  .field[data-field="sobrenome"],
  .field[data-field="telefone"],
  .field[data-field="email"],
  .field[data-field="mensagem"] {
    margin-bottom: 0.5rem;
  }
}

.form__status {
  font-size: 0.9rem;
  color: var(--accent);
}

.form__status[hidden] {
  display: none;
}

/* ==========================================================================
   Location & contact
   ========================================================================== */

.location .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .location .container {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
  }
}

.location__map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--stone-line);
}

@media (min-width: 1024px) {
  .location__map {
    order: 2;
    aspect-ratio: auto;
  }
}

#location-map {
  width: 100%;
  height: 100%;
  background: var(--bg-elevated-2);
}

/* A genuinely minimal basemap (CARTO Positron/Dark Matter) rather than
   a recolored default map: muted greys, sparse labels, no attempt to
   force it into the brand color. Only the pin carries the brand teal. */
.leaflet-tile-pane {
  opacity: 0.92;
}

.leaflet-control-attribution {
  background: var(--nav-scrim) !important;
  color: var(--text-faint) !important;
  font-size: 0.65rem !important;
}

.leaflet-control-attribution a {
  color: var(--text-faint) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  border-color: var(--stone-line-strong) !important;
}

.map-pin svg {
  color: var(--accent-solid);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.info-block {
  margin-bottom: 2.25rem;
}

.info-block h3 {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.info-block p,
.info-block a {
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--text);
}

.info-block address {
  font-style: normal;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stone-line-strong);
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.social-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.social-row svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  position: relative;
  border-top: 1px solid var(--stone-line);
  padding-block: 2.5rem;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("../assets/azulejo-tile.png");
  background-size: 200px 200px;
  background-repeat: repeat;
  pointer-events: none;
}

/* azulejo-tile.png is the official brand pattern in brand teal, so it
   already reads correctly on both light and dark grounds with no
   per-theme filter needed. */
:root[data-theme="light"] .footer::before {
  opacity: 0.14;
}

.footer .container {
  position: relative;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer__brand img {
  height: 14px;
  width: auto;
  opacity: 0.7;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer__links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--text);
}

/* ==========================================================================
   Greca — azulejo frieze, scroll-linked
   A single decorative band (About → Suites transition only, per the
   one-marquee-per-page rule) that drifts right-to-left as it crosses the
   viewport. Driven by scroll position itself (animation-timeline: view()),
   not a timer, so it never moves while the user isn't scrolling.
   ========================================================================== */
.greca {
  position: relative;
  height: 84px;
  overflow: hidden;
  border-block: 1px solid var(--stone-line);
  background: var(--bg-elevated);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.greca__track {
  position: absolute;
  inset: 0;
  left: -25%;
  width: 150%;
  opacity: 0.6;
  background-image: url("../assets/azulejo-tile.png");
  background-size: 72px 72px;
  background-repeat: repeat-x;
  background-position: center;
}

@supports (animation-timeline: view()) {
  .greca__track {
    animation: greca-scroll linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 100%;
  }
}

@keyframes greca-scroll {
  from { transform: translateX(20%); }
  to { transform: translateX(-20%); }
}

@media (prefers-reduced-motion: reduce) {
  .greca__track {
    animation: none;
  }
}

/* ==========================================================================
   Scroll reveal (IntersectionObserver driven)
   ========================================================================== */

/* Hidden-until-revealed state only applies once js/main.js has confirmed
   it is running (html.js). No-JS / JS-failed visitors see full content
   immediately, no permanently-invisible sections. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[data-i18n-lang="pt"],
[data-i18n-lang="en"] {
  display: none;
}

html[lang="pt"] [data-i18n-lang="pt"],
html[lang="en"] [data-i18n-lang="en"] {
  display: revert;
}

html[lang="pt"] [data-i18n-lang="es"],
html[lang="pt"] [data-i18n-lang="en"],
html[lang="en"] [data-i18n-lang="pt"],
html[lang="en"] [data-i18n-lang="es"] {
  display: none;
}
