/* Halden & Roe Architects — shared styles
   Signature: paper, ink, one redline accent. Things are drawn, then built. */

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("../fonts/plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* Metric-matched fallbacks so the swap doesn't shift layout */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 92%; ascent-override: 98%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: "Plex Sans Fallback"; src: local("Arial"); size-adjust: 101%; ascent-override: 101%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "Plex Mono Fallback"; src: local("Courier New"); size-adjust: 100%; ascent-override: 102%; descent-override: 27%; line-gap-override: 0%; }

:root {
  --paper: #F4F1EA;
  --paper-deep: #EAE5D9;
  --ink: #1B1B1A;
  --ink-soft: #4F4C46;
  --rule: #CDC6B7;
  --rule-strong: #A69E8E;
  --red: #B4482F;
  --red-deep: #8F3622;

  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --sans: "Plex Sans", "Plex Sans Fallback", Arial, sans-serif;
  --mono: "Plex Mono", "Plex Mono Fallback", "Courier New", monospace;

  --ease: cubic-bezier(.22, .61, .24, 1);
  --gutter: clamp(16px, 4.2vw, 56px);
  --max: 1320px;
  --line: 1px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.012em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 3rem); }
h3 { font-size: clamp(1.3rem, 1.15rem + .55vw, 1.6rem); line-height: 1.2; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Small drafting labels: sheet numbers, metadata, dimensions */
.label {
  font: 400 .75rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label .tick { color: var(--red); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; text-decoration: none;
  font: 500 .9rem var(--sans);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 48px; padding: .75rem 1.35rem;
  font: 500 .95rem/1.2 var(--sans); letter-spacing: .01em;
  text-decoration: none; border: var(--line) solid var(--ink);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { border-color: var(--red); color: var(--red-deep); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.text-link {
  font: 500 .95rem var(--sans); color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--red); padding-bottom: 2px;
}
.text-link:hover { color: var(--red-deep); }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 20;
  border-bottom: var(--line) solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-name { font: 400 1.5rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }

.nav-list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative; display: inline-block; padding: .5rem 0;
  font: 400 .95rem var(--sans); text-decoration: none; color: var(--ink);
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .25rem; height: 1px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list .nav-cta { border: 1px solid var(--ink); padding: .55rem 1rem; }
.nav-list .nav-cta::after { display: none; }
.nav-list .nav-cta:hover { border-color: var(--red); color: var(--red-deep); }

.nav-toggle {
  display: none; align-items: center; gap: .55rem;
  min-height: 44px; padding: .4rem .2rem; background: none; border: 0; color: var(--ink);
  font: 400 .75rem var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.nav-toggle-icon { position: relative; width: 22px; height: 12px; }
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle-icon::before { top: 2px; }
.nav-toggle-icon::after { top: 9px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 5.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 5.5px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .js .site-nav { display: block; visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
  .js .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .no-js .site-nav, .site-nav:not(.js *) { position: static; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .nav-list li { border-top: 1px solid var(--rule); }
  .nav-list li:first-child { border-top: 0; }
  .nav-list a { display: block; padding: .9rem 0; font-size: 1.05rem; }
  .nav-list .nav-cta { border: 0; padding: .9rem 0; }
  .nav-list a::after { bottom: .7rem; right: auto; width: 2.5rem; }
}
/* Without JS the menu simply shows below the header */
html:not(.js) .site-nav { display: block; position: static; }
html:not(.js) .nav-toggle { display: none; }
@media (max-width: 760px) { html:not(.js) .site-header .wrap { flex-wrap: wrap; } html:not(.js) .site-nav { width: 100%; } }

/* ---------- Sheet sections ---------- */
.sheet { padding-block: clamp(4rem, 3rem + 5vw, 8rem); border-bottom: var(--line) solid var(--rule); }
.sheet-head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}
.sheet-head::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.split {
  display: grid; gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
}
.split .lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.6; max-width: 38em; margin: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; border-bottom: var(--line) solid var(--rule); overflow: hidden; }
/* Floor plan behind the whole hero at 10%; multiply drops its white so only the linework tints the paper */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../images/hero-plan.webp") left top / cover no-repeat; /* keep the plan's detailed top-left corner in view */
  background-image: image-set(url("../images/hero-plan.avif") type("image/avif"), url("../images/hero-plan.webp") type("image/webp"));
  opacity: .1; mix-blend-mode: multiply;
}
.hero .wrap {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy .label { margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem); }
.hero h1 {
  font-size: clamp(2.5rem, 1.35rem + 3.3vw, 4.5rem);
  line-height: 1.02; letter-spacing: -.02em; text-wrap: initial;
}
.hero-line { display: block; }
@media (min-width: 901px) { .hero-line { white-space: nowrap; } }
.hero-sub {
  margin: clamp(1.1rem, .9rem + .8vw, 1.6rem) 0 0;
  font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); color: var(--ink-soft); max-width: 26em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); }

/* The art box: aligned photo, a paper cover that lifts floor by floor, and the trace on top.
   All three share the sketch's 768×512 coordinate space. */
.hero-figure { position: relative; margin: 0; }
.hero-crop { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
/* Soft outer edges on all four sides, through the sequence and in the final state */
.hero-crop {
  --edge: 18%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent),
                      linear-gradient(to bottom, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent),
                      linear-gradient(to bottom, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
          mask-composite: intersect;
}
.hero-art { position: absolute; inset: 0; }
.hero-art img, .hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .hero-cover { position: absolute; inset: -2px; } /* 2px overhang hides the photo's edge pixels */
.hero-art img { object-fit: cover; }
/* Paper cover over the photo; --dev grows a feathered ellipse out from the centre (0% = covered, 125% = clear) */
.hero-cover {
  --dev: 125%; background: var(--paper);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent calc(var(--dev) - 25%), #000 var(--dev));
          mask-image: radial-gradient(ellipse at center, transparent calc(var(--dev) - 25%), #000 var(--dev));
}
/* Pencil sketch, added by hero.js only while the sequence runs */
.hero-art .hero-sketch { mix-blend-mode: multiply; opacity: 0; }
.trace { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.hero-art svg { opacity: .15; }

/* registration marks at the four corners of the art */
.hero-figure::before, .hero-figure::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--red); border-style: solid;
}
.hero-figure::before { top: -8px; left: -8px; border-width: 1px 0 0 1px; }
.hero-figure::after { bottom: -8px; right: -8px; border-width: 0 1px 1px 0; }
.hero-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 1.75rem; padding-top: 2rem; }
}
@media (max-width: 600px) {
  /* Crop to the roof apex, the roofline and the top two floors */
  .hero-crop { aspect-ratio: 768 / 300; }
  /* 128% wide = 600 sketch units visible; left/top put sketch (105, 80) at the corner */
  .hero-art { inset: auto; left: -17.5%; top: -34.13%; width: 128%; aspect-ratio: 3 / 2; }
  .trace { stroke-width: 1.6; }
}

/* Animation start state, only when JS and motion are allowed (set in <head>) */
.hero-anim .hero-cover { --dev: 0%; }
.hero-anim .hero-art svg { opacity: 1; }
.hero-anim .trace path { stroke-dasharray: 1 2; stroke-dashoffset: 1.01; }
.hero-anim .hero-line, .hero-anim .hero-sub, .hero-anim .hero-actions, .hero-anim .hero-copy .label {
  animation: line-in .9s var(--ease) both;
}
.hero-anim .hero-copy .label { animation-delay: 0s; }
.hero-anim .hero-line:nth-child(1) { animation-delay: .05s; }
.hero-anim .hero-line:nth-child(2) { animation-delay: .22s; }
.hero-anim .hero-sub { animation-delay: .5s; }
.hero-anim .hero-actions { animation-delay: .75s; }
@keyframes line-in { from { opacity: .01; transform: translateY(.45em); } to { opacity: 1; transform: none; } }

/* ---------- Section reveal (one shared easing, once) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- What we design ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.services li { padding: 1.5rem clamp(1rem, 1.6vw, 1.75rem) .5rem 0; border-right: 1px solid var(--rule); }
.services li + li { padding-left: clamp(1rem, 1.6vw, 1.75rem); }
.services li:last-child { border-right: 0; }
.services .label { display: block; margin-bottom: 1.25rem; }
.services h3 { margin-bottom: .6rem; }
.services p { color: var(--ink-soft); margin: 0; }
@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services li { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; }
  .services li:nth-child(2n) { border-right: 0; }
  .services li:nth-child(2n+1) { padding-left: 0; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .services li, .services li + li { border-right: 0; padding-left: 0; }
}

/* ---------- Project cards with drawn elevations ---------- */
.work-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.2vw, 2.25rem); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; max-width: 560px; } }
.card { position: relative; display: flex; flex-direction: column; }
.card-sheet {
  position: relative; border: 1px solid var(--rule);
  aspect-ratio: 640 / 300; display: grid; place-items: center;
  background: var(--paper);
  transition: border-color .35s var(--ease);
}
.card-sheet .label { position: absolute; left: .75rem; top: .6rem; font-size: .66rem; }
.card-body { padding-top: 1.1rem; }
.card h3 { margin-bottom: .45rem; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card .label { display: block; margin-bottom: .7rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 1rem; }
.card:hover .card-sheet, .card:focus-within .card-sheet { border-color: var(--rule-strong); }
.card:focus-within h3 a { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }

.elev { width: 100%; height: 100%; }
.elev path, .elev line, .elev rect, .elev polyline { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .4s var(--ease); }
.elev .el-ground path { stroke-width: 1.4; }
.elev .el-accent path { stroke: var(--red); stroke-width: 1.6; transition: transform .4s var(--ease); }
.card:hover .elev path, .card:focus-within .elev path { stroke-width: 2.75; }
.card:hover .elev .el-ground path, .card:focus-within .elev .el-ground path { stroke-width: 1.4; }
.card:hover .elev .el-accent path, .card:focus-within .elev .el-accent path { stroke-width: 1.6; transform: translateY(-3px); }
.elev-anim .elev [pathLength] { stroke-dasharray: 1 2; stroke-dashoffset: 1.01; }

/* ---------- Project pages (orchard-lane.html) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.crumbs { list-style: none; margin: 0 0 clamp(1.25rem, 1rem + 1vw, 2rem); padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--rule-strong); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--red-deep); }
.project-head { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.project-head h1 { font-size: clamp(2.4rem, 1.4rem + 3vw, 4.2rem); line-height: 1.02; letter-spacing: -.02em; }
.project-drawing { border-bottom: var(--line) solid var(--rule); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); }
.project-drawing .label { display: block; margin-bottom: 1rem; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ink); margin: 0; }
.spec > div { padding: .8rem 1rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.spec > div:nth-child(2n) { border-right: 0; }
.spec > div:nth-last-child(-n+2) { border-bottom: 0; }
.spec dt { font: 400 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .3rem; }
.spec dd { margin: 0; }
/* Facts box sits centred against the taller description column; stacked, it stays on top. */
.spec-col { align-self: center; }

/* ---------- Colour fill (js/colourfill.js) ---------- */
/* Line drawing underneath, colour on top. Like the hero, the colour develops out from the centre through a
   feathered ellipse (--fill 0% → 125%) and goes from grey to full colour on the way (Eric 2026-10-25; it was a
   ground-up wipe). Final state unless animating. @property lets --fill transition; without it the colour simply appears. */
@property --fill { syntax: "<percentage>"; inherits: true; initial-value: 125%; }
.fill-art { position: relative; margin: 0 auto; width: 100%; max-width: 768px; aspect-ratio: 3 / 2; --fill: 125%; }
.fill-art picture, .fill-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The line art has opaque white patches; multiply drops them into the paper. */
.fill-art > picture:first-child img { mix-blend-mode: multiply; }
.fill-colour {
  -webkit-mask-image: radial-gradient(ellipse at center, #000 calc(var(--fill) - 25%), transparent var(--fill));
          mask-image: radial-gradient(ellipse at center, #000 calc(var(--fill) - 25%), transparent var(--fill));
}
.fill-anim .fill-art { --fill: 0%; }
.fill-anim .fill-colour img { filter: grayscale(1) contrast(.82) brightness(1.1); }
.fill-anim .fill-art.is-filled { --fill: 125%; transition: --fill 4.2s cubic-bezier(.45,.05,.35,1) .6s; }
.fill-anim .fill-art.is-filled .fill-colour img { filter: none; transition: filter 2.6s var(--ease) 2.2s; }
/* Once the colour is in, the line drawing goes away (Eric 2026-10-25: its dimension lines stuck out past
   the colour). Hidden in the final / reduced-motion state; animating, it fades out after the 4.8s fill. */
.fill-art > picture:first-child { opacity: 0; }
.fill-anim .fill-art > picture:first-child { opacity: 1; }
.fill-anim .fill-art.is-filled > picture:first-child { opacity: 0; transition: opacity 1.2s var(--ease) 4.8s; }

/* ---------- Ink-bleed interlude (js/inkbleed.js) ---------- */
.interlude { padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-bottom: var(--line) solid var(--rule); overflow: hidden; }
/* Equal thirds: the drawing takes the middle third only (~410px at full width), never stretched. */
.ib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.ib-art { margin: 0 auto; aspect-ratio: 3 / 2; width: min(100%, 420px); }
.ib-art svg, .ib-art img { width: 100%; height: 100%; overflow: visible; }
.ib-stages { list-style: none; margin: 0; padding: 0; justify-self: end; text-align: right; }
.ib-stages li { display: block; padding-block: .35rem; color: var(--rule-strong); transition: color .4s var(--ease); }
.ib-stages li.is-on { color: var(--ink); }
.ib-stages li.is-on::after { content: " ·"; color: var(--red); }
@media (max-width: 900px) {
  .ib-grid { grid-template-columns: 1fr; }
  .ib-side { display: none; }
  .ib-art { width: min(100%, 360px); }
}

/* Closing CTA on every page (was the Study interlude): the drawing colours in on the left while pinned,
   then the call to action fades in on the right. Paper ground, same as the sheet. */
.panel-study {
  background: var(--paper); color: var(--ink); overflow: visible; overflow-x: clip; /* sideways only, so the shadow above shows */
  min-height: 100svh; display: grid; align-items: center;
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); border-bottom: 0;
}
.panel-study .ib-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 5rem); }
.ib-art-col { display: grid; gap: 1rem; justify-items: start; }
.ib-sheet {
  position: relative; width: min(100%, 768px, calc((100svh - 12rem) * 1.5));
  padding: clamp(.75rem, 2vw, 1.75rem); aspect-ratio: auto; margin: 0;
  background: var(--paper);
}
.ib-sheet svg { aspect-ratio: 3 / 2; height: auto; mix-blend-mode: multiply; } /* white wash takes the paper colour */
.ib-sheet::before, .ib-sheet::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--red); pointer-events: none;
}
.ib-sheet::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.ib-sheet::after { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
/* Stage labels as a caption row under the sheet */
.panel-study .ib-stages { display: flex; gap: 1.5rem; justify-self: start; text-align: left; }
.ib-copy .label { margin: 0 0 1rem; }
.ib-copy h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.6rem); line-height: 1.06; margin: 0 0 2rem; max-width: 12em; }
.ib-copy p:last-child { margin: 0; }
@media (max-width: 900px) {
  .panel-study .ib-grid { grid-template-columns: 1fr; gap: 2rem; }
  .ib-sheet { width: 100%; }
  .panel-study .ib-stages { display: none; }
}

/* ---------- Stacking: the first section rises over the hero / banner (js/stack.js, only with JS + motion) ---------- */
.stack-anim .stack-under.stack-under {
  position: sticky; top: var(--stick, 0px);
  will-change: transform;
}
.stack-under { position: relative; }
/* Dimming veil, driven by --dim (0 → .4) as the next panel covers this one */
.stack-under::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--ink); opacity: var(--dim, 0);
}
.stack-over { z-index: 1; }
/* Shadow cast upward only, onto the section being covered, never down onto the next one */
.stack-anim .stack-over::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 48px; pointer-events: none;
  background: linear-gradient(to top, rgba(27, 27, 26, .16), rgba(27, 27, 26, 0));
}
/* First section of every page: paper sheet sliding up over the hero or project banner */
.panel-first { position: relative; background: var(--paper); border-bottom: 0; }
/* First section over the dark hero / banner: the default 48px shadow vanishes on a dark ground, so this
   edge gets a deeper, longer falloff (tight contact shadow + soft ambient) and a hairline highlight
   along the paper's top edge, so it reads as a sheet lifted above the hero. */
.stack-anim .panel-first::before {
  height: 160px;
  background:
    linear-gradient(to top, rgba(8, 16, 13, .55), rgba(8, 16, 13, 0) 18%),
    linear-gradient(to top, rgba(8, 16, 13, .35), rgba(8, 16, 13, .12) 45%, rgba(8, 16, 13, 0));
}
.stack-anim .panel-first,
.stack-anim .panel-study { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
/* Same lift for the closing CTA as it covers the Orchard photo (Eric 2026-10-26) */
.stack-anim .panel-study::before {
  height: 160px;
  background:
    linear-gradient(to top, rgba(8, 8, 7, .55), rgba(8, 8, 7, 0) 18%),
    linear-gradient(to top, rgba(8, 8, 7, .35), rgba(8, 8, 7, .12) 45%, rgba(8, 8, 7, 0));
}

/* Banding: alternate sections on a deeper paper so they read apart (Eric 2026-10-26) */
:root { --band: var(--paper-deep); }
section.band { background: var(--band); }
.band .ib-sheet { background: transparent; } /* the multiply-blended CTA drawing takes the band colour */
/* Band edges as site-plan contours (Eric 2026-10-26: flow instead of hard stops): the band's top and bottom
   become a gentle curve, and faint hairlines echo it into the paper section next door. The SVGs carry the
   band fill (#EAE5D9), so change them with --band. z-index lifts the edges over the neighbouring sections. */
/* Doubled class beats the CTA's .stack-anim .panel-study lift shadow, which is for Home's stacked panels only */
section.band.band { position: relative; z-index: 2; border-bottom: 0; box-shadow: none; }
section.band.band::before, section.band.band::after {
  content: ""; position: absolute; left: 0; right: 0; height: clamp(36px, 2rem + 2vw, 64px); pointer-events: none;
  background: center / 100% 100% no-repeat;
}
section.band.band::before { bottom: 100%; background-image: url("../images/band-top.svg"); }
section.band.band::after { top: 100%; background-image: url("../images/band-bottom.svg"); }
/* The hairline rule under the section before a band would cut across its curve */
.sheet:has(+ .band), .sheet:has(+ .pin-spacer > .band) { border-bottom: 0; }

/* ---------- Process teaser ---------- */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); }
.steps li { padding: 1rem 1rem 1.15rem; border-right: 1px solid var(--rule); }
.steps li:last-child { border-right: 0; }
.steps .label { display: block; margin-bottom: .45rem; }
.steps span:last-child { font: 400 1.15rem/1.25 var(--serif); }
@media (max-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
.process-copy p { max-width: 36em; }

/* ---------- CTA band ---------- */
.cta { background: var(--ink); color: var(--paper); padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem); }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.cta h2 { max-width: 20em; font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.6rem); }
.cta .btn { border-color: var(--paper); color: var(--paper); }
.cta .btn:hover { background: var(--paper); color: var(--ink); }
.cta .label { color: #B9B3A6; margin-bottom: 1rem; }

/* ---------- Footer as a drawing title block ---------- */
.site-footer { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 2rem; }
.title-block {
  display: grid; grid-template-columns: 2.2fr 1.2fr 1fr 1fr;
  border: 1px solid var(--ink);
}
.title-block > div { padding: .9rem 1rem; border-right: 1px solid var(--ink); min-width: 0; }
.title-block > div:last-child { border-right: 0; }
.title-block .label { display: block; margin-bottom: .35rem; font-size: .66rem; }
.title-block p { margin: 0; font-size: .95rem; line-height: 1.5; }
.title-block .tb-name { font: 400 1.35rem/1.2 var(--serif); margin-bottom: .25rem; }
.title-block a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.title-block a:hover { border-bottom-color: var(--red); color: var(--red-deep); }
.footer-note { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1rem; }
.footer-note a { color: var(--ink); }
@media (max-width: 900px) {
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > div:nth-child(2) { border-right: 0; }
  .title-block > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
}
@media (max-width: 520px) {
  .title-block { grid-template-columns: 1fr; }
  .title-block > div { border-right: 0; border-bottom: 1px solid var(--ink); }
  .title-block > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Project page content ---------- */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 1rem + 3vw, 4rem); }
.pair h2, .pair h3 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.75rem); margin-bottom: .75rem; }
.pair p { color: var(--ink-soft); margin: 0; max-width: 34em; font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem); line-height: 1.65; }
@media (max-width: 1100px) { .pair { grid-template-columns: 1fr; } }
.project-text .pair { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); padding-top: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); border-top: 1px solid var(--rule); }
/* Elevation & design notes: the front elevation colours in on the left, the four notes it illustrates
   run down the right as a ruled list (replaces the old drawing-only Sheet 02 and the faint background, 2026-10-26). */
.notes-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.notes-grid .fill-art { margin: 0; }
.services.notes-list { grid-template-columns: 1fr; border-top: 0; }
.services.notes-list li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1rem; padding: 1.1rem 0; border-right: 0; border-top: 1px solid var(--rule); }
.services.notes-list li:last-child { border-bottom: 1px solid var(--rule); }
.services.notes-list .label { grid-row: span 2; margin: .3rem 0 0; }
.services.notes-list h3 { margin-bottom: .3rem; }
@media (max-width: 900px) { .notes-grid { grid-template-columns: 1fr; } }
