/* ============================================================
   J&E HOMES · brochure viewer (brochure/brochure.css)
   Same tokens and type as site.css, without the homepage's weight.
   The book itself is page-flip (vendor/page-flip), which injects
   its own small stylesheet for the page geometry.
   ============================================================ */
@font-face{font-family:'Figtree';font-style:normal;font-weight:400 700;font-display:swap;
  src:url("../assets/fonts/figtree-var.woff2") format("woff2")}
:root{
  --navy:#031440; --navy-deep:#020B26; --navy-lift:#0E2A66;
  --gold:#E8D4A9; --gold-hi:#F2E4C4; --glow-blue:#3F62B3;
  --on-navy:#F6F2EA; --on-navy-muted:#BAC1CF;
  --sans:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --r-btn:10px;
  --turn:.7s;                 /* matches flippingTime in brochure.js */
  --ease:cubic-bezier(.45,.05,.25,1);
}
*{box-sizing:border-box}
html,body{margin:0}
body{color:var(--on-navy);font:400 1rem/1.5 var(--sans);-webkit-font-smoothing:antialiased;
  /* a pool of light behind the book, falling off to deep navy at the edges */
  background:radial-gradient(ellipse 75% 65% at 50% 46%,var(--navy-lift) 0%,var(--navy) 58%,var(--navy-deep) 100%) fixed var(--navy)}
a{color:inherit;text-decoration:none}
img{display:block}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:2px}
[hidden]{display:none!important}   /* .btn's own display would otherwise win */
.sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.skip{position:fixed;left:1rem;top:-100px;z-index:50;background:var(--gold);color:var(--navy);
  font-weight:600;padding:.7rem 1.1rem;border-radius:8px;transition:top .2s}
.skip:focus{top:1rem}

/* ---------- one screen: bar, book, controls ---------- */
/* Phones: header, book, controls. Wider screens add the side panel and the
   page overview as columns on the left (see "desktop" below). */
.js body{display:grid;grid-template-rows:auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);
  grid-template-areas:"bar" "stage" "ctl";height:100vh;height:100dvh;overflow:hidden}
.bar{grid-area:bar}
.stage{grid-area:stage}
.controls{grid-area:ctl}
.rail,.overview,.side{display:none}

.bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:16px clamp(16px,3vw,36px) 10px}
.brand{display:inline-flex;line-height:0}
.brand img{height:30px;width:auto}
.bar-actions{display:flex;align-items:center;gap:.6rem}

/* buttons, as on the main site */
.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;
  font:600 .85rem/1 var(--sans);letter-spacing:.005em;padding:.68rem 1.1rem;min-height:44px;
  border-radius:var(--r-btn);border:1px solid transparent;isolation:isolate;white-space:nowrap;
  transition:transform .3s cubic-bezier(.2,.7,.2,1),background .35s,color .3s,border-color .3s,box-shadow .35s}
.btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.btn--primary{background:var(--gold);color:var(--navy)}
.btn--primary::before{content:"";position:absolute;inset:-2px;border-radius:inherit;z-index:-1;
  background:linear-gradient(90deg,var(--glow-blue),var(--gold) 26%,var(--gold-hi) 50%,var(--gold) 74%,var(--glow-blue));
  background-size:220% 100%;opacity:0;filter:blur(8px);transition:opacity .45s ease}
@keyframes glow{to{background-position:250% 0}}
.btn--ghost{background:rgba(246,242,234,.08);color:var(--on-navy);border-color:rgba(246,242,234,.4)}
/* hover only where there is a pointer to hover with: on a phone it sticks after a tap */
@media (hover:hover){
  .btn--primary:hover{transform:translateY(-2px);background:linear-gradient(100deg,var(--gold-hi),var(--gold) 55%,#EAD8B0)}
  .btn--primary:hover::before{opacity:.8;animation:glow 3s linear infinite}
  .btn--ghost:hover{background:rgba(246,242,234,.16);border-color:var(--on-navy);transform:translateY(-2px)}
  .ctl:hover:not(:disabled){background:var(--gold);border-color:var(--gold);color:var(--navy)}
}

/* full screen: one icon for going in, one for coming out */
.fs-toggle .fs-out,.is-full .fs-toggle .fs-in{display:none}
.is-full .fs-toggle .fs-out{display:block}

/* A cover slid to the middle carries the open book's empty half past the edge
   of the screen. Clip it sideways only; clip rather than hidden keeps the
   shadow under the book. */

.stage{position:relative;display:grid;place-items:center;min-height:0;padding:10px clamp(16px,3vw,36px) 6px;
  overflow-x:clip}

/* ---------- the book ---------- */
.book-wrap{position:relative;transition:transform var(--turn) var(--ease),opacity .5s ease}
.js .book-wrap{opacity:0}
.js.ready .book-wrap{opacity:1}
.resizing .book-wrap{transition:none}
/* page-flip writes min and max sizes onto the book as inline styles, sized for
   its own layout logic; the book is sized by brochure.js instead */
.book.stf__parent{min-width:0!important;min-height:0!important;max-width:none!important}
.js .pg{display:none}
.pg{background:#fff;overflow:hidden}
/* One shadow under the whole book, not one per page: a page's own shadow
   spilled across the fold onto its neighbour and darkened the middle of
   every spread. It narrows to one page while a cover stands alone. */
.book-wrap::before{content:"";position:absolute;inset:0;pointer-events:none;
  box-shadow:0 22px 48px -22px rgba(0,0,0,.7),0 2px 6px rgba(0,0,0,.18);
  transition:left var(--turn) var(--ease),right var(--turn) var(--ease)}
.book-wrap.only-right::before{left:50%}
.book-wrap.only-left::before{right:50%}
.no-js .book-wrap::before{display:none}
.no-js .pg{box-shadow:0 22px 48px -22px rgba(0,0,0,.7)}
.pg img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;
  -webkit-user-drag:none;pointer-events:none}
.pg-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* The fold darkens only while a page is turning, then fades away, so an open
   spread reads edge to edge as one piece. */
.book-wrap.spread::after{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 3%);width:6%;
  pointer-events:none;z-index:5;opacity:0;transition:opacity .45s ease;
  background:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.05) 38%,rgba(0,0,0,.12) 50%,rgba(0,0,0,.05) 62%,rgba(0,0,0,0) 100%)}
.flipping .book-wrap.spread::after{opacity:1;transition-duration:.15s}

/* links printed on the page */
.hot{position:absolute;z-index:3;border-radius:3px;transition:background-color .2s,box-shadow .2s}
.hot::before{content:"";position:absolute;inset:-8px -4px}    /* a bigger target than the line of type */
.hot:hover{background:rgba(232,212,169,.3);box-shadow:0 0 0 3px rgba(232,212,169,.3)}

/* ---------- controls ---------- */
.controls{display:flex;align-items:center;justify-content:center;gap:.5rem;
  padding:8px 16px calc(16px + env(safe-area-inset-bottom))}
.ctl{width:44px;height:44px;flex:none;display:grid;place-items:center;padding:0;cursor:pointer;
  border-radius:50%;border:1px solid rgba(246,242,234,.3);background:rgba(246,242,234,.06);color:var(--on-navy);
  transition:background-color .2s,border-color .2s,color .2s,opacity .2s}
.ctl svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ctl:active:not(:disabled){background:var(--gold);border-color:var(--gold);color:var(--navy)}
.ctl:disabled{opacity:.3;cursor:default}
.ctl:focus-visible{border-radius:50%}
/* the hint wraps inside the counter's width rather than widening the row */
.count{margin:0 .35rem;width:15rem;display:flex;flex-direction:column;align-items:center;gap:.2rem;text-align:center}
#count{font:600 .92rem/1.2 var(--sans);letter-spacing:.01em}
.hint{min-height:1.3em;font-size:.75rem;line-height:1.3;color:var(--on-navy-muted);transition:opacity .6s ease}
.hint.gone{opacity:0}
.sep{width:1px;height:26px;background:rgba(246,242,234,.2);margin:0 .25rem}
.end-cta{margin-left:.6rem}

/* ---------- zoom ---------- */
.zoom{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;
  background:rgba(2,11,38,.97);color:var(--on-navy)}
.zoom::backdrop{background:rgba(2,11,38,.85)}
.zoom-scroll{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;cursor:grab;padding:0 16px}
.zoom-scroll.grab{cursor:grabbing}
/* one shadow under the spread, so neither page shades the other */
.zoom-pages{display:flex;width:max-content;margin:76px auto 32px;box-shadow:0 22px 48px -22px rgba(0,0,0,.7)}
.zoom-pages img{max-width:none;height:auto;background:#fff center/cover no-repeat;
  user-select:none;-webkit-user-drag:none}
.close{position:fixed;top:16px;right:16px;z-index:2;background:rgba(3,20,64,.82)}

/* ---------- desktop: side panel, overview, arrows ---------- */
.rail{flex-direction:column;align-items:center;gap:6px;width:68px;padding:16px 0;z-index:10;
  background:rgba(2,11,38,.55);border-right:1px solid rgba(246,242,234,.08)}
.rail-btn{position:relative;width:48px;height:48px;display:grid;place-items:center;padding:0;cursor:pointer;
  border:0;border-radius:12px;background:none;color:var(--on-navy);transition:background-color .2s,color .2s}
.rail-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.rail-btn .dots{stroke-width:3.2}
.rail-btn[aria-expanded="true"],.rail-btn[aria-pressed="true"]{background:rgba(232,212,169,.14);color:var(--gold)}
.rail-btn:focus-visible{outline-offset:0}
/* the name of each tool, shown beside it on hover or keyboard focus */
.tip{position:absolute;left:calc(100% + 12px);top:50%;transform:translate(-4px,-50%);z-index:20;
  opacity:0;pointer-events:none;white-space:nowrap;
  background:var(--on-navy);color:var(--navy);font:600 .8rem/1 var(--sans);padding:.6rem .8rem;border-radius:8px;
  box-shadow:0 10px 24px -10px rgba(0,0,0,.6);transition:opacity .15s ease,transform .15s ease}
.tip::before{content:"";position:absolute;right:100%;top:50%;margin-top:-5px;
  border:5px solid transparent;border-right-color:var(--on-navy)}
.rail-btn:focus-visible .tip{opacity:1;transform:translate(0,-50%)}
/* once its panel or menu is open, the name has done its job */
.rail-btn[aria-expanded="true"] .tip{display:none}
@media (hover:hover){
  .rail-btn:hover{background:rgba(246,242,234,.08);color:var(--gold)}
  .rail-btn:hover .tip{opacity:1;transform:translate(0,-50%)}
}

/* page overview: every spread as a thumbnail, the current one marked */
.overview{width:232px;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px 28px;
  background:#041341;border-right:1px solid rgba(246,242,234,.08);scrollbar-width:thin;scrollbar-color:rgba(246,242,234,.25) transparent}
.ov-title{margin:4px 2px 14px;font:600 .72rem/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.ov-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.ov-item{position:relative;display:flex;justify-content:center;width:100%;padding:10px 8px;cursor:pointer;
  border:1px solid transparent;border-radius:10px;background:rgba(246,242,234,.05);transition:border-color .2s,background-color .2s}
.ov-sheet{display:flex;box-shadow:0 6px 14px -8px rgba(0,0,0,.7)}
.ov-sheet img{display:block;width:84px;height:auto;background:#fff}
.ov-label{position:absolute;left:6px;top:6px;padding:.3rem .45rem;border-radius:4px;
  background:var(--on-navy);color:var(--navy);font:700 .7rem/1 var(--sans)}
.ov-item[aria-current="true"]{border-color:var(--gold);background:rgba(232,212,169,.12)}
.ov-item[aria-current="true"] .ov-label{background:var(--gold)}
@media (hover:hover){.ov-item:hover{border-color:rgba(232,212,169,.5)}}

/* the arrows beside the book */
.side{position:absolute;top:50%;z-index:6;width:56px;height:120px;margin-top:-60px;padding:0;
  place-items:center;cursor:pointer;border:0;border-radius:12px;background:none;color:var(--on-navy);
  opacity:.75;transition:opacity .2s,color .2s,background-color .2s}
.side svg{width:22px;height:60px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.side-prev{left:18px}
.side-next{right:18px}
.side:disabled{opacity:0;pointer-events:none}
@media (hover:hover){.side:hover{opacity:1;color:var(--gold);background:rgba(246,242,234,.05)}}

/* share */
.share-pop{position:fixed;z-index:30;min-width:220px;padding:8px;border-radius:12px;
  background:var(--on-navy);color:var(--navy);box-shadow:0 22px 44px -14px rgba(0,0,0,.6)}
.share-pop a,.share-pop button{display:flex;align-items:center;gap:.75rem;width:100%;min-height:44px;padding:.6rem .8rem;
  border:0;border-radius:8px;background:none;cursor:pointer;text-align:left;font:600 .88rem/1.2 var(--sans);color:var(--navy)}
.share-pop svg{width:20px;height:20px;flex:none}
.share-pop .line{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.share-pop .mark{fill:currentColor}
.share-pop :focus-visible{outline-color:var(--navy);outline-offset:-2px}
@media (hover:hover){.share-pop a:hover,.share-pop button:hover{background:rgba(3,20,64,.07)}}
.toast{position:fixed;left:50%;bottom:84px;z-index:40;margin:0;transform:translate(-50%,8px);opacity:0;pointer-events:none;
  padding:.7rem 1.1rem;border-radius:999px;background:var(--on-navy);color:var(--navy);font:600 .85rem/1 var(--sans);
  box-shadow:0 14px 30px -12px rgba(0,0,0,.6);transition:opacity .2s ease,transform .2s ease}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (min-width:901px){
  .js body{grid-template-columns:auto auto minmax(0,1fr);
    grid-template-areas:"rail ov bar" "rail ov stage" "rail ov ctl"}
  .js .rail{display:flex;grid-area:rail;grid-row:1/-1}
  .js .overview{display:block;grid-area:ov;grid-row:1/-1}
  .js .side{display:grid}
  /* room either side of the book for the arrows */
  .stage{padding:12px 92px 4px}
  /* the side panel carries zoom and download here, and the arrows turn the pages */
  .bar .dl,.controls .ctl,.controls .sep,.end-cta{display:none!important}
  .controls{padding:12px 16px 18px}
  /* Full screen is for reading: the header, and with it Register Your
     Interest and the full screen button, steps aside. The side panel stays. */
  .is-full .bar{display:none}
  .is-full .stage{padding-top:20px}
}

/* ---------- smaller screens ---------- */
@media (max-width:900px){
  .bar .cta{display:none}
}
@media (max-width:600px){
  .bar{padding:12px 16px 6px}
  .brand img{height:24px}
  .dl,.fs{width:44px;padding:0}
  .dl span,.fs span{display:none}
  .stage{padding:6px 12px 4px}
  .count{width:10.5rem;margin:0 .15rem}
  #count{font-size:.86rem}
  .controls{gap:.4rem}
  /* on the last pages the call to action takes the counter's place */
  .controls.at-end .count{display:none}
  .is-full .end-cta{display:none!important}
  .is-full .controls.at-end .count{display:flex}
  .end-cta{margin-left:0;padding:.68rem .95rem}
}

/* a phone on its side: every pixel of height goes to the book */
@media (max-height:500px) and (orientation:landscape){
  .bar{padding:8px 16px 0}
  .brand img{height:22px}
  .stage{padding:4px 12px}
  .controls{padding:4px 16px calc(6px + env(safe-area-inset-bottom))}
  .hint{display:none}
}

/* ---------- reduced motion: pages change without turning ---------- */
.still .book-wrap,.still .book-wrap::before,.still .book-wrap::after,.still .hint,.still .btn,.still .btn svg{transition:none}
.still .btn--primary:hover::before{animation:none}
@media (prefers-reduced-motion:reduce){
  .book-wrap,.book-wrap::before,.book-wrap::after,.hint,.btn,.ctl,.hot{transition:none}
  .btn--primary:hover::before{animation:none}
}

/* ---------- no JavaScript: the pages simply stack and scroll ---------- */
.no-js .controls,.no-js .zoom{display:none}
.no-js .book{display:grid;gap:18px;max-width:640px;margin:0 auto}
.no-js .pg{position:relative}
.no-js .pg img{height:auto}
/* both editions are in the page; without JavaScript the screen width picks one */
.no-js #bookMobile{display:none}
@media (max-width:600px){.no-js #book{display:none}.no-js #bookMobile{display:grid}}
