/* Bos Villas Bali - design system v2 (feedback round 1)
   Typography mirrors the original site: Prata (serif) for display and
   headings, Montserrat for body. Both self-hosted (CSP font-src 'self').
   Palette: jungle green, warm sand, near-black, gold accent. */

@font-face {
  font-family: 'Prata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/prata-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-var.woff2') format('woff2');
}

:root {
  --ink: #131511;
  --jungle: #1f3d2b;
  --jungle-deep: #162c1f;
  --sand: #f5f0e6;
  --sand-warm: #ece3d2;
  --gold: #b99652;
  --white: #ffffff;
  --max-w: 1120px;
  --serif: 'Prata', Georgia, serif;
  --sans: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 16px;
}

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

a { color: var(--jungle); }

h1, h2, h3.display { font-family: var(--serif); font-weight: 400; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 240, 230, 0.96);
  border-bottom: 1px solid var(--sand-warm);
  backdrop-filter: blur(6px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand img { height: 46px; width: auto; }
.brand .brand-text {
  font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.06em;
}
.nav a {
  margin-left: 22px; text-decoration: none; color: var(--ink);
  font-size: 0.92rem; font-weight: 500;
}
.nav a:hover { color: var(--jungle); }
.nav a.btn-book {
  background: var(--jungle); color: var(--white);
  padding: 10px 20px; border-radius: 2px; font-weight: 600;
}
.nav a.btn-book:hover { background: var(--jungle-deep); color: var(--white); }
.nav-toggle { display: none; }

/* Hero (video or image) */
.hero { position: relative; color: var(--white); overflow: hidden; }
.hero video, .hero > img {
  width: 100%; height: min(82vh, 680px); object-fit: cover; display: block;
}
.hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(19,21,17,0.25) 0%, rgba(19,21,17,0.55) 100%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  letter-spacing: 0.02em; max-width: 20ch; line-height: 1.25;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.hero p.sub {
  margin-top: 14px; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 400;
  max-width: 60ch; margin-left: auto; margin-right: auto;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.hero .cta {
  display: inline-block; margin-top: 28px; background: var(--white);
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 14px 34px; border-radius: 2px; letter-spacing: 0.04em;
}
.hero .cta:hover { background: var(--sand); }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--sand-warm); }
.kicker {
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.78rem; font-weight: 600; margin-bottom: 10px;
  font-family: var(--sans);
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; text-wrap: balance; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin-bottom: 18px; text-wrap: balance; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.lede { max-width: 62ch; margin-bottom: 14px; }

/* Oasis section (logo graphic + centered invite) */
.oasis { text-align: center; }
.oasis img.mark { width: 96px; margin: 0 auto 18px; }
.oasis h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.oasis p { max-width: 62ch; margin: 0 auto 26px; }
.btn-primary {
  display: inline-block; background: var(--jungle); color: var(--white);
  text-decoration: none; font-weight: 600; padding: 14px 34px;
  border-radius: 2px; letter-spacing: 0.04em;
}
.btn-primary:hover { background: var(--jungle-deep); }

/* Villa cards: whole card clickable, image zoom + veil on hover */
.villa-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px; margin-top: 40px;
}
.villa-card {
  position: relative; background: var(--white); border-radius: 3px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(19,21,17,0.08);
  display: flex; flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.villa-card:hover { box-shadow: 0 10px 28px rgba(19,21,17,0.18); transform: translateY(-3px); }
.villa-card .thumb { overflow: hidden; position: relative; }
.villa-card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(19,21,17,0); transition: background 0.3s ease;
}
.villa-card:hover .thumb::after { background: rgba(19,21,17,0.18); }
.villa-card .thumb img {
  height: 240px; width: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.villa-card:hover .thumb img { transform: scale(1.05); }
.villa-card .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.villa-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.villa-card h3 a { text-decoration: none; color: var(--ink); }
/* stretched link: makes photo + title + whole card clickable */
.villa-card h3 a::after { content: ""; position: absolute; inset: 0; }
.villa-card p.spec { color: #55584f; font-size: 0.95rem; margin-bottom: 18px; }
.villa-card .btn {
  margin-top: auto; align-self: flex-start; text-decoration: none;
  background: var(--jungle); color: var(--white); font-weight: 600;
  font-size: 0.92rem; padding: 11px 24px; border-radius: 2px;
  position: relative; z-index: 1;
}
.villa-card .btn:hover { background: var(--jungle-deep); }

/* Services grid with icons */
.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px 40px; margin-top: 36px;
}
.svc h3 { color: var(--jungle); display: flex; align-items: center; gap: 10px; }
.svc h3 .icon svg { height: 1.15em; width: auto; fill: var(--gold); display: block; }

/* Villa detail */
.detail-hero img { width: 100%; height: min(60vh, 520px); object-fit: cover; }
.detail-head { padding: 48px 0 8px; }
.detail-head p.spec { color: #55584f; font-size: 1.05rem; margin-top: 4px; }
/* On desktop the booking box is visible beside the content, so the extra
   Check-availability button under the title is hidden; on mobile the box is
   far down the page and the anchor button earns its place. */
.detail-head .btn-primary { margin-top: 18px; display: none; }

/* Guest rating line */
.rating { color: var(--gold); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.rating .muted { color: #55584f; font-weight: 400; }
.two-col {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start;
}
.facts { background: var(--white); padding: 28px; border-radius: 3px; }
.facts h3 { margin-top: 22px; font-family: var(--serif); font-weight: 400; }
.facts h3:first-child { margin-top: 0; }
.facts ul { list-style: none; }
.facts li {
  padding: 4px 0; font-size: 0.95rem;
  display: flex; align-items: center; gap: 10px;
}
.facts li .icon svg { height: 1em; width: 1.2em; fill: var(--jungle); flex: none; display: block; }

/* Booking box */
.booking-box {
  background: var(--white); border: 1px solid var(--sand-warm);
  border-radius: 3px; padding: 28px; margin-bottom: 28px;
}
.booking-box h2 { margin-bottom: 6px; }
.booking-box p.note { color: #55584f; font-size: 0.9rem; margin-bottom: 18px; }

/* Search bar (villas index) */
.search-widget { margin-top: 36px; }

/* Photo grids: clickable lightbox thumbs */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-top: 28px;
}
.photo-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.photo-grid a.lb {
  display: block; overflow: hidden; border-radius: 3px; position: relative;
}
.photo-grid a.lb::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(19,21,17,0); transition: background 0.3s ease;
}
.photo-grid a.lb:hover::after { background: rgba(19,21,17,0.18); }
.photo-grid img {
  height: 230px; width: 100%; object-fit: cover; border-radius: 3px;
  transition: transform 0.45s ease;
}
/* Villa galleries: keep the photos' natural 3:2 frame instead of cropping
   into squares (feedback round 2: photos looked compressed). */
.photo-grid.two-col img { height: auto; aspect-ratio: 3 / 2; }
.photo-grid a.lb:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(19,21,17,0.92);
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 3px; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--sand);
  font-size: 2.2rem; cursor: pointer; padding: 12px 18px; line-height: 1;
  font-family: var(--sans);
}
.lightbox button:hover { color: var(--white); }
.lightbox .lb-close { top: 12px; right: 16px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { color: rgba(245,240,230,0.7); margin-top: 10px; font-size: 0.85rem; }

/* Media cards (photo + text, groups page and about) */
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px; margin-top: 36px;
}
.media-card { background: var(--white); border-radius: 3px; overflow: hidden; box-shadow: 0 1px 3px rgba(19,21,17,0.08); }
.media-card img { height: 220px; width: 100%; object-fit: cover; }
.media-card .body { padding: 20px 22px 24px; }
.media-card h3 { color: var(--jungle); }

/* FAQ accordion */
.faq-item {
  background: var(--white); border: 1px solid var(--sand-warm);
  border-radius: 3px; margin-top: 10px; padding: 0 20px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; padding: 16px 0;
  list-style-position: outside; color: var(--jungle);
}
.faq-item p { padding: 0 0 18px; max-width: 70ch; }

/* Video embed */
.video-embed { position: relative; aspect-ratio: 16 / 9; margin-top: 28px; }
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  border-radius: 3px;
}
.map-embed { aspect-ratio: 16 / 9; margin-top: 28px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 3px; }

/* Contact card */
.person-card {
  background: var(--white); border-radius: 3px; overflow: hidden;
  max-width: 380px; box-shadow: 0 1px 3px rgba(19,21,17,0.08);
}
.person-card img { height: 300px; width: 100%; object-fit: cover; object-position: top; }
.person-card .body { padding: 20px 22px 24px; }
.person-card p.role { color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 600; margin-bottom: 10px; }

/* Footer */
.site-footer { background: var(--jungle-deep); color: var(--sand); padding: 64px 0 32px; }
.site-footer a { color: var(--sand); }
.foot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
}
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 12px; font-family: var(--serif); font-weight: 400; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 2px 0; font-size: 0.93rem; }
.site-footer p { font-size: 0.93rem; }
.site-footer .foot-logo { height: 72px; width: auto; margin-bottom: 16px; }
.copyright {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(245,240,230,0.15);
  font-size: 0.85rem; color: rgba(245,240,230,0.7);
}

/* Legal */
.legal-table { border-collapse: collapse; margin: 20px 0; min-width: 420px; }
.legal-table th, .legal-table td { border: 1px solid #ece3d2; padding: 10px 16px; text-align: left; background: #fff; }
.legal-table th { background: #1f3d2b; color: #fff; }
.legal h1 { margin-bottom: 4px; }
.legal .updated { color: #55584f; margin-bottom: 8px; }
.legal p, .legal li { max-width: 75ch; }
.legal h3 { margin-top: 32px; }

@media (max-width: 760px) {
  .detail-head .btn-primary { display: inline-block; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--sand);
    padding: 16px 24px; gap: 12px; border-bottom: 1px solid var(--sand-warm); }
  .nav.open a { margin-left: 0; }
  .nav-toggle { display: block; background: none; border: 1px solid var(--ink);
    border-radius: 2px; padding: 6px 12px; font-size: 0.9rem; cursor: pointer;
    font-family: var(--sans); }
  .two-col { grid-template-columns: 1fr; }
  .photo-grid.two-col { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
  .brand img { height: 38px; }
}

/* Villa detail description: breathing room and a readable measure, so the
   intro text aligns with the typography rhythm of the rest of the site
   (feedback round 3). */
.two-col > div > p { margin-bottom: 14px; max-width: 62ch; }
