/* Pelton Builders — shared site styles (v8 multi-page) */
:root{
  --cream:#F7F2E9;
  --bone:#FBF7EF;
  --sand:#E8DCC4;
  --clay:#B86A4A;
  --clay-soft:#D89978;
  --charcoal:#2A2520;
  --ink:#1F1A14;
  --muted:#7A6B58;
  --line:#E2D7C2;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:var(--bone);color:var(--ink);
  line-height:1.7;letter-spacing:.005em;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;border-radius:.5rem}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{
  font-family:'Lora','Georgia',serif;
  font-weight:500;line-height:1.15;letter-spacing:-.02em;
  color:var(--charcoal);
}
h1{font-size:clamp(2.25rem,4.4vw,3.75rem)}
h2{font-size:clamp(1.875rem,3.4vw,3rem)}
h3{font-size:clamp(1.25rem,2vw,1.75rem)}
p{text-wrap:pretty}

.container{max-width:1240px;margin:0 auto;padding:0 1.5rem}
@media(min-width:1024px){.container{padding:0 2.5rem}}

section{padding:5.5rem 0}
@media(min-width:768px){section{padding:8rem 0}}
@media(min-width:1024px){section{padding:10rem 0}}
section.hero{padding:0}

.eyebrow{
  font-family:'Inter',sans-serif;font-size:.75rem;font-weight:600;
  letter-spacing:.22em;text-transform:uppercase;color:var(--clay);
  margin-bottom:1rem;
}
.btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.9rem 1.75rem;background:var(--charcoal);color:var(--bone);
  font-weight:500;font-size:.9375rem;border-radius:999px;
  transition:all .25s ease;border:none;cursor:pointer;
}
.btn-primary:hover{background:var(--clay);transform:translateY(-1px)}

.img-wide{aspect-ratio:16/10;object-fit:cover;width:100%;height:100%}
.img-frame{overflow:hidden;border-radius:.5rem;position:relative}

/* HEADER — overlays full-screen hero on home, solid on subpages (.subpage) */
header{
  position:fixed;top:0;left:0;right:0;z-index:50;
  transition:all .3s ease;background:transparent;
}
header .nav-row{display:flex;align-items:center;justify-content:space-between;height:88px}
header .logo{display:inline-flex;align-items:center}
header .logo img{height:42px;width:auto;border-radius:0;transition:opacity .25s ease}
header .logo .logo-on-light{display:none}
header.scrolled .logo .logo-on-dark{display:none}
header.scrolled .logo .logo-on-light{display:inline-block}
header nav.main{display:none;gap:2.75rem}
header nav.main a{
  color:#fff;font-size:.8125rem;font-weight:500;
  letter-spacing:.18em;text-transform:uppercase;
  transition:color .2s,opacity .2s;opacity:.92;
}
header nav.main a:hover,header nav.main a.is-active{color:var(--clay-soft);opacity:1}

.header-right{display:flex;align-items:center}
.header-socials{display:none;align-items:center;gap:.5rem;margin-left:1.75rem;padding-left:1.75rem;border-left:1px solid rgba(255,255,255,.25)}
.header-socials a{
  color:#fff;opacity:.85;
  width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:50%;
  transition:color .2s,opacity .2s,background .2s;
}
.header-socials a:hover{opacity:1;color:var(--clay-soft);background:rgba(255,255,255,.08)}
.header-socials svg{width:17px;height:17px}
@media(min-width:1024px){.header-socials{display:inline-flex}}

header.scrolled,
body.subpage header{
  background:rgba(251,247,239,.96);
  backdrop-filter:blur(10px);
  box-shadow:0 1px 0 rgba(0,0,0,.04);
}
header.scrolled nav.main a,
body.subpage header nav.main a{color:var(--charcoal)}
header.scrolled nav.main a:hover,
header.scrolled nav.main a.is-active,
body.subpage header nav.main a:hover,
body.subpage header nav.main a.is-active{color:var(--clay)}
header.scrolled .header-socials,
body.subpage header .header-socials{border-left-color:rgba(0,0,0,.12)}
header.scrolled .header-socials a,
body.subpage header .header-socials a{color:var(--charcoal)}
header.scrolled .header-socials a:hover,
body.subpage header .header-socials a:hover{color:var(--clay);background:rgba(0,0,0,.04)}
body.subpage header .logo .logo-on-dark{display:none}
body.subpage header .logo .logo-on-light{display:inline-block}
@media(min-width:1024px){header nav.main{display:flex}}

.menu-btn{
  background:transparent;border:0;color:#fff;cursor:pointer;
  width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
}
header.scrolled .menu-btn,body.subpage header .menu-btn{color:var(--charcoal)}
@media(min-width:1024px){.menu-btn{display:none}}

/* HERO — full-screen photo with slideshow */
.hero{position:relative;height:100vh;min-height:640px;overflow:hidden;color:#fff;margin-top:0}
.hero .bg{position:absolute;inset:0;background:#1a1612}
.hero .slide{position:absolute;inset:0;opacity:0;transition:opacity 1.4s ease}
.hero .slide.active{opacity:1}
.hero .slide img{
  width:100%;height:100%;object-fit:cover;object-position:center bottom;
  border-radius:0;transform:scale(1.04);
}
.hero .slide[data-i="1"] img{object-position:center center}
.hero-dots{
  position:absolute;right:2.5rem;top:50%;transform:translateY(-50%);
  display:flex;flex-direction:column;gap:.6rem;z-index:4;
}
@media(max-width:1023px){.hero-dots{right:1.5rem}}
@media(max-width:767px){.hero-dots{right:1rem;top:1.25rem;flex-direction:row;transform:none}}
.hero-dots button{
  width:8px;height:8px;border-radius:50%;border:0;
  background:rgba(255,255,255,.4);cursor:pointer;padding:0;
  transition:background .25s,transform .25s;
}
.hero-dots button.active{background:#fff;transform:scale(1.25)}
.hero .scrim{
  position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.18) 14%,
    rgba(0,0,0,0)   30%,
    rgba(0,0,0,0)   55%,
    rgba(0,0,0,.55) 78%,
    rgba(0,0,0,.95) 100%);
}
.hero-inner{
  position:relative;z-index:2;height:100%;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding-bottom:.75rem;
}
.hero-inner .hero-sub{margin-bottom:0;line-height:1.45;max-width:min(34rem,calc(100% - 5rem))}
@media(max-width:767px){.hero-inner .hero-sub{max-width:100%}}
.hero-tag{
  display:inline-block;
  font-size:.75rem;font-weight:600;letter-spacing:.22em;
  text-transform:uppercase;color:#fff;opacity:.85;
  margin-bottom:1.25rem;
}
.hero-title{
  font-family:'Lora',serif;color:#fff;
  font-size:clamp(2.25rem,5.4vw,4.5rem);
  font-weight:500;line-height:1.05;letter-spacing:-.02em;
  margin-bottom:1.25rem;max-width:24ch;
}
.hero-sub{font-size:1.0625rem;color:rgba(255,255,255,.95);max-width:34rem;line-height:1.6}
.hero .scroll-cue{
  position:absolute;right:2.5rem;top:calc(50% + 5rem);z-index:3;
  display:none;flex-direction:column;align-items:center;gap:.6rem;
  color:rgba(255,255,255,.85);
  font-size:.6875rem;letter-spacing:.22em;text-transform:uppercase;
  transition:color .2s,opacity .2s,transform .3s;
}
.hero .scroll-cue span{writing-mode:vertical-rl;transform:rotate(180deg)}
.hero .scroll-cue:hover{color:#fff}
.hero .scroll-cue svg{width:14px;height:14px;animation:bob 2.4s ease-in-out infinite}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
@media(min-width:768px){.hero .scroll-cue{display:inline-flex}}
@media(max-width:1023px){.hero .scroll-cue{right:1.5rem}}

/* PAGE INTRO — for subpages (Homes/Process/Story) */
.page-intro{
  background:var(--bone);
  padding:9rem 0 4rem;
}
@media(min-width:768px){.page-intro{padding:11rem 0 5rem}}
.page-intro .crumb{
  font-size:.75rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--muted);margin-bottom:1.25rem;
}
.page-intro .crumb a{color:var(--muted);transition:color .2s}
.page-intro .crumb a:hover{color:var(--clay)}
.page-intro .crumb span{margin:0 .5rem;opacity:.5}
.page-intro h1{margin-bottom:1.5rem;max-width:24ch}
.page-intro p.lede{color:var(--muted);max-width:42rem;font-size:1.125rem;line-height:1.6}

/* RECENT HOMES */
.homes{background:var(--bone)}
.homes-head{max-width:42rem;margin-bottom:3.5rem}
.homes-grid{display:grid;grid-template-columns:1fr;gap:3.5rem 2rem}
@media(min-width:768px){.homes-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.homes-grid{grid-template-columns:repeat(3,1fr)}}
.home-card .img-frame{margin-bottom:1.25rem;aspect-ratio:4/3;width:100%}
.img-frame.lb-trigger{
  border:0;padding:0;cursor:zoom-in;background:#000;
  transition:transform .35s ease;overflow:hidden;
}
.img-frame.lb-trigger img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.img-frame.lb-trigger:hover img{transform:scale(1.04)}
.home-meta{display:flex;justify-content:space-between;align-items:baseline;color:var(--muted);font-size:.875rem}
.home-meta h3{font-family:'Lora',serif;font-size:1.25rem}
.homes-cta{text-align:center;margin-top:4rem}
.homes-cta a{display:inline-flex;align-items:center;gap:.5rem;color:var(--clay);font-size:.875rem;font-weight:500;letter-spacing:.02em}
.homes-cta a span.line{border-bottom:1px solid var(--clay);padding-bottom:.125rem}

/* PROCESS */
.process{background:var(--cream)}
.process-head{max-width:42rem;margin:0 auto 5rem;text-align:center}
.process-head h2{margin-bottom:1.25rem}
.process-head p{color:var(--muted);font-size:1.125rem}
.stages{display:flex;flex-direction:column;gap:6rem}
@media(min-width:768px){.stages{gap:8rem}}
.stage{display:grid;grid-template-columns:1fr;gap:2rem;align-items:center}
@media(min-width:1024px){
  .stage{grid-template-columns:repeat(12,1fr);gap:2.5rem}
  .stage .photo{grid-column:span 7}
  .stage .text{grid-column:9 / span 4}
  .stage.reverse .photo{grid-column:6 / span 7;grid-row:1}
  .stage.reverse .text{grid-column:1 / span 4;grid-row:1}
}
.stage .photo .img-frame{aspect-ratio:4/5}
.stage h3{font-size:clamp(1.5rem,2.4vw,2rem);margin-bottom:1.25rem}
.stage p{color:var(--muted)}

/* STORY */
.story{background:var(--bone)}
.story-hero{margin-bottom:5rem}
.story-hero .img-frame{aspect-ratio:21/9;width:100%;display:block}
.story-hero .img-frame.lb-trigger{padding:0;border:0;cursor:zoom-in}
.story-hero img{width:100%;height:100%;object-fit:cover;object-position:center}
.story-grid{display:grid;grid-template-columns:1fr;gap:3rem}
@media(min-width:1024px){.story-grid{grid-template-columns:5fr 7fr;gap:4rem}}
.story-grid .lead h2{margin-bottom:1.5rem}
.story-grid .lead p{color:var(--muted);max-width:24rem}
.story-body p{color:var(--ink);margin-bottom:1.25rem;line-height:1.8}
.story-body p:last-child{margin-bottom:0}
.story-photos{margin-top:5rem;display:grid;grid-template-columns:1fr;gap:1.25rem}
@media(min-width:768px){.story-photos{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.story-photos{grid-template-columns:repeat(3,1fr)}}
.story-photos .img-frame.lb-trigger{display:block;width:100%;height:100%}
.story-photos .img-frame{aspect-ratio:4/3}
.stat-row{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;
  margin-top:3.5rem;padding-top:1.5rem;border-top:1px solid var(--line);
}
.stat-row dt{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.1em;margin-bottom:.25rem}
.stat-row dd{font-family:'Lora',serif;font-size:1.5rem;color:var(--clay)}

/* CONTACT */
.contact{background:var(--charcoal);color:var(--bone)}
.contact h2{color:var(--bone);margin-bottom:1.5rem}
.contact .head{max-width:42rem;margin-bottom:3.5rem}
.contact .head .eyebrow{color:var(--clay-soft)}
.contact .head p{color:rgba(251,247,239,.7);line-height:1.7}
.contact-grid{display:grid;grid-template-columns:1fr;gap:2.5rem}
@media(min-width:1024px){.contact-grid{grid-template-columns:4fr 8fr;gap:3rem}}
.contact-info{display:flex;flex-direction:column;gap:1.5rem}
.info-row{display:flex;align-items:flex-start;gap:.75rem}
.info-row svg{width:1.125rem;height:1.125rem;color:var(--clay-soft);margin-top:.25rem;flex-shrink:0}
.info-row .label{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;color:rgba(251,247,239,.5);margin-bottom:.25rem}
.info-row .val,.info-row a{color:var(--bone);transition:color .2s}
.info-row a:hover{color:var(--clay-soft)}
.form{display:grid;grid-template-columns:1fr;gap:1.25rem}
@media(min-width:768px){.form{grid-template-columns:repeat(2,1fr)}}
.form .field-full{grid-column:1/-1}
.form label{display:block;font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;color:rgba(251,247,239,.5);margin-bottom:.5rem}
.form input,.form textarea{
  width:100%;background:transparent;color:var(--bone);
  border:1px solid rgba(251,247,239,.2);border-radius:.5rem;
  padding:.85rem 1rem;font:inherit;transition:border-color .2s;
}
.form input:focus,.form textarea:focus{outline:none;border-color:var(--clay-soft)}
.form textarea{min-height:8rem;resize:vertical}
.form button{
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.95rem 1.75rem;background:var(--clay);color:var(--bone);
  font-weight:500;border-radius:999px;border:none;cursor:pointer;transition:all .25s;
}
.form button:hover{background:var(--bone);color:var(--charcoal)}

/* Footer */
footer{background:var(--charcoal);color:rgba(251,247,239,.6);border-top:1px solid rgba(251,247,239,.1)}
footer .row{padding:2.5rem 0;display:flex;flex-direction:column;gap:1.5rem}
@media(min-width:768px){footer .row{flex-direction:row;align-items:center;justify-content:space-between}}
footer img{height:32px;width:auto;border-radius:0;filter:brightness(0) invert(1)}
footer nav{display:flex;flex-wrap:wrap;gap:1.5rem;font-size:.875rem}
footer nav a:hover{color:var(--bone)}
footer .copy{font-size:.75rem}

/* Lightbox */
.lightbox{
  position:fixed;inset:0;z-index:100;
  background:rgba(15,12,8,.94);
  display:none;align-items:center;justify-content:center;padding:2rem;
}
.lightbox.open{display:flex}
.lb-stage{position:relative;max-width:min(1400px,100%);max-height:100%;display:flex;flex-direction:column;align-items:center;gap:1rem}
.lb-stage img{max-width:100%;max-height:78vh;width:auto;height:auto;border-radius:.25rem;box-shadow:0 30px 80px rgba(0,0,0,.6);object-fit:contain}
.lb-meta{display:flex;align-items:baseline;justify-content:space-between;width:100%;color:rgba(255,255,255,.85);font-size:.875rem}
.lb-meta .lb-title{font-family:'Lora',serif;font-size:1.125rem;color:#fff;margin-right:.75rem}
.lb-meta .lb-sub{color:rgba(255,255,255,.6)}
.lb-meta .lb-count{font-size:.75rem;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.55)}
.lb-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.25);
  color:#fff;width:48px;height:48px;border-radius:50%;
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
  transition:background .2s,border-color .2s;
}
.lb-btn:hover{background:rgba(0,0,0,.7);border-color:rgba(255,255,255,.5)}
.lb-prev{left:-3.5rem}
.lb-next{right:-3.5rem}
@media(max-width:900px){.lb-prev{left:.5rem}.lb-next{right:.5rem}}
.lb-close{
  position:absolute;top:1.5rem;right:1.5rem;
  background:transparent;border:0;color:#fff;cursor:pointer;
  width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;
  opacity:.8;transition:opacity .2s;
}
.lb-close:hover{opacity:1}

.reveal{opacity:0;transform:translateY(24px);transition:opacity .8s ease,transform .8s ease}
.reveal.in{opacity:1;transform:translateY(0)}

/* Mobile menu drawer (≤1023px). The header button toggles `.menu-open` on
   <header>; on desktop nav.main is already visible and unaffected. */
@media(max-width:1023px){
  header.menu-open{
    background:rgba(251,247,239,.98);
    backdrop-filter:blur(10px);
    box-shadow:0 1px 0 rgba(0,0,0,.04);
  }
  header.menu-open .logo .logo-on-dark{display:none}
  header.menu-open .logo .logo-on-light{display:inline-block}
  header.menu-open .menu-btn{color:var(--charcoal)}
  header.menu-open nav.main{
    display:flex;flex-direction:column;gap:0;
    position:absolute;top:100%;left:0;right:0;
    background:rgba(251,247,239,.98);
    backdrop-filter:blur(10px);
    padding:.25rem 1.5rem 1.25rem;
    border-top:1px solid var(--line);
    box-shadow:0 12px 24px rgba(0,0,0,.06);
  }
  header.menu-open nav.main a{
    color:var(--charcoal);opacity:1;
    padding:1rem 0;font-size:1rem;letter-spacing:.16em;
    border-bottom:1px solid var(--line);
  }
  header.menu-open nav.main a:last-child{border-bottom:0}
  header.menu-open .header-socials{display:none}
}
