/*
Theme Name: BelizeAhead Properties
Description: Lightweight presentation theme for the BelizeAhead Properties V1 pilot. Requires the bap-core plugin.
Version: 0.1.1
Requires at least: 6.5
Requires PHP: 8.0
Author: BelizeAhead
License: Proprietary
Text Domain: bap-theme
*/

:root {
	--ink: #16211f;
	--muted: #4a5a57;
	--bg: #fbfaf7;
	--surface: #ffffff;
	--sand: #f2eee5;
	--line: #dcd6ca;
	--brand: #0e5a52;
	--brand-dark: #0a433d;
	--brand-tint: #e5f0ee;
	--warn-bg: #fdf1dc;
	--warn-ink: #6b4200;
	--error: #a3261a;
	--error-bg: #fcebe8;
	--private: #8a1f11;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(22, 33, 31, .06), 0 4px 16px rgba(22, 33, 31, .06);
	--max: 1180px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; border-radius: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 6px; box-shadow: var(--shadow); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted, .bap-muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.wordmark { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.wordmark span { color: var(--brand); }
.nav-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); }
@media (max-width: 767px) {
	.site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 4px 20px 12px; }
	.js .site-nav:not(.is-open) { display: none; }
	.site-nav li + li { border-top: 1px solid var(--line); }
}
@media (min-width: 768px) {
	.nav-toggle { display: none; }
	.site-nav ul { display: flex; gap: 28px; }
	.site-nav a { padding: 8px 0; }
}

/* Buttons */
.btn, .bap-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 8px; border: 2px solid var(--brand); background: var(--brand); color: #fff; font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover, .bap-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn--ghost, .bap-btn--secondary { background: transparent; color: var(--brand); }
.btn--ghost:hover, .bap-btn--secondary:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn--block { width: 100%; }
.bap-btn[disabled] { opacity: .6; cursor: progress; }
.bap-link { background: none; border: 0; padding: 4px; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }

/* Home */
.hero { background: var(--sand); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.hero p { font-size: 1.15rem; max-width: 40em; color: var(--muted); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.section { padding: 48px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; background: var(--surface); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 24px; }
.filters label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.filters select, .filters input { width: 100%; }
.filters .actions { display: flex; gap: 8px; align-items: end; grid-column: 1 / -1; }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(4, 1fr) auto; } .filters .actions { grid-column: auto; } }
.cards { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16 / 9; background: var(--sand); position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__eyebrow { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.card__title { font-size: 1.2rem; margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--brand); }
.card__price { font-weight: 700; font-size: 1.15rem; }
.card__attrs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .95rem; }
.card .btn { margin-top: auto; align-self: flex-start; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); }
.card__media .badge { position: absolute; top: 12px; left: 12px; }
.steps3 { display: grid; gap: 20px; grid-template-columns: 1fr; counter-reset: s; padding: 0; list-style: none; }
@media (min-width: 768px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps3 li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 8px; }
.cta-band { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 32px 24px; }
.cta-band p { color: #e6f1ef; max-width: 44em; }
.cta-band .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }
.cta-band .btn:hover { background: var(--brand-tint); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; }

/* Property page */
.breadcrumb { font-size: .92rem; padding: 16px 0 8px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.gallery-hero { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 20px; }
.gallery-hero__main { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.gallery-hero__main img, .gallery-hero__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-hero__thumbs { display: none; }
@media (min-width: 900px) {
	.gallery-hero.has-thumbs { grid-template-columns: 2fr 1fr; }
	.gallery-hero:not(.has-thumbs) .gallery-hero__main { aspect-ratio: 21 / 9; }
	.gallery-hero__thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
	.gallery-hero__thumb { border-radius: var(--radius); overflow: hidden; background: var(--sand); position: relative; }
}
.gallery-open { margin-top: 8px; }
.prop-head { display: grid; gap: 12px; margin-bottom: 8px; }
.prop-head .location { color: var(--muted); font-size: 1.05rem; margin: 0; }
.prop-head .price { font-size: 1.6rem; font-weight: 700; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(5, auto); justify-content: start; column-gap: 32px; } }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.prop-layout { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 48px; }
@media (min-width: 960px) {
	.prop-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
	.prop-aside { position: sticky; top: 84px; }
}
.prop-aside .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.prop-aside .panel .price { font-size: 1.4rem; font-weight: 700; margin: 0 0 8px; }
.prop-aside dl { margin: 12px 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .95rem; }
.prop-aside dt { color: var(--muted); }
.prop-aside dd { margin: 0; font-weight: 600; }
@media (max-width: 959px) { .prop-aside { display: none; } }
.prop-section { padding: 28px 0; border-top: 1px solid var(--line); }
.prop-section:first-child { border-top: 0; padding-top: 8px; }
.glance { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .glance { grid-template-columns: 1fr 1fr; } }
.glance h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.glance dl { margin: 0; display: grid; grid-template-columns: minmax(8em, 45%) 1fr; gap: 8px 12px; }
.glance dt { color: var(--muted); }
.glance dd { margin: 0; }
.nearby { width: 100%; border-collapse: collapse; }
.nearby th, .nearby td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nearby th { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qualifier { font-size: .95rem; color: var(--muted); background: var(--sand); border-left: 4px solid var(--line); padding: 12px 14px; border-radius: 0 8px 8px 0; }
.doc-list { list-style: none; padding: 0; margin: 0 0 12px; }
.doc-list li { padding: 6px 0 6px 28px; position: relative; }
.doc-list li::before { content: ""; position: absolute; left: 4px; top: .8em; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.map-facade { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 20px; }
.map-frame { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--sand); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--radius); margin-bottom: 12px; }
.enquire { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.status-note { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.lightbox { border: 0; padding: 0; background: #0d1413; color: #fff; width: 100vw; height: 100vh; max-width: none; max-height: none; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox__inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.lightbox__stage img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lightbox button { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; min-height: 44px; min-width: 44px; padding: 8px 14px; font: inherit; cursor: pointer; }
.lightbox__nav { display: flex; justify-content: center; gap: 12px; padding: 12px; }

/* Content pages */
.page-content { max-width: 760px; padding: 32px 0 56px; }
.page-content ul, .page-content ol { padding-left: 1.3em; }
.page-content li { margin-bottom: .4em; }
.bap-disclosure { font-size: .95rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }

/* Footer */
.site-footer { background: #1b2624; color: #d7e0de; padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .disclosure { max-width: 60em; color: #c3cfcc; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer .legal { color: #a9b8b5; margin: 0; }

/* ---------- Forms (bap-core) ---------- */
.bap-form { background: var(--surface); }
.bap-form-intro { margin-bottom: 16px; }
.bap-field { margin: 0 0 18px; }
.bap-field > label, .bap-label, .bap-choice legend { display: block; font-weight: 600; margin-bottom: 6px; }
.bap-field input[type=text], .bap-field input[type=email], .bap-field input[type=tel], .bap-field input[type=date], .bap-field select, .bap-field textarea, .filters select, .filters input {
	width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #8c9794; border-radius: 8px;
}
.bap-field textarea { min-height: 96px; resize: vertical; }
.bap-field input:focus, .bap-field select:focus, .bap-field textarea:focus { border-color: var(--brand); }
.bap-help { font-size: .92rem; color: var(--muted); margin: 6px 0 0; }
.bap-error { color: var(--error); font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); background: #fffafa; }
.bap-req { color: var(--error); }
.bap-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.bap-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.bap-choice { border: 0; padding: 0; margin: 0; }
.bap-choice__opt { display: inline-flex; align-items: center; gap: 8px; margin: 4px 18px 4px 0; min-height: 40px; cursor: pointer; }
.bap-choice__opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.bap-error-summary { border: 2px solid var(--error); background: var(--error-bg); border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; }
.bap-error-summary h2 { font-size: 1.1rem; color: var(--error); }
.bap-error-summary ul { margin: 0; padding-left: 1.2em; }
.bap-error-summary a { color: var(--error); font-weight: 600; }
.bap-progress { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.bap-progress li { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; background: var(--sand); border-radius: 999px; padding: 4px 10px 4px 4px; }
.bap-progress__n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .8rem; }
.bap-progress li[aria-current="step"] { background: var(--brand); color: #fff; }
.bap-progress li[aria-current="step"] .bap-progress__n { color: var(--brand); }
.bap-progress li.is-done .bap-progress__n { background: var(--brand-tint); }
@media (max-width: 699px) { .bap-form.is-stepped .bap-progress li:not([aria-current]) .bap-progress__t { display: none; } }
.bap-form:not(.is-stepped) .bap-progress { display: none; }
.bap-step { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.bap-step__title { font-size: 1.35rem; font-weight: 700; margin-bottom: 16px; padding: 0; }
.bap-step__count { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bap-step-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }
.bap-step-nav .bap-btn { flex: 1 1 auto; }
@media (min-width: 600px) { .bap-step-nav .bap-btn { flex: 0 0 auto; } .bap-step-nav [data-bap-next], .bap-step-nav button[type=submit] { margin-left: auto; } }
.bap-form:not(.is-stepped) [data-bap-next], .bap-form:not(.is-stepped) [data-bap-prev] { display: none; }
.bap-badge { border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; }
.bap-badge p { margin: 4px 0 0; }
.bap-badge--private { background: #fbeceb; border: 2px solid var(--private); color: var(--private); }
.bap-badge--private p { color: #5c1a12; }
.bap-badge--public { background: var(--brand-tint); border: 2px solid var(--brand); color: var(--brand-dark); }
.bap-upload { border: 1.5px dashed #8c9794; border-radius: 8px; padding: 14px; margin-bottom: 16px; background: #fcfcfb; }
.bap-upload label { font-weight: 600; display: block; }
.bap-upload input[type=file] { margin-top: 8px; max-width: 100%; font: inherit; }
.bap-upload__list { list-style: none; padding: 0; margin: 8px 0 0; }
.bap-upload__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bap-upload__name { font-weight: 600; word-break: break-all; }
.bap-upload__meta { color: var(--muted); font-size: .9rem; }
.bap-upload__list li.is-error .bap-upload__meta { color: var(--error); font-weight: 600; }
.bap-upload__list progress { width: 120px; }
.bap-nearby { border: 0; padding: 0; margin: 0 0 16px; }
.bap-nearby legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.bap-nearby__row { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; padding: 12px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .bap-nearby__row { grid-template-columns: 1.2fr 2fr 1fr 1fr; } }
.bap-nearby__row .bap-field { margin-bottom: 8px; }
.bap-certify { border: 0; padding: 0; margin: 0 0 16px; }
.bap-certify legend { font-weight: 700; margin-bottom: 8px; }
.bap-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bap-confirmation { background: var(--brand-tint); border: 2px solid var(--brand); border-radius: var(--radius); padding: 20px; }
.bap-notice { background: var(--sand); padding: 12px 16px; border-radius: 8px; }
.bap-field--static { background: var(--sand); padding: 10px 14px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
