:root {
  color-scheme: light;
  --paper: #faf8f1;
  --paper-deep: #f0ece1;
  --sage: #edf0e7;
  --ink: #263b2f;
  --forest: #21382d;
  --forest-deep: #192d24;
  --muted: #4f5b50;
  --gold: #e7ce9c;
  --ochre: #8b6434;
  --line: #cfcfc1;
  --serif: Georgia, "Palatino Linotype", "Liberation Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5.1vw, 5.5rem);
  --content-width: 79rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.65 var(--sans);
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; text-underline-offset: 0.25em; }
button { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.6rem 1rem;
  transform: translateY(-200%);
  background: var(--paper);
}

.skip-link:focus { transform: none; }

.section-wrap, .header-inner {
  width: min(calc(100% - var(--gutter) * 2), var(--content-width));
  margin-inline: auto;
}

.site-header { background: var(--paper); }

.header-inner {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand img { width: 3.2rem; height: auto; mix-blend-mode: multiply; }

.brand-name {
  display: grid;
  gap: 0.14rem;
  font: 1.52rem/1 var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.brand-name span {
  font: 650 0.69rem/1.35 var(--sans);
  letter-spacing: 0.29em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3.2vw, 3rem);
  font-size: 0.90625rem;
  font-weight: 600;
}

.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.site-nav .nav-contact {
  padding: 0.4rem 1.08rem;
  border: 1px solid #a5afa1;
  transition: background-color 160ms, color 160ms;
}

.site-nav .nav-contact:hover {
  color: var(--paper);
  background: var(--forest);
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 46% 54%;
  min-height: clamp(34rem, 43vw, 45rem);
  background: var(--forest);
  color: var(--paper);
}

.hero-content {
  align-self: center;
  padding: 4.5rem clamp(1.25rem, 3vw, 3.25rem) 4.5rem max(var(--gutter), calc((100vw - var(--content-width)) / 2));
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #644d30;
  font: 650 0.8125rem/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rule {
  flex: 0 0 1.5rem;
  height: 1px;
  background: var(--ochre);
}

.hero .eyebrow, .contact .eyebrow { color: var(--gold); }
.hero .rule, .contact .rule { background: var(--gold); }

.hero h1 {
  margin-block: 1.45rem 1.55rem;
  font-size: clamp(3.15rem, 5.63vw, 6.1rem);
  line-height: 0.97;
  letter-spacing: -0.048em;
}

.hero h1 em {
  color: var(--gold);
  font-size: 0.83em;
  letter-spacing: -0.056em;
  white-space: nowrap;
}

.hero-description {
  max-width: 25rem;
  color: #e6e9dc;
  font-size: clamp(1rem, 1.3vw, 1.1875rem);
  line-height: 1.65;
}

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 2.95rem;
  align-items: center;
  justify-content: center;
  padding: 0.68rem 1.24rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 160ms;
}

.button-light { color: var(--forest-deep); background: #efe3c9; }
.button-light:hover { background: #f9efd9; }
.button-light:focus-visible { outline-color: var(--paper); }
.hero .button { margin-top: 1.65rem; }

.hero-visual {
  position: relative;
  min-width: 0;
  min-height: 16rem;
  isolation: isolate;
}

.hero-visual img,
.gallery-media > img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual img { object-position: 50% 62%; }

.hero-visual::after {
  position: absolute;
  z-index: 0;
  inset: 42% 0 0;
  background: linear-gradient(transparent, rgb(14 29 21 / 78%));
  content: "";
  pointer-events: none;
}

.hero-visual figcaption {
  position: absolute;
  z-index: 1;
  bottom: 1.65rem;
  left: clamp(1.4rem, 3vw, 2.7rem);
  display: grid;
  gap: 0.24rem;
  font: 1.38rem/1.2 var(--serif);
}

.hero-visual figcaption span {
  color: #f1e3c9;
  font: 600 0.75rem/1.25 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work { padding-block: clamp(3.8rem, 6.3vw, 6.25rem); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.85rem 2.5rem;
  align-items: end;
  margin-bottom: 2.1rem;
}

.section-head h2, .services h2, .contact h2 {
  margin-top: 0.72rem;
  font-size: clamp(2.7rem, 4.75vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.043em;
}

.section-head > p, .services-intro > p:not(.eyebrow) {
  max-width: 35rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.project-gallery { border: 1px solid var(--line); }

.gallery-nav {
  display: flex;
  flex-wrap: wrap;
  padding-inline: 0.6rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  gap: 0 0.16rem;
}

.gallery-nav button {
  min-height: 3.35rem;
  padding: 0.5rem clamp(0.65rem, 1.45vw, 1.24rem) 0.42rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.gallery-nav button:hover { background: var(--paper-deep); }
.gallery-nav button[aria-pressed="true"] { border-color: var(--forest); }
.gallery-nav button:focus-visible, .photo-option:focus-visible { outline-offset: -3px; }

.gallery-body {
  display: grid;
  grid-template-columns: minmax(0, 1.96fr) minmax(17rem, 1fr);
  align-items: stretch;
  background: var(--paper-deep);
}

.gallery-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.64;
  overflow: hidden;
  align-self: stretch;
  background: #d5d2c4;
}

.gallery-media > img { object-position: center 55%; }
.gallery-media[data-scene="entry"] > img { object-position: center 64%; }
.gallery-media[data-scene="process"] > img { object-position: center 50%; }
.gallery-media > img[src="assets/process-operator.webp"] { object-position: center 43%; }
.gallery-media[data-scene="materials"] > img { object-position: center 66%; }
.gallery-media[data-fit="contain"] { background: #e5e2d7; }
.gallery-media[data-fit="contain"] > img { padding: 0.9rem; object-fit: contain; object-position: center; }
.gallery-media[data-fit="contain"] .photo-stage { display: none; }

.photo-stage, .enlarge-button {
  position: absolute;
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.37rem 0.72rem;
  color: #fffdf7;
  background: var(--forest-deep);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.photo-stage { top: 1rem; left: 1rem; }
.enlarge-button { bottom: 1rem; right: 1rem; gap: 0.45rem; border: 1px solid #a4ac9c; }
.enlarge-button:focus-visible { outline-color: var(--paper); }
.enlarge-button:hover { background: #3a5041; }

.expand-icon {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}

.gallery-context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.65rem;
  padding: clamp(1.2rem, 3.1vw, 3rem);
}

.gallery-context h3 {
  margin-block: 0.55rem 0.65rem;
  font-size: clamp(1.7rem, 2.75vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

#gallery-caption, .project-notes p { color: var(--muted); }

.gallery-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }

.photo-option {
  display: grid;
  gap: 0.29rem;
  min-width: 0;
  padding: 0.25rem;
  border: 1px solid #a9afa2;
  background: var(--paper);
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.35;
}

.photo-option img { width: 100%; height: auto; aspect-ratio: 1.56; object-fit: cover; }
.photo-option span { padding: 0.12rem 0.26rem 0.32rem; }
.photo-option:hover { border-color: var(--forest); }
.photo-option[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: var(--paper); font-weight: 650; }

.project-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem clamp(1.2rem, 3vw, 3.35rem);
  margin-top: 2.1rem;
}

.project-notes > div { border-top: 1px solid var(--line); padding-top: 1rem; }
.project-notes h3 { margin-bottom: 0.3rem; font-size: 1.38rem; line-height: 1.2; }

.services {
  background: var(--sage);
  border-top: 1px solid #d9ddd0;
  padding-block: clamp(3.5rem, 6.3vw, 6.25rem);
}

.services-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.2rem clamp(2rem, 7vw, 8rem);
}

.services-intro > p:not(.eyebrow) { margin: 1rem 0 1.5rem; }

.services-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.4;
  object-fit: cover;
  object-position: center 63%;
}

.services-visual figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font: italic 1rem/1.3 var(--serif);
}

.service-group + .service-group { margin-top: 2.25rem; }
.service-group h3 { margin-bottom: 0.65rem; font-size: clamp(1.65rem, 2.7vw, 2.35rem); line-height: 1.18; letter-spacing: -0.028em; }
.service-group details { border-top: 1px solid #c3cabc; }
.service-group details:last-child { border-bottom: 1px solid #c3cabc; }

.service-group summary {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.12rem;
  list-style: none;
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.38;
}

.service-group summary::-webkit-details-marker { display: none; }
.service-group summary:hover { text-decoration: underline; text-underline-offset: 0.23em; }

.service-group summary::after {
  display: inline-block;
  flex: 0 0 0.75rem;
  height: 0.75rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  content: "";
}

.service-group details[open] summary::after { background-size: 100% 1px, 0 0; }
.service-group details p { color: var(--muted); padding: 0 1.6rem 1rem 0.14rem; }

.restoration-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 0.9rem;
  padding: 0 0.14rem 1.25rem;
}

.restoration-examples figure { min-width: 0; }
.restoration-examples img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.restoration-examples figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.contact { padding-block: clamp(3.4rem, 6.15vw, 6rem); color: var(--paper); background: var(--forest-deep); }

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 1.25rem 2.5rem;
  align-items: end;
}

.contact h2 em { color: var(--gold); }
.contact-info p { max-width: 24rem; margin-bottom: 1.22rem; color: #e5e8dc; font-size: 1.0625rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.62rem; }
.contact-links .button-outline { color: var(--paper); border-color: #aebdad; }
.contact-links .button-outline:hover { background: var(--forest); }
.contact-info .contact-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin: 0.7rem 0 0;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
#copy-email {
  border: 0;
  padding: 0.35rem 0;
  background: transparent;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.24em;
}
.contact-status { font-size: 0.875rem; color: #e5e8dc; }

.footer { background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; align-items: center; justify-content: space-between; padding-block: 1.25rem; }
.footer .brand img { width: 2.5rem; }
.footer .brand-name { font-size: 1.25rem; }
.footer .brand-name span { font-size: 0.62rem; }
.footer p, .footer-inner > a:last-child { font-size: 0.875rem; }

#photo-dialog {
  width: min(62rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

#photo-dialog::backdrop { background: rgb(15 28 21 / 86%); }
.dialog-inner { display: grid; gap: 0.85rem; padding: clamp(0.85rem, 2vw, 1.35rem); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.dialog-header h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); line-height: 1.15; }
.dialog-close { min-height: 2.6rem; background: var(--forest); color: var(--paper); border: 0; padding: 0.42rem 0.75rem; font-weight: 600; }
.dialog-close:hover { background: #3a5041; }
.dialog-close:focus-visible { outline-color: var(--forest-deep); }
#dialog-photo { width: 100%; max-height: 70dvh; object-fit: contain; background: var(--paper-deep); }
#dialog-caption { color: var(--muted); }
#dialog-original { width: fit-content; font-weight: 600; }

@media (max-width: 960px) {
  .hero-content { padding-block: 3.55rem; }
  .hero { min-height: clamp(28rem, 55vw, 34rem); }
  .work { padding-block: 4.25rem; }
  .gallery-body { grid-template-columns: minmax(0, 1.65fr) minmax(15.25rem, 1fr); }
  .gallery-media { min-height: 100%; }
}

@media (max-width: 850px) {
  .gallery-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 0; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 4.8rem; gap: 0.42rem 1rem; }
  .site-nav { gap: 0.85rem; }
  .site-nav .nav-contact { padding-inline: 0.58rem; }
  .brand img { width: 2.65rem; }
  .brand-name { font-size: 1.23rem; }
  .brand-name span { font-size: 0.61rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 3.2rem var(--gutter) 2.75rem; }
  .hero h1 { font-size: clamp(3.25rem, 10vw, 4.75rem); }
  .hero .eyebrow { letter-spacing: 0.09em; }
  .hero .rule { flex-basis: 1rem; }
  .hero-visual { min-height: 0; aspect-ratio: 1.42; }
  .hero-visual figcaption { bottom: 1.2rem; left: var(--gutter); }
  .hero-visual img { object-position: 50% 61%; }
  .section-head, .gallery-body, .services-inner, .contact-inner { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 1.35rem; }
  .gallery-nav button { min-width: 0; padding-inline: 0.22rem; font-size: 0.875rem; line-height: 1.25; }
  .gallery-media { min-height: 0; }
  .gallery-media[data-fit="contain"] { aspect-ratio: 1.1; }
  .gallery-media[data-fit="contain"] > img { height: calc(100% - 3rem); }
  .gallery-context { gap: 1.05rem; }
  .gallery-options { max-width: 22rem; }
  .project-notes { grid-template-columns: 1fr; }
  .services-visual { max-width: 28rem; }
  .contact-inner { gap: 1.15rem; }
  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 410px) {
  .header-inner { gap: 0.65rem; flex-wrap: wrap; padding-block: 0.75rem; }
  .site-nav { width: 100%; justify-content: space-between; }
  .hero h1 { font-size: clamp(2.8rem, 12.15vw, 3.4rem); }
  .gallery-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-nav button { min-height: 2.8rem; }
}

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