:root {
  --paper: #f6f4ef;
  --white: #ffffff;
  --ink: #161616;
  --muted: #6b6963;
  --line: #d9d6cd;
  --accent: #b4532a;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --head: "Jost", "Helvetica Neue", Arial, sans-serif;
  --body: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--head); font-weight: 300; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
.eyebrow {
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 1.1rem;
}
.lead { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.6; }
p { margin: 0 0 1.1em; }

/* ------------------------------- header ------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, color .3s;
  color: var(--white);
}
.site-header .bar {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { text-decoration: none; line-height: 1.1; }
.logo b { display: block; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; font-size: clamp(1.15rem, 1.5vw, 1.5rem); white-space: nowrap; }
.logo span { display: block; font-size: clamp(0.7rem, 0.8vw, 0.8rem); letter-spacing: 0.22em; text-transform: uppercase; opacity: .75; margin-top: 5px; white-space: nowrap; }
/* phones: slightly tighter spacing so the name stays on one line down to 360px wide */
@media (max-width: 600px) {
  .logo b { font-size: 1.1rem; letter-spacing: 0.2em; }
  .logo span { font-size: 0.68rem; letter-spacing: 0.18em; }
}
.logo:hover { color: inherit; }
.nav { display: flex; gap: clamp(14px, 2.2vw, 34px); }
.nav a {
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; font-weight: 400;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: inherit; border-bottom-color: currentColor; }
.menu-btn { display: none; background: none; border: 0; color: inherit; font: inherit; letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; cursor: pointer; padding: 8px 0; }

.site-header.solid, body.light-header .site-header {
  background: rgba(246,244,239,.94); backdrop-filter: blur(8px); color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.solid .bar { padding-top: 14px; padding-bottom: 14px; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; background: var(--ink); color: var(--white);
    flex-direction: column; justify-content: center; align-items: center; gap: 22px;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .nav a { font-size: 1rem; }
  body.menu-open .nav { opacity: 1; pointer-events: auto; }
  body.menu-open .menu-btn { position: relative; z-index: 60; color: var(--white); }
}

/* -------------------------------- hero -------------------------------- */
.hero { position: relative; height: 100vh; min-height: 560px; color: var(--white); overflow: hidden; background: #222; }
.hero .slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease; transform: scale(1.04);
}
.hero .slide.on { opacity: 1; animation: drift 14s ease-out forwards; }
/* per-photo crop focus from SITE.heroImages (position / phonePosition) */
.hero .slide { background-position: var(--pos, center); }
@media (max-width: 600px) { .hero .slide { background-position: var(--pos-phone, var(--pos, center)); } }
@keyframes drift { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.6) 100%); }
.hero .caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(36px, 8vh, 90px); }
.hero h1 { max-width: 14ch; font-size: clamp(2rem, 4.2vw, 3.6rem); }
.hero .eyebrow { color: rgba(255,255,255,.8); }
.hero .cta-row { margin-top: 2rem; display: flex; gap: 14px; flex-wrap: wrap; }
/* the two hero buttons share one height; single-line text sits centered next to the two-line one */
.hero .cta-row .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.5; }

.btn {
  display: inline-block; text-decoration: none; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem; font-weight: 500;
  padding: 15px 28px; border: 1px solid currentColor; transition: background .2s, color .2s;
}
.btn:hover { background: var(--white); color: var(--ink); }
.btn.dark { color: var(--ink); }
.btn.dark:hover { background: var(--ink); color: var(--white); }
.btn.fill { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn.fill:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* ------------------------------ sections ------------------------------ */
section { padding: clamp(64px, 10vw, 140px) 0; }
.page-top { padding-top: clamp(130px, 18vw, 200px); padding-bottom: clamp(30px, 5vw, 60px); }
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(28px, 4vw, 54px); flex-wrap: wrap; }
.link-arrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; }

/* ------------------------------ project grid ------------------------------ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 32px); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card { text-decoration: none; display: block; }
.card:hover { color: inherit; }
.card .ph { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.card:hover .ph img { transform: scale(1.05); }
.card .meta { padding: 16px 2px 0; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.card h3 { font-size: 1.25rem; font-weight: 400; }
.card .sub { display: block; font-size: .9rem; color: var(--muted); line-height: 1.45; margin-top: 4px; }
/* award label (optional "award" field on a project): on its card and on its project page */
.award { display: block; width: fit-content; margin: 10px 0 0; padding-left: 10px; border-left: 2px solid var(--accent); color: var(--accent); font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.award.big { margin: 1.1rem 0 0; font-size: .78rem; padding-left: 12px; }
.card .tag { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.grid.big .card:nth-child(5n+1) { grid-column: span 2; }
.grid.big .card:nth-child(5n+1) .ph { aspect-ratio: 16 / 9; }
@media (max-width: 1000px) { .grid.big .card:nth-child(5n+1) { grid-column: auto; } .grid.big .card:nth-child(5n+1) .ph { aspect-ratio: 4/3; } }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2rem; }
.filters button {
  font: inherit; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 500;
  background: none; border: 1px solid var(--line); color: var(--ink); padding: 11px 22px; cursor: pointer; transition: all .2s;
}
.filters button:hover { border-color: var(--ink); }
.filters button.on { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ------------------------------ project page ------------------------------ */
.proj-hero { height: 78vh; min-height: 440px; position: relative; background: #222; }
.proj-hero img { width: 100%; height: 100%; object-fit: cover; }
.proj-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,0) 30%); }
.proj-info { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(30px, 6vw, 100px); padding: clamp(40px, 7vw, 90px) 0; }
@media (max-width: 860px) { .proj-info { grid-template-columns: 1fr; } }
.facts { list-style: none; margin: 1.6rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts li span:first-child { text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 500; color: var(--muted); padding-top: 3px; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.6vw, 22px); padding-bottom: clamp(50px, 8vw, 100px); }
.gallery figure { margin: 0; grid-column: span 6; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: #ddd; cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery figure.wide, .gallery figure:last-child:nth-child(even) { grid-column: span 12; }
.gallery figure.wide button, .gallery figure:last-child:nth-child(even) button { aspect-ratio: 16 / 9; }
.gallery figcaption { margin-top: 8px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 600px) { .gallery figure { grid-column: span 12; } }
.proj-nav { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 32px 0; }
.proj-nav a { text-decoration: none; }
.proj-nav small { display: block; text-transform: uppercase; letter-spacing: .18em; font-size: .66rem; color: var(--muted); }
.proj-nav .next { text-align: right; margin-left: auto; }
.proj-nav strong { font-weight: 300; font-size: 1.5rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,10,10,.96); z-index: 100; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; padding: 16px; line-height: 1; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lightbox .x { top: 8px; right: 12px; } .lightbox .p { left: 8px; top: 50%; } .lightbox .n { right: 8px; top: 50%; }
.lightbox .count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #aaa; font-size: .8rem; letter-spacing: .2em; }

/* ------------------------------ misc blocks ------------------------------ */
.news { border-top: 1px solid var(--line); padding: 26px 0; }
.news h3 { margin-bottom: .6rem; font-weight: 400; }
.notice { font-size: .88rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 16px; margin-top: 30px; }

.progress-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 50px; }
@media (max-width: 700px) { .progress-list { columns: 1; } }
.progress-list li { break-inside: avoid; padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.progress-list li::before { content: ""; width: 7px; height: 7px; background: var(--accent); margin-top: .72em; flex: none; }

.dark-band { background: var(--ink); color: var(--white); }
.dark-band .eyebrow { color: #a8a59d; }
.cert-row { display: flex; gap: 14px 40px; flex-wrap: wrap; margin-top: 2rem; }
.cert-row span { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 500; color: #d9d6cd; padding-left: 14px; border-left: 1px solid var(--accent); }

.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.cred-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(30px, 5vw, 80px); }
.cred-cols h3 { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--muted); margin-bottom: 1.2rem; }
.cred-cols ul { list-style: none; margin: 0; padding: 0; }
.cred-cols li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }

.quote { max-width: 860px; margin: 0 auto; padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.quote:first-of-type { border-top: 0; }
.quote p { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.65; font-weight: 300; }
.quote p::first-letter { }
.quote .mark { display: block; font-size: 3.6rem; line-height: .5; color: var(--accent); margin-bottom: 14px; font-family: Georgia, serif; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 100px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid dt { text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; font-weight: 500; color: var(--muted); margin-top: 1.8rem; }
.contact-grid dd { margin: 4px 0 0; font-size: 1.1rem; }
form .field { margin-bottom: 22px; }
form label { display: block; text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
form input[type=text], form input[type=email], form textarea {
  width: 100%; font: inherit; padding: 14px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 0;
}
form input:focus, form textarea:focus { outline: none; border-bottom-color: var(--accent); }
form textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.check input { accent-color: var(--accent); }
.note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
/* contact form: spam trap kept off-screen; status line under the button */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; font-size: .95rem; min-height: 1.5em; }
.form-status.ok { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 14px; }
.form-status.err { color: #a33a1f; }

/* ------------------------------ footer ------------------------------ */
.site-footer { background: var(--ink); color: #cfccc4; padding: 70px 0 34px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer b { display: block; color: #fff; letter-spacing: .24em; text-transform: uppercase; font-weight: 400; margin-bottom: 12px; }
.site-footer h4 { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; font-weight: 500; color: #8f8c84; }
.site-footer a { text-decoration: none; display: block; padding: 2px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid #333; margin-top: 46px; padding-top: 22px; font-size: .78rem; color: #8f8c84; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero .slide.on { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}
