/* Dos Antique. Palette from the farm itself: limewashed walls, stinkwood, thatch,
   green shutters, yellowwood. The one bold element is the gable facade on the home page. */
@font-face{font-family:"Young Serif";src:url(fonts/young-serif-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Hanken Grotesk";src:url(fonts/hanken-grotesk-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Hanken Grotesk";src:url(fonts/hanken-grotesk-latin-600-normal.woff2) format("woff2");font-weight:600;font-display:swap}

:root{
  --wall:#E6E3DA;        /* limewash, the page */
  --white:#F8F7F3;       /* fresh whitewash, the gable and panels */
  --shade:#D9D5C9;       /* photo placeholder, rules */
  --ink:#261C16;         /* stinkwood */
  --thatch:#5F594B;      /* secondary text */
  --shutter:#34473A;     /* buttons, links */
  --shutter-2:#26352B;
  --yellowwood:#C4953F;  /* small accents on the dark band, focus */
  --bg:var(--wall);
  --display:"Young Serif",Georgia,serif;
  --text:"Hanken Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --maxw:1200px;
  --gut:clamp(1rem,4vw,2.5rem);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:76px}
body{margin:0;background:var(--wall);color:var(--ink);font-family:var(--text);
  font-size:clamp(1rem,.35vw + .92rem,1.08rem);line-height:1.55;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
h1,h2,h3{font-family:var(--display);font-weight:400;line-height:1.12;margin:0 0 .4em;letter-spacing:-.01em}
h1{font-size:clamp(2rem,4.6vw,3.4rem)}
h2{font-size:clamp(1.6rem,3vw,2.3rem)}
h3{font-size:1.12rem;line-height:1.25}
p{margin:0 0 1em}
:focus-visible{outline:2px solid var(--shutter);outline-offset:3px}
.contact :focus-visible,.foot :focus-visible,.lb :focus-visible{outline-color:var(--yellowwood)}
.card :focus-visible{outline-color:var(--shutter)}
.svg-defs{position:absolute;width:0;height:0;overflow:hidden}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 var(--gut)}
.mark{width:32px;height:28px;flex:none;--door:var(--wall)}
.mark rect{fill:var(--door)}

/* header */
.top{position:sticky;top:0;z-index:5;background:rgba(230,227,218,.94);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.top::after{content:"";position:absolute;left:0;right:0;top:100%;height:9px;opacity:.55;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='9' viewBox='0 0 34 9'%3E%3Cpath d='M0,8.5 H9 V6 C9,4 11,3.6 12.5,2.8 C14,2 14.5,.6 17,.6 C19.5,.6 20,2 21.5,2.8 C23,3.6 25,4 25,6 V8.5 H34' fill='none' stroke='%239E9785' stroke-width='1'/%3E%3C/svg%3E") repeat-x left bottom}
.top-in{display:flex;align-items:center;justify-content:space-between;gap:1rem;height:64px}
.brand{display:flex;align-items:center;gap:.6rem;text-decoration:none;font-family:var(--display);font-size:1.3rem;white-space:nowrap}
.brand .mark{color:var(--ink)}
.top nav{display:flex;gap:.3rem}
.top nav a{text-decoration:none;padding:.5rem .8rem;border-radius:3px;font-weight:600;font-size:.95rem}
.top nav a:hover{background:var(--white)}
.top nav a{white-space:nowrap}
.top nav .lang{border:1.5px solid var(--ink);margin-left:.3rem}
.top nav .short{display:none}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:.65rem 1.25rem;
  border-radius:3px;border:1.5px solid var(--ink);text-decoration:none;font-weight:600;font-size:.98rem;
  color:var(--ink);background:transparent;overflow-wrap:anywhere;text-align:center}
.btn:hover{background:var(--ink);color:var(--white)}
.btn.solid{background:var(--shutter);border-color:var(--shutter);color:var(--white)}
.btn.solid:hover{background:var(--shutter-2);border-color:var(--shutter-2)}

/* home: the gable facade */
.intro{padding:clamp(1rem,2.5vw,1.6rem) 0 0}
.facade{position:relative;background:var(--white);text-align:center;margin-top:clamp(68px,8vw,100px);
  padding:clamp(.4rem,1.5vw,1rem) var(--gut) clamp(1.6rem,3vw,2.4rem);border-radius:0 0 3px 3px}
.crest{position:absolute;left:50%;bottom:100%;width:clamp(104px,12vw,150px);height:auto;transform:translateX(-50%);
  margin-bottom:-1px;overflow:visible}
.crest path{fill:var(--white)}
.crest .win{fill:var(--shade)}
.facade h1{max-width:30ch;margin:0 auto .3em;font-size:clamp(1.9rem,3.7vw,2.9rem);text-wrap:balance}
.facade p{max-width:54ch;margin:0 auto;color:var(--thatch);text-wrap:balance}

/* work grid */
.work{padding:clamp(1.8rem,4vw,3rem) 0 clamp(1rem,3vw,2rem)}
.work-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.8rem 1.5rem;margin-bottom:1.4rem}
.work-head h2{margin:0}
.n{font-family:var(--text);font-size:.95rem;color:var(--thatch);margin-left:.4em;letter-spacing:0}
.search{font:inherit;min-height:46px;padding:.55rem .1rem;width:min(100%,22rem);border:0;border-bottom:1.5px solid var(--ink);
  background:transparent;color:var(--ink);border-radius:0}
.search::placeholder{color:var(--thatch)}
.search:focus{outline:none;border-bottom-color:var(--shutter);box-shadow:0 1.5px 0 var(--shutter)}
.chips{display:flex;flex-wrap:wrap;gap:.45rem;margin:-.4rem 0 1.5rem}
.chip{font:inherit;font-size:.88rem;min-height:36px;padding:.3rem .85rem;border:1px solid var(--shade);border-radius:99px;
  background:var(--white);color:var(--ink);cursor:pointer}
.chip.on{background:var(--ink);border-color:var(--ink);color:var(--white)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:clamp(1.2rem,2.4vw,2rem) clamp(.9rem,1.8vw,1.4rem)}
.proj{text-decoration:none;display:block}
.proj-img{aspect-ratio:4/5;overflow:hidden;background:var(--shade);clip-path:url(#gableCard)}
.proj-img img{width:100%;height:100%;object-fit:cover}
.proj:hover .proj-img img{filter:brightness(1.04) contrast(1.03)}
.proj-txt{padding:.7rem .1rem 0}
.proj-txt .proj-tags{display:block;font-size:.85rem;color:var(--shutter);margin:0 0 .15em}
.proj-txt h3{margin:0 0 .1em;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:text-decoration-color .15s}
.proj:hover h3{text-decoration-color:currentColor}
.proj-txt p{margin:0;font-size:.9rem;color:var(--thatch);display:flex;justify-content:space-between;gap:.6rem}
.count{white-space:nowrap;margin-left:auto}
.empty{color:var(--thatch);padding:2rem 0}

/* project page */
.project{padding-top:clamp(1.2rem,3vw,2rem);padding-bottom:clamp(2.5rem,5vw,4rem)}
.back{margin-bottom:1.2rem}
.back a{text-decoration:none;font-weight:600;font-size:.95rem;color:var(--thatch)}
.back a:hover{color:var(--ink)}
.p-head{max-width:44rem;margin-bottom:clamp(1.4rem,3vw,2.2rem)}
.p-head h1{margin-bottom:.25em}
.meta{color:var(--thatch)}
.tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:1rem}
.tag{font-size:.85rem;padding:.2rem .7rem;border-radius:99px;background:var(--white)}
.desc{max-width:62ch}
/* justified rows: keeps left-to-right photo order, no cropping. --r = width/height */
.masonry{display:flex;flex-wrap:wrap;gap:clamp(.5rem,1.2vw,.8rem)}
.masonry::after{content:"";flex-grow:999}
.shot{display:block;flex:var(--r) 1 calc(var(--r) * clamp(150px,22vw,280px));background:var(--shade);cursor:zoom-in;border-radius:3px;overflow:hidden}
.shot img{width:100%;height:auto}
.pn{display:flex;justify-content:space-between;gap:1rem;margin-top:clamp(2rem,4vw,3rem);padding-top:1.2rem;border-top:1.5px solid var(--shade)}
.pn a{text-decoration:none;font-family:var(--display);font-size:1.1rem}
.pn a:hover{text-decoration:underline;text-underline-offset:3px}
.pn a:last-child{text-align:right}

/* contact: dark stinkwood band */
.contact{position:relative;background:var(--ink);color:var(--white);padding:clamp(3rem,7vw,5rem) 0;margin-top:clamp(56px,9vw,120px)}
.werf{position:absolute;left:50%;bottom:calc(100% - 2px);transform:translateX(-50%);width:min(100%,1200px);height:auto;display:block}
.werf path{fill:var(--ink)}
.werf .win{fill:var(--wall)}
.contact-in{display:grid;grid-template-columns:1fr minmax(0,27rem);gap:clamp(2rem,5vw,4.5rem);align-items:center}
.contact-copy .mark{display:none}
.contact-copy h2{max-width:18ch;text-wrap:balance}
.contact-copy p{max-width:36ch;color:#D8D2C4;font-size:1.08em;margin:0}
.card{background:var(--white);color:var(--ink);border-radius:3px;padding:clamp(1.3rem,3vw,2rem)}
.card h3{font-size:1.5rem;margin-bottom:.2em}
.tel{width:100%;max-width:300px;height:auto;margin:.2rem 0 1.3rem}
.btns{display:flex;flex-direction:column;gap:.6rem}
.addr{margin:1.2rem 0 0;font-size:.92rem;color:var(--thatch)}

/* footer continues the dark band */
.foot{background:var(--ink);color:#B9B2A3;font-size:.9rem;padding:0 0 2rem}
.foot-in{display:flex;align-items:center;gap:.7rem;border-top:1px solid #3E332B;padding-top:1.4rem}
.foot .mark{width:22px;height:19px;color:#B9B2A3;--door:var(--ink)}
.foot p{margin:0}

/* lightbox */
.lb{border:0;padding:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;background:rgba(24,18,14,.97);color:var(--white)}
.lb::backdrop{background:rgba(24,18,14,.97)}
.lb[open]{display:flex;align-items:center;justify-content:center}
.lb img{max-width:calc(100vw - 2rem);max-height:calc(100dvh - 5rem);width:auto;height:auto;object-fit:contain;user-select:none}
.lb button{position:absolute;background:none;border:0;color:inherit;font-size:2.6rem;line-height:1;cursor:pointer;
  width:56px;height:56px;display:flex;align-items:center;justify-content:center;opacity:.8}
.lb button:hover,.lb button:focus-visible{opacity:1}
.lb-x{top:.4rem;right:.4rem}
.lb-prev{left:.2rem;top:50%;transform:translateY(-50%)}
.lb-next{right:.2rem;top:50%;transform:translateY(-50%)}
.lb-n{position:absolute;bottom:.8rem;left:0;right:0;text-align:center;margin:0;font-size:.9rem;opacity:.75}

@media (max-width:760px){
  .contact-in{grid-template-columns:1fr}
  .brand{font-size:1.12rem}
  .top nav a{padding:.5rem .45rem;font-size:.88rem}
  .top nav .lang{margin-left:.1rem}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem .8rem}
  .proj-txt h3{font-size:1rem}
  .proj-txt p{flex-direction:column;gap:0;font-size:.82rem}
  .lb-prev,.lb-next{top:auto;bottom:.2rem;transform:none}
}
@media (max-width:480px){
  .top nav .lang .long{display:none}
  .top nav .lang .short{display:inline}
  .top nav{gap:0}
  .top-in{gap:.4rem}
  .brand{font-size:1rem;gap:.4rem}
  .brand .mark{width:26px;height:22px}
  .top nav a{padding:.45rem .4rem}
}
@media (max-width:359px){
  .top nav .long{display:none}
  .top nav .short{display:inline}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* merged from the Codex pass: skip link, screen-reader text, filters, empty state, project nav labels */
body.viewer-open{overflow:hidden}
.skip{position:fixed;top:1rem;left:1rem;z-index:20;background:var(--white);padding:.75rem 1rem;border-radius:3px;transform:translateY(-200%)}
.skip:focus{transform:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.work-title{display:flex;align-items:baseline;gap:.2rem .6rem;flex-wrap:wrap}
.work-title h2{margin:0}
.search-box{display:block;width:min(100%,22rem)}
.search-box .search{width:100%}
.empty{padding:1.5rem 0}
.empty p{margin-bottom:.8rem}
.pn span{display:block;font:.85rem/1.4 var(--text);color:var(--thatch);margin-bottom:.2rem}
