:root {
  --paper: #f5f0e8;
  --ink: #0a0a0a;
  --pine: #133200;
  --muted: #415136;
  --gold: #d4a843;
  --gold-light: #e6c777;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Manrope, Arial, sans-serif;
  --gutter: clamp(18px, 4.65vw, 82px);
  --header: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 20px); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 15px/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
button, summary { cursor: pointer; }
button { color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
p, h1, h2, h3 { margin: 0; }
em { font-weight: inherit; }
:focus-visible { outline: 2px solid #95701d; outline-offset: 5px; }
.skip { position: fixed; z-index: 9; top: 12px; left: 12px; padding: 10px 16px; background: var(--gold); transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(1500px, 100%); margin-inline: auto; padding-inline: var(--gutter); }

.header {
  position: sticky; z-index: 4; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header); padding-inline: var(--gutter);
  color: var(--pine); background: var(--paper); border-bottom: 1px solid #78571c36;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px; width: fit-content;
  color: #8a661a; white-space: nowrap; font: 400 23px/1 Arial, sans-serif;
}
.brand small { font-size: 11px; letter-spacing: .08em; }
.header nav { display: flex; gap: clamp(18px, 3.1vw, 54px); font-size: 14px; font-weight: 700; }
.header nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header nav a:hover { color: #78571c; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 15px;
  min-height: 46px; padding: 10px 20px; border: 1px solid transparent; border-radius: 100px;
  width: fit-content; font-size: 13px; line-height: 1.25; font-weight: 800;
  transition: background .22s, color .22s, border-color .22s;
}
.pill span { font-size: 1.2em; }
.header-cta { justify-self: end; border-color: #94722e; color: var(--pine); white-space: nowrap; }
.header-cta:hover { background: var(--gold); border-color: var(--gold); }
.primary { background: var(--gold); color: var(--ink); }
.primary:hover { background: var(--gold-light); }
.services :focus-visible, .contact-panel :focus-visible { outline-color: var(--gold-light); }

.opening { min-height: calc(108svh - var(--header)); padding: 14px 15px 0; }
.hero {
  --hero-accent: #78571c;
  isolation: isolate; position: sticky; top: var(--header); display: grid; align-items: center;
  min-height: clamp(640px, calc(100svh - var(--header) - 36px), 1100px);
  overflow: clip; border-radius: 4px; color: var(--pine); background: var(--paper);
}
.hero-picture {
  position: absolute; inset: 0 0 0 28%; z-index: -2; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 17%);
}
.hero-picture img {
  height: 100%; object-fit: cover; object-position: 50% 36%;
  transform: translate3d(0, var(--hero-y, 0px), 0) scale(var(--hero-scale, 1.035));
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--paper), #f5f0e8e6 15%, #f5f0e800 41%),
              linear-gradient(90deg, var(--paper) 28%, #f5f0e8f5 38%, #f5f0e870 55%, #f5f0e800 73%);
}
.hero-copy { padding: 64px calc(var(--gutter) - 4px) 110px; position: relative; }
.eyebrow { font-size: 10px; line-height: 1.35; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow i { display: inline-block; width: 19px; height: 1px; margin: 0 9px 3px 0; background: currentColor; }
.hero .eyebrow { color: var(--hero-accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin-block: 22px 21px; font-size: clamp(76px, 9.8vw, 174px); line-height: .82; letter-spacing: -.05em; }
h1 em { color: var(--hero-accent); letter-spacing: -.045em; }
.hero-description { max-width: 39ch; font-size: clamp(15px, 1.3vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 25px; margin-top: 29px; }
.text-button { display: inline-flex; align-items: center; gap: 9px; padding: 4px 0; border: 0; background: none; font-size: 13px; font-weight: 750; }
.text-button:hover { color: var(--hero-accent); }
.play { display: inline-grid; place-items: center; width: 33px; height: 33px; border: 1px solid #78571c80; border-radius: 50%; font-size: 14px; }
.hero-credit, .hero-bottom { position: absolute; right: calc(var(--gutter) - 4px); }
.hero-credit { bottom: 100px; display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.hero-credit span { display: block; width: 6px; height: 6px; background: var(--hero-accent); border-radius: 50%; }
.hero-credit b { color: var(--hero-accent); }
.hero-bottom {
  bottom: 0; left: calc(var(--gutter) - 4px); min-height: 63px;
  display: grid; grid-template-columns: 1fr minmax(36px, 100px); align-items: center;
  border-top: 1px solid #78571c59;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.hero-bottom a { width: fit-content; }
.hero-bottom a span { margin-right: 8px; font-size: 16px; }
.hero-bottom a:hover { color: var(--hero-accent); }
.progress { height: 1px; background: #78571c59; }
.progress span { display: block; height: 1px; background: var(--hero-accent); transform-origin: left; transform: scaleX(var(--scroll, .08)); }

.work { padding-block: clamp(76px, 9vw, 145px) clamp(90px, 10vw, 160px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px 50px; margin-bottom: clamp(25px, 3.5vw, 55px); }
h2 { font-size: clamp(57px, 7vw, 109px); line-height: .91; letter-spacing: -.043em; }
.section-heading h2, .service-intro h2 { margin-top: 15px; }
.section-heading h2 em { color: var(--pine); }
.section-heading .eyebrow { color: var(--pine); }
.section-heading > p { max-width: 33ch; color: var(--muted); padding-bottom: 4px; }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 74px) clamp(14px, 2.1vw, 34px); }
.featured { grid-column: 1 / -1; }
.project-image {
  isolation: isolate; position: relative; display: block; overflow: hidden;
  width: 100%; height: auto; aspect-ratio: 1.2; background: var(--pine);
  padding: 0; border: 0; border-radius: 3px;
}
.featured .project-image { aspect-ratio: 2.28; }
.project-image img {
  height: 100%; object-fit: cover; object-position: center 42%;
  transform: translate3d(0, var(--media-y, 0px), 0) scale(var(--zoom, 1.13));
  transition: scale .55s cubic-bezier(.2,.7,.25,1);
}
.project-image:hover img { scale: 1.045; }
.featured img { object-position: 50% 34%; }
.worm img { object-position: 50% 37%; }
.mancato img { object-position: 50% 50%; }
.project-icon {
  position: absolute; inset: auto 22px 22px auto; display: grid; place-items: center;
  width: 52px; height: 52px; border: 1px solid var(--gold); border-radius: 50%;
  background: #133200e0; color: var(--gold-light); font-size: 13px; text-indent: 2px;
}
.project-caption { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-block: 17px 1px; }
.project-caption .eyebrow { color: var(--muted); }
h3 { margin-top: 3px; font-size: clamp(37px, 4.4vw, 62px); letter-spacing: -.03em; line-height: .98; }
.round {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 46px; height: 46px; padding: 0; border: 1px solid #a4853d; border-radius: 50%;
  color: var(--pine); background: transparent; font-size: 20px; line-height: 1;
  transition: color .22s, background .22s;
}
.round:hover { color: var(--paper); background: var(--pine); }

.services { background: var(--pine); color: var(--paper); border-block: 1px solid #a4853d; }
.service-layout { display: grid; grid-template-columns: 1fr 1.12fr; gap: 40px; padding-block: clamp(72px, 8vw, 130px); }
.service-intro h2 em, .service-intro .eyebrow { color: var(--gold); }
.service-list { padding-top: 6px; }
details { border-top: 1px solid #d4a8437a; }
details:last-child { border-bottom: 1px solid #d4a8437a; }
summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-block: 20px; list-style: none; font-size: clamp(16px, 2vw, 24px); font-weight: 750; }
summary::-webkit-details-marker { display: none; }
summary span { position: relative; flex: 0 0 16px; height: 16px; color: var(--gold); }
summary span::before, summary span::after { content: ""; position: absolute; inset: 7px 0 auto; height: 1px; background: currentColor; }
summary span::after { transform: rotate(90deg); transition: transform .22s; }
details[open] summary span::after { transform: none; }
details p { max-width: 48ch; color: var(--paper); }
details a { display: inline-block; margin: 14px 0 23px; color: var(--gold-light); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.contact { padding-block: clamp(45px, 7vw, 105px) clamp(37px, 5vw, 67px); }
.contact-panel {
  display: grid; gap: clamp(23px, 3vw, 42px); max-width: 700px; margin-inline: auto;
  padding: clamp(21px, 5vw, 58px); border-radius: 4px;
  color: var(--paper); background: var(--pine); border: 1px solid #a4853d;
}
.contact-panel h2 { font-size: clamp(49px, 7vw, 88px); }
.contact-panel h2 em { color: var(--gold); }
.contact-form { display: grid; gap: 8px; }
.contact-form[hidden], .contact-result[hidden] { display: none; }
.contact-form label { font-size: 14px; font-weight: 700; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 13px; background: var(--paper); color: var(--ink);
  border: 1px solid #b8944c; border-radius: 4px; font: 500 16px/1.6 var(--sans);
}
.contact-form input { min-height: 46px; }
.contact-form textarea { resize: vertical; min-height: 118px; }
.contact-form label:not(:first-child), .contact-form button { margin-top: 10px; }
.contact-frame {
  display: block; width: 100%; height: 290px;
  border: 0; border-radius: 4px; background: var(--paper);
}
.contact-status { margin-bottom: 12px; }
.contact-status:empty { display: none; }
.contact-back {
  margin-top: 13px; padding: 4px 0; border: 0; background: none;
  color: var(--gold-light); text-decoration: underline; text-underline-offset: 4px;
}
.footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; min-height: 105px; }
.footer > a:not(.brand) { font-size: 12px; font-weight: 750; }
.footer > a:last-child { justify-self: end; }

dialog {
  width: min(870px, calc(100% - 32px)); max-height: calc(100% - 36px);
  padding: 0; position: fixed; color: var(--ink); background: var(--paper);
  border: 0; border-radius: 4px; overscroll-behavior: contain;
}
dialog::backdrop { background: #0b1d02e0; }
.dialog-content { position: relative; padding: clamp(23px, 5vw, 54px); }
.dialog-close { position: absolute; top: 14px; right: 14px; font-size: 28px; }
.dialog-content > .eyebrow { padding-right: 42px; }
.dialog-content h2 { margin-block: 11px; font-size: clamp(49px, 8vw, 82px); }
#project-description { max-width: 60ch; color: var(--muted); margin-bottom: 23px; }
#project-media video { display: block; margin-inline: auto; width: auto; height: auto; max-height: 67svh; max-width: 100%; background: var(--pine); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery img { height: 100%; max-height: 490px; aspect-ratio: 3 / 4; object-fit: cover; }
.project-contact { margin-top: 24px; }
.reveal.waiting { opacity: 0; transform: translateY(28px); }
.reveal { transition: opacity .65s ease, transform .75s cubic-bezier(.2,.65,.2,1); }

@media (max-width: 800px) {
  :root { --header: 66px; }
  .opening { padding: 9px 9px 0; }
  .hero { min-height: max(570px, calc(100svh - var(--header) - 22px)); }
  .hero-picture { left: 16%; }
  .hero-picture img { object-position: 50% 41%; }
  .hero::after {
    background: linear-gradient(0deg, var(--paper), #f5f0e8d9 16%, #f5f0e800 45%),
                linear-gradient(90deg, var(--paper) 16%, #f5f0e8e6 36%, #f5f0e864 59%, #f5f0e800 79%);
  }
  .hero-copy { padding-inline: var(--gutter); }
  .hero-credit, .hero-bottom { right: var(--gutter); }
  .hero-bottom { left: var(--gutter); }
  .service-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --header: 60px; }
  .header { grid-template-columns: auto 1fr auto; gap: 7px; padding-inline: clamp(11px, 3.5vw, 18px); }
  .brand { gap: 5px; font-size: 17px; }
  .brand small { font-size: 8px; }
  .header nav { justify-self: center; gap: 9px; font-size: 12px; }
  .header-cta { min-height: 36px; padding-inline: 8px; gap: 4px; font-size: 11px; }
  .hero { align-items: end; min-height: max(550px, calc(100svh - var(--header) - 20px)); }
  .hero-picture { left: 0; mask-image: none; }
  .hero-picture img { object-position: 55% 35%; }
  .hero::after { background: linear-gradient(0deg, var(--paper) 37%, #f5f0e8e8 49%, #f5f0e86b 62%, #f5f0e800 76%); }
  h1 { font-size: clamp(61px, 15vw, 94px); margin-block: 14px 17px; }
  .hero-copy { padding-block: 30px 93px; }
  .hero-credit { display: none; }
  .hero-actions { margin-top: 21px; gap: 9px 12px; }
  .hero-actions .pill { padding-inline: 12px; gap: 7px; }
  .hero-actions .text-button { font-size: 12px; }
  .hero-bottom { grid-template-columns: 1fr 48px; column-gap: 12px; min-height: 54px; font-size: 9px; }
  .section-heading { display: grid; gap: 15px; }
  .projects { grid-template-columns: 1fr; }
  .featured .project-image { aspect-ratio: 1.2; }
  .service-layout { gap: 28px; }
}
@media (max-width: 350px) {
  .header { gap: 5px; padding-inline: 9px; }
  .brand { gap: 4px; font-size: 15px; }
  .header nav { gap: 5px; font-size: 11px; }
  .header-cta { padding-inline: 6px; font-size: 10px; }
  .header-cta span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
  .opening { min-height: 0; }
  .hero { position: relative; top: auto; }
  .hero-picture img { transform: none; }
  .project-image img { transform: none; scale: none; }
  .reveal.waiting { transform: none; opacity: 1; }
}
