/* Thara Tropical Villa — guest-facing styles. Brand: the Thara Tropical brand document
   (apps/completed-live/Thara-Tropical-Website/brand/thara-tropical-brand-document.html, tokens in that project's
   public/css/tokens.css): Cormorant Garamond headings, Montserrat body, sage / cream / stone / taupe / deep moss.
   Re-themed 2026-10-07 (was Playfair Display + teal, taken from the welcome book). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/cormorant-garamond.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap; src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/montserrat.woff2') format('woff2'); }

:root {
  /* brand palette */
  --sage: #8A8A68;
  --cream: #F7F7EF;        /* page background */
  --stone: #E7E6E2;        /* cards, panels, dividers */
  --taupe: #66615C;        /* secondary text: 5.7:1 on cream */
  --moss: #4A5236;         /* buttons + links: cream on moss 7.7:1 */
  --charcoal: #2F2E29;     /* body text: 12.6:1 on cream */
  --teak: #B89878;
  --gold: #E8D8B8;
  /* roles */
  --ink: var(--charcoal);
  --muted: var(--taupe);
  --primary: var(--moss);
  --primary-hover: #3A4129;
  --primary-soft: #ECECE0; /* light sage tint: hovers, selected ranges, notes */
  --line: var(--stone);
  --line-strong: #C9C5BC;  /* input borders */
  --danger: #a3271f;
  --danger-soft: #fbeceb;
  --white: #fff;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 10px 30px rgba(47, 46, 41, 0.08);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; } /* no double-tap zoom: quick taps (e.g. the calendar's month arrows) must stay taps; pinch-zoom still works */
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; font-weight: 300; line-height: 1.7; }
b, strong { font-weight: 600; }
img { max-width: 100%; display: block; }
button, a, input, select, textarea, label, .picker, .gsel-list { touch-action: manipulation; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 0.5em; color: var(--ink); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.45rem; font-weight: 500; }
em { font-family: var(--serif); font-style: italic; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 640px; }

/* header */
.site-header { position: absolute; z-index: 5; inset: 0 0 auto 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { font-family: var(--serif); font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: 0.02em; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark { width: 2.1rem; height: 2.1rem; flex: none; }
.site-header:not(.header-solid) .brand-mark { filter: drop-shadow(0 1px 6px rgba(0,0,0,0.5)); }
.brand small { display: block; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.9; }
.header-solid { position: static; background: var(--cream); border-bottom: 1px solid var(--line); }
.header-solid .brand { color: var(--ink); text-shadow: none; }

/* hero */
.hero { position: relative; min-height: min(84vh, 760px); display: flex; align-items: flex-end; color: #fff; background: #3b3a33; }
.hero picture, .hero img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(47, 46, 41, 0.72) 0%, rgba(47, 46, 41, 0.15) 55%, rgba(47, 46, 41, 0.25) 100%); }
.hero-copy { position: relative; z-index: 2; padding-top: 5.5rem; padding-bottom: calc(var(--search-h) + var(--search-gap) + 2.25rem); } /* top: clear the logo on short (landscape) screens */
.hero h1 { color: var(--cream); font-weight: 400; font-size: clamp(2.6rem, 7vw, 4.4rem); margin-bottom: 0.3em; text-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 34ch; margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }

/* search card overlapping the hero */
/* The search card sits INSIDE the hero photo (Jason, 2026-10-07): it is pulled up by its own height plus a strip of photo
   below it (--search-h is the card's height per layout; .hero-copy reserves the same room above). Frosted: cream at 70%
   opacity (30% transparent) + a background blur, so the photo shows through without hurting the labels' contrast; the inputs stay solid. */
:root { --search-h: 23rem; --search-gap: 2rem; }             /* phones: four stacked controls */
@media (min-width: 481px) and (max-width: 759px) { :root { --search-h: 17.5rem; } } /* two-column grid */
@media (min-width: 760px) { :root { --search-h: 8.25rem; --search-gap: 2.5rem; } }  /* one row */
.search { position: relative; z-index: 3; margin-top: calc(-1 * (var(--search-h) + var(--search-gap))); margin-bottom: var(--search-gap); } /* the next section starts at the photo's bottom edge */
.search .search-form { background: rgba(247, 247, 239, 0.7); -webkit-backdrop-filter: blur(14px) saturate(115%); backdrop-filter: blur(14px) saturate(115%); border: 1px solid rgba(255, 255, 255, 0.45); box-shadow: 0 12px 34px rgba(47, 46, 41, 0.18); }
.search .search-form label { color: var(--charcoal); }      /* full-strength labels on the translucent card */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .search .search-form { background: rgba(247, 247, 239, 0.94); } }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.search-form { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.search-form > div { min-width: 0; }
input[type=date] { min-width: 0; }
.search-form .guests { grid-column: 1 / -1; }
/* one height for every control in the row, so labels and boxes line up */
.search-form .date-field, .search-form select, .search-form input { height: 52px; line-height: 1.25; }
.search-form > button[type=submit] { min-height: 52px; line-height: 1.25; } /* may wrap to two lines on a narrow phone, so it grows */
.search-form button { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .search-form { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.8fr) auto; }
  .search-form .guests, .search-form button { grid-column: auto; }
}
label { display: block; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 0.3rem; }
input, select, textarea { width: 100%; padding: 0.75rem 0.85rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; font-weight: 400; font-size: 1rem; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; min-height: 96px; }
.field { margin-bottom: 1rem; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0.3rem 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.75rem 1.75rem; border: none; border-radius: var(--radius-sm); background: var(--primary); color: var(--cream); font: inherit; font-weight: 500; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn:hover { background: var(--primary-hover); }
.btn:disabled { background: #8f8b84; color: #fff; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-quiet { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-quiet:hover { background: var(--primary-soft); }

.alert { border-radius: var(--radius-sm); padding: 0.85rem 1rem; margin: 0 0 1rem; font-size: 0.95rem; }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f0c7c4; }
.alert-info { background: var(--primary-soft); color: var(--primary-hover); font-weight: 400; }

/* request layout: form + summary */
.request { padding-top: 2.5rem; padding-bottom: 1rem; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
.request > * { min-width: 0; }
@media (max-width: 899px) { .summary { order: -1; } }
@media (min-width: 900px) { .request { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } .summary { position: sticky; top: 1.25rem; } }
.summary h3 { margin-bottom: 0.9rem; }
.summary dl { margin: 0 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 1rem; font-size: 0.95rem; } /* 2026-10-23: labels take the slack (discount lines are long), values keep their width */
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; }
.total-row { border-top: 1px solid var(--line); padding-top: 0.9rem; display: flex; justify-content: space-between; align-items: baseline; }
.total-row .amount { font-family: var(--serif); font-size: 2.2rem; }
.assurance { background: var(--primary-soft); color: var(--primary-hover); font-weight: 400; border-radius: var(--radius-sm); padding: 0.85rem 1rem; font-size: 0.9rem; margin-top: 1rem; }
.cf-turnstile { margin: 1rem 0; }
/* opt-in checkbox row (under the bot check): the whole row is the tap target */
.check { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0 0 1.25rem; padding: 0.35rem 0; text-transform: none; letter-spacing: normal; font-size: 0.95rem; font-weight: 300; color: var(--ink); line-height: 1.5; cursor: pointer; }
.check input[type=checkbox] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0.1rem 0 0; padding: 0; accent-color: var(--primary); cursor: pointer; }
#request-submit { margin-top: 1.25rem; } /* room between the "Good to know" line and the button */
.request > .progress { grid-column: 1 / -1; order: -2; margin-bottom: 0; }
#search-form { scroll-margin-top: 1rem; }

/* sections */
section { padding: 3rem 0; }
.search + section, .search ~ section:first-of-type { padding-top: 3.5rem; }
@media (min-width: 760px) { section { padding: 4.5rem 0; } .search + section, .search ~ section:first-of-type { padding-top: 4rem; } }
.steps { display: grid; gap: 1.25rem; counter-reset: s; list-style: none; padding: 0; margin: 1.5rem 0 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; background: var(--white); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.25rem 4rem; position: relative; box-shadow: 0 2px 10px rgba(47,46,41,0.05); }
.steps li::before { content: counter(s); position: absolute; left: 1.1rem; top: 1.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-family: var(--serif); display: grid; place-items: center; font-size: 1.3rem; }
.steps strong { display: block; margin-bottom: 0.15rem; }
.steps span { color: var(--muted); font-size: 0.92rem; }

.section-stone { background: var(--stone); }
.policy { background: var(--white); border-radius: var(--radius); margin: 1.25rem 0 1rem; padding: 0.35rem 1.25rem; max-width: 46rem; } /* one bubble, left-aligned with the page (Jason, 2026-10-07) */
.policy p { margin: 0; padding: 0.85rem 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.policy p + p { border-top: 1px solid var(--line); }
.policy b { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; min-width: 9.5rem; }
.policy span { color: var(--muted); }

footer { background: var(--moss); color: var(--cream); padding: 2.5rem 0; margin-top: 0; /* the last section (stone) meets the footer; .page keeps its own bottom padding */ font-size: 0.92rem; }
footer a { color: var(--gold); }
footer .brand-foot { font-family: var(--serif); font-size: 1.45rem; color: var(--cream); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.55rem; }
footer .brand-foot .brand-mark { width: 1.8rem; height: 1.8rem; }
footer .foot-links { margin-top: 0.75rem; font-size: 0.85rem; }

/* progress + status pages */
.progress { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); flex-wrap: wrap; }
.progress li { display: flex; align-items: center; gap: 0.4rem; }
.progress li::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line-strong); }
.progress li.done::before, .progress li.now::before { background: var(--primary); }
.progress li.now { color: var(--ink); font-weight: 600; }
.page { padding-top: 2.5rem; padding-bottom: 3rem; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.45rem; }
.legal p, .legal li { line-height: 1.6; }
.status-card { text-align: center; padding: 2.5rem 1.5rem; }
.status-icon { width: 3.6rem; height: 3.6rem; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.6rem; background: var(--primary-soft); color: var(--primary); }
.status-icon.warn { background: #fbf0dc; color: #8a5a10; }
.status-icon.bad { background: var(--danger-soft); color: var(--danger); }
.next-steps { text-align: left; max-width: 34rem; margin: 1.5rem auto 0; padding-left: 1.2rem; color: var(--muted); }
.next-steps li { margin-bottom: 0.4rem; }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } .gsel-chevron { transition: none; } .gsel-list { animation: none; } }

/* small phones: the Turnstile widget is a fixed 300px, so give the card room */
@media (max-width: 480px) {
  .search-form { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding-left: 0.75rem; padding-right: 0.75rem; }
  .card { padding: 1rem; }
  .status-card { padding: 1.75rem 1rem; }
}
@media (max-width: 340px) {
  .cf-turnstile { transform: scale(0.88); transform-origin: 0 0; height: 58px; }
}

/* ---- availability date picker ---- */
.date-field { width: 100%; min-height: 48px; padding: 0.75rem 0.85rem; text-align: left; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; font-weight: 400; font-size: 1rem; cursor: pointer; }
.date-field.is-empty { color: var(--muted); }
.date-field.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.picker { margin-top: 1rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.picker[hidden] { display: none; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.picker-title { font-family: var(--serif); font-size: 1.35rem; }
.picker-nav { width: 44px; height: 44px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.picker-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.picker-months { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .picker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; } }
.cal-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; text-align: center; margin-bottom: 0.4rem; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); padding: 0.25rem 0; text-transform: uppercase; }
.cal td { padding: 1px; text-align: center; }
.day { width: 100%; min-height: 44px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--ink); font: inherit; font-size: 0.95rem; cursor: pointer; }
.day:hover { background: var(--primary-soft); }
/* Airbnb-style day states: dark = you can pick it now; grey = free night but not for this step (check-out only, minimum
   stay, or a new stay after a check-in); grey + crossed out = the night itself is booked, past or not offered. */
.day { color: #75716A; font-weight: 400; }   /* ~4.8:1 on white */
.day.is-on { color: #000; font-weight: 500; } /* black, a touch heavier than regular (bold 700 stood out too much next to the grey and crossed-out days) */
.day.is-off { cursor: not-allowed; background: transparent; }
.day.is-booked { color: #A3A097; text-decoration: line-through; }
.day.is-off:hover { background: transparent; }
.day.in-range { background: var(--primary-soft); border-radius: 0; text-decoration: none; color: var(--ink); }
.day.is-selected { background: var(--primary); color: var(--cream); text-decoration: none; font-weight: 700; }
.day.is-today { box-shadow: inset 0 0 0 1.5px var(--teak); }
.picker-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.85rem; }
/* Not shown (Jason, 2026-10-01): the selection text is for screen readers only - it still announces each choice. */
.picker-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.picker-clear { min-height: 40px; padding: 0.4rem 1rem; }
@media (max-width: 480px) { .picker { padding: 0.75rem; } .day { font-size: 0.9rem; } }

/* picker placement inside the search form grid. The picker is placed in the DOM right after the check-out field, so
   on phones and tablets it simply flows under the date fields (DOM order = visual order = tap/tab order). On desktop it
   is pinned to row 2, under the whole row; the four controls auto-fill row 1. No `order`: when the picker was moved into place
   with `order` (DOM order != visual order), taps on its month arrows reached the Guests box on a real phone (2026-10-01). */
.search-form .picker { grid-column: 1 / -1; margin-top: 0; box-shadow: none; border: 1px solid var(--line); }
@media (min-width: 760px) { .search-form .picker { grid-row: 2; margin-top: 0.25rem; } }
/* Belt and braces on phones: while the calendar is open, a tap can never reach the guests box or the search button
   (a tap there just closes the calendar, via the picker's own "tap outside closes"). */
@media (max-width: 759px) { .search-form.picker-open .guests, .search-form.picker-open > button[type=submit] { pointer-events: none; } }

/* ---- branded guests dropdown (public/js/guests-select.js; the native select is the no-JS fallback) ---- */
.guests.has-gsel { position: relative; }
.gsel-button { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; color: var(--ink); }
.gsel-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsel-chevron { width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform 0.15s ease; }
.gsel-button[aria-expanded="true"] .gsel-chevron { transform: rotate(180deg); color: var(--primary); }
.gsel-list { position: absolute; left: 0; z-index: 20; min-width: 100%; max-height: 21rem; overflow-y: auto; margin: 0; padding: 0.35rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: gsel-in 0.14s ease-out; }
.gsel-list[hidden] { display: none; }
@keyframes gsel-in { from { opacity: 0; transform: translateY(-4px); } }
.gsel-option { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); font-weight: 400; font-size: 1rem; white-space: nowrap; }
.gsel-option.is-active { background: var(--primary-soft); }
.gsel-option[aria-selected="true"] { font-weight: 600; color: var(--primary-hover); }
.gsel-check { width: 18px; height: 18px; flex: none; color: var(--primary); visibility: hidden; }
.gsel-option[aria-selected="true"] .gsel-check { visibility: visible; }

/* Price summary discounts + promo code (2026-10-23, docs/pricing-discounts-promos.md). The promo code is deliberately quiet:
   a small grey link that opens a slim field - for guests who already have a code, not something to go looking for. */
.summary dd.discount { color: var(--primary); white-space: nowrap; }
.promo { margin: 0.6rem 0 0; }
.promo summary { display: inline-block; font-size: 0.8rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; list-style: none; }
.promo summary::-webkit-details-marker { display: none; }
.promo-form { margin: 0.45rem 0 0; }
.promo-row { display: flex; gap: 0.4rem; }
.promo-row input { flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 0.6rem; font-size: 0.9rem; text-transform: uppercase; }
.promo-row .btn { flex: 0 0 auto; min-height: 38px; padding: 0.35rem 0.9rem; font-size: 0.7rem; }
.promo-error { color: var(--danger); }
.promo-applied { margin: 0.6rem 0 0; font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* read by screen readers only (the promo price update) */
