:root {
  --brand: #a90541;          /* logo crimson */
  --brand-dark: #7a032e;     /* deeper crimson — hover, footer, headings */
  --accent: #b8893f;         /* warm gold — complements the crimson */
  --cream: #faf5f1;          /* warm off-white background */
  --blush: #f6ece9;          /* soft rose tint for alternating sections */
  --ink: #2e2125;            /* warm near-black */
  --muted: #8a7378;          /* warm muted mauve-grey */
  --radius: 10px;
  --shadow: 0 8px 24px rgba(122, 3, 46, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;            /* keep snapped sections clear of the sticky header */
  scroll-snap-type: y mandatory;       /* one scroll lands on the next section */
}

/* Respect users who prefer no motion / no snapping. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
}

/* Each top-level section is a snap target; "always" forbids skipping one. */
.hero,
.section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--brand-dark); }
h3 { font-size: 1.4rem; }

a { color: var(--brand-dark); }

.container { width: min(1140px, 92%); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
code { background: rgba(0,0,0,0.06); padding: 0.1em 0.4em; border-radius: 4px; }

/* ── Splash screen ─────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  animation: splash-fade 1.8s ease forwards;
}
#splash img {
  width: min(360px, 72vw);
  height: auto;
}
@keyframes splash-fade {
  0%, 72% { opacity: 1; }
  100%    { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #splash { animation-duration: 0.01ms; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-dark); color: #fff; padding: 0.6rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  background: rgba(250, 245, 241, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(122, 3, 46, 0.12);
  border-bottom-color: rgba(122, 3, 46, 0.1);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: 10px;
  container-type: inline-size;        /* enables cqw so the logo can self-center */
}
/* The logo stays in its left-hand slot but is slid to the centre with a
   GPU-friendly transform; on scroll it animates back to the left. */
.brand {
  display: flex; align-items: center; text-decoration: none;
  transform: translateX(calc(50cqw - 50%));
  transition: transform 0.4s ease;
  will-change: transform;
}
.site-header.scrolled .brand { transform: translateX(0); }
.brand-logo {
  height: 175px; width: auto; display: block;
  transition: height 0.4s ease;
}
.site-header.scrolled .brand-logo { height: 70px; }

/* At the top only the logo is shown; the menu + phone fade in on scroll. */
.site-header .main-nav,
.site-header .phone-cta {
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.site-header.scrolled .main-nav { opacity: 1; visibility: visible; margin-left: auto; }
.site-header.scrolled .phone-cta { opacity: 1; visibility: visible; }
.nav-list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative; text-decoration: none; font-weight: 600; color: var(--ink);
  transition: color 0.2s ease;
}
.nav-list a:hover { color: var(--brand); }
.nav-list a.active { color: var(--brand); }
.nav-list a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--brand); border-radius: 2px;
}

.phone-cta {
  background: var(--brand); color: #fff; text-decoration: none;
  padding: 0.55rem 1.1rem; border-radius: 999px; font-weight: 700; white-space: nowrap;
}
.phone-cta:hover { background: var(--brand-dark); }
.phone-cta.big { display: inline-block; font-size: 1.3rem; margin: 0.5rem 0; }

/* Map navigation icons in the header (desktop) */
.header-nav-icons {
  display: flex; align-items: center; gap: 0.5rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.site-header.scrolled .header-nav-icons { opacity: 1; visibility: visible; }

/* Mobile quick-action icons — hidden on desktop, absolutely centred on mobile */
.mobile-action-icons {
  display: none;
  align-items: center; gap: 0.1rem;
}

.nav-icon-link {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--ink);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-icon-link:hover { color: var(--brand); background: rgba(169, 5, 65, 0.08); }
.nav-icon-link svg { width: 22px; height: 22px; fill: currentColor; }
/* Waze icon: inner face stays white; outer shape inherits currentColor */
.wz-st0 { fill: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: 0.25s; }


/* ---- Desktop: hero fills the full viewport, slider expands to fill the rest ---- */
@media (min-width: 761px) {
  .hero {
    height: calc(100vh - 90px); /* 90px = sticky header height (scrolled state) */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .slider {
    flex: 1;         /* fill all space below the title text */
    margin-top: 1rem;
    aspect-ratio: unset; /* height is controlled by flex, not a fixed ratio */
    min-height: 0;   /* allow flex child to shrink if viewport is very short */
  }
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  text-align: center;
  background: linear-gradient(180deg, var(--blush), var(--cream));
}
.hero-title { font-size: clamp(2.6rem, 7vw, 4.5rem); color: var(--brand-dark); margin-bottom: 0.2em; }
.hero-subtitle { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--muted); margin-top: 0; }

/* Slider */
.slider {
  position: relative; margin: 2rem 0 0;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #ddd;
}

.slides { display: flex; height: 100%; transition: transform 0.6s ease; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
  display: grid; place-items: center; transition: background 0.2s;
}
.slider-btn:hover { background: rgba(0,0,0,0.7); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }

.slider-dots { position: absolute; bottom: 14px; right: 16px; }
.slider-counter {
  background: rgba(0,0,0,0.45); color: #fff;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--blush); }
.section p { font-size: 1.05rem; }

/* Gallery */
.gallery-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 1.5rem 0 2rem; }
.gallery-tabs button {
  border: 1px solid var(--brand); background: transparent; color: var(--brand-dark);
  padding: 0.45rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-family: inherit;
  transition: 0.2s;
}
.gallery-tabs button:hover { background: rgba(169,5,65,0.08); }
.gallery-tabs button.active { background: var(--brand); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; aspect-ratio: 4 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.gallery-grid figure:hover img { transform: scale(1.06); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); text-align: center; }
.card .price { font-size: 2rem; font-weight: 800; color: var(--brand); margin: 0.3rem 0; }
.card .price span { font-size: 0.95rem; font-weight: 600; color: var(--muted); }

/* Features — Airbnb-style amenity grid */
.features {
  list-style: none; padding: 0; margin: 2rem auto 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: 3rem; row-gap: 0;
}
.features li {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 0; border-bottom: 1px solid #e5e5e5;
  background: none; border-radius: 0; box-shadow: none;
  font-size: 1rem; color: var(--ink);
}
.features li::before {
  content: "";
  flex-shrink: 0; width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e2125' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.section-alt .features li { border-bottom-color: #d8cdd0; }

.contact-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--brand-dark); color: #f3e3e7; text-align: center; padding: 1.5rem 0; }
.site-footer p { margin: 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 6px; }
.lightbox-close { position: absolute; top: 18px; right: 24px; background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); color: #fff; border: 0;
  width: 54px; height: 54px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

/* Responsive */
@media (max-width: 760px) {
  /* Sections stack tall on phones, so don't trap scrolling with snap there. */
  html { scroll-snap-type: none; }
  /* Make header-inner a positioning context for the centred icons */
  .header-inner { position: relative; }
  .nav-toggle { display: block; }
  /* Hamburger pushed to right; no extra flex needed since icons are out of flow */
  .main-nav { margin-left: auto; }
  /* Icons sit in the absolute centre of the header bar */
  .mobile-action-icons {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    align-items: center; gap: 0.1rem;
  }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--cream);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-list.open { max-height: 400px; }
  .nav-list li { border-top: 1px solid rgba(0,0,0,0.06); }
  .nav-list a { display: block; padding: 0.9rem 1rem; }
  .site-header.scrolled .phone-cta { display: none; }
  .site-header.scrolled .header-nav-icons { display: none; }
  .slider { aspect-ratio: 4 / 3; }
}
