/* Palette from Goa itself: laterite stone, limewash walls, palm shade, azulejo blue. */
:root {
  --bg: #f3eee4;
  --surface: #ebe4d6;
  --ink: #1f1a15;
  --muted: #5d544a;
  --line: #d3c8b6;
  --laterite: #9a3b22;
  --laterite-ink: #fff8ef;
  --palm: #2e4a39;
  --azul: #23466e;
  --ok: #2e5e3a;
  --bad: #9a2a22;
  --busy: #d9cfbf;
  --sel: #23466e;
  --sel-ink: #fff;
  --range: #cdd8e6;
  --display: "Newsreader", Georgia, serif;
  --body: "Public Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17140f; --surface: #221d17; --ink: #f0e9dd; --muted: #b3a896; --line: #3a3229;
    --laterite: #d0663f; --laterite-ink: #1a0f0a; --palm: #8fb59b; --azul: #8fb0d8;
    --ok: #8fc79b; --bad: #f08a7f; --busy: #3a3229; --sel: #8fb0d8; --sel-ink: #10161f; --range: #2b3a4d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17140f; --surface: #221d17; --ink: #f0e9dd; --muted: #b3a896; --line: #3a3229;
  --laterite: #d0663f; --laterite-ink: #1a0f0a; --palm: #8fb59b; --azul: #8fb0d8;
  --ok: #8fc79b; --bad: #f08a7f; --busy: #3a3229; --sel: #8fb0d8; --sel-ink: #10161f; --range: #2b3a4d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--laterite); }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sample { background: var(--palm); color: var(--bg); font-size: .875rem; text-align: center; padding: 6px 16px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { font-family: var(--display); font-size: 1.4rem; line-height: 1.1; color: var(--ink); text-decoration: none; }
@media (max-width: 480px) { .brand { font-size: 1.15rem; max-width: 11em; } }
header.site nav { display: flex; gap: 20px; }
header.site nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
header.site nav a:hover { color: var(--laterite); }

.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 36em; }

.search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-top: 28px; max-width: 760px; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 2px var(--azul); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  font: 600 1rem var(--body); border: 1px solid var(--laterite); background: var(--laterite); color: var(--laterite-ink);
  border-radius: 2px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); color: var(--laterite-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.villas { list-style: none; padding: 0; margin: 0; }
.villa-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--line); align-items: center; }
.villa-row:nth-child(even) .ph { order: 2; }
.villa-row .meta { color: var(--muted); font-size: .95rem; }
.villa-row .price { font-family: var(--display); font-size: 1.25rem; margin: 12px 0 16px; }
.avail { font-size: .9rem; font-weight: 600; margin-bottom: 12px; min-height: 1.5em; }
.avail.free { color: var(--ok); }
.avail.taken { color: var(--bad); }

.ph { aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: .9rem; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .lbl { text-align: center; padding: 16px; }
.ph .lbl strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.5rem; color: var(--laterite); }

.skel { background: var(--surface); border-radius: 2px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel.line { height: 1em; margin: .5em 0; }
.state { padding: 32px 0; color: var(--muted); }
.state.error { color: var(--bad); }

/* villa page */
.vhead { padding: 40px 0 24px; }
.vhead .meta { color: var(--muted); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.gallery .ph:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 320px; }
.vbody { display: grid; grid-template-columns: 1fr 400px; gap: 48px; padding: 40px 0 64px; align-items: start; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.facts div { font-size: .95rem; } .facts b { font-family: var(--display); font-weight: 500; font-size: 1.3rem; display: block; }
ul.plain { padding-left: 1.1em; margin: 0 0 1.5em; }
ul.cols { columns: 2; }

.book { border: 1px solid var(--line); background: var(--surface); padding: 20px; position: sticky; top: 16px; }
.book h2 { font-size: 1.4rem; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-nav button { min-width: 44px; min-height: 44px; background: none; border: 1px solid var(--line); color: var(--ink); font-size: 1.1rem; cursor: pointer; border-radius: 2px; }
.cal-nav button:disabled { opacity: .35; cursor: default; }
.cal-month { font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal .dow { font-size: .75rem; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1; min-height: 40px; border: 0; background: var(--bg); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; border-radius: 2px; padding: 0; }
.cal button:hover:not(:disabled) { outline: 1px solid var(--azul); }
.cal button:disabled { background: var(--busy); color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.cal button.past:disabled { text-decoration: none; background: transparent; opacity: .4; }
.cal button.in { background: var(--range); }
.cal button.sel { background: var(--sel); color: var(--sel-ink); font-weight: 700; }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); margin: 10px 0 16px; }
.legend i { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; background: var(--busy); }
.legend i.s { background: var(--sel); }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.breakdown { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
.breakdown td { padding: 4px 0; } .breakdown td:last-child { text-align: right; }
.breakdown tr.total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.form-grid { display: grid; gap: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin-top: 12px; font-size: .95rem; }
.msg.error { color: var(--bad); }
.done { border-top: 1px solid var(--line); padding-top: 16px; }
.done .ref { font-family: var(--display); font-size: 1.6rem; color: var(--laterite); }
.small { font-size: .85rem; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* prose pages */
.prose { max-width: 720px; padding: 48px 16px 64px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }

/* admin */
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); font-size: .8rem; }
.tag.paid, .tag.confirmed { border-color: var(--ok); color: var(--ok); }
.tag.conflict, .tag.underpaid { border-color: var(--bad); color: var(--bad); }
.scroll-x { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

@media (max-width: 860px) {
  .villa-row, .vbody { grid-template-columns: 1fr; gap: 20px; }
  .villa-row:nth-child(even) .ph { order: 0; }
  .book { position: static; }
  .search { grid-template-columns: 1fr 1fr; }
  .search .btn { grid-column: span 2; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .ph:not(:first-child) { display: none; }
  .gallery .ph:first-child { min-height: 0; aspect-ratio: 4 / 3; }
  header.site nav a.hide-sm { display: none; }
  ul.cols { columns: 1; }
}

/* utility classes (CSP blocks inline style attributes) */
.w30 { width: 30%; } .w40 { width: 40%; } .w80 { width: 80%; }
.skel.title { width: 60%; height: 1.8em; } .skel.h1 { width: 50%; height: 2.4em; }
.ph.wide { aspect-ratio: 16 / 7; }
.mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt48 { margin-top: 48px; }
.plainlink { color: inherit; text-decoration: none; }
.page-pad { padding: 32px 16px 64px; }
.narrow { max-width: 360px; }
h1.sm { font-size: 2rem; }
.search.five { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; max-width: none; }
@media (max-width: 860px) { .search.five { grid-template-columns: 1fr 1fr; } }
.villa-row > a { text-decoration: none; }

/* content pages */
.answer { font-size: 1.1rem; border-top: 2px solid var(--laterite); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 8px 0 28px; }
.prose-in { max-width: 760px; padding-top: 32px; padding-bottom: 48px; }
.prose table:not(.breakdown) { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted); font-size: .85rem; }
.prose .scroll-x { margin: 16px 0 24px; }
.villas.compact .villa-row { grid-template-columns: 220px 1fr; gap: 20px; padding: 20px 0; }
.villas.compact .villa-row:nth-child(even) .ph { order: 0; }
.villas.compact h3 { font-size: 1.15rem; }
.faq { margin-top: 40px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.faq details p { margin: 10px 0 4px; }
.disclaimer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 860px) { .villas.compact .villa-row { grid-template-columns: 1fr; } }

/* cookie consent (shown only where consent is required) */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 560px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 16px; font-size: .9rem; }
.consent p { margin: 0 0 12px; }
.consent .row { display: flex; gap: 8px; flex-wrap: wrap; }
