/* assets/pages.css
   The hand-written pages (2026-10-29): /neighborhoods/, /team/, /guides/ and
   /nantucket-now/, built by scripts/build_pages.py on the shell in scripts/page.py.
   Canvas D's palette (chrome.css sets the tokens; restated here so the page never
   depends on load order), Figtree body, Marcellus headings, Cormorant italic for
   taglines. The pill nav and the footer are assets/chrome.css. Links on navy
   restate their color, or a{color:var(--ink)} hides them. */
:root{
  --navy:#0b1424;--navy-deep:#07101d;--ink:#0b1f33;--ink-2:#4a5566;--muted:#6b7585;
  --gold:#a89160;--gold-pale:#c8ad78;--gold-light:#e3cf9f;--gold-text:#7a6a45;
  --cream:#faf8f3;--sand:#f1ede3;--sand-2:#e9e3d4;--line:rgba(11,31,51,.12);--line-w:rgba(255,255,255,.16);
  --r-card:14px;--r-inner:8px;--r-btn:5px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--cream);color:var(--ink);font-family:Figtree,system-ui,sans-serif;-webkit-font-smoothing:antialiased;min-height:100vh;display:flex;flex-direction:column}
main.page{flex:1 0 auto}
a{color:var(--ink);text-decoration:none}
img{display:block;max-width:100%}
h1,h2,h3{font-family:Marcellus,serif;font-weight:400;color:var(--ink)}
.wrap{max-width:1320px;margin:0 auto;padding:0 clamp(24px,6vw,96px)}
.wrap-narrow{max-width:860px;margin:0 auto;padding:0 clamp(24px,6vw,96px)}
.eyebrow{font-size:11px;font-weight:600;letter-spacing:.34em;text-transform:uppercase;color:var(--gold-text);margin:0}
.btn-gold{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:46px;padding:0 26px;border:0;border-radius:var(--r-btn);background:var(--gold);color:var(--ink);font-size:11px;font-weight:600;letter-spacing:.22em;white-space:nowrap;transition:background .2s}
.btn-gold:hover{background:var(--gold-pale)}
.btn-line{display:inline-flex;align-items:center;justify-content:center;height:46px;padding:0 24px;border:1px solid var(--navy);border-radius:var(--r-btn);color:var(--ink);font-size:11px;font-weight:600;letter-spacing:.22em;white-space:nowrap;transition:background .2s,color .2s}
.btn-line:hover{background:var(--navy);color:#fff}
.link-ul{font-size:11px;letter-spacing:.2em;font-weight:600;color:var(--ink);border-bottom:1px solid var(--gold);padding-bottom:6px;transition:color .2s}
.link-ul:hover{color:var(--gold-text)}

/* ---------- The opening band ---------- */
.band{position:relative;overflow:hidden;color:#fff;background:var(--navy);display:flex;align-items:flex-end}
.band-photo{min-height:min(62vh,560px)}
.band-navy{min-height:360px}
.band-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.band-faces .band-img{object-position:center 28%} /* Sean 10/29: eyes about a fifth of the way down the band */
.band-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(9,17,33,.25) 0%,rgba(9,17,33,.2) 40%,rgba(9,17,33,.78) 100%)}
.band-copy{position:relative;z-index:2;width:100%;padding-top:150px;padding-bottom:clamp(40px,5vw,64px)}
.band .eyebrow{color:var(--gold-light)}
.band h1{margin:16px 0 0;max-width:820px;font-size:clamp(36px,4.6vw,60px);line-height:1.05;color:#fff;text-shadow:0 2px 24px rgba(0,0,0,.25);text-wrap:balance}
.band-lede{margin:18px 0 0;max-width:640px;font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;font-size:clamp(20px,2.2vw,26px);line-height:1.35;color:var(--gold-light)}
.band-kicker{margin:16px 0 0;font-size:13px;letter-spacing:.08em;color:rgba(255,255,255,.78)}
.band-kicker a{color:#fff;border-bottom:1px solid var(--gold)}

/* ---------- Breadcrumb ---------- */
.crumbs{padding:22px 0 0}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 10px;font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;font-weight:600;color:var(--muted)}
.crumbs li+li::before{content:"/";margin-right:10px;color:var(--gold)}
.crumbs a{color:var(--ink)}
.crumbs a:hover{color:var(--gold-text)}

/* ---------- Article + aside ---------- */
.body{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:clamp(40px,6vw,96px);padding:clamp(40px,5vw,64px) 0 clamp(56px,7vw,96px)}
@media (max-width:980px){.body{grid-template-columns:1fr}}
.article{max-width:720px}
.article h2{font-size:clamp(24px,2.6vw,32px);line-height:1.2;margin:40px 0 0}
.article h2:first-child{margin-top:0}
.article h3{font-size:20px;margin:28px 0 0}
.article p{font-size:16.5px;line-height:1.78;color:var(--ink-2);margin:16px 0 0}
.article p:first-of-type{margin-top:0}
.article .lead,.article>p:first-child{font-size:19px;line-height:1.7;color:var(--ink)}
.article ul,.article ol{margin:14px 0 0;padding-left:22px;color:var(--ink-2);font-size:16px;line-height:1.75}
.article li+li{margin-top:8px}
.article a{border-bottom:1px solid var(--gold);transition:color .2s}
.article a:hover{color:var(--gold-text)}
.article strong{color:var(--ink)}
.article blockquote{margin:24px 0 0;padding:18px 24px;border-left:2px solid var(--gold);background:var(--sand);font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;font-size:21px;line-height:1.45;color:var(--ink)}
.article blockquote p{margin:0;font:inherit;color:inherit}
.aside{display:flex;flex-direction:column;gap:22px}
@media (min-width:981px){.aside{position:sticky;top:112px;align-self:start}}
.facts{margin:0;padding:22px 24px;border-radius:var(--r-card);background:var(--sand);display:grid;gap:0}
.facts div{display:flex;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line);font-size:14px}
.facts div:last-child{border-bottom:0}
.facts dt{margin:0;font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;font-weight:600;color:var(--gold-text);padding-top:3px;flex:0 0 auto}
.facts dd{margin:0;text-align:right;color:var(--ink);line-height:1.45}
.locator{padding:20px 22px 16px;border-radius:var(--r-card);background:var(--navy);color:#fff}
.locator svg{width:100%;height:auto;display:block}
.locator-island{fill:rgba(255,255,255,.08);stroke:rgba(255,255,255,.35);stroke-width:2}
.locator .pin-all{fill:rgba(255,255,255,.28)}
.locator .pin-here{fill:var(--gold-light)}
.locator-cap{margin:12px 0 0;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.72)}
.locator-cap strong{color:#fff;font-weight:600}
.aside-cta{padding:22px 24px;border-radius:var(--r-card);border:1px solid var(--line)}
.aside-cta h3{margin:0;font-size:20px}
.aside-cta p{margin:8px 0 16px;font-size:14px;line-height:1.6;color:var(--ink-2)}
.aside-cta .btn-gold{width:100%}
.aside-list{margin:12px 0 0;padding:0;list-style:none}
.aside-list li{padding:9px 0;border-bottom:1px solid var(--line);font-size:14.5px}
.aside-list li:last-child{border-bottom:0}
.aside-list a{border-bottom:1px solid var(--gold)}

/* ---------- Card grids (neighborhoods, team, guides, posts) ---------- */
.section{padding:clamp(48px,6vw,88px) 0}
.section-sand{background:var(--sand)}
.section-navy{background:var(--navy);color:#fff}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 32px;flex-wrap:wrap;margin-bottom:clamp(28px,4vw,44px)}
.section-head h2{margin:12px 0 0;font-size:clamp(28px,3.2vw,40px);line-height:1.15}
.section-head p{margin:12px 0 0;max-width:560px;font-size:15px;line-height:1.7;color:var(--ink-2)}
.section-navy .section-head h2{color:#fff}
.section-navy .section-head p{color:rgba(255,255,255,.78)}
.section-navy .eyebrow{color:var(--gold-light)}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:1180px){.grid-4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.grid,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2{grid-template-columns:1fr}}
@media (max-width:560px){.grid,.grid-4{grid-template-columns:1fr}}
.card{display:block;color:inherit;border-radius:var(--r-card);overflow:hidden;background:#fff;border:1px solid var(--line);box-shadow:0 1px 2px rgba(11,20,36,.04),0 12px 32px rgba(11,20,36,.06);transition:transform .25s ease,box-shadow .25s ease}
.card:hover{transform:translateY(-2px);box-shadow:0 1px 2px rgba(11,20,36,.05),0 18px 40px rgba(11,20,36,.10)}
.card:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.card-ph{display:block;aspect-ratio:3/2;overflow:hidden;background:var(--sand);box-shadow:inset 0 0 0 1px rgba(168,145,96,.35);position:relative}
.card-ph img{width:100%;height:100%;object-fit:cover;transition:opacity .25s}
.card:hover .card-ph img{opacity:.9}
.card-ph .ph-name{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:Marcellus,serif;font-size:26px;color:var(--gold-text);text-align:center;padding:20px}
.card-body,.card-k,.card-t,.card-d,.card-m,.dcard-meta,.dcard-office{display:block}
.card-body{padding:20px 22px 22px}
.card-k{font-size:10px;font-weight:600;letter-spacing:.24em;text-transform:uppercase;color:var(--gold-text)}
.card-t{font-family:Marcellus,serif;font-size:22px;line-height:1.2;margin:6px 0 0;color:var(--ink)}
.card-d{font-size:13.5px;line-height:1.6;color:var(--ink-2);margin:8px 0 0}
.card-m{font-size:11px;letter-spacing:.08em;color:var(--muted);margin:12px 0 0}

/* district pages: the live listings block rendered by assets/district.js */
.d-listings .section-head p{margin-top:8px}
.dcard-meta{font-size:12px;letter-spacing:.08em;color:var(--muted);font-variant-numeric:tabular-nums;margin:6px 0 0}
.dcard-price{font-size:19px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink);float:right;margin-left:12px}
.dcard-office{margin:12px 0 0;padding-top:12px;border-top:1px solid var(--line);font-size:11.5px;color:var(--muted)}
.d-empty{font-size:16px;line-height:1.7;color:var(--ink-2);margin:0;max-width:640px}
.d-empty a{border-bottom:1px solid var(--gold)}
.link-block{margin-top:clamp(28px,4vw,40px);font-size:11.5px;line-height:1.65;color:var(--muted);max-width:980px}
.neighbors{display:flex;flex-wrap:wrap;gap:12px 32px;justify-content:space-between;align-items:center;padding:0 0 clamp(40px,5vw,64px)}
.neighbors a{font-size:11px;letter-spacing:.2em;font-weight:600;border-bottom:1px solid var(--gold);padding-bottom:6px}
.neighbors a:hover{color:var(--gold-text)}

/* ---------- Team ---------- */
.team-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:28px}
@media (max-width:1180px){.team-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){.team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:440px){.team-grid{grid-template-columns:1fr}}
/* an agent page's "rest of the team": four cards, centred under the heading (Sean, 10/29) */
.team-grid-rest{display:flex;flex-wrap:wrap;justify-content:center;gap:28px}
.team-grid-rest .tcard{flex:0 1 220px}
@media (max-width:760px){.team-grid-rest .tcard{flex-basis:calc(50% - 14px)}}
@media (max-width:440px){.team-grid-rest .tcard{flex-basis:100%}}
.tcard{display:block;color:inherit;text-align:center}
.tcard img{width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;object-position:50% 20%;border-radius:140px 140px var(--r-card) var(--r-card);transition:opacity .25s}
/* Desktop with a real pointer (Sean, 10/29): the five arches are 220px slices of the
   3:4 headshots, 600px tall. Hovering one widens it to the photo's own width (450px);
   the others keep their size and slide aside, never covered. The row is centred and
   may run a little past the gutters at 1440, so the section clips sideways. */
@media (min-width:1181px) and (hover:hover) and (pointer:fine){
  .team-grid{display:flex;justify-content:center;gap:28px}
  .team-grid .tcard{flex:0 0 220px;width:220px;transition:flex-basis .5s cubic-bezier(.22,1,.36,1),width .5s cubic-bezier(.22,1,.36,1)}
  /* the hovered width is the photo's (450) or whatever the viewport leaves once the other four and the gaps are kept whole, 16px to spare each side */
  .team-grid .tcard:hover,.team-grid .tcard:focus-within{--w:max(220px,min(450px,calc(100vw - 1024px)));flex-basis:var(--w);width:var(--w)}
  .team-grid .tcard img{height:600px;aspect-ratio:auto}
  /* the agent pages' four-up row sits inside the 1320px wrap: open to 360px at most, and
     never wider than what keeps the other three whole inside the wrap (Sean, 10/29: the
     fourth card was pushed off the right edge) */
  .team-grid-rest .tcard:hover,.team-grid-rest .tcard:focus-within{--w:max(220px,min(360px,calc(min(1320px,100vw) - 2*min(6vw,96px) - 744px)))}
  .team-grid .tcard:hover img{opacity:1}
  .team-section{overflow-x:clip}
}
.tcard:hover img{opacity:.9}
.tcard-n{font-family:Marcellus,serif;font-size:21px;margin:18px 0 0;transition:color .2s}
.tcard:hover .tcard-n{color:var(--gold-text)}
.tcard-r{font-size:10.5px;letter-spacing:.22em;font-weight:600;color:var(--gold-text);margin:6px 0 0}
.tcard-p{font-size:13.5px;color:var(--ink-2);margin:6px 0 0}
.bio{display:grid;grid-template-columns:380px minmax(0,1fr);gap:clamp(36px,6vw,80px);align-items:start;padding:clamp(40px,5vw,64px) 0 clamp(56px,7vw,96px)}
@media (max-width:900px){.bio{grid-template-columns:1fr}.bio-photo{max-width:380px}}
.bio-photo img{width:100%;aspect-ratio:3/4;object-fit:cover;object-position:50% 20%;border-radius:190px 190px var(--r-card) var(--r-card)}
.bio-card{margin-top:22px;padding:22px 24px;border-radius:var(--r-card);background:var(--sand)}
.bio-card div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.bio-card div:last-child{border-bottom:0}
.bio-card dt{margin:0;font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;font-weight:600;color:var(--gold-text);padding-top:3px}
.bio-card dd{margin:0;text-align:right;line-height:1.45;overflow-wrap:anywhere}
.bio-card a{border-bottom:1px solid var(--gold)}
.bio-quote{margin:0 0 28px;font-family:'Cormorant Garamond',Georgia,serif;font-style:italic;font-size:clamp(22px,2.4vw,28px);line-height:1.4;color:var(--ink)}
.bio-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:32px}

/* ---------- Posts (Nantucket Now) ---------- */
.post-head{padding:clamp(40px,5vw,64px) 0 0}
.post-date{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:600;color:var(--gold-text)}
.post-byline{margin:14px 0 0;font-size:13px;color:var(--muted)}
.post-byline a{border-bottom:1px solid var(--gold)}
.post-body{padding:clamp(28px,4vw,40px) 0 clamp(56px,7vw,96px)}
.post-nav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 32px;margin-top:40px;padding-top:24px;border-top:1px solid var(--line)}
.post-nav a{font-size:11px;letter-spacing:.2em;font-weight:600;border-bottom:1px solid var(--gold);padding-bottom:6px}
.feed-link{display:inline-flex;align-items:center;gap:8px;font-size:11px;letter-spacing:.2em;font-weight:600;color:var(--ink);border-bottom:1px solid var(--gold);padding-bottom:6px}

/* ---------- Closing CTA band ---------- */
.cta-band{background:var(--navy);color:#fff;padding:clamp(56px,7vw,96px) 0;text-align:center}
.cta-band h2{margin:0;font-size:clamp(28px,3.4vw,42px);line-height:1.15;color:#fff}
.cta-band p{margin:16px auto 28px;max-width:560px;font-size:15.5px;line-height:1.75;color:rgba(255,255,255,.8)}
.cta-band a{color:var(--ink)}
