/* Z1 Homes: shared styles for the homepage and the unit pages. */
:root {
  --dark: #14100C; --ink: #1F1B16; --cream: #F4EEE4; --soft: #D4CABB; --muted: #645D54; --line: #E8E1D6;
  --gold: #C9A86E; --gold-l: #E8CF9B; --gold-d: #7E6129; --tint: #F3EADB; --wa: #11804A;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
::selection { background: var(--gold); color: var(--dark); }
html { scrollbar-color: var(--gold-d) var(--dark); }
p { text-wrap: pretty; }
* { box-sizing: border-box; margin: 0; }
html { scroll-padding-top: 76px; }
html:not(.lenis) { scroll-behavior: smooth; }   /* Lenis does its own smoothing; the two fight */
.motion .hero .wrap { visibility: hidden; }     /* GSAP shows it as the intro starts; no flash of unanimated text */
body { background: var(--dark); color: var(--cream); font: 300 17px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; text-wrap: balance; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 0;
       font: 500 15px var(--sans); text-decoration: none; cursor: pointer; background: var(--gold); color: var(--dark);
       transition: translate .2s var(--ease-out), scale .16s var(--ease-out), box-shadow .2s var(--ease-out), background-color .2s var(--ease-out); }
.btn:active { scale: .97; }
.btn.wa { background: var(--wa); color: #fff; }
.btn.ghost { background: rgba(20,16,12,.25); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) {   /* touch screens keep hover styles stuck after a tap */
  .btn:hover { translate: 0 -2px; box-shadow: 0 10px 28px rgba(201,168,110,.3); }
  .btn.wa:hover { box-shadow: 0 10px 28px rgba(17,128,74,.4); }
  .btn.ghost:hover { background: rgba(201,168,110,.2); box-shadow: inset 0 0 0 1px var(--gold-l); }
}
@media (prefers-reduced-motion: reduce) { .btn:hover { translate: none; } .btn:active { scale: none; } }

/* photo-backed sections: the picture sits behind a dark wash so text stays readable */
.photo { position: relative; isolation: isolate; background: var(--dark) var(--bg) center / cover no-repeat; }
.photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,16,12,.72), rgba(20,16,12,.86)); }
@media (min-width: 900px) and (hover: hover) { .photo { background-attachment: fixed; } }

header { position: fixed; inset: 0 0 auto; z-index: 10; background: rgba(20,16,12,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(201,168,110,.25); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 56px; width: auto; }
header nav { display: flex; gap: 24px; align-items: center; font-size: 15px; }
header nav a:not(.btn) { text-decoration: none; color: var(--cream); transition: color .2s; }
.progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; transform: scaleX(0); transform-origin: 0 50%;
            background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }
header nav a:not(.btn):hover { color: var(--gold-l); }
header .btn { padding: 9px 18px; }
@media (max-width: 640px) { header nav a:not(.btn) { display: none; } }

.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; padding: 110px 0 70px; }
.slides img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: slide 30s linear infinite both; }
.slides img:nth-child(2) { animation-delay: 6s; } .slides img:nth-child(3) { animation-delay: 12s; }
.slides img:nth-child(4) { animation-delay: 18s; } .slides img:nth-child(5) { animation-delay: 24s; }
@keyframes slide { 0% { opacity: 0; transform: scale(1); } 4% { opacity: 1; } 20% { opacity: 1; } 25% { opacity: 0; transform: scale(1.1); } 100% { opacity: 0; } }
.slides img:first-child { opacity: 1; animation: none; }   /* base layer: shows at once, the others fade in over it */
.hero.paused .slides img { animation-play-state: paused; }
.pause { position: absolute; right: 20px; bottom: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
         border: 1px solid rgba(201,168,110,.6); background: rgba(20,16,12,.45); color: var(--cream); transition: background-color .2s; }
.pause:hover { background: rgba(201,168,110,.3); }
.pause svg { width: 16px; height: 16px; fill: currentColor; }
.pause[aria-pressed="true"] .i-pause, .pause[aria-pressed="false"] .i-play { display: none; }
@media (prefers-reduced-motion: reduce) { .slides img { animation: none; } .pause { display: none; } }

.trust { background: #1A1510; border-bottom: 1px solid rgba(201,168,110,.25); }
.trust ul { list-style: none; max-width: 1160px; margin: 0 auto; padding: 24px 20px; display: grid; gap: 18px 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.trust li { display: flex; align-items: center; gap: 14px; font-size: 14.5px; color: var(--soft); line-height: 1.35; }
.trust b { display: block; font-weight: 500; font-size: 16px; color: var(--cream); }
.trust svg { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--gold-l); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rating { display: flex; align-items: center; gap: 3px; font-size: 14px; color: var(--soft); }
.rating svg { width: 15px; height: 15px; fill: var(--gold-l); }
.rating span { margin-left: 6px; }
/* .66 at the centre keeps cream text at 4.5:1 even over a white wall in the photo */
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(20,16,12,.66), rgba(20,16,12,.85)); }
.hero .logo { width: clamp(170px, 26vw, 270px); height: auto; margin: 0 auto 18px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.5)); }
.hero h1 { font-size: clamp(40px, 6.5vw, 72px); margin: 12px auto 14px; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.hero p { max-width: 50ch; margin: 0 auto; font-size: 18px; color: var(--cream); text-shadow: 0 1px 12px rgba(0,0,0,.55); }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.places { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.places a { text-decoration: none; font-size: 14px; padding: 6px 14px; border-radius: 99px; border: 1px solid rgba(201,168,110,.5); background: rgba(20,16,12,.35); }
.places a:hover { border-color: var(--gold-l); color: var(--gold-l); }

.head { text-align: center; }
.head h2 { font-size: clamp(36px, 5vw, 54px); }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.divider i { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider i:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.divider b { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.intro { padding: 90px 0 70px; }
.intro p { max-width: 56ch; margin: 18px auto 0; color: var(--soft); }

.home { padding: 96px 0; border-top: 1px solid rgba(201,168,110,.2); overflow-x: clip; }   /* panels slide in from the sides */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; gap: 44px; } .home.flip .info { order: 2; } }
.glass { background: rgba(20,16,12,.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(201,168,110,.35); border-radius: 20px; padding: 30px; }
.info { display: flex; flex-direction: column; gap: 14px; }
.info h2 { font-size: clamp(34px, 4.2vw, 46px); }
.where { font: italic 500 21px var(--serif); color: var(--gold-l); margin-top: -10px; }
.price { color: var(--soft); font-size: 15px; }
.price b { font: 600 28px var(--serif); color: var(--gold-l); }
.info ul { padding-left: 18px; font-size: 16px; }
.info li::marker { color: var(--gold); }
.times { font-size: 14px; color: var(--soft); border-top: 1px solid rgba(201,168,110,.3); padding-top: 12px; }
details { font-size: 15.5px; }
summary { cursor: pointer; font-weight: 500; color: var(--gold-l); }
details p { margin-top: 8px; color: var(--soft); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.gallery { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip img { flex: 0 0 100%; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; }
.gallery button { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 0;
                  background: rgba(255,255,255,.9); font-size: 20px; cursor: pointer; color: var(--ink); transition: background-color .2s var(--ease-out), scale .16s var(--ease-out); }
.gallery button:active { scale: .94; }
@media (hover: hover) and (pointer: fine) { .gallery button:hover { background: var(--gold-l); } }
.gallery .prev { left: 12px; } .gallery .next { right: 12px; }
.gallery .count { position: absolute; right: 14px; bottom: 14px; background: rgba(20,16,12,.7); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 99px; }

#book { padding: 96px 0; }
#book .head { margin-bottom: 36px; }
.booker { background: #FFFDF9; color: var(--ink); border-radius: 20px; padding: 26px; display: grid; gap: 26px; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
@media (min-width: 900px) { .booker { grid-template-columns: 1.6fr 1fr; padding: 32px; } }
label { display: block; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
select, input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: 400 16px var(--sans); background: #fff; color: var(--ink); }
.booker :focus-visible { outline-color: var(--gold-d); }
.field { margin-bottom: 16px; }
.calnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.calnav button { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; font-size: 18px; color: var(--ink); transition: background-color .2s; }
.calnav button:hover:not(:disabled) { background: var(--tint); }
.calnav button:disabled { opacity: .35; cursor: default; }
#cal { display: grid; gap: 24px; }
@media (min-width: 720px) { #cal { grid-template-columns: 1fr 1fr; } }
.month h3 { font: 600 20px var(--serif); text-align: center; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.grid .wd { font-size: 12px; color: var(--muted); padding: 4px 0; }
.grid button { aspect-ratio: 1; border: 0; border-radius: 8px; background: none; font: 400 15px var(--sans); color: var(--ink); cursor: pointer; transition: background-color .15s; }
.grid button:hover:not(:disabled) { background: var(--tint); }
.grid .past { color: #BDB5AA; cursor: default; }
.grid .taken { color: var(--muted); text-decoration: line-through; background: repeating-linear-gradient(135deg, #F4F1EC 0 4px, #fff 4px 8px); }
.grid .range { background: var(--tint); border-radius: 0; }
.grid .sel { background: var(--ink); color: #fff; text-decoration: none; }
.note { font-size: 14px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
#summary { font: 500 21px/1.3 var(--serif); margin: 4px 0 16px; }
.booker .btn { width: 100%; justify-content: center; }
.small { font-size: 14px; color: var(--muted); margin-top: 12px; }

#how { padding: 96px 0; }
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: s; margin-top: 40px; }
.steps .glass { counter-increment: s; }
.steps .glass::before { content: counter(s); display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%;
                        font: 500 21px var(--serif); color: var(--gold-l); margin-bottom: 12px; }
.steps h3 { font-size: 27px; margin-bottom: 6px; }
.steps p, .rules p { color: var(--soft); font-size: 16px; }
.rules { display: grid; gap: 18px 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 52px; padding-top: 40px; border-top: 1px solid rgba(201,168,110,.3); }
.rules h3 { font-size: 23px; color: var(--gold-l); }

footer { background: var(--dark); border-top: 1px solid rgba(201,168,110,.3); padding: 60px 0 36px; font-size: 15.5px; color: var(--soft); }
footer .wrap { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
footer .logo { width: 150px; height: auto; }
footer a { text-decoration: none; transition: color .2s; } footer a:hover { color: var(--gold-l); }
footer p { margin-bottom: 6px; }
footer .motto { font: italic 500 20px var(--serif); color: var(--gold-l); margin-top: 12px; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid #3A342C; padding-top: 18px; font-size: 13px; color: #A79E90; }

/* Homepage: link from each home to its own page */
.info h2 a { text-decoration: none; transition: color .2s; }
.info h2 a:hover { color: var(--gold-l); }
.gallery .all { position: absolute; left: 14px; bottom: 14px; background: rgba(20,16,12,.7); color: #fff; font-size: 13px; padding: 5px 12px; border-radius: 99px; text-decoration: none; transition: background-color .2s; }
.gallery .all:hover { background: var(--gold-d); }

/* Unit pages (deluxe.html, lavington.html, nakuru.html), built by tools/unit-pages.mjs */
.unit-hero { min-height: 86vh; min-height: 86svh; display: grid; align-items: end; padding: 130px 0 56px; }
.unit-hero::before { background: linear-gradient(180deg, rgba(20,16,12,.5), rgba(20,16,12,.62) 45%, rgba(20,16,12,.95)); }
.unit-hero h1 { font-size: clamp(46px, 7.5vw, 88px); text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.unit-hero .where { font-size: clamp(21px, 2.4vw, 27px); margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; text-decoration: none; color: var(--cream); text-shadow: 0 1px 10px rgba(0,0,0,.7); margin-bottom: 22px; transition: color .2s; }
.back:hover { color: var(--gold-l); }
.back svg, .lightbox svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin: 18px 0 26px; color: var(--soft); font-size: 15px; }
.meta .price b { font-size: 30px; }
.unit-hero .places { justify-content: flex-start; margin-top: 30px; }
.unit .progress { animation: grow linear both; animation-timeline: scroll(root); }
@keyframes grow { to { transform: scaleX(1); } }

.section { padding: 88px 0; border-top: 1px solid rgba(201,168,110,.2); }
.section .head { margin-bottom: 40px; }
.section .head p { max-width: 56ch; margin: 14px auto 0; color: var(--soft); }

.videos { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.video { flex: 1 1 200px; max-width: 300px; }
@media (max-width: 640px) {   /* phones: swipe sideways through the videos, the next one peeking in */
  .videos { flex-wrap: nowrap; justify-content: start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .video { flex: 0 0 74%; max-width: none; scroll-snap-align: start; }
}
.video video { width: 100%; aspect-ratio: 9 / 16; display: block; object-fit: cover; background: #000; border-radius: 16px; border: 1px solid rgba(201,168,110,.3); }
.video figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; font: 500 22px var(--serif); }
.video figcaption span { font: 400 14px var(--sans); color: var(--soft); font-variant-numeric: tabular-nums; }

.photos { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .photos { grid-template-columns: repeat(3, 1fr); gap: 14px; } .photos button:first-child { grid-column: span 2; grid-row: span 2; } }
@media (min-width: 1000px) { .photos { grid-template-columns: repeat(4, 1fr); } }
.photos button { display: block; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; }
.photos img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: scale .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .photos button:hover img { scale: 1.04; } }

.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; background: rgba(12,10,8,.95); color: var(--cream); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lightbox::backdrop { background: rgba(12,10,8,.6); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox .top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.lightbox figure { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 0; padding: 0 76px 18px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 56px); min-height: 0; object-fit: contain; border-radius: 8px; touch-action: pan-y; user-select: none; -webkit-user-drag: none; }
.lightbox[open] img { animation: pop .26s var(--ease-out); }
@keyframes pop { from { opacity: 0; scale: .96; } }
.lightbox figcaption { padding-top: 14px; text-align: center; color: var(--soft); }
.lightbox button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; color: var(--cream);
                   background: rgba(20,16,12,.6); border: 1px solid rgba(201,168,110,.5); transition: background-color .2s, scale .16s var(--ease-out); }
.lightbox button:active { scale: .94; }
@media (hover: hover) and (pointer: fine) { .lightbox button:hover { background: rgba(201,168,110,.3); } }
.lightbox .prev, .lightbox .next { position: absolute; top: 50%; translate: 0 -50%; }
.lightbox .prev { left: 16px; } .lightbox .next { right: 16px; }
@media (max-width: 640px) {
  .lightbox figure { padding: 0 8px 84px; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 18px; translate: none; }
}
@media (prefers-reduced-motion: reduce) { .lightbox[open] img { animation: none; } .photos img { transition: none; } }

.about { display: grid; gap: 22px; }
@media (min-width: 900px) { .about { grid-template-columns: 1.25fr 1fr; } }
.about h3 { font-size: 30px; margin-bottom: 14px; }
.about ul { padding-left: 18px; }
.about li { margin-bottom: 6px; }
.about li::marker { color: var(--gold); }
.about .more { margin-top: 16px; color: var(--soft); }
.facts { display: grid; gap: 12px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(201,168,110,.22); padding-bottom: 10px; }
.facts dt { color: var(--soft); } .facts dd { text-align: right; }
.unit .rules { margin-top: 44px; }

.others { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.other { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 3; padding: 24px; border-radius: 20px; overflow: hidden; text-decoration: none; border: 1px solid rgba(201,168,110,.3); }
.other img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease-out); }
.other::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,16,12,.1) 30%, rgba(20,16,12,.9)); }
.other h3 { font-size: 32px; }
.other p { color: var(--soft); }
@media (hover: hover) and (pointer: fine) { .other:hover img { scale: 1.05; } }
