:root{
  --paper:#EEF1EC; --navy:#16305F; --ink:#15264F; --green:#2A7A2A; --green-dk:#1F6E1F;
  --lime:#C6E86A; --mist:#D8E1F2; --white:#FFFFFF;
  --display:'Zilla Slab',Georgia,serif; --body:'Work Sans',system-ui,sans-serif; --hand:'Architects Daughter',cursive;
  --pad:64px; --r:8px;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--body);color:var(--ink);background:var(--paper);line-height:1.5}
img{max-width:100%;display:block}
a{color:var(--green-dk)}
a:hover{color:#154F15}
:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
h1,h2{font-family:var(--display);font-weight:700;margin:0;line-height:1.05}
h2{font-size:clamp(34px,4vw,52px)}
p{margin:0}

/* blueprint grounds */
.bp{background-color:var(--navy);background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:120px 120px,120px 120px,24px 24px,24px 24px}
.bpl{background-color:var(--paper);background-image:linear-gradient(rgba(21,38,79,.10) 1px,transparent 1px),linear-gradient(90deg,rgba(21,38,79,.10) 1px,transparent 1px),linear-gradient(rgba(21,38,79,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(21,38,79,.04) 1px,transparent 1px);background-size:120px 120px,120px 120px,24px 24px,24px 24px}
/* ponytail: striped photo placeholders until Mark's photos arrive */
.ph{background:repeating-linear-gradient(135deg,#DCE2DB 0 14px,#E5EAE3 14px 28px);display:flex;align-items:center;justify-content:center;font-size:14px;border-radius:4px;color:var(--ink)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:14px 24px;border-radius:6px;font-weight:600;font-size:17px;text-decoration:none;white-space:nowrap;transition:transform .15s ease,background-color .2s ease}
.btn:active{transform:translateY(1px)}
.btn-green{background:var(--green);color:var(--white)}
.btn-green:hover{background:#226622;color:var(--white)}
.btn-lime{background:var(--lime);color:var(--ink)}
.btn-lime:hover{background:#D4F07F;color:var(--ink)}
.btn-ghost{border:2px solid var(--white);color:var(--white)}
.btn-ghost:hover{background:rgba(255,255,255,.1);color:var(--white)}
.row{display:flex;gap:14px;flex-wrap:wrap}

/* header */
.top{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:12px var(--pad);background:var(--paper);border-bottom:2px solid var(--ink)}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-family:var(--display);font-weight:700;font-size:24px}
.brand img{width:56px;height:56px;object-fit:contain}
.nav{display:flex;gap:32px;font-weight:500}
.nav a{color:var(--ink);text-decoration:none;padding:8px 0}
.nav a:hover{color:var(--green)}
.top-cta{display:flex;align-items:center;gap:12px}
.phone{color:var(--ink);font-weight:600;text-decoration:none;padding:12px 8px}

/* hero */
.hero{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:48px;align-items:center;padding:88px var(--pad) 96px;color:var(--white)}
.hero-copy{display:flex;flex-direction:column;gap:28px}
.hero h1{font-size:clamp(46px,5.6vw,80px)}
.hero-copy p{font-size:21px;color:var(--mist);max-width:520px}
.hero-art{display:flex;flex-direction:column;gap:8px}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab{font:600 15px var(--body);min-height:44px;padding:0 14px;border-radius:6px;border:1px solid rgba(255,255,255,.45);background:transparent;color:var(--white);cursor:pointer;transition:background-color .2s ease,color .2s ease}
.tab:hover{border-color:var(--lime)}
.tab[aria-pressed=true]{background:var(--lime);color:var(--ink);border-color:var(--lime)}
.stage{display:flex;justify-content:center}
.scene[hidden]{display:none}
.scene{width:100%;max-width:560px;height:auto;fill:none;stroke:var(--white);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.scene .new{stroke:var(--lime)}
.scene text{fill:var(--lime);stroke:none;font-family:var(--hand);font-size:17px}

/* blueprint draw animation: one cycle per scene, JS restarts it */
.draw{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 7s ease-in-out forwards}
.fade{opacity:0;animation:fadein 7s ease-in-out forwards}
.d1{animation-delay:.35s}.d2{animation-delay:.7s}.d3{animation-delay:1.05s}.d4{animation-delay:1.4s}.d5{animation-delay:1.75s}
@keyframes draw{0%{stroke-dashoffset:1;opacity:1}40%{stroke-dashoffset:0}88%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}
@keyframes fadein{0%,30%{opacity:0}45%,88%{opacity:1}100%{opacity:0}}

/* sections */
.section{padding:96px var(--pad);display:flex;flex-direction:column;gap:36px}
.white{background:var(--white);border-top:2px solid var(--ink);border-bottom:2px solid var(--ink)}
.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:56px;align-items:center}
.stack{display:flex;flex-direction:column;gap:20px}
.stack p{font-size:19px;max-width:480px}

/* services bento */
.bento{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:260px 260px;gap:24px}
.tile{display:flex;flex-direction:column;justify-content:flex-end;gap:8px;padding:20px;border:2px solid var(--ink);border-radius:var(--r);background:var(--white);color:var(--ink);text-decoration:none;transition:border-color .2s ease}
.tile:hover{border-color:var(--green);color:var(--ink)}
.tile strong{font-family:var(--display);font-size:28px}
.tile span{font-size:16px}
.tile-big{grid-column:span 2;grid-row:span 2;padding:16px;gap:14px}
.tile-big .ph{flex-grow:1}
.tile-foot{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap}
.tile-big strong{font-size:36px}
.tile-wide{grid-column:span 2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:16px}
.tile-text{display:flex;flex-direction:column;justify-content:flex-end;gap:8px}
.tile-green{background:var(--green);color:var(--white)}
.tile-green:hover{color:var(--white);border-color:var(--ink)}
.tile-bp{color:var(--white)}
.tile-bp:hover{color:var(--white)}
.tile-bp span{color:var(--mist)}

/* before / after */
#ba{width:min(420px,100%);height:44px;accent-color:var(--green)}
label{font-weight:600;font-size:15px}
.ba{position:relative;height:460px;border:2px solid var(--ink);border-radius:var(--r);overflow:hidden}
.ba-after{position:absolute;inset:0;background:var(--green);color:var(--white);display:flex;align-items:center;justify-content:flex-end;padding-right:40px}
.ba-before{position:absolute;inset:0 auto 0 0;width:var(--pos);justify-content:flex-start;padding-left:40px;white-space:nowrap;overflow:hidden;border-right:4px solid var(--lime);border-radius:0}
.ba-knob{position:absolute;top:50%;left:var(--pos);width:48px;height:48px;margin:-24px 0 0 -22px;border-radius:50%;background:var(--lime);border:2px solid var(--ink);color:var(--ink);display:flex;align-items:center;justify-content:center;pointer-events:none}

/* estimator */
.chips{display:flex;gap:14px;flex-wrap:wrap}
.chip{font:600 18px var(--body);min-height:48px;padding:12px 24px;border-radius:6px;border:2px solid var(--ink);background:var(--white);color:var(--ink);cursor:pointer;transition:background-color .2s ease,color .2s ease}
.chip:active{transform:scale(.97)}
.chip[aria-pressed=true]{background:var(--ink);color:var(--white)}
.range{display:flex;align-items:center;gap:28px;flex-wrap:wrap;border-top:2px dashed var(--ink);padding-top:28px;font-size:20px}
.range-val{font-family:var(--display);font-weight:700;font-size:clamp(30px,3.4vw,44px);color:var(--green-dk);width:100%}
.range .btn{margin-left:auto}

/* treehouses */
.tree-photo{height:520px;border:2px solid var(--ink);border-radius:var(--r)}
.tree-row{display:flex;align-items:flex-end;gap:48px;flex-wrap:wrap}
.tree-row h2{font-size:clamp(40px,4.6vw,64px)}
.tree-row p{font-size:19px;max-width:440px}
.tree-row a{margin-left:auto;font-weight:600;font-size:18px;padding:12px 0}

/* about */
.about{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:48px;align-items:center}
.about-photo{height:380px;border-radius:var(--r)}
.about .stack{grid-column:span 2;gap:24px}
blockquote{margin:0;font-family:var(--display);font-size:clamp(28px,3vw,40px);line-height:1.25}
.who{font-weight:600;font-size:17px}
.facts{display:flex;gap:36px;flex-wrap:wrap;font-size:17px}

/* footer */
.foot{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:48px var(--pad);background:var(--ink);color:var(--mist);font-size:15px}
.foot a{color:var(--mist)}

/* tablet */
@media (max-width:1024px){
  :root{--pad:32px}
  .nav{display:none} /* ponytail: nav hidden on small screens, add a menu if Mark wants more pages */
  .hero,.split,.about{grid-template-columns:minmax(0,1fr)}
  .about .stack{grid-column:auto}
  .bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:360px 220px 200px}
  .tile-big{grid-row:span 1}
}
/* phone */
@media (max-width:640px){
  :root{--pad:16px}
  .top{padding:10px var(--pad)}
  .brand span,.top-cta .btn-green{display:none}
  .phone{background:var(--green);color:var(--white);border-radius:6px;padding:12px 18px}
  .hero{padding:48px var(--pad) 56px;gap:32px}
  .hero-copy p{font-size:18px}
  .section{padding:64px var(--pad)}
  .bento{grid-template-columns:minmax(0,1fr);grid-template-rows:none}
  .tile-big,.tile-wide{grid-column:auto}
  .tile-big .ph{height:240px}
  .tile-wide{grid-template-columns:minmax(0,1fr)}
  .tile-wide .ph{height:180px}
  .ba{height:300px}
  .range .btn{margin-left:0}
  .tree-photo{height:300px}
  .tree-row a{margin-left:0}
  .about-photo{height:280px}
}

@media (prefers-reduced-motion:reduce){
  .draw,.fade{animation:none;stroke-dashoffset:0;opacity:1}
  .btn,.tab,.chip,.tile{transition:none}
}
