/*
Theme Name: Global Nest
Theme URI: https://www.globalnestguesthouse.com/
Author: Rukukwe
Description: A standalone theme for Global Nest Guest House, Cape Town. Hand-built, no page builder, no CSS framework.
Version: 1.1.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: globalnest
*/

/* ------------------------------------------------------------------
   Palette sampled from the property's own photographs: warm sand
   paving (#b6a18a), grey-blue walls (#bfc8c8), greige interiors. The
   accent is a deeper relative of the paving rather than an invented
   brand colour. Every pairing used here is gated at AA by
   tools/palette-check.js.

   The design is deliberately plain - flat, no shadows, hairline rules.
   This is a modest guesthouse, and a luxury-hotel treatment would
   promise something the rooms do not deliver.
   ------------------------------------------------------------------ */
:root{
  --bone:#faf7f2;
  --oat:#f0ebe2;
  --clay:#e4dad0;
  --ink:#1e1b17;
  --body:#544e46;
  --muted:#736b62;
  --accent:#8a5f3c;
  --accent-hi:#a4744c;
  --dark:#26221d;
  --on-dark:#e8e2d9;
  --rule:rgba(30,27,23,.14);

  --serif:"Lora",Georgia,"Times New Roman",serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;

  --wrap:1240px;
  --gutter:clamp(1.25rem,5vw,4rem);
}

/* ---------- reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:5rem}
body{margin:0;background:var(--bone);color:var(--body);font-family:var(--sans);
  font-size:clamp(1rem,.96rem + .18vw,1.09rem);line-height:1.75;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
h1,h2,h3{font-family:var(--serif);color:var(--ink);font-weight:500;line-height:1.16;margin:0 0 .6em}
h1{font-size:clamp(2.4rem,1.6rem + 3.4vw,4.15rem);letter-spacing:-.025em}
h2{font-size:clamp(1.9rem,1.35rem + 2.4vw,3rem);letter-spacing:-.02em}
h3{font-size:clamp(1.1rem,1rem + .5vw,1.35rem);letter-spacing:-.01em}
p{margin:0 0 1.15em}
ul{margin:0;padding:0;list-style:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px}

/* ---------- primitives ---------- */
.wrap{width:min(100% - (var(--gutter) * 2),var(--wrap));margin-inline:auto}
.section{padding:clamp(4rem,10vw,8.5rem) 0}
.section--oat{background:var(--oat)}

/* Letterspaced small caps with a leading rule: section labels. */
.label{font-family:var(--sans);font-size:.7rem;font-weight:600;letter-spacing:.2em;
  text-transform:uppercase;color:var(--accent);margin:0 0 1.25rem;display:flex;
  align-items:center;gap:.75rem}
.label::before{content:"";width:1.75rem;height:1px;background:currentColor;flex:none}

/* Hairline-underlined small-caps link, for secondary actions. The
   booking CTA stays a real button: it is the only route to a booking. */
.link{display:inline-block;font-family:var(--sans);font-size:.74rem;font-weight:600;
  letter-spacing:.16em;text-transform:uppercase;color:var(--ink);text-decoration:none;
  padding-bottom:.55rem;border-bottom:1px solid var(--ink);transition:color .2s,border-color .2s}
.link:hover{color:var(--accent);border-color:var(--accent)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;
  font-family:var(--sans);font-size:.85rem;font-weight:600;letter-spacing:.06em;
  padding:1.05rem 2rem;border:1px solid transparent;text-decoration:none;
  transition:background .2s,color .2s,border-color .2s}
.btn svg{width:1.15em;height:1.15em;flex:none}
.btn--solid{background:var(--accent);color:var(--bone);border-color:var(--accent)}
.btn--solid:hover{background:var(--ink);border-color:var(--ink)}
.btn--line{background:transparent;color:var(--ink);border-color:var(--rule)}
.btn--line:hover{border-color:var(--ink)}
.btn--onhero{background:rgba(250,247,242,.14);color:#fff;border-color:rgba(255,255,255,.5)}
.btn--onhero:hover{background:#fff;color:var(--ink);border-color:#fff}

.lede{font-family:var(--serif);font-size:clamp(1.1rem,1rem + .5vw,1.3rem);
  line-height:1.6;color:var(--ink)}

/* ---------- header ---------- */
.site-header{position:fixed;inset:0 0 auto;z-index:100;border-bottom:1px solid transparent;
  transition:background .3s,border-color .3s}
.site-header.is-solid{background:rgba(250,247,242,.95);backdrop-filter:blur(12px);
  border-bottom-color:var(--rule)}
.site-header__inner{display:flex;align-items:center;gap:2rem;min-height:5rem}
.brand{margin-right:auto;font-family:var(--serif);font-size:1.05rem;font-weight:500;
  letter-spacing:.18em;text-transform:uppercase;color:#fff;text-decoration:none;line-height:1.2}
.brand small{display:block;font-family:var(--sans);font-size:.6rem;letter-spacing:.24em;
  opacity:.75;margin-top:.3rem;font-weight:500}
.is-solid .brand{color:var(--ink)}
.nav{display:flex;align-items:center;gap:2.25rem}
.nav a{font-size:.76rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(255,255,255,.88);text-decoration:none;white-space:nowrap;transition:color .2s}
.nav a:hover{color:#fff}
.is-solid .nav a{color:var(--body)}
.is-solid .nav a:hover{color:var(--ink)}
.nav .btn{padding:.8rem 1.5rem}
.nav-toggle{display:none;background:none;border:0;padding:.5rem;margin-left:auto;
  cursor:pointer;color:#fff}
.is-solid .nav-toggle{color:var(--ink)}
.nav-toggle svg{width:26px;height:26px}
@media (max-width:960px){
  .nav-toggle{display:block}
  .nav{position:fixed;inset:5rem 0 auto;flex-direction:column;align-items:stretch;gap:0;
    background:var(--bone);border-bottom:1px solid var(--rule);padding:.5rem 0 1.5rem;display:none}
  .nav[data-open="true"]{display:flex}
  .nav a{color:var(--body);padding:1rem var(--gutter);font-size:.85rem}
  .nav .btn{margin:1rem var(--gutter) 0}
}

/* ---------- hero ---------- */
.hero{position:relative;min-height:min(92vh,820px);display:flex;align-items:flex-end;
  padding:9rem 0 clamp(3rem,7vw,5.5rem);isolation:isolate}
.hero__media{position:absolute;inset:0;z-index:-2}
.hero__media img{width:100%;height:100%;object-fit:cover;object-position:center 42%}
.hero::after{content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(180deg,rgba(20,17,14,.72) 0%,rgba(20,17,14,.3) 38%,rgba(20,17,14,.84) 100%)}
.hero__inner{max-width:80ch}
.hero h1{color:#fff;margin-bottom:.45em}
.hero__lead{font-family:var(--serif);font-size:clamp(1.05rem,.98rem + .45vw,1.28rem);
  line-height:1.6;color:rgba(255,255,255,.94);margin-bottom:2rem;max-width:min(100%,560px)}
.hero__cta{display:flex;flex-wrap:wrap;gap:.85rem}
.hero__meta{position:absolute;right:var(--gutter);bottom:clamp(3rem,7vw,5.5rem);
  text-align:right;font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(255,255,255,.75);line-height:2.2;margin:0}
@media (max-width:1100px){.hero__meta{display:none}}

/* ---------- facts strip ---------- */
.facts{background:var(--dark);color:var(--on-dark)}
.facts ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))}
.facts li{display:flex;align-items:center;gap:.85rem;padding:1.6rem 0;font-size:.78rem;
  letter-spacing:.1em;text-transform:uppercase;font-weight:500}
.facts li + li{border-left:1px solid rgba(232,226,217,.16);padding-left:2rem}
.facts svg{width:20px;height:20px;color:var(--accent-hi);flex:none}
@media (max-width:820px){
  .facts li + li{border-left:0;border-top:1px solid rgba(232,226,217,.16);padding-left:0}
  .facts li{padding:1.1rem 0}
}

/* ---------- editorial split ---------- */
.split{display:grid;gap:clamp(2rem,5vw,5rem);align-items:center}
@media (min-width:900px){
  .split{grid-template-columns:1fr 1fr}
  .split--reverse .split__media{order:2}
}
.split__text{max-width:46ch}
.split__media img{width:100%;aspect-ratio:4/5;object-fit:cover}
.split__caption{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);margin:.9rem 0 0}

/* ---------- rooms ---------- */
.rooms{display:grid;gap:clamp(2rem,4vw,3rem);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr))}
.room{display:flex;flex-direction:column}
.room img{width:100%;aspect-ratio:3/4;object-fit:cover;margin-bottom:1.5rem}
.room h3{margin-bottom:.5rem}
.room p{font-size:.95rem;margin-bottom:1.4rem}
.room .link{margin-top:auto;align-self:flex-start}

/* ---------- amenities ---------- */
.amenities{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));
  border-top:1px solid var(--rule)}
.amenities li{display:flex;align-items:center;gap:.9rem;padding:1.35rem .5rem 1.35rem 0;
  border-bottom:1px solid var(--rule);font-size:.92rem;color:var(--ink)}
.amenities svg{width:22px;height:22px;color:var(--accent);flex:none}

/* ---------- location & house rules ---------- */
.nearby li{display:flex;justify-content:space-between;align-items:baseline;gap:1.5rem;
  padding:.85rem 0;border-bottom:1px solid var(--rule)}
.nearby li:first-child{border-top:1px solid var(--rule)}
.nearby span{font-size:.95rem}
.nearby strong{font-family:var(--serif);font-weight:500;color:var(--ink);white-space:nowrap}

.rules{display:grid;gap:1.35rem}
.rules li{display:flex;gap:1rem;align-items:flex-start}
.rules svg{width:20px;height:20px;color:var(--accent);flex:none;margin-top:.35rem}
.rules span{display:block;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted);font-weight:600;margin-bottom:.15rem}
.rules strong{font-family:var(--serif);font-weight:500;color:var(--ink);font-size:1.05rem}
.rules__note{margin:2rem 0 0;padding-top:1.5rem;border-top:1px solid var(--rule);
  font-size:.9rem;color:var(--muted)}

/* ---------- gallery rail ----------
   Every photograph of this property is portrait, so they run as a
   horizontal rail rather than being cropped into a square grid. Each
   item is a real link, so the rail is reachable by keyboard. */
.rail{display:flex;gap:clamp(.75rem,1.5vw,1.25rem);overflow-x:auto;
  scroll-snap-type:x mandatory;padding-bottom:1.5rem;
  scrollbar-width:thin;scrollbar-color:var(--muted) var(--clay)}
.rail::-webkit-scrollbar{height:3px}
.rail::-webkit-scrollbar-track{background:var(--clay)}
.rail::-webkit-scrollbar-thumb{background:var(--muted)}
.rail figure{flex:0 0 clamp(220px,25vw,310px);scroll-snap-align:start;margin:0}
.rail a{text-decoration:none;display:block}
.rail img{width:100%;aspect-ratio:3/4;object-fit:cover;background:var(--clay)}
.rail figcaption{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);margin-top:.85rem}
.rail__hint{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);margin:0}

/* ---------- contact ---------- */
.contact{display:grid;gap:clamp(2.5rem,6vw,5rem)}
@media (min-width:900px){.contact{grid-template-columns:1.1fr .9fr}}
.contact-list li{display:flex;gap:1rem;align-items:flex-start;padding:1.1rem 0;
  border-bottom:1px solid var(--rule)}
.contact-list li:first-child{border-top:1px solid var(--rule)}
.contact-list svg{width:20px;height:20px;color:var(--accent);flex:none;margin-top:.45rem}
.contact-list span{display:block;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted);font-weight:600;margin-bottom:.15rem}
.contact-list a,.contact-list strong{font-family:var(--serif);font-size:1.05rem;font-weight:500;
  color:var(--ink);text-decoration:none}
.contact-list a:hover{color:var(--accent)}
.booking{background:var(--dark);color:var(--on-dark);padding:clamp(2rem,4vw,2.75rem);
  align-self:start}
.booking h3{color:#fff;font-size:1.5rem}
.booking p{font-size:.95rem;color:rgba(232,226,217,.82)}
.booking .btn{width:100%;margin-bottom:.7rem}
.booking .btn--line{color:var(--on-dark);border-color:rgba(232,226,217,.35)}
.booking .btn--line:hover{border-color:var(--on-dark);background:rgba(232,226,217,.08)}

/* ---------- footer ---------- */
.site-footer{background:var(--dark);color:rgba(232,226,217,.6);font-size:.85rem;
  padding:clamp(3rem,6vw,4.5rem) 0 2rem}
.site-footer a{color:rgba(232,226,217,.85);text-decoration:none}
.site-footer a:hover{color:#fff}
.site-footer__top{display:flex;flex-wrap:wrap;gap:2rem 3rem;justify-content:space-between;
  padding-bottom:2.5rem;border-bottom:1px solid rgba(232,226,217,.16)}
.site-footer__brand{font-family:var(--serif);font-size:1rem;letter-spacing:.18em;
  text-transform:uppercase;color:#fff;margin-bottom:.6rem}
.site-footer__nav{display:flex;flex-wrap:wrap;gap:1.5rem;font-size:.72rem;
  letter-spacing:.14em;text-transform:uppercase}
.site-footer__bottom{padding-top:1.75rem;display:flex;flex-wrap:wrap;gap:.5rem 2rem;
  justify-content:space-between;font-size:.78rem;color:rgba(232,226,217,.45)}

/* ---------- interior pages ---------- */
.page-hero{background:var(--dark);color:#fff;padding:9rem 0 3.5rem}
.page-hero h1{color:#fff;margin:0;font-size:clamp(2rem,1.4rem + 2.4vw,3.2rem)}
.entry{padding:clamp(3rem,7vw,5rem) 0}
.entry__body{max-width:68ch}
.entry__body img{margin:2.5rem 0}
.entry__body ul,.entry__body ol{padding-left:1.4rem;margin:0 0 1.15em;list-style:revert}

.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;z-index:200;background:var(--bone);
  padding:.85rem 1.4rem;border:1px solid var(--ink)}

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

/* The hero photograph has a bright framed picture exactly where the nav sits,
   so the transparent header carries its own scrim. This guarantees nav
   contrast whatever image is used, rather than relying on the photo. */
.site-header:not(.is-solid){
  background:linear-gradient(180deg,rgba(20,17,14,.62) 0%,rgba(20,17,14,.28) 60%,transparent 100%)}

/* Location and Good to know are two text columns: align their headings. */
#location .split{align-items:start}

/* ---------- gallery lightbox ----------
   Built by assets/js/lightbox.js. The rail links still point at the full-size
   image, so with no JavaScript the photo simply opens on its own. */
.is-lightbox-open{overflow:hidden}
.lightbox{position:fixed;inset:0;z-index:200;display:flex;align-items:center;
  justify-content:center;gap:clamp(.5rem,2vw,1.5rem);
  padding:clamp(3.5rem,7vw,4.5rem) clamp(.75rem,3vw,3rem);
  background:rgba(16,14,12,.94);backdrop-filter:blur(6px)}
.lightbox[hidden]{display:none}
.lightbox__stage{margin:0;display:flex;flex-direction:column;align-items:center;
  gap:1rem;min-width:0;max-height:100%}
.lightbox__stage img{max-width:100%;max-height:calc(100vh - 12rem);width:auto;height:auto;
  object-fit:contain;opacity:1;transition:opacity .18s ease}
.lightbox.is-loading .lightbox__stage img{opacity:.25}
.lightbox__stage figcaption{font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;
  color:rgba(232,226,217,.82);text-align:center}
.lightbox__close,.lightbox__nav{background:transparent;border:1px solid rgba(232,226,217,.3);
  color:var(--on-dark);cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .2s,border-color .2s}
.lightbox__close:hover,.lightbox__nav:hover{background:rgba(232,226,217,.14);
  border-color:rgba(232,226,217,.7)}
.lightbox__close{position:absolute;top:clamp(.75rem,2vw,1.5rem);right:clamp(.75rem,3vw,1.5rem);
  width:2.75rem;height:2.75rem;border-radius:50%}
.lightbox__close svg{width:20px;height:20px}
.lightbox__nav{flex:none;width:3rem;height:3rem;border-radius:50%}
.lightbox__nav svg{width:22px;height:22px}
.lightbox__count{position:absolute;bottom:clamp(.9rem,2.5vw,1.6rem);left:0;right:0;
  text-align:center;margin:0;font-size:.72rem;letter-spacing:.18em;
  color:rgba(232,226,217,.6)}
@media (max-width:640px){
  /* On a phone the arrows would crowd the photo; swipe handles it instead. */
  .lightbox__nav{position:absolute;bottom:clamp(2.6rem,9vw,3.4rem);width:2.75rem;height:2.75rem}
  .lightbox__nav--prev{left:clamp(.75rem,6vw,2rem)}
  .lightbox__nav--next{right:clamp(.75rem,6vw,2rem)}
  .lightbox__stage img{max-height:calc(100vh - 14rem)}
}
@media (prefers-reduced-motion:reduce){
  .lightbox__stage img{transition:none}
}
