:root {
  --sand: #f6efe3;
  --cream: #fbf7f0;
  --paper: #fffdf8;
  --ink: #1a2629;
  --ink-soft: #3d4c50;
  --sea: #1b4a56;
  --sea-deep: #102f36;
  --foam: #e4eef0;
  --magenta: #d11c6d;
  --magenta-dark: #9e1453;
  --gold: #b58a4a;
  --line: rgba(16, 47, 54, 0.12);
  --shadow: 0 16px 40px rgba(16, 47, 54, 0.12);
  --radius: 18px;
  --header-h: 5.6rem;
  --font-serif: "Fraunces", "Palatino Linotype", Palatino, serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 76rem;
}

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

body {
  margin: 0;
  overflow-wrap: break-word;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta-dark); }
a:hover { color: var(--magenta); }
:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}
.logo img {
  width: min(240px, 52vw);
  height: auto;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem 0.9rem;
}
.nav a {
  color: var(--sea-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--magenta); }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 0.4rem;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--sea);
  color: #fff;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.2rem;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}
.btn-primary {
  background: var(--magenta);
  color: #fff;
  border-color: var(--magenta);
}
.btn-primary:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-sea {
  background: var(--sea);
  color: #fff;
  border-color: var(--sea);
}
.btn-sea:hover { background: var(--sea-deep); color: #fff; }
.menu-btn {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  padding: 0;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--sea-deep);
  position: relative;
  margin: 0 auto;
}
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

@media (max-width: 1280px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1.2rem;
    border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid var(--line);
  }
  .lang-toggle { margin: 0.8rem 0 0; align-self: flex-start; }
}

/* Hero
   Default is a static, viewport-tall photo with text at the bottom.
   When JS adds .hero--reveal (and motion is allowed), the section grows
   to ~200vh with a sticky full-viewport photo so the text can scroll
   down and fade first, revealing the clean photo before the page continues. */
.hero {
  position: relative;
  color: #fff;
  background: var(--sea-deep);
  padding: 0;
}
section.hero { padding: 0; }
.hero-pin {
  position: relative;
  min-height: min(88vh, 46rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}
@media (prefers-reduced-motion: no-preference) {
  .hero {
    height: 200vh;
    height: 200svh;
    min-height: 200vh;
    min-height: 200svh;
    /* Pull the photo up behind the sticky header so the text starts
       on-screen at the bottom of the viewport, and the pin can be 100svh. */
    margin-top: calc(-1 * var(--header-h));
  }
  .hero-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
  }
}
.hero-pin picture, .hero-pin picture img, .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 48%, rgba(0, 0, 0, 0.62) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 7rem 0 4.5rem;
}
.hero--reveal .hero-content,
.hero--reveal .hero-overlay {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero--reveal {
    height: auto;
    min-height: 0;
  }
  .hero--reveal .hero-pin {
    position: relative;
    height: auto;
    min-height: min(88vh, 46rem);
  }
  .hero--reveal .hero-content,
  .hero--reveal .hero-overlay {
    will-change: auto;
    transform: none !important;
    opacity: 1 !important;
  }
}
.eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: #f3d6a5;
  margin: 0 0 0.6rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(3rem, 7.2vw, 6.25rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero .lede {
  max-width: 44rem;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.92);
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.pano {
  background: var(--sea-deep);
}
.pano img {
  width: 100%;
  height: min(28vw, 220px);
  object-fit: cover;
  object-position: center 60%;
}

/* Sections */
section { padding: 4.5rem 0; }
.section-kicker {
  color: var(--magenta);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 3.8vw, 3.45rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--sea-deep);
  letter-spacing: -0.02em;
}
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
  color: var(--sea-deep);
}
.lead { font-size: 1.375rem; max-width: 50rem; color: var(--ink-soft); }

.split > *, .project-grid > *, .copy, .contact-grid > * { min-width: 0; }
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.split.reverse { grid-template-columns: 0.95fr 1.05fr; }
.split.reverse .copy { order: 2; }
.split img, .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 18rem;
}
.frame.tall { min-height: 24rem; }
.caption {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0.55rem 0 0;
}

@media (max-width: 800px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .copy { order: 0; }
}

/* Stays */
#stays { background: var(--sand); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(16, 47, 54, 0.08);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}
.card img {
  width: 100%;
  height: 15.5rem;
  object-fit: cover;
}
.card-body { padding: 1.25rem 1.3rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.65rem; }
.kind {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--magenta);
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}
.card p { margin: 0 0 1rem; color: var(--ink-soft); font-size: 1.2rem; }
.more { display: none; }
.card.is-open .more { display: inline; }
.card.is-open .ellipsis { display: none; }
.toggle-more {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--magenta-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.toggle-more:hover { color: var(--magenta); }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .card img { height: 18rem; }
}

/* Amenities */
.amenities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 2rem;
}
.amenity {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 0.95rem;
}
.amenity strong {
  display: block;
  font-size: 1.2rem;
  color: var(--sea-deep);
  margin-bottom: 0.15rem;
}
.amenity span { font-size: 1.1rem; color: var(--ink-soft); }
@media (max-width: 800px) {
  .amenities { grid-template-columns: 1fr 1fr; }
}

/* Clubs */
#clubs { background: var(--cream); }
.club + .club { margin-top: 4rem; }
.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.7rem;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  min-height: 11rem;
}
.gallery picture.span2, .gallery .span2 { grid-column: 1 / -1; }
.gallery picture.span2 img, .gallery img.span2 { height: 16rem; width: 100%; object-fit: cover; }
.foods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 0.7rem;
}
.foods img { width: 100%; height: 10rem; object-fit: cover; border-radius: 14px; }
@media (max-width: 700px) {
  .gallery, .foods { grid-template-columns: 1fr; }
  .gallery picture.span2 img, .gallery img.span2 { height: 14rem; }
}

.note {
  font-size: 1.12rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Location */
#location { background: var(--sea-deep); color: #eef4f5; }
#location h2, #location h3 { color: #fff; }
#location .lead { color: rgba(255,255,255,0.82); }
#location .caption { color: rgba(255,255,255,0.65); }
.map-switch img { width: 100%; border-radius: var(--radius); background: #fff; }
[data-lang="en"] .map-es, [data-lang="es"] .map-en { display: none; }
[data-lang="es"] .map-es, [data-lang="en"] .map-en { display: block; }
.loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.loc-grid img { width: 100%; height: 16rem; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 700px) {
  .loc-grid { grid-template-columns: 1fr; }
}

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  text-align: center;
  margin: 0;
  color: #f3d6a5;
}

/* Team */
#team { background: var(--sand); text-align: center; }
#team .lead { margin-inline: auto; }

/* Contact */
#contact { background: var(--cream); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
  box-shadow: 0 8px 24px rgba(16, 47, 54, 0.06);
}
.contact-card p { margin: 0.35rem 0; }
.contact-card a { font-weight: 700; text-decoration: none; }
form {
  display: grid;
  gap: 0.85rem;
}
label { font-weight: 650; font-size: 1.12rem; }
input, textarea {
  width: 100%;
  margin-top: 0.3rem;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 8.5rem; resize: vertical; }
.form-note { font-size: 1.08rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  background: var(--sea-deep);
  color: rgba(255,255,255,0.78);
  padding: 2rem 0;
  font-size: 1.12rem;
}
.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}
.site-footer a { color: #fff; }

.hours { margin-top: 1rem; }
.hours strong { display: block; }


/* Projects */
#projects { background: var(--paper); }
.project {
  margin-top: 3rem;
}
.project + .project { margin-top: 4rem; }
.project-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}
.project-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.project-photos figure { margin: 0; }
.project-photos img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  border-radius: 14px;
}
.project-photos .span2 { grid-column: 1 / -1; }
.project-photos .span2 img { height: 16rem; }
.project-photos .tall img { height: 22rem; object-position: center top; }
.project-photos .plan { grid-column: 1 / -1; }
.project-photos .plan img {
  height: auto;
  max-height: 28rem;
  object-fit: contain;
  background: #fff;
  object-position: center top;
}

.pano-frame { margin: 1.25rem 0 0; }
.pano-frame img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  object-position: center 60%;
  border-radius: var(--radius);
}
.included {
  margin-top: 3.5rem;
}
.included-list {
  columns: 2;
  column-gap: 2.5rem;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.25rem;
}
.included-list li {
  break-inside: avoid;
  margin: 0 0 0.45rem;
}
.included-sub {
  list-style: lower-alpha;
  margin: 0.35rem 0 0.6rem;
  padding-left: 1.3rem;
}
.drawings { margin-top: 3.5rem; }
.drawing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
.drawing-grid figure { margin: 0; }
.drawing-grid img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
}
@media (max-width: 800px) {
  .project-grid { grid-template-columns: 1fr; }
  .included-list { columns: 1; }
  .drawing-grid { grid-template-columns: 1fr; }
  .project-photos img { height: 12.5rem; }
}

/* Photo gallery */
#gallery { background: var(--sand); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  height: 14.5rem;
  object-fit: cover;
  border-radius: 14px;
}
.photo-grid .wide { grid-column: span 2; }
.photo-grid .wide img { height: 16rem; }
@media (max-width: 800px) {
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid .wide { grid-column: span 2; }
}
@media (max-width: 520px) {
  .photo-grid, .project-photos { grid-template-columns: 1fr; }
  .photo-grid .wide { grid-column: auto; }
  .photo-grid img, .photo-grid .wide img { height: 14rem; }
}

/* Print cover and typography-friendly print layout */
.print-cover { display: none; }

@media print {
  .print-cover {
    display: block;
    position: relative;
    width: 210mm;
    height: 297mm;
    overflow: hidden;
    margin: 0;
    background: #111;
    color: #fff;
    break-after: page;
    page-break-after: always;
  }
  .print-cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
  }
  .print-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.22) 72%, rgba(0, 0, 0, 0.58) 100%);
  }
  .print-cover-inner {
    position: absolute;
    left: 16mm;
    right: 16mm;
    bottom: 22mm;
    z-index: 1;
  }
  .print-cover-logo-wrap {
    display: inline-block;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 4mm;
    padding: 2.6mm 4.2mm 2.2mm;
    margin: 0 0 7mm;
    box-shadow: 0 1.2mm 4mm rgba(0, 0, 0, 0.22);
  }
  .print-cover-logo {
    width: 78mm;
    height: auto;
    margin: 0;
    display: block;
    filter: none;
  }
  .print-cover-eyebrow {
    font-size: 3.6mm;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: #f3d6a5;
    margin: 0 0 4mm;
  }
  .print-cover h1 {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 16mm;
    line-height: 1.05;
    margin: 0 0 6mm;
    color: #fff;
    max-width: none;
  }
  .print-cover-tag {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 6.2mm;
    line-height: 1.3;
    margin: 0;
    color: #f3d6a5;
    max-width: 165mm;
  }
  .skip, .menu-btn, .lang-toggle, .nav,
  .site-header, .hero, .pano, .hero-actions,
  #contact-form, [data-print-hide] {
    display: none !important;
  }
}

@page {
  size: A4 portrait;
  margin: 12mm 12mm 14mm 12mm;
}
@page:first {
  margin: 0;
}

/* Logo wave = SOS button (js/wave-sos.js) */
.logo-comp { position: relative; width: min(240px, 52vw); flex: none; }
.logo-comp .logo { display: block; }
.logo-comp .logo img { width: 100%; height: auto; display: block; }
.logo-comp .wave-sos { position: absolute; left: 0; top: 0; width: 24.4%; height: 81.9%; }
.nav a.nav-residents { color: #fff; background: var(--sea); border-radius: 999px; padding: 0.3rem 0.9rem; }
.nav a.nav-residents:hover { background: var(--magenta); color: #fff; }
.footer-links a { white-space: nowrap; }
@media (max-width: 1280px) { .nav a.nav-residents { margin-top: 0.6rem; text-align: center; border-bottom: 0; padding: 0.7rem 1rem; } }
@media print { .wave-sos .ws-pill, .wave-sos::before { display: none !important; } }
