:root {
  --ink: #121212;
  --soft: #7a7a76;
  --line: #e4e4e0;
  --bg: #fafaf8;
  --gut: clamp(18px, 3.4vw, 56px);
  --font: "Jost", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--font); letter-spacing: .01em; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.wrap { padding: 0 var(--gut); }
.caps { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 400; }

/* Header: sits over the hero, turns solid on scroll */
.top { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 28px var(--gut); color: #fff; transition: background .4s, color .4s, padding .4s; }
.top.solid, .top.light { background: rgba(250,250,248,.96); color: var(--ink); padding-top: 18px; padding-bottom: 18px; }
.brand img { width: 132px; transition: filter .4s; filter: invert(1); }
.top.solid .brand img, .top.light .brand img { filter: none; }
.nav { display: flex; gap: clamp(1.2rem, 2.6vw, 2.6rem); }
.nav a { opacity: .9; } .nav a:hover, .nav a[aria-current] { opacity: 1; border-bottom: 1px solid currentColor; }
.menu { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px 0; }
@media (max-width: 820px) {
  .menu { display: block; }
  .nav { display: none; position: fixed; inset: 0; background: var(--bg); color: var(--ink); flex-direction: column; justify-content: center; align-items: center; gap: 1.6rem; z-index: -1; }
  .nav a { font-size: 15px; }
  .top.open .nav { display: flex; }
  .top.open { color: var(--ink); } .top.open .brand img { filter: none; }
}

/* Full-bleed hero */
.hero { position: relative; height: 100vh; min-height: 560px; overflow: hidden; background: #111; }
.hero img { width: 100%; height: 100%; object-fit: cover; animation: settle 2.4s ease-out both; }
@keyframes settle { from { transform: scale(1.04); opacity: .6; } to { transform: none; opacity: 1; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 62%, rgba(0,0,0,.45) 100%); }
.hero .on { position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(28px, 5vw, 56px); z-index: 2; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.hero h1 { font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.04; letter-spacing: -.01em; margin: 0; max-width: 14em; }
.hero .on span { opacity: .85; }

/* Statement */
.statement { max-width: 52rem; margin: clamp(5rem, 11vw, 10rem) auto; padding: 0 var(--gut); text-align: center; }
.statement p { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.45; margin: 0; }
.statement .caps { display: block; color: var(--soft); margin-top: 2rem; }

/* Project index */
.index { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(3.5rem, 7vw, 7rem) clamp(14px, 2vw, 28px); padding: 0 var(--gut); }
.proj { display: block; }
.proj .pic { overflow: hidden; background: #e9e9e5; }
.proj img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.6,.2,1); }
.proj:hover img { transform: scale(1.035); }
.proj .meta { display: flex; justify-content: space-between; gap: 1rem; padding-top: 16px; }
.proj b { font-weight: 400; font-size: 19px; letter-spacing: .01em; }
.proj .meta span { color: var(--soft); }
.p-full { grid-column: 1 / -1; } .p-full .pic { aspect-ratio: 21 / 9; }
.p-7 { grid-column: span 7; } .p-7 .pic { aspect-ratio: 4 / 3; }
.p-5 { grid-column: span 5; } .p-5 .pic { aspect-ratio: 4 / 5; }
@media (max-width: 820px) { .p-7, .p-5 { grid-column: 1 / -1; } .p-full .pic, .p-7 .pic, .p-5 .pic { aspect-ratio: 4 / 3; } }

/* Section heads: a rule and a word, no badges */
.sec { padding: clamp(6rem, 11vw, 10rem) var(--gut) 0; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 16px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sec-h h2 { font-weight: 300; font-size: clamp(24px, 2.4vw, 34px); margin: 0; letter-spacing: -.005em; }
.sec-h p { margin: 0; color: var(--soft); max-width: 30em; text-align: right; }
@media (max-width: 820px) { .sec-h { flex-direction: column; gap: .6rem; } .sec-h p { text-align: left; } }

/* Justified galleries */
.grid { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 28px); }
.grid .row { display: flex; gap: clamp(14px, 2vw, 28px); }
.grid figure { margin: 0; min-width: 0; }
.grid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.grid img { width: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.6,.2,1); }
.grid button:hover img { transform: scale(1.03); }
.grid figcaption { font-size: 13px; color: var(--soft); padding-top: 10px; }
@media (max-width: 820px) { .grid .row { flex-direction: column; } .grid figure { flex: none !important; width: 100%; } .grid img { aspect-ratio: 4 / 3 !important; } }

/* Studio and contact */
.two { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); }
.two p { margin: 0 0 1.1em; max-width: 34em; }
.big { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; }
.soft { color: var(--soft); }
.soft a, .link { border-bottom: 1px solid currentColor; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.form label { display: block; color: var(--soft); margin-bottom: 4px; }
.form input, .form textarea, .form select { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #bdbdb8; padding: 8px 0; border-radius: 0; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-bottom-color: var(--ink); }
.form textarea { min-height: 110px; resize: vertical; }
.form .full { grid-column: 1 / -1; }
.send { font: inherit; text-transform: uppercase; letter-spacing: .22em; font-size: 12px; background: var(--ink); color: #fff; border: 0; padding: 16px 30px; cursor: pointer; }
.send:hover { background: #333; }
@media (max-width: 820px) { .form { grid-template-columns: 1fr; } }

/* Footer */
.foot { margin-top: clamp(6rem, 10vw, 9rem); border-top: 1px solid var(--line); padding: 26px var(--gut) 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--soft); font-size: 14px; }
.foot a { color: var(--ink); }

/* Project pages */
.p-intro { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); padding: clamp(4rem, 8vw, 7rem) var(--gut) 0; }
.p-intro h1 { font-weight: 300; font-size: clamp(34px, 4vw, 58px); line-height: 1.04; margin: 0; letter-spacing: -.01em; }
.p-intro .where { color: var(--soft); margin-top: 12px; }
.p-intro p { margin: 0 0 1em; max-width: 34em; }
@media (max-width: 820px) { .p-intro { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; border-top: 1px solid var(--ink); margin: clamp(6rem, 10vw, 9rem) var(--gut) 0; padding-top: 16px; }
.pager a:hover { border-bottom: 1px solid currentColor; }

/* Before/after slider */
.cmp { position: relative; overflow: hidden; user-select: none; touch-action: pan-y; background: #ddd; }
.cmp img { width: 100%; display: block; }
.cmp .b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--p, 50%)); }
.cmp .b img { height: 100%; object-fit: cover; }
.cmp .bar { position: absolute; top: 0; bottom: 0; left: var(--p, 50%); width: 1px; background: #fff; pointer-events: none; }
.cmp .bar::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1px solid #fff; border-radius: 50%; background: rgba(0,0,0,.18); backdrop-filter: blur(2px); }
.cmp .lab { position: absolute; top: 16px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); pointer-events: none; }
.cmp .l { left: 18px; } .cmp .r { right: 18px; }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cap { display: flex; justify-content: space-between; gap: 1rem; color: var(--soft); font-size: 13px; padding-top: 10px; }

/* Option tabs */
.opts { position: relative; overflow: hidden; background: #ddd; }
.opts img { width: 100%; display: block; }
.opts img + img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.opts img { opacity: 0; transition: opacity .6s ease; } .opts img.on { opacity: 1; }
.opts img:first-child { position: relative; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; padding-top: 14px; align-items: baseline; }
.tabs .t { color: var(--soft); margin-right: 8px; }
.tabs button { font: inherit; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--soft); border-bottom: 1px solid transparent; }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.block { margin-bottom: clamp(3rem, 6vw, 5.5rem); }

/* Lightbox */
.lb { position: fixed; inset: 0; background: rgba(250,250,248,.98); z-index: 50; display: none; align-items: center; justify-content: center; padding: 64px var(--gut); }
.lb.on { display: flex; }
.lb img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb .x, .lb .pv, .lb .nx { position: absolute; background: none; border: 0; font: inherit; cursor: pointer; color: var(--ink); padding: 10px; }
.lb .x { top: 14px; right: var(--gut); } .lb .pv { left: var(--gut); bottom: 14px; } .lb .nx { right: var(--gut); bottom: 14px; }
.lb .lc { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--soft); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .hero img { animation: none; } }
.sec .sec { padding-left: 0; padding-right: 0; }

/* v3: slideshow banner */
.hero.show img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: none; transform: scale(1.05); transition: opacity 2.4s ease, transform 9s ease-out; }
.hero.show img.cur { opacity: 1; transform: none; }
.hero::after { background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 50%, rgba(0,0,0,.6) 100%); z-index: 1; }
@media (max-aspect-ratio: 1/1) { .hero.show img { object-position: var(--x, 50%) 50%; } }

/* v3: square project cards, two per row */
.index.sq .proj { grid-column: span 6; }
.index.sq .pic { aspect-ratio: 1 / 1; }
@media (max-width: 820px) { .index.sq .proj { grid-column: 1 / -1; } .index.sq .pic { aspect-ratio: 1 / 1; } }

/* v3: sliders two per row */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 4vw, 4rem) clamp(14px, 2vw, 28px); }
.pairs .block { margin: 0; }
.pairs .cmp > img, .pairs .opts img:first-child { aspect-ratio: 5 / 4; object-fit: cover; }
@media (max-width: 820px) { .pairs { grid-template-columns: 1fr; } }

/* v3: approach */
.terms { margin: 2.4rem 0 0; border-top: 1px solid var(--line); }
.terms div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding: 14px 0; border-bottom: 1px solid var(--line); }
.terms dt { font-weight: 400; } .terms dd { margin: 0; color: var(--soft); }
@media (max-width: 820px) { .terms div { grid-template-columns: 1fr; gap: .2rem; } }
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); margin-top: clamp(4rem, 8vw, 7rem); }
.details figure { margin: 0; }
.details button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.details img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 1.6s cubic-bezier(.2,.6,.2,1); }
.details button:hover img { transform: scale(1.03); }
.details figcaption { font-size: 13px; color: var(--soft); padding-top: 10px; }
@media (max-width: 820px) { .details { grid-template-columns: 1fr; } }

/* v3: slower, calmer pace */
.reveal { transform: translateY(24px); transition: opacity 1.4s ease, transform 1.4s ease; }
.proj img, .grid img { transition-duration: 1.6s; }
@media (prefers-reduced-motion: reduce) { .hero.show img { transition: opacity .01s; transform: none; } }
.hero .sub { margin: 18px 0 0; opacity: .9; }

/* v3: options fit on one screen, thumbnails */
.block.fit { margin-left: auto; margin-right: auto; }
.thumbs .t { display: flex; justify-content: space-between; gap: 1rem; margin: 14px 0 10px; font-size: 14px; }
.thumbs .t .soft { font-size: 13px; }
.tb { display: flex; flex-wrap: wrap; gap: 10px; }
.tb button { width: 104px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; color: var(--soft); text-align: left; }
.tb button img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; opacity: .55; outline: 1px solid transparent; outline-offset: 2px; transition: opacity .4s; }
.tb button:hover img { opacity: .85; }
.tb button span { display: block; padding-top: 6px; }
.tb button[aria-pressed="true"] img { opacity: 1; outline-color: var(--ink); }
.tb button[aria-pressed="true"] span { color: var(--ink); }
@media (max-width: 820px) { .tb button { width: calc(33.333% - 7px); } .thumbs .t { flex-direction: column; gap: 2px; } }
.pairs .tb button { width: 80px; }

/* v3: arrange a call */
.nav a.call { border: 1px solid currentColor; padding: 7px 14px; margin-top: -8px; margin-bottom: -8px; opacity: 1; }
.nav a.call:hover { border-bottom: 1px solid currentColor; background: rgba(255,255,255,.12); }
.top.solid .nav a.call:hover, .top.light .nav a.call:hover { background: var(--ink); color: #fff; }
.callbox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 2rem; }
.callbox .send { display: inline-block; }
.callbox .soft { font-size: 14px; max-width: 18em; }
@media (max-width: 820px) { .nav a.call { margin: 0; } }

/* v3: philosophy */
.statement .def { font-size: clamp(15px, 1.2vw, 17px); color: var(--soft); margin-bottom: 1.6rem; letter-spacing: .02em; }
.statement .def b { font-weight: 400; color: var(--ink); }
.prin { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); border-top: 1px solid var(--line); padding: clamp(2.2rem, 4vw, 3.4rem) 0; }
.prin h2 { font-weight: 300; font-size: clamp(24px, 2.4vw, 34px); margin: 0; }
.prin p { margin: 0; max-width: 34em; }
.interline { text-align: center; font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.1; letter-spacing: -.01em; margin: clamp(5rem, 10vw, 9rem) 0; }
.sec .pager { margin-left: 0; margin-right: 0; }
@media (max-width: 820px) { .prin { grid-template-columns: 1fr; gap: 1rem; } }

/* v3: house blue, used as a trace only */
:root { --house: #4251A5; }
.tb button[aria-pressed="true"] img { outline-color: var(--house); }
.tb button[aria-pressed="true"] span { color: var(--house); }
.soft a:hover, .link:hover, .pager a:hover, .foot a:hover { color: var(--house); border-bottom-color: var(--house); }
.foot a[href*="constructmedia"] { color: var(--house); }
:focus-visible { outline: 1px solid var(--house); outline-offset: 3px; }
/* statement definition: same size as the paragraph, set apart by colour */
.statement .def { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.45; letter-spacing: 0; margin-bottom: 1.2rem; }

/* v3: how we helped, phyllis 2x2 */
.p-intro .role { display: block; font-weight: 400; margin-bottom: 4px; }
.pairs.sq .opts img:first-child { aspect-ratio: 1 / 1; object-fit: cover; }
.pairs .thumbs .t { flex-direction: column; gap: 2px; }

/* virtual tour embed */
.vr { position: relative; aspect-ratio: 16 / 9; background: #e9e9e5; }
.vr iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 820px) { .vr { aspect-ratio: 4 / 5; } }
/* odd number of projects: last card runs full width */
.index.sq .proj:last-child:nth-child(odd) { grid-column: 1 / -1; }
.index.sq .proj:last-child:nth-child(odd) .pic { aspect-ratio: 2 / 1; }
@media (max-width: 820px) { .index.sq .proj:last-child:nth-child(odd) .pic { aspect-ratio: 1 / 1; } }
