/* ============================================================
   BEL FENCE - inner pages (fences, services, about, gallery, contact)
   Loaded after site.css. Colours come from the tokens in site.css :root;
   the few extra tokens used here are declared first.
   ============================================================ */

:root{
  --veil:rgba(255,255,255,.04);
  --field-bg:#0e1116;
  --danger:#ff9a8f;
  --ok:#9fe3b4;
  --scrim-strong:rgba(5,6,8,.94);
  --mask-on:#000;
}

/* ---------- page banner ---------- */
.page-banner{position:relative;overflow:hidden;padding:calc(var(--header-h) + clamp(40px,6vw,88px)) 0 clamp(36px,5vw,72px);border-bottom:1px solid var(--border);background:var(--bg)}
.page-banner::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(90deg,var(--veil) 0 2px,transparent 2px 46px);-webkit-mask-image:linear-gradient(180deg,var(--mask-on) 0%,transparent 92%);mask-image:linear-gradient(180deg,var(--mask-on) 0%,transparent 92%);pointer-events:none}
.page-banner .wrap{position:relative}
.page-banner .display{max-width:16ch}
.page-banner .lede{max-width:56ch;margin-top:1.4rem;font-size:clamp(1.02rem,1.5vw,1.25rem);color:var(--text-2)}

/* ---------- alternating feature rows (fences, services) ---------- */
.rows{display:grid;gap:clamp(56px,8vw,120px)}
.row{display:grid;grid-template-columns:1.3fr 1fr;gap:clamp(28px,6vw,88px);align-items:center}
.row:nth-child(even){grid-template-columns:1fr 1.3fr}
.row:nth-child(even) .row-media{order:2}
.row-media{position:relative;overflow:hidden;border-radius:var(--radius-lg);border:1px solid var(--border);aspect-ratio:4/3;background:var(--surface-2)}
.row-media picture,.row-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.row-no{display:block;font-family:var(--font-display);font-size:.95rem;letter-spacing:.3em;color:var(--accent-2);margin-bottom:.8rem}
.row h2{font-size:clamp(2rem,4.6vw,3.6rem);line-height:1.02;text-transform:uppercase;letter-spacing:.012em}
.row p{margin:1.1rem 0 1.8rem;max-width:52ch;font-size:1.05rem}
.row .row-text > p:last-child{margin-bottom:0}
.link-arrow{display:inline-flex;align-items:center;gap:.6em;font-weight:600;letter-spacing:.04em;color:var(--text);border-bottom:1px solid var(--border-2);padding-bottom:3px;transition:border-color .18s,gap .18s}
.link-arrow:hover{border-color:var(--accent)}

/* ---------- about ---------- */
.about-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(32px,6vw,96px);align-items:start}
.about-photo{position:sticky;top:calc(var(--header-h) + 24px);overflow:hidden;border-radius:var(--radius-lg);border:1px solid var(--border);aspect-ratio:3/4;background:var(--surface-2)}
.about-photo picture,.about-photo img{width:100%;height:100%;object-fit:cover}
.about-copy p{font-size:1.12rem;line-height:1.75}
/* about: the family story as a horizontal timeline over a photo band.
   Default (no JS, reduced motion, save-data, old browsers): a plain vertical list on a thin line, every stop visible, the
   first photo beside it on desktop and on top on phones; the other photos, the ruler, the label chip stay hidden. Nothing below moves until site.js adds a mode class to the section, and it does that only under
   html.js-motion:
   - .story-pin (768px and up): the section is (stops + 1) screens tall with a sticky 100svh (100vh fallback) stage drawn like a design canvas
     (a faint square grid and two diagonal guides, both SVG lines). Vertical scroll through the section slides the
     list sideways and scrubs the photo band: one photo per stop, the outgoing one blurring and draining to black and white
     while the next sharpens into colour and settles from scale 1.04 to 1 (opacity, transform and filter only, written from
     a rAF loop with a light lerp). A ruler (a major tick with its number per stop, minor ticks between) slides across the
     lower part of the band under a fixed cursor; a chip says what the current photo shows; the last stop ends sharp and in colour.
   - .story-stack (under 768px): a plain vertical timeline that scrolls with the page, nothing pinned or sideways. Each stop
     carries its own full-width photo (site.js copies the band's layers in), fades and rises in once as it enters the view,
     and an accent line down the left fills with scroll progress (transform only).
   --stops must match the number of stops, .tl-tick spans and .tl-pic layers in about.html; --pitch is the distance between
   stops on desktop; --rpitch is the ruler's distance between major ticks (site.js reads it; the minor-tick pattern is a
   fifth of it).
   The first photo asset is a phone screenshot with bars above and below the picture: that img is oversized and centred
   so only the picture shows (the middle 61% of the file), in every mode. */
.story{--stops:5;--pitch:88%;--rpitch:150px}
.story h2{max-width:20ch;margin-top:.6rem}
@media (min-width:900px){.story .about-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.story .about-photo{aspect-ratio:auto;height:calc(100svh - var(--header-h) - 48px);max-height:860px}}
.tl-pic{position:absolute;inset:0}
.tl-pic:not(:first-child),.tl-chip,.tl-band{display:none}
.tl-pic picture{display:block;position:relative;width:100%;height:100%;overflow:hidden}
.tl-pic img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
.tl-pic-crop img{top:-32%;height:164%}
.tl-fig,.tl-prog{display:none}
.tl-fig picture{display:block;position:relative;width:100%;height:100%;overflow:hidden}
.tl-fig img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}
.story .about-copy p.eyebrow{font-size:11px;line-height:1.5}
.story-head{position:relative}
.tl-count,.tl-num{display:none}
.tl{list-style:none;margin:clamp(32px,5vw,56px) 0 0;padding:0 0 0 clamp(24px,4vw,40px);border-left:1px solid var(--border);max-width:720px}
.tl-stop{position:relative;padding:0 0 clamp(44px,6vw,64px)}
.tl-stop:last-child{padding-bottom:0}
.tl-stop::before{content:"";position:absolute;left:calc(-1 * clamp(24px,4vw,40px) - 5px);top:.45em;width:9px;height:9px;background:var(--accent-2)}
.tl-stop h3{font-size:clamp(1.15rem,1.9vw,1.45rem);line-height:1.25;margin:0 0 .7rem}
.about-copy .tl-stop p{font-size:1.05rem;line-height:1.75;max-width:60ch}
/* shared pieces of both armed modes: the counter on the eyebrow line, the photo band (stacked layers, the chip, the then /
   now split, the ruler strip with its fixed cursor), the faint number behind each stop */
.story-pin .tl-count{display:block;position:absolute;top:0;right:0;margin:0;font-family:var(--font-label);font-size:11px;font-weight:600;letter-spacing:var(--track);line-height:1.5;color:var(--text-2);font-variant-numeric:tabular-nums}
.story-pin .about-photo{position:relative;isolation:isolate;background:var(--ink)}
.story-pin .tl-pic{display:block;transform-origin:50% 50%}
.story-pin .tl-pic:not(:first-child){opacity:0;visibility:hidden}
.story-pin .tl-pic{will-change:transform,opacity,filter}
.story-pin .tl-chip{display:block;position:absolute;left:14px;top:14px;margin:0;padding:7px 9px 6px;background:var(--ink);color:var(--paper);border:1px solid var(--border-2);font-family:var(--font-label);font-size:10px;font-weight:600;letter-spacing:.16em;line-height:1;text-transform:uppercase;white-space:nowrap;pointer-events:none;z-index:3}
.story-pin .tl-band{display:block;position:absolute;left:0;right:0;bottom:0;height:46px;overflow:hidden;background:rgba(var(--ink-rgb),.66);border-top:1px solid var(--border);z-index:3}
/* the ruler: a 1px minor tick every fifth of --rpitch (an SVG line, repeated), a 16px major tick with its number per stop */
.story-pin .tl-ruler{position:absolute;left:22%;top:0;bottom:0;width:calc(var(--stops) * var(--rpitch) + 100%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='8'%3E%3Crect width='1' height='8' fill='%23cfd3d8' fill-opacity='.4'/%3E%3C/svg%3E") 0 0 / calc(var(--rpitch) / 5) 8px repeat-x;will-change:transform}
.tl-tick{position:absolute;top:0;bottom:0;padding:23px 0 0 7px;font-family:var(--font-label);font-size:10px;font-weight:600;letter-spacing:.12em;line-height:1;color:var(--muted);font-variant-numeric:tabular-nums;transition:color .3s}
.tl-tick::before{content:"";position:absolute;left:0;top:0;width:1px;height:16px;background:var(--silver)}
.tl-tick:nth-child(2){left:calc(1 * var(--rpitch))}.tl-tick:nth-child(3){left:calc(2 * var(--rpitch))}.tl-tick:nth-child(4){left:calc(3 * var(--rpitch))}.tl-tick:nth-child(5){left:calc(4 * var(--rpitch))}
.tl-tick.tl-on{color:var(--paper)}
.tl-cursor{position:absolute;left:22%;top:0;bottom:0;width:1px;background:var(--paper)}
.tl-cursor::before{content:"";position:absolute;left:-3px;top:0;width:7px;height:7px;background:var(--paper)}
.story-pin .tl{display:flex;margin:0;padding:0;border:0;max-width:none}
.story-pin .tl-stop{padding-bottom:0}
.story-pin .tl-stop::before{display:none}
.story-pin .tl-num{display:block;position:absolute;left:-.04em;top:0;font-family:var(--font-display);font-weight:600;line-height:1;letter-spacing:.02em;color:var(--paper);opacity:.055;pointer-events:none;user-select:none;-webkit-user-select:none;transition:opacity .4s}
.story-pin .tl-on .tl-num{opacity:.1}
.story-pin .tl-stop h3,.story-pin .about-copy .tl-stop p{position:relative}
@media (min-width:768px){
  .story-pin{padding:0;height:calc((var(--stops) + 1) * 100vh);height:calc((var(--stops) + 1) * 100svh)}
  /* the stage is a design canvas: a faint 40px square grid and two corner-to-corner guides, both SVG lines */
  .story-pin .story-stage{position:sticky;top:0;height:100vh;height:100svh;padding-top:var(--header-h);overflow:hidden;background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 .5H40M.5 0V40' stroke='%23cfd3d8' stroke-opacity='.075' fill='none'/%3E%3C/svg%3E") 50% 0 repeat}
  .story-pin .story-stage::before{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0L100 100M100 0L0 100' stroke='%23cfd3d8' stroke-opacity='.09' vector-effect='non-scaling-stroke' fill='none'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;pointer-events:none}
  .story-pin .about-grid{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:clamp(32px,5vw,72px);align-items:stretch;height:100%}
  .story-pin .about-photo{z-index:2;top:auto;aspect-ratio:auto;height:auto;max-height:none;margin:24px 0}
  .story-pin .about-copy{display:flex;flex-direction:column;min-width:0;margin:24px 0}
  .story-pin h2{font-size:clamp(1.6rem,2.5vw,2.4rem);max-width:18ch;margin-top:.4rem}
  .story-pin .tl-view{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding-top:clamp(16px,3vh,32px);clip-path:inset(-24px -100vw -24px 0)}
  .story-pin .tl{margin:auto 0;will-change:transform}
  .story-pin .tl-stop{flex:0 0 72%;margin-right:calc(var(--pitch) - 72%);padding-top:clamp(12px,2vh,24px);transform-origin:0 50%;will-change:transform,opacity}
  .story-pin .tl-num{font-size:clamp(6.5rem,10vw,10.5rem)}
  .story-pin .tl-stop h3{font-size:clamp(1.7rem,2.5vw,2.6rem);line-height:1.12;margin:clamp(56px,9vh,96px) 0 1.1rem;max-width:15ch}
  .story-pin .about-copy .tl-stop p{font-size:clamp(1rem,1.15vw,1.12rem);line-height:1.7;max-width:46ch}
}
@media (max-width:767px){
  .story-stack .about-photo{display:none} /* each stop carries its own photo */
  .story-stack .tl-view{position:relative;margin-top:clamp(28px,7vw,40px)}
  .story-stack .tl-view::before,.story-stack .tl-prog{content:"";position:absolute;left:4px;top:0;bottom:0;width:1px;background:var(--border)}
  .story-stack .tl-prog{display:block;background:var(--accent-2);transform:scaleY(0);transform-origin:50% 0;will-change:transform}
  .story-stack .tl{margin:0;padding:0 0 0 28px;border:0}
  .story-stack .tl-stop{padding-bottom:56px;opacity:0;transform:translate3d(0,28px,0);transition:opacity .8s var(--ease),transform .8s var(--ease)}
  .story-stack .tl-stop:last-child{padding-bottom:0}
  .story-stack .tl-stop.tl-in{opacity:1;transform:none}
  .story-stack .tl-stop::before{left:-28px;top:0}
  .story-stack .tl-fig{display:block;position:relative;aspect-ratio:4/3;margin:0 0 20px;overflow:hidden;background:var(--ink)}
  .story-stack .tl-stop h3{font-size:clamp(1.35rem,5.6vw,1.6rem);line-height:1.2;margin:0 0 .7rem}
  .story-stack .about-copy .tl-stop p{font-size:1rem;line-height:1.7}
}
}
.row-solo{grid-template-columns:1fr!important;border-top:1px solid var(--border);padding-top:clamp(32px,5vw,56px)}
.about-copy p + p{margin-top:1.5rem}
.about-copy .lead{font-family:var(--font-display);font-size:clamp(1.15rem,1.9vw,1.5rem);line-height:1.4;color:var(--text);font-weight:600}

/* ---------- gallery ---------- */
.shots{columns:4 240px;column-gap:14px}
.shot{break-inside:avoid;margin-bottom:14px}
.shot-btn{display:block;width:100%;overflow:hidden;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface-2);cursor:zoom-in;position:relative;padding:0}
.shot-btn img{width:100%;height:auto;transition:transform .6s var(--ease),opacity .4s}
.shot-btn:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.lb{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center;background:var(--scrim-strong)}
.lb.open{display:flex}
.lb-fig{position:relative;margin:0;max-width:min(94vw,1100px);max-height:88svh;display:flex;flex-direction:column;align-items:center;gap:12px}
.lb-img{max-width:100%;max-height:calc(88svh - 40px);width:auto;height:auto;border-radius:var(--radius);box-shadow:0 20px 60px -20px var(--mask-on);object-fit:contain}
.lb-count{font-size:.8rem;letter-spacing:.2em;text-transform:uppercase;color:var(--text-3)}
.lb-btn{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;border:1px solid var(--border-2);background:var(--header-bg);color:var(--text);font-size:1.6rem;line-height:1}
.lb-btn:hover{border-color:var(--accent)}
.lb-close{top:max(14px,env(safe-area-inset-top));right:16px}
.lb-prev{left:12px;top:50%;transform:translateY(-50%)}
.lb-next{right:12px;top:50%;transform:translateY(-50%)}
html.js-motion .lb.open .lb-img{animation:lbIn .28s var(--ease)}
@keyframes lbIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}

/* ---------- contact ---------- */
.contact-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(32px,6vw,88px);align-items:start}
.info-list{display:grid;gap:0;border-top:1px solid var(--border)}
.info-list li{display:grid;grid-template-columns:96px 1fr;gap:16px;padding:18px 0;border-bottom:1px solid var(--border)}
.info-list .k{font-size:.75rem;font-weight:600;letter-spacing:.22em;text-transform:uppercase;color:var(--text-3);padding-top:3px}
.info-list .v{color:var(--text);font-size:1.02rem}
.info-list a.v:hover{color:var(--accent)}
.map{margin-top:28px;position:relative;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-lg);aspect-ratio:4/3;background:var(--surface)}
.map iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.map-facade{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;text-align:center;background:repeating-linear-gradient(0deg,var(--veil) 0 1px,transparent 1px 38px),repeating-linear-gradient(90deg,var(--veil) 0 1px,transparent 1px 38px)}
.map-facade p{color:var(--text)}
.map-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.areas-small{margin-top:28px}
.areas-small .eyebrow{margin-bottom:.8rem}
.areas-small .areas li{padding:8px 14px;font-size:.88rem}

@media (max-width:899px){
  .row,.row:nth-child(even){grid-template-columns:1fr}
  .row:nth-child(even) .row-media{order:0}
  .about-grid,.contact-grid{grid-template-columns:1fr}
  .about-photo{position:relative;top:0;aspect-ratio:4/5;max-height:70svh}
}
@media (max-width:599px){
  .shots{columns:2 140px;column-gap:10px}
  .shot{margin-bottom:10px}
  .info-list li{grid-template-columns:78px 1fr}
  .lb-prev{left:6px}.lb-next{right:6px}
  .lb-btn{width:46px;height:46px}
}
@media (prefers-reduced-motion:reduce){
  .lb.open .lb-img{animation:none!important}
}
.field .opt{text-transform:none;letter-spacing:0;font-weight:400;color:var(--text-3)}
