:root {
  --bg: #ffffff;
  --ink: #1f1d1a;
  --muted: #7a746c;
  --line: #e7e3dd;
  --brass: #9c7c46;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(10px, 1.2vw, 16px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 26px var(--gutter);
  background: transparent;
  transition: background .35s, padding .35s, box-shadow .35s;
}
/* once the page scrolls past the top image, the header gets a white bar */
.site-header.scrolled {
  padding-top: 18px; padding-bottom: 18px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}
.wordmark {
  font: 300 clamp(20px, 2.1vw, 27px)/1.2 var(--sans);
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--muted); }

/* ---------- Hero: faded image with header and intro laid over it ---------- */
.hero {
  position: relative;
  height: min(90vh, 900px);
  min-height: 520px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  opacity: .5;
}
/* soften the top edge under the menu and melt the bottom into the page */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 55%, rgba(255,255,255,.85) 88%, #fff 100%);
}

/* ---------- Intro ---------- */
.intro {
  position: relative; z-index: 1;
  max-width: 40em;
  padding: 0 var(--gutter) clamp(40px, 7vh, 80px);
  text-align: center;
  color: #3d3934;
}
.intro p:last-child { margin-bottom: 0; }
.intro::before {  /* soft glow so the text reads over the branches */
  content: ""; position: absolute; z-index: -1;
  inset: -60px -40px 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,255,255,.8) 0, rgba(255,255,255,.55) 45%, rgba(255,255,255,0) 72%);
}
.intro-lede {
  font: 400 clamp(30px, 3.6vw, 48px)/1.2 var(--serif);
  color: var(--ink);
  margin: 0 0 .6em;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  max-width: 1360px;
  margin: clamp(32px, 5vw, 64px) auto clamp(64px, 8vw, 110px);
  padding: 0 var(--gutter);
  scroll-margin-top: 90px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0; border: 0; margin: 0;
  background: #f4f2ef;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .4s;
}
.tile:hover img { transform: scale(1.035); }
.tile:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* caption on work tiles: appears on hover */
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 18px 14px;
  font: italic 400 19px/1.2 var(--serif);
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.38));
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s, transform .35s;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }

/* label on info tiles: always visible */
.tile .label {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  width: fit-content;
  padding: 10px 18px 11px;
  background: rgba(255,255,255,.93);
  font: 400 clamp(22px, 2.2vw, 30px)/1.15 var(--serif);
  transition: background .3s;
}
.tile .label::after { content: "+"; margin-left: 14px; color: var(--brass); font: 300 .8em/1 var(--sans); }
.tile.info:hover .label { background: #fff; }
/* the silver chair photo is white, so its label gets a black border to stand out */
.tile[data-open="furniture"] .label { box-shadow: inset 0 0 0 1px var(--ink); }

/* plain white Inquiries square */
.tile.blank {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  transition: box-shadow .4s;
}
.tile.blank:hover { box-shadow: inset 0 0 0 1px var(--brass); }
.blank-title { font: 400 clamp(30px, 3vw, 42px)/1 var(--serif); }
.blank-sub {
  margin-top: 14px;
  font-size: 11.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  margin: 0 var(--gutter);
  padding-left: 0; padding-right: 0;
  font-size: 14px; color: var(--muted);
}
.foot-name { color: var(--ink); font-weight: 400; }
.foot-links { display: flex; flex-direction: column; gap: 2px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-small { width: 100%; font-size: 12px; letter-spacing: .04em; }

/* ---------- Overlays (shared) ---------- */
.lightbox, .panel {
  position: fixed; inset: 0; z-index: 50;
  background: #fff;
  opacity: 0;
  transition: opacity .3s ease;
}
.lightbox.open, .panel.open { opacity: 1; }
.x {
  position: absolute; top: 14px; right: 18px; z-index: 3;
  width: 48px; height: 48px;
  border: 0; background: none; cursor: pointer;
  font: 300 36px/1 var(--sans); color: var(--muted);
}
.x:hover { color: var(--ink); }
.x:focus { outline: none; }
.x:focus-visible, .arrow:focus-visible { outline: 1px solid var(--line); }

/* ---------- Lightbox ---------- */
.lightbox { display: flex; align-items: center; justify-content: center; }
.lightbox[hidden], .panel[hidden] { display: none; }
.lightbox figure {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  max-width: calc(100vw - 160px);
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  transition: opacity .25s;
}
.lightbox img.loading { opacity: 0; }
.lightbox figcaption { margin-top: 16px; text-align: center; line-height: 1.35; }
.lb-title { display: block; font: 400 22px/1.3 var(--serif); }
.lb-detail { display: block; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.lb-count {
  position: absolute; top: 26px; left: 28px;
  font-size: 12px; letter-spacing: .18em; color: var(--muted);
}
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 64px; height: 96px;
  border: 0; background: none; cursor: pointer;
  font: 200 54px/1 var(--sans); color: var(--muted);
}
.arrow:hover { color: var(--ink); }
.arrow.prev { left: 10px; }
.arrow.next { right: 10px; }

/* ---------- Information panel ---------- */
.panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  max-width: 1280px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(64px, 8vh, 96px) var(--gutter);
  align-items: start;
}
.panel-media { position: sticky; top: clamp(64px, 8vh, 96px); }
.panel-media img {
  width: 100%;
  max-height: calc(100vh - 2 * clamp(64px, 8vh, 96px));
  object-fit: cover;
}
.panel-text { max-width: 34em; padding-top: 8px; }
.panel-text.solo { grid-column: 1 / -1; justify-self: center; max-width: 38em; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--brass);
}
.panel-text h2 {
  margin: 0 0 28px;
  font: 400 clamp(36px, 4vw, 54px)/1.05 var(--serif);
}
.panel-text h3 {
  margin: 44px 0 14px;
  font: italic 400 26px/1.2 var(--serif);
}
.panel-text p { margin: 0 0 1.1em; }
.panel-text a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.panel-text a:hover { text-decoration-color: var(--ink); }
.panel-link { margin-top: 32px !important; }
.panel-link a {
  font-size: 12px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
}
.steps { list-style: none; counter-reset: s; margin: 0 0 36px; padding: 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 16px 0 16px 46px;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 17px;
  font: italic 400 20px/1.3 var(--serif); color: var(--brass);
}
.steps strong { display: block; font-weight: 400; color: var(--ink); }
.button {
  display: inline-block;
  padding: 14px 26px 13px;
  border: 1px solid var(--ink);
  font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none !important;
  transition: background .25s, color .25s;
}
.button:hover { background: var(--ink); color: #fff; }

/* ---------- Mobile: a simple scroll instead of a grid ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header { padding: 16px; }
  .hero { height: 88svh; min-height: 480px; }
  .hero img { object-position: 60% 40%; }

  .grid { grid-template-columns: 1fr; gap: 40px; padding: 0 16px; }
  .m-hide { display: none; }
  .tile { aspect-ratio: 4 / 5; overflow: visible; background: none; }
  .tile.work { aspect-ratio: auto; }
  .tile.work img { height: auto; aspect-ratio: 4 / 5; }
  .tile:hover img { transform: none; }
  .tile .cap {
    position: static; opacity: 1; transform: none;
    padding: 10px 0 0; background: none; color: var(--ink); font-size: 18px;
  }
  .tile.blank { aspect-ratio: auto; padding: 56px 16px; }

  .site-footer { flex-direction: column; margin: 0 16px; }

  .arrow { display: none; }
  .lightbox figure { max-width: 100vw; padding: 0 12px; }
  .lightbox img { max-height: calc(100dvh - 140px); }

  .panel-inner { grid-template-columns: 1fr; padding: 72px 16px 56px; gap: 28px; }
  .panel-media { position: static; }
  .panel-media img { max-height: 52vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
