:root {
  --bg: #0f0f0e;
  --surface: #181816;
  --line: #2a2a27;
  --text: #ecebe6;
  --muted: #9a988f;
  --accent: #c8876a; /* copper, matches the logo */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; display: flex; align-items: center; gap: 16px; }
.brand-logo { height: 66px; width: auto; margin: -12px 0; }
.brand-text { display: flex; flex-direction: column; gap: 2px; padding-left: 16px; border-left: 1px solid var(--line); }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: .01em; white-space: nowrap; }
.brand-tag { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .3em; }
.main-nav { align-items: center; }
.main-nav a { color: #c9c7bf; }
.main-nav .nav-icon { display: inline-flex; padding: 6px; border: 0; }
.main-nav .nav-icon:hover { color: var(--accent); }
nav { display: flex; gap: 28px; }
nav a {
  text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text); border-color: var(--accent); }

main { padding: 0 clamp(16px, 4vw, 48px) 80px; max-width: 1600px; margin: 0 auto; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: min(82vh, 820px); background: var(--surface);
}
.hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 6s ease-out;
}
.hero.loaded .hero-bg img { opacity: 1; transform: none; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(15,15,14,.7) 32%, rgba(15,15,14,.15) 70%, rgba(15,15,14,.35) 100%),
    linear-gradient(to right, rgba(15,15,14,.55), transparent 60%);
}
.hero-inner {
  position: relative; z-index: 1; max-width: 900px;
  padding: 0 clamp(16px, 4vw, 48px) clamp(40px, 7vw, 88px);
}
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .28em;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--accent); }
.eyebrow:empty { display: none; }
.hero h1 {
  font-family: var(--serif); font-weight: 500; line-height: 1; margin: 0 0 20px;
  font-size: clamp(46px, 8.5vw, 112px); letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero-intro { color: #d4d2ca; font-size: clamp(16px, 1.6vw, 19px); margin: 0 0 32px; max-width: 520px; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-size: 12px; text-transform: uppercase; letter-spacing: .22em;
  padding: 14px 24px; border: 1px solid rgba(236,235,230,.35); border-radius: 999px;
  background: rgba(15,15,14,.25); backdrop-filter: blur(6px);
  transition: border-color .2s, color .2s, background .2s;
}
.scroll-cue:hover { border-color: var(--accent); color: var(--accent); }
.scroll-cue span { transition: transform .2s; }
.scroll-cue:hover span { transform: translateY(3px); }
.hero--plain { min-height: 0; padding-top: clamp(48px, 9vw, 120px); }
.hero--plain::after, .hero--plain .scroll-cue { display: none; }
html { scroll-behavior: smooth; }
#work { scroll-margin-top: 70px; }

/* ---------- gallery ---------- */
.work-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: clamp(48px, 7vw, 88px) 0 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.work-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; margin: 0; }
.work-head .eyebrow { margin-bottom: 12px; }
.work-head h2 em { font-style: italic; color: var(--accent); }
.count { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .2em; }

.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.tile {
  margin: 0; position: relative; overflow: hidden; flex: none;
  background: var(--surface); cursor: zoom-in; border-radius: 4px;
  opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease;
}
.tile.shown { opacity: 1; transform: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .4s; }
.tile:hover img { transform: scale(1.04); filter: brightness(1.06); }
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: box-shadow .3s;
}
.tile:hover::after { box-shadow: inset 0 0 0 1px rgba(200,135,106,.6); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  font-size: 14px; opacity: 0; transition: opacity .3s;
}
.tile:hover figcaption { opacity: 1; }
.empty { color: var(--muted); border: 1px dashed var(--line); padding: 60px 24px; text-align: center; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(8,8,7,.985); backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; animation: lb-in .3s ease; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox img {
  max-width: 88vw; max-height: 80vh; object-fit: contain; border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  opacity: 0; transform: scale(.97); transition: opacity .35s ease, transform .35s ease;
}
.lightbox img.in { opacity: 1; transform: none; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(236,235,230,.16); background: rgba(236,235,230,.06);
  color: var(--text); font-size: 28px; line-height: 1; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.lb-btn:hover { background: rgba(200,135,106,.18); border-color: var(--accent); color: var(--accent); }
.lb-close { top: 18px; right: 18px; font-size: 26px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 18px 24px; color: var(--muted); font-size: 13px; letter-spacing: .12em;
}
.lb-bar a { color: var(--accent); text-decoration: none; letter-spacing: .06em; }
.lb-bar a:hover { text-decoration: underline; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); padding-top: clamp(48px, 9vw, 110px); }
.contact h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin: 0 0 20px; }
.contact .lead { color: var(--muted); font-size: 18px; margin: 0 0 40px; }
.details { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.details li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.details span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; }
.details a { text-decoration: none; }
.details a:hover { color: var(--accent); }

form { display: grid; gap: 22px; align-content: start; }
label { display: grid; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }
input, textarea, select {
  font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  padding: 14px 16px; border-radius: 2px; outline: none; transition: border-color .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { min-height: 160px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hp { position: absolute; left: -9999px; }
button.primary {
  justify-self: start; font: inherit; font-size: 13px; text-transform: uppercase; letter-spacing: .2em;
  background: var(--accent); color: #17130a; border: 0; padding: 16px 34px; cursor: pointer; border-radius: 2px;
  transition: filter .2s;
}
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: .5; cursor: wait; }
.status { font-size: 15px; min-height: 1.6em; margin: 0; }
.status.ok { color: #9fd49a; }
.status.err { color: #e59a8c; }

footer { color: var(--muted); font-size: 13px; padding: 40px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.foot { max-width: 1600px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot-logo { height: 96px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { text-decoration: none; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; transition: color .2s; }
.foot-links a:hover { color: var(--accent); }

@media (max-width: 920px) {
  .brand-text { display: none; }
}
@media (max-width: 760px) {
  nav { gap: 18px; }
  .contact, .row { grid-template-columns: 1fr; }
  .gallery { gap: 8px; }
  .tile { border-radius: 3px; }
  .tile:active img { transform: scale(.97); transition-duration: .15s; }
  /* Phone photo viewer: photo edge to edge, controls along the bottom within thumb reach */
  .lightbox img { max-width: 100vw; max-height: 74vh; border-radius: 0; box-shadow: none; }
  .lb-close { top: 14px; right: 14px; width: 42px; height: 42px; }
  .lb-prev, .lb-next { top: auto; bottom: 22px; transform: none; width: 52px; height: 52px; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-bar { left: 80px; right: 80px; bottom: 22px; height: 52px; padding: 0; flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
  .lb-bar a { font-size: 12px; }
  .tile figcaption { opacity: 1; }
  /* Phone cover: photo on top, text below it so the photo isn't hidden behind the title */
  .hero { --img-h: 58vh; --img-h: 58svh; display: block; min-height: 0; background: var(--bg); }
  .hero-bg { position: absolute; inset: 0 0 auto 0; height: var(--img-h); overflow: hidden; background: var(--surface); }
  .hero-bg img { object-position: 85% center; }
  .hero::after {
    inset: 0 0 auto 0; height: var(--img-h);
    background:
      linear-gradient(to top, var(--bg) 0%, rgba(15,15,14,.6) 22%, transparent 48%),
      linear-gradient(to bottom, rgba(15,15,14,.45), transparent 22%);
  }
  .hero-inner { padding-top: calc(var(--img-h) - 72px); padding-bottom: 44px; }
  .hero h1 { font-size: clamp(42px, 12vw, 56px); margin-bottom: 14px; }
  .hero-intro { margin-bottom: 26px; }
  .hero--plain .hero-inner { padding-top: 0; }

  .work-head { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 48px; margin-bottom: 20px; }
  .work-head h2 { font-size: 36px; }
  .eyebrow { letter-spacing: .22em; }
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .brand-logo { height: 52px; margin: -8px 0; }
  .main-nav .nav-icon { padding: 2px; }
  nav a { letter-spacing: .12em; font-size: 12px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
