/* Guesthouse template. Change the colours here. */
:root {
  --bg: #f5f2ec;      /* off-white stone */
  --text: #2a2a28;    /* charcoal */
  --muted: #6b6a65;
  --line: #ddd8ce;
  --accent: #2f5d46;  /* forest green */
  --wa: #25d366;      /* WhatsApp green */
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 64px; /* room for the mobile contact bar */
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #24493a; }

/* ---------- 1. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 30; /* above the contact bar so the booking sheet covers it */
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}
.header-row .btn { flex-shrink: 0; white-space: nowrap; } /* long names must not squash "Book now" */
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav { display: none; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* Booking: mobile = bottom sheet, shown when "Book now" targets #book */
.booking {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
  padding: 20px 0 24px;
}
.booking:target { display: block; }
.booking-inner { display: grid; gap: 12px; position: relative; }
.booking-title { font-weight: 700; font-size: 1.1rem; }
.booking-close {
  position: absolute; right: 20px; top: -6px;
  font-size: 1.8rem; text-decoration: none; color: var(--muted);
}
.booking label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.booking input, .booking select {
  font: inherit;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.booking input:focus, .booking select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Mobile contact bar */
.contact-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.contact-bar a {
  padding: 18px;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.contact-call { background: var(--text); }
.contact-wa { background: var(--wa); }

/* ---------- 2. Hero ---------- */
.hero {
  display: flex;
  align-items: flex-end;
  min-height: 75vh;
  color: #fff;
  /* dark gradient so white text is readable on any photo; green shows if the photo is missing */
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.1) 60%),
              url("img/hero.jpg") center / cover, var(--accent);
}
.hero-text { width: 100%; padding-top: 48px; padding-bottom: 48px; animation: reveal .9s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 12px;
}
.hero p { font-size: 1.15rem; max-width: 36ch; margin-bottom: 24px; opacity: .95; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* ---------- Sections (shared) ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 24px;
}

/* ---------- 3. Rooms ---------- */
.rooms { display: grid; gap: 24px; }
.room {
  background: #fff;
  display: flex;
  flex-direction: column;
}
.room img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.room-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.badge {
  align-self: flex-start;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
}
.room h3 { font-size: 1.25rem; }
.amenities { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; }
.amenities li::before { content: "✓ "; color: var(--accent); }
.price { font-size: 1.2rem; font-weight: 700; margin-top: auto; }
.price small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.room .btn { text-align: center; }

/* ---------- 4. Reviews ---------- */
.section-band { background: #fff; }
.rating { margin: -12px 0 24px; color: var(--muted); }
.rating strong { color: var(--text); font-size: 1.2rem; }
.stars { color: #e0a526; letter-spacing: 2px; }
.reviews { display: grid; gap: 32px; }
.review { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; }
.review::before { content: "★★★★★"; display: block; color: #e0a526; letter-spacing: 2px; margin-bottom: 8px; }
.review blockquote { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; margin-bottom: 12px; }
.review figcaption { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* ---------- 5. Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--line);
}

/* ---------- 6. Essentials + Location ---------- */
.two-col { display: grid; gap: 48px; }
.essentials { display: grid; gap: 4px 24px; }
.essentials dt { font-weight: 700; margin-top: 12px; }
.essentials dd { margin: 0; color: var(--muted); }
.address { margin-bottom: 16px; }
.map {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  background: var(--line);
  margin-bottom: 16px;
}

/* ---------- 7. FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 32px 18px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 14px;
  font-size: 1.4rem; color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* ---------- 8. Footer ---------- */
.footer { background: var(--text); color: #e8e5de; padding: 56px 0 24px; }
.footer-grid { display: grid; gap: 32px; }
.footer p + p { margin-top: 4px; }
.footer h3 { font-size: 1rem; color: #9c9a93; margin-bottom: 8px; }
.footer a { color: #fff; }
.footer .brand { color: #fff; margin-bottom: 4px; }
.copyright { margin-top: 40px; font-size: .85rem; color: #9c9a93; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  html { scroll-padding-top: 140px; }
  .nav { display: flex; }
  .header-row { gap: 24px; }
  .section { padding-top: 88px; padding-bottom: 88px; }
  .rooms, .reviews, .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery { gap: 12px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 64px; }
  .essentials { grid-template-columns: max-content 1fr; }
  .essentials dt { margin-top: 0; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1.5fr; }
  .gallery img { aspect-ratio: 4 / 3; }

  .booking, .booking:target {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0;
  }
  .booking-inner { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
  .booking-title, .booking-close { display: none; }

  .contact-bar {
    inset: auto 24px 24px auto;
    display: block;
  }
  .contact-call { display: none; }
  .contact-wa { border-radius: 999px; padding: 14px 22px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
}

/* Respect the phone's "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text { animation: none; }
  .faq summary::after { transition: none; }
}
