/* Divanbeigi Design & Build. House-wrap envelope.
   Ground = printed house wrap; seams = flashing tape; photographs sit in cut rough openings.
   Strict 45/90 degree geometry. */

@font-face {
  font-family: "Tinos";
  src: url("../fonts/tinos-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --wrap: #f3f5f4;
  --wrap-2: #e7ecea;
  --wrap-3: #d6dddc;
  --ink: #101213;
  --ink-2: #353c3f;
  --ink-3: #566063;
  --red: #c8231b;
  --blue: #1f5fa8;
  --blue-deep: #174a85;
  --osb: #c8944f;
  --osb-deep: #8a5d26;
  --tape: #d3d9db;
  --tape-hi: #eef1f2;
  --acm: #0c0d0e;
  --cut: rgba(16, 18, 19, 0.34);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --header-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;
  --fs-h2: clamp(2rem, 1.2rem + 3.6vw, 3.75rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --fs-display: clamp(2.25rem, 9.2vw, 6rem);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .3 0 0 0 0 .32 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--wrap) var(--noise);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-stretch: 100%;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }
html { scrollbar-color: var(--ink-3) var(--wrap-2); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--wrap-2); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--wrap-2); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- type voices ---------- */
.display, h1.display, h2.display {
  font-weight: 860;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-wrap: balance;
}
.h2 { font-size: var(--fs-h2); }
.h3 {
  font-size: var(--fs-h3);
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-transform: uppercase;
}
.lede { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.prose { max-width: 66ch; color: var(--ink-2); text-wrap: pretty; }
.prose p + p { margin-top: 1em; }
.print {
  font-size: var(--fs-label);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.red { color: var(--red); }

/* ---------- wrap print texture (hero + footer only) ---------- */
.printed { position: relative; isolation: auto; }
.printed::before {
  content: attr(data-print) / "";
  position: absolute;
  inset: -10% -10%;
  z-index: 0;
  font-weight: 860;
  font-stretch: 125%;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(16, 18, 19, 0.045);
  overflow: hidden;
  word-spacing: 0.4em;
  transform: rotate(-45deg) scale(1.4);
  transform-origin: center;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 38%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0%, #000 38%, transparent 80%);
}
.printed > * { position: relative; z-index: 1; }

/* ---------- tape seams ---------- */
.seam {
  position: relative;
  height: 18px;
  background: linear-gradient(180deg, var(--tape-hi) 0%, #dfe4e6 40%, var(--tape) 70%, #c1c9cb 100%);
  border-block: 1px solid rgba(16, 18, 19, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--wrap) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 18, 19, 0.14);
  transition: box-shadow 0.3s var(--ease);
}
.site-header[data-stuck="true"] { box-shadow: 0 10px 24px -18px rgba(16, 18, 19, 0.5); }
.site-header__in {
  max-width: var(--max);
  margin: auto;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; line-height: 1; flex: none; }
.brand__mark { width: auto; height: 48px; display: block; border: 1px solid rgba(16, 18, 19, 0.35); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
/* the wordmark follows the logo's own lettering: bold serif name over a bold sans line */
.brand__name { font-family: "Tinos", "Times New Roman", Times, serif; font-weight: 700; font-size: 1.75rem; letter-spacing: -0.01em; line-height: 0.95; }
.brand__sub { margin-top: 4px; font-weight: 700; font-stretch: 100%; font-size: 0.9375rem; letter-spacing: 0; color: var(--ink); line-height: 1; }
.nav { margin-left: auto; display: flex; gap: clamp(14px, 2.4vw, 34px); align-items: center; }
.nav a {
  text-decoration: none;
  font-weight: 700;
  font-stretch: 108%;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 2px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { background-size: 100% 2px; }
.nav a[aria-current="page"] { background: linear-gradient(var(--red), var(--red)) 0 calc(100% - 6px) / 100% 2px no-repeat; }
.tel {
  flex: none;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  padding: 0 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.25s var(--ease);
}
.tel:hover { background: var(--blue); }
.menu-btn { display: none; margin-left: 0; width: 44px; height: 44px; background: none; border: 1px solid rgba(16, 18, 19, 0.4); cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 5px auto; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--wrap);
    border-bottom: 1px solid rgba(16, 18, 19, 0.2);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.35s var(--ease), visibility 0s 0.35s;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav a { font-size: 1.0625rem; border-bottom: 1px solid rgba(16, 18, 19, 0.14); padding: 14px 0; background-position: 0 100%; }
  .nav .tel { margin-top: 16px; justify-content: center; border: 0; font-size: 1rem; }
  .site-header .tel--bar { margin-left: auto; }
  .menu-btn { margin-left: 0; }
}
.tel__short { display: none; }
@media (max-width: 820px) { .tel__long { display: none; } .tel__short { display: inline; } }
@media (min-width: 821px) { .nav .tel--menu { display: none; } }

/* ---------- layout helpers ---------- */
.wrap-in { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px) 0; }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 56px); max-width: 960px; }
.arrow { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-left: 0.4em; }
.link {
  font-weight: 700;
  font-stretch: 108%;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding: 12px 0 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.link:hover { border-bottom-color: var(--red); color: var(--red); }

/* ---------- rough opening (photograph frame) ---------- */
.opening {
  position: relative;
  display: block;
  margin: 0;
  background: #c4cccc;
  border: 9px solid var(--tape);
  box-shadow: 0 0 0 1px rgba(16, 18, 19, 0.28);
  padding: 0;
}
.ph { display: block; overflow: hidden; }
.ph img { width: 100%; }
.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 7px 16px -7px rgba(0, 0, 0, 0.55), inset 7px 0 16px -9px rgba(0, 0, 0, 0.35);
}
/* relief cuts at the four corners, 45 degrees only */
.opening--cut { overflow: visible; margin: 34px; }
.opening--cut .cuts { position: absolute; inset: -9px; pointer-events: none; z-index: 2; }
.opening--cut .cuts i { position: absolute; width: 46px; height: 1px; background: var(--cut); transform-origin: 0 0; }
.cuts i:nth-child(1) { left: 0; top: 0; transform: rotate(-135deg); }
.cuts i:nth-child(2) { right: 0; top: 0; transform-origin: 100% 0; transform: rotate(135deg); }
.cuts i:nth-child(3) { left: 0; bottom: 0; transform-origin: 0 100%; transform: rotate(135deg); }
.cuts i:nth-child(4) { right: 0; bottom: 0; transform-origin: 100% 100%; transform: rotate(-135deg); }
@media (max-width: 560px) { .opening--cut { margin: 0; } .opening--cut .cuts { display: none; } }

/* stick-on printed label */
.sticker {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px 9px;
  max-width: min(100%, 34ch);
  border-top: 2px solid var(--red);
}
.sticker b { display: block; font-weight: 800; font-stretch: 112%; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.25; }
.sticker span { display: block; margin-top: 2px; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-3); line-height: 1.3; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: clip; padding-top: clamp(28px, 5vw, 64px); }
.hero__grid {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 0;
  grid-template-rows: auto auto auto auto 1fr;
}
.hero__title { grid-column: 1 / 9; grid-row: 1; font-size: var(--fs-display); position: relative; z-index: 2; }
.hero__title span { display: block; }
@media (min-width: 961px) { .hero__title { font-size: min(6rem, 6.4vw); } }
.hero__title .blend { color: var(--red); }
.hero__lede { grid-column: 1 / 7; grid-row: 2; margin-top: clamp(20px, 3vw, 36px); position: relative; z-index: 2; }
.hero__door { grid-column: 8 / 13; grid-row: 1 / 6; margin-top: 8px; position: relative; z-index: 1; }
.hero__door .opening, .hero__door .opening--cut { margin: 0; }
.hero__act { grid-column: 1 / 8; grid-row: 3; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding-top: 28px; position: relative; z-index: 2; }
.cta-tape {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 22px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 860;
  font-stretch: 118%;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  border: 2px solid var(--ink);
  box-shadow: 0 10px 18px -12px rgba(16, 18, 19, 0.6);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--ease);
}
.cta-tape small { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.cta-tape span { white-space: nowrap; }
@media (max-width: 480px) { .cta-tape { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 18px; min-height: 60px; } }
.cta-tape:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 16px 22px -14px rgba(16, 18, 19, 0.65); }
.stagebar {
  grid-column: 1 / 8;
  grid-row: 4;
  margin-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(36px, 5vw, 72px);
  position: relative;
  z-index: 2;
}
.stagebar ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 2px solid var(--ink); }
.stagebar li { flex: 1 1 auto; }
.stagebar a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  padding: 10px 12px 12px 0;
  min-height: 56px;
  position: relative;
}
.stagebar a b { font-size: 0.8125rem; font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.06em; }
.stagebar a:hover b { color: var(--osb-deep); }
.stagebar a::before { content: ""; position: absolute; left: 0; top: -2px; width: 0; height: 6px; background: var(--osb); transition: width 0.4s var(--ease); }
.stagebar a:hover::before { width: 100%; }

@media (max-width: 960px) {
  .hero__title { grid-column: 1 / 13; }
  .hero__lede { grid-column: 1 / 13; }
  .hero__act { grid-column: 1 / 13; grid-row: 3; }
  .hero__door { grid-column: 1 / 13; grid-row: 4; margin-top: 8px; }
  .stagebar { grid-column: 1 / 13; grid-row: 5; }
    .hero__grid { grid-template-rows: auto; }
}

/* ---------- build sequence (signature) ---------- */
.sequence { position: relative; }
.sequence__pin { position: relative; padding-block: clamp(40px, 6vw, 80px) 0; }
.sequence__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.stages { position: relative; }
.stages__list { list-style: none; margin: 0; padding: 0; }
.stage { border-top: 1px solid rgba(16, 18, 19, 0.2); }
.stage__btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 16px 0 16px 28px;
  min-height: 64px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-items: baseline;
  gap: 8px;
  position: relative;
}
.stage__n { font-weight: 800; font-stretch: 112%; font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stage__name { font-weight: 860; font-stretch: 125%; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; transition: color 0.25s; }
.stage__text { grid-column: 2; max-width: 42ch; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; display: grid; grid-template-rows: 1fr; }
.stage__text > span { display: block; overflow: hidden; min-height: 0; padding-top: 6px; }
.sequence[data-pinned="true"] .stage__text { grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.55s var(--ease), opacity 0.35s var(--ease); }
.stage__btn[aria-current="step"] .stage__name { color: var(--blue); }
.stage__btn[aria-current="step"] .stage__n { color: var(--blue); }
.sequence[data-pinned="true"] .stage__btn[aria-current="step"] .stage__text { grid-template-rows: 1fr; opacity: 1; }
.stage__btn:hover .stage__name { color: var(--blue); }
/* tape measure along the left edge */
.stages::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: repeating-linear-gradient(180deg, rgba(16, 18, 19, 0.45) 0 1px, transparent 1px 8px) 0 0 / 12px 100%, repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 40px) 0 0 / 12px 100%;
  -webkit-mask: linear-gradient(90deg, #000 0 100%);
}
.stages .rule { position: absolute; left: 0; top: 0; width: 6px; height: var(--progress, 0%); background: var(--osb); transition: height 0.6s var(--ease); z-index: 1; }

.viewer { position: relative; aspect-ratio: 4 / 3.35; display: none; }
.sequence[data-pinned="true"] .viewer { display: block; }
.viewer .opening { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.viewer .opening .ph { height: 100%; }
.viewer .opening img { width: 100%; height: 100%; object-fit: cover; }
.viewer__layer { position: absolute; inset: 0; clip-path: inset(0 0 100% 0); transition: clip-path 0.9s var(--ease); }
.viewer__layer[data-on="true"] { clip-path: inset(0 0 0 0); z-index: 2; }
.viewer__layer[data-past="true"] { clip-path: inset(0 0 0 0); z-index: 1; }
.viewer__layer img { transform: scale(1.06); transition: transform 1.6s var(--ease); }
.viewer__layer[data-on="true"] img { transform: none; }
.viewer .sticker { z-index: 5; }

/* static (no-JS / reduced motion) fallback: stages as a plain list with their photo */
.stage__fig { display: block; margin: 14px 0 22px 28px; }
.stage__fig .opening { border-width: 6px; }
.sequence[data-pinned="true"] .stage__fig { display: none; }
.js .sequence[data-pinned="true"] { height: calc(var(--n) * 78svh + 40svh); }
.js .sequence[data-pinned="true"] .sequence__pin { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); padding-block: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.sequence__left { min-width: 0; }
.sequence__left .section__head { margin-bottom: clamp(18px, 2vw, 28px); gap: 12px; }
.sequence__left .section__head h2 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem); }
.sequence__left .lede { font-size: 1rem; max-width: 40ch; }
.sequence[data-pinned="true"] .sequence__grid { align-items: center; height: calc(100svh - var(--header-h) - 2 * clamp(20px, 3vw, 40px)); }
.sequence[data-pinned="true"] .viewer { aspect-ratio: auto; height: 100%; max-height: 780px; }
.sequence[data-pinned="true"] .sequence__left { align-self: start; padding-top: clamp(4px, 1vw, 16px); }
@media (max-height: 780px) { .sequence__left .lede { display: none; } .stage__btn { padding-block: 10px; min-height: 52px; } }

.sequence:not([data-pinned="true"]) .sequence__grid { grid-template-columns: 1fr; }
.sequence:not([data-pinned="true"]) .stages { max-width: none; }
.sequence:not([data-pinned="true"]) .stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 3vw, 48px); align-items: center; padding-block: 18px; }
.sequence:not([data-pinned="true"]) .stage__fig { margin: 0; }
.sequence:not([data-pinned="true"]) .stage__btn { cursor: default; }
@media (max-width: 860px) {
  .sequence:not([data-pinned="true"]) .stage { grid-template-columns: 1fr; }
  .sequence__grid { grid-template-columns: 1fr; gap: 20px; }
  .viewer { order: -1; aspect-ratio: 16 / 11; }
  .stage__btn { padding-block: 10px; min-height: 52px; }
  .stage__name { font-size: 1.25rem; }
  .js .sequence[data-pinned="true"] .section__head p { display: none; }
  .sequence[data-pinned="true"] .sequence__grid { align-content: start; height: auto; }
  .sequence[data-pinned="true"] .viewer { height: auto; aspect-ratio: 16 / 11; }
  .stage__text { font-size: 0.875rem; }
}

/* ---------- selected work (features) ---------- */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; align-items: start; margin-top: clamp(56px, 8vw, 112px); }
.feature:first-of-type { margin-top: 0; }
.feature__main { grid-column: 1 / 8; }
.feature__aside { grid-column: 9 / 13; display: grid; gap: 28px; align-content: start; }
.feature--flip .feature__main { grid-column: 5 / 13; grid-row: 1; }
.feature--flip .feature__aside { grid-column: 1 / 5; grid-row: 1; }
.feature__pair { grid-column: 5 / 13; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.feature__copy { display: grid; gap: 14px; }
.feature__copy .prose { max-width: 40ch; }
.feature__meta { margin-top: 4px; }

.tag {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  border: 1px solid rgba(16, 18, 19, 0.5);
  background: #fff;
  margin-top: -1px;
  font-size: 0.8125rem;
  line-height: 1.3;
}
.tag > * { padding: 7px 10px; border-top: 1px solid rgba(16, 18, 19, 0.2); }
.tag > :nth-child(-n + 2) { border-top: 0; }
.tag__no { font-weight: 800; font-stretch: 112%; letter-spacing: 0.06em; color: var(--red); border-right: 1px solid rgba(16, 18, 19, 0.2); font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.tag__title { font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.03em; }
.tag__k { color: var(--ink-3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.6875rem; overflow-wrap: anywhere; border-right: 1px solid rgba(16, 18, 19, 0.2); display: flex; align-items: center; }
.tag__v { color: var(--ink-2); }

@media (max-width: 860px) {
  .feature, .feature--flip { display: block; }
  .feature__pair { margin-top: 28px; gap: 16px; grid-template-columns: 1fr; }
  .feature__aside { margin-top: 28px; }
}

/* ---------- millwork rail ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 28vw, 380px); gap: 24px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px var(--gutter) 28px; margin-inline: calc(var(--gutter) * -1); scrollbar-width: thin; }
.rail figure { margin: 0; scroll-snap-align: start; }
.rail .opening img { aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- plates (galleries) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; align-items: center; }
.filters__lbl { margin-right: 8px; }
.chip {
  background: transparent;
  border: 1.5px solid var(--ink);
  padding: 0 16px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  font-stretch: 108%;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s;
}
.chip:hover { background: var(--wrap-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip .n { opacity: 0.65; margin-left: 6px; font-variant-numeric: tabular-nums; }
.plates { column-gap: 24px; column-count: 3; }
.plate { break-inside: avoid; margin: 0 0 32px; display: block; }
.plate[hidden] { display: none; }
.plate__btn { all: unset; display: block; cursor: zoom-in; width: 100%; }
.plate__btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.plate .opening { border-width: 9px; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.plate__btn:hover .opening { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(16, 18, 19, 0.5); }
@media (max-width: 1000px) { .plates { column-count: 2; } }
@media (max-width: 560px) { .plates { column-count: 1; } }
.count { color: var(--ink-3); font-size: var(--fs-small); margin-bottom: 20px; }
.sortbar { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* ---------- earlier work teaser ---------- */
.schedule { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.schedule__rows { margin: 28px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.schedule__rows li { display: grid; grid-template-columns: 3rem 1fr auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(16, 18, 19, 0.2); font-size: 0.9375rem; align-items: baseline; }
.schedule__rows .no { color: var(--red); font-weight: 800; font-stretch: 112%; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.schedule__rows .nm { font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.02em; }
.schedule__rows .yr { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.schedule__rows .ty { display: block; color: var(--ink-3); font-size: 0.8125rem; font-weight: 500; font-stretch: 100%; text-transform: none; letter-spacing: 0; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mosaic a { display: block; text-decoration: none; }
.mosaic .opening { border-width: 5px; }
.mosaic img { aspect-ratio: 1; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .schedule { grid-template-columns: 1fr; } }

/* ---------- principal / about ---------- */
.principal { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.principal .prose { margin-top: 18px; }
@media (max-width: 860px) { .principal { grid-template-columns: 1fr; } }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.rows li { padding: 18px 0; border-bottom: 1px solid rgba(16, 18, 19, 0.22); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.rows b { font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.02em; }
.rows span { color: var(--ink-2); }
@media (max-width: 700px) { .rows li { grid-template-columns: 1fr; gap: 4px; } .cols2 { grid-template-columns: 1fr; } }

/* ---------- page head ---------- */
.page-head { padding-block: clamp(40px, 6vw, 88px) clamp(28px, 4vw, 56px); display: grid; gap: 20px; }
.page-head h1 { font-size: clamp(2.5rem, 1rem + 6.4vw, 5.25rem); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.contact__lines { display: grid; gap: 22px; margin-top: 28px; }
.contact__lines dt { margin-bottom: 4px; color: var(--ink-3); }
.contact__lines dd { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.contact__lines a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.form { display: grid; gap: 18px; background: #fff; padding: clamp(20px, 3vw, 36px); border: 1px solid rgba(16, 18, 19, 0.5); box-shadow: 0 30px 40px -32px rgba(16, 18, 19, 0.5); position: relative; }
.form::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 8px; background: linear-gradient(180deg, var(--tape-hi), var(--tape)); border-bottom: 1px solid rgba(16, 18, 19, 0.25); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--wrap);
  border: 1.5px solid rgba(16, 18, 19, 0.6);
  border-radius: 0;
  padding: 12px 14px;
  min-height: 48px;
  caret-color: var(--red);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); background: #fff6f5; }
.field .err { color: var(--red); font-size: 0.8125rem; margin-top: 4px; min-height: 1em; font-weight: 600; }
.btn {
  background: var(--ink);
  color: #fff;
  border: 0;
  min-height: 56px;
  padding: 0 28px;
  font-weight: 860;
  font-stretch: 118%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9375rem;
  cursor: pointer;
  justify-self: start;
  transition: background-color 0.25s var(--ease);
}
.btn:hover { background: var(--blue); }
.form__note { font-size: 0.8125rem; color: var(--ink-3); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } .form .row2 { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(72px, 10vw, 140px); background: var(--acm); color: #e8ecec; position: relative; }
.site-footer .seam { border-color: rgba(255, 255, 255, 0.2); }
.site-footer__in { max-width: var(--max); margin: auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer .brand__name { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); color: #fff; }
.site-footer .brand__sub { color: #e8ecec; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.375rem); margin-top: 6px; }
.site-footer h2 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: #aab3b5; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.site-footer address { font-style: normal; color: #cbd2d3; line-height: 1.7; }
.site-footer__base { max-width: var(--max); margin: auto; padding: 0 var(--gutter) 32px; color: #8e999b; font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: 8px 28px; }
@media (max-width: 760px) { .site-footer__in { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */
dialog.lightbox {
  padding: 0;
  border: 0;
  background: var(--acm);
  color: #fff;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
}
dialog.lightbox::backdrop { background: rgba(12, 13, 14, 0.9); }
.lightbox__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 22rem); height: 100%; }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: calc(100dvh - clamp(24px, 6vw, 80px)); width: auto; height: auto; object-fit: contain; }
.lightbox__panel { background: var(--wrap); color: var(--ink); padding: 28px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; border-left: 6px solid var(--tape); }
.lightbox__panel h2 { font-size: 1.5rem; font-weight: 860; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.lightbox__panel dl { margin: 0; display: grid; gap: 12px; }
.lightbox__panel dt { color: var(--ink-3); margin-bottom: 1px; }
.lightbox__panel dd { margin: 0; font-weight: 600; }
.lightbox__panel .note { font-size: 0.8125rem; color: var(--ink-3); }
.lightbox__ctl { display: flex; gap: 8px; margin-top: auto; }
.lightbox__ctl button { flex: 1; min-height: 48px; background: var(--ink); color: #fff; border: 0; cursor: pointer; font-weight: 800; font-stretch: 112%; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; }
.lightbox__ctl button:hover { background: var(--blue); }
.lightbox__close { position: absolute; top: 10px; right: 10px; z-index: 4; width: 48px; height: 48px; background: var(--ink); border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; cursor: pointer; font-size: 0; }
.lightbox__close::before, .lightbox__close::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: #fff; transform: rotate(45deg); }
.lightbox__close::after { transform: rotate(-45deg); }
.lightbox__close:hover { background: var(--red); }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs button { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .lightbox__in { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lightbox__panel { border-left: 0; border-top: 6px solid var(--tape); max-height: 42dvh; padding: 18px var(--gutter); }
  .lightbox__stage img { max-height: calc(58dvh - 24px); }
}

/* ---------- reveals ---------- */
.js [data-rise] { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
.js [data-rise].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-rise] { opacity: 1; transform: none; }
}
@media print { .site-header, .seam, .filters, dialog { display: none !important; } }

.more { display: flex; justify-content: center; margin: 8px 0 0; }
.more[hidden] { display: none; }

/* ---------- page progress: a tape measure drawn along the header ---------- */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--osb); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* ---------- phone dock ---------- */
.dock { display: none; }
@media (max-width: 820px) {
  .dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 18px 28px -14px rgba(16, 18, 19, 0.75);
    transform: translateY(150%);
    transition: transform 0.5s var(--ease);
  }
  .dock[data-show="true"] { transform: none; }
  .dock a { min-height: 52px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 860; font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8125rem; }
  .dock__msg { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-left-width: 0; }
  .site-footer { padding-bottom: 80px; }
}

/* ---------- gallery cursor label (fine pointers only) ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 70;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-top: 3px solid var(--red);
  font-size: 0.6875rem;
  font-weight: 860;
  font-stretch: 118%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.2s var(--ease), scale 0.35s var(--ease);
  will-change: transform;
}
.cursor[data-on="true"] { opacity: 1; scale: 1; }
.has-cursor .plate__btn { cursor: none; }

/* ---------- motion: the wrap unrolls ---------- */
@keyframes lineIn { from { clip-path: inset(0 -2% 100% -2%); transform: translateY(0.28em); } to { clip-path: inset(-12% -2% -12% -2%); transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes wipeDown { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes plateIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero__title span { animation: lineIn 0.95s var(--ease) backwards; }
  .hero__title span:nth-child(2) { animation-delay: 0.1s; }
  .hero__title span:nth-child(3) { animation-delay: 0.2s; }
  .hero__lede { animation: fadeUp 0.8s var(--ease) 0.4s backwards; }
  .hero__act { animation: fadeUp 0.8s var(--ease) 0.52s backwards; }
  .stagebar { animation: fadeUp 0.8s var(--ease) 0.68s backwards; }
    .hero__door .ph { animation: wipeDown 1.25s var(--ease) 0.25s backwards; }
  .hero__door .ph img { animation: settle 1.9s var(--ease) 0.25s backwards; }
  .hero__door .sticker { animation: slideIn 0.7s var(--ease) 1.15s backwards; }
  .hero__door .cuts i { animation: fadeUp 0.6s var(--ease) 1.2s backwards; }

  /* photographs unroll when they arrive (same wipe as the hero and the build sequence) */
  .js [data-wipe] .ph { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease); }
  .js [data-wipe] .ph img { transform: scale(1.1); transition: transform 1.6s var(--ease); }
  .js [data-wipe].in .ph { clip-path: inset(0 0 0 0); }
  .js [data-wipe].in .ph img { transform: none; }
  .js [data-wipe] .sticker { opacity: 0; transform: translateX(-10px); transition: opacity 0.5s var(--ease) 0.6s, transform 0.6s var(--ease) 0.6s; }
  .js [data-wipe].in .sticker { opacity: 1; transform: none; }
  .js [data-wipe].in .ph img { transition-delay: 0s; }

  .plate.enter { animation: plateIn 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .plate__btn .ph img { transition: transform 0.9s var(--ease); }
  .plate__btn:hover .ph img { transform: scale(1.04); }
  .cta-tape { transition: border-color 0.25s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
  .link .arrow { transition: transform 0.35s var(--ease); }
  .link:hover .arrow { transform: translateX(5px); }

  ::view-transition-group(lbimg) { animation-duration: 0.55s; animation-timing-function: var(--ease); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
}
@media (prefers-reduced-motion: reduce) {
  .progress { transition: none; }
  .cursor { display: none; }
}

.footer-logo { display: inline-block; max-width: 300px; border: 1px solid rgba(255, 255, 255, 0.22); }
.footer-logo img { display: block; width: 100%; height: auto; }

.brand__mark--print { height: 52px; width: auto; border: 0; }
.brand--footer { gap: 18px; }
.site-footer .brand__mark--print { height: clamp(84px, 10vw, 120px); }
