/* ==========================================================================
   Yemtech Construction — site styles
   Clean white editorial system: Host Grotesk + DM Mono, near-black ink,
   hairline rules, photos shown at their natural proportions.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f6f6f4;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --line: #e9e9e9;
  --line-2: #dcdcdc;
  --green: #1f6241;

  --f-sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-serif: "Fraunces", Georgia, "Times New Roman", serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --hdr-h: 72px;
  --r: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.6; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
address { font-style: normal; }
::selection { background: var(--ink); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 120px); }
.section--rule { padding-top: 0; }
.section--rule > .wrap:first-child { position: relative; padding-top: clamp(56px, 7vw, 96px); }
.section--rule > .wrap:first-child::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }
.section--soft { background: var(--soft); }

/* Type -------------------------------------------------------------------- */
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 10px; vertical-align: 2px; }
.t-xl { font-size: clamp(40px, 6.2vw, 80px); font-weight: 500; letter-spacing: -.04em; line-height: 1.02; margin: 0; }
.t-l  { font-size: clamp(30px, 3.6vw, 48px); font-weight: 500; letter-spacing: -.035em; line-height: 1.06; margin: 0; }
.t-m  { font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; margin: 0; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.lead { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.42; letter-spacing: -.02em; color: var(--ink); max-width: 36ch; margin: 0; }
.muted { color: var(--muted); }

/* Buttons & links --------------------------------------------------------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; letter-spacing: -.01em; cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--line:hover { background: var(--soft); border-color: var(--line-2); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.link { border-bottom: 1px solid var(--line-2); transition: border-color .2s; }
.link:hover { border-color: var(--ink); }
.more { font-family: var(--f-mono); font-size: 13px; color: var(--muted); transition: color .2s; white-space: nowrap; }
.more:hover, li:hover .more { color: var(--ink); }

/* Header ------------------------------------------------------------------ */
.hdr { position: sticky; top: 0; z-index: 40; height: var(--hdr-h); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.hdr.is-scrolled { border-color: var(--line); }
.hdr__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { flex: none; display: block; }
.brand img { width: 150px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav a:not(.btn):is(:hover, [aria-current="page"]) { color: var(--ink); }
.nav .btn { margin-left: 4px; }
.menu-btn { display: none; height: 38px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }

.menu { position: fixed; inset: var(--hdr-h) 0 0; z-index: 39; background: #fff; padding: 24px var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s; }
body.menu-open .menu { opacity: 1; visibility: visible; transform: none; }
body.menu-open { overflow: hidden; }
.menu__links { list-style: none; margin: 0; padding: 0; }
.menu__links a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.menu__links small { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.menu__links a[aria-current="page"] { color: var(--green); }
.menu__foot { display: grid; gap: 6px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }

/* Intro (home) ------------------------------------------------------------ */
.intro { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(40px, 5vw, 64px); }
.intro .label { margin-bottom: 28px; }
.intro__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-top: clamp(28px, 4vw, 48px); }
.intro__row .btns { justify-content: flex-end; }

/* Figures ----------------------------------------------------------------- */
.fig { margin: 0; }
.ph { overflow: hidden; border-radius: var(--r); }
.fig img { width: 100%; border-radius: var(--r); background: var(--soft); }
.fig figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.fig--zoom { cursor: zoom-in; }
.fig--zoom .ph { overflow: hidden; border-radius: var(--r); }
.fig--zoom img { transition: transform .8s var(--ease); }
.fig--zoom:hover img { transform: scale(1.02); }

/* Hero slideshow ---------------------------------------------------------- */
.show { margin: 0; }
.show-wrap { overflow: hidden; }
.show__stage { position: relative; width: 100%; height: clamp(240px, 32vw, 440px); border-radius: 0; background: var(--soft); clip-path: inset(0 var(--ix, var(--gutter)) round var(--ir, var(--r))); will-change: clip-path; }
.show figcaption { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.show__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: none; }
.show__stage img.is-on { opacity: 1; z-index: 2; transition: opacity 1.2s ease; }
.show__stage img.is-prev { opacity: 1; z-index: 1; }
.show__stage img.is-on, .show__stage img.is-prev { animation: kenburns 7.5s linear both; }
@keyframes kenburns { from { transform: scale(1.1); } to { transform: scale(1); } }
.show figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.show__ctl { display: inline-flex; align-items: center; gap: 12px; }
.show__btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; font-size: 14px; line-height: 1; display: grid; place-items: center; transition: background .2s, color .2s, border-color .2s; }
.show__btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.show__idx { min-width: 56px; text-align: center; }
.js .show[data-reveal] { opacity: 1; transform: none; }

/* Facts ------------------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(40px, 5vw, 64px); }
.facts > div { border-top: 1px solid var(--line); padding-top: 18px; }
.facts .num { font-family: var(--f-mono); font-size: 12px; color: var(--faint); display: block; margin-bottom: 10px; }
.facts strong { display: block; font-size: 18px; font-weight: 500; letter-spacing: -.015em; margin-bottom: 4px; }
.facts span:last-child { color: var(--muted); font-size: 15px; }

/* Section heads ----------------------------------------------------------- */
.sh { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.sh .label { margin-bottom: 16px; }
.sh p { margin: 0; color: var(--muted); max-width: 46ch; }

/* Statement --------------------------------------------------------------- */
.statement { font-size: clamp(30px, 4.4vw, 56px); font-weight: 400; letter-spacing: -.035em; line-height: 1.08; max-width: 20ch; margin: 0; }
.statement + p { margin-top: 24px; color: var(--muted); max-width: 52ch; font-size: 17px; }

/* Service list ------------------------------------------------------------ */
.list { position: relative; z-index: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 28px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.list li::before { content: ""; position: absolute; inset: 0 -14px; border-radius: 10px; background: var(--soft); opacity: 0; transition: opacity .2s; z-index: -1; }
.list li:hover::before { opacity: 1; }
.list__thumb { width: 96px; aspect-ratio: 4/3; border-radius: 6px; object-fit: cover; }
.list__title { display: grid; gap: 2px; }
.list__title b { font-size: 18px; font-weight: 500; letter-spacing: -.015em; }
.list__title small { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.list__desc { color: var(--muted); font-size: 15px; margin: 0; }
.list a.cover { position: absolute; inset: 0; z-index: 1; }

/* Split ------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split--rev .split__media { order: 2; }
.split__copy .label { margin-bottom: 16px; }
.split__copy .t-l { margin-bottom: 24px; }
.split__copy > p { color: var(--muted); font-size: 17px; max-width: 52ch; }
.split__copy .btn { margin-top: 8px; }
.split__media { position: sticky; top: calc(var(--hdr-h) + 24px); }

.checks { list-style: none; margin: 28px 0 32px; padding: 0; border-top: 1px solid var(--line); counter-reset: c; }
.checks li { display: grid; grid-template-columns: 36px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.checks li::before { counter-increment: c; content: counter(c, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; color: var(--faint); padding-top: 3px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.stats > div { border-top: 1px solid var(--line); padding-top: 18px; }
.stats b { display: block; height: 1em; font-size: clamp(36px, 4vw, 52px); font-weight: 500; letter-spacing: -.04em; line-height: 1; overflow: hidden; }
.stats > div > span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Project grid ------------------------------------------------------------ */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; }
.proj { display: block; text-align: left; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.proj .ph { overflow: hidden; border-radius: var(--r); background: var(--soft); }
.grid2, .grid3 { align-items: start; }
.proj .ph { aspect-ratio: 4 / 3; }
.proj img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; transition: transform .8s var(--ease); }
.proj:hover img { transform: scale(1.02); }
.proj__cap { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 14px; align-items: baseline; }
.proj__cap b { font-size: 18px; font-weight: 500; letter-spacing: -.015em; }
.proj__cap small { font-family: var(--f-mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.proj__cap span { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }

/* Masonry (natural proportions, no crop) ---------------------------------- */
.masonry { columns: 3 260px; column-gap: 20px; }
.masonry .fig { break-inside: avoid; margin-bottom: 28px; }

/* Steps ------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps > div { border-top: 1px solid var(--line); padding-top: 18px; }
.steps .num { font-family: var(--f-mono); font-size: 12px; color: var(--faint); display: block; margin-bottom: 28px; }
.steps h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; letter-spacing: -.015em; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

/* Tiles ------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-height: 230px; scroll-margin-top: calc(var(--hdr-h) + 24px); transition: border-color .3s, box-shadow .3s; }
.tile__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; padding-bottom: 28px; }
.tile__n { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.tile h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.tile.is-target { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(10,10,10,.06); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Timeline ---------------------------------------------------------------- */
.timeline { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.timeline b { font-family: var(--f-mono); font-weight: 400; font-size: 13px; color: var(--muted); }

/* Offices ----------------------------------------------------------------- */
.offices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.office { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.office address { color: var(--muted); }
.office dl { margin: 0; display: grid; grid-template-columns: 72px 1fr; gap: 6px 16px; font-size: 15px; }
.office dt { font-family: var(--f-mono); font-size: 12px; color: var(--faint); padding-top: 3px; }
.office dd { margin: 0; }

/* Page head --------------------------------------------------------------- */
.phead { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.phead__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.crumbs { display: flex; gap: 8px; margin-bottom: 28px; }
.crumbs a:hover { color: var(--ink); }
.phead .t-xl { margin-bottom: 28px; }
.phead .fig--portrait { max-width: 480px; justify-self: end; width: 100%; }

/* CTA --------------------------------------------------------------------- */
.cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.cta .statement { max-width: 18ch; }

/* Notice ------------------------------------------------------------------ */
.notice { background: var(--soft); border-radius: var(--r); padding: 18px 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Lightbox ---------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 250; background: rgba(255,255,255,.98); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox__nav { display: flex; justify-content: center; gap: 8px; padding: 16px; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lb-btn:hover { background: var(--soft); }
.lb-btn svg { width: 15px; height: 15px; }

/* Form -------------------------------------------------------------------- */
.estimate { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.estimate__aside { position: sticky; top: calc(var(--hdr-h) + 24px); }
.estimate__aside .label { margin-bottom: 16px; }
.estimate__aside .t-l { margin-bottom: 20px; }
.estimate__aside > p { color: var(--muted); }
.form { border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 36px); }
.fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.fs + .fs { margin-top: 40px; }
.fs legend { display: flex; gap: 12px; align-items: baseline; width: 100%; padding: 0 0 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 500; letter-spacing: -.015em; }
.fs legend span { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 500; }
.field label em { font-style: normal; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b6b6b' stroke-width='1.5'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,10,10,.06); }
.field input[type="file"] { min-height: 0; padding: 10px; }
.field input[type="file"]::file-selector-button { margin-right: 12px; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px; background: var(--soft); cursor: pointer; font-size: 13px; }
.field .consent { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--muted); cursor: pointer; }
.field .consent input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 2px 0 0; border-radius: 4px; accent-color: var(--ink); cursor: pointer; box-shadow: none; }
.form-note { font-size: 13px; color: var(--muted); margin: 0; }
.form__submit { margin-top: 28px; display: grid; gap: 12px; justify-items: start; }
.success { display: none; margin-bottom: 20px; padding: 14px 16px; border-radius: 10px; background: #eef6f0; color: var(--green); font-size: 15px; }
.success.show { display: block; }
.form-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.form-progress i { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.form-progress i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .4s var(--ease); }

/* Footer ------------------------------------------------------------------ */
.foot { border-top: 1px solid var(--line); padding-top: 56px; padding-bottom: 32px; font-size: 15px; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1.3fr; gap: 32px; }
.foot h4 { margin: 0 0 12px; font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.foot p, .foot address { color: var(--muted); margin: 0; }
.foot .brand img { width: 160px; margin-bottom: 16px; }
.foot__links { display: grid; gap: 4px; }
.foot__links a, .foot address a { color: var(--muted); transition: color .2s; }
.foot__links a:hover, .foot address a:hover { color: var(--ink); }
.foot__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.to-top { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.to-top:hover { color: var(--ink); }

/* Reveal ------------------------------------------------------------------ */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Headings rise word by word */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0s)); }
.js [data-split].is-in .w > span { transform: none; }

/* Photos unveil: wipe up + settle */
.js .fig[data-reveal], .js .proj[data-reveal] { opacity: 1; transform: none; }
.js .fig[data-reveal] .ph, .js .proj[data-reveal] .ph { clip-path: inset(14% 0 0 0 round var(--r)); transition: clip-path 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .fig[data-reveal] .ph img, .js .proj[data-reveal] .ph img { transform: scale(1.12); transition: transform 1.6s var(--ease), opacity .3s; transition-delay: var(--d, 0s); }
.js .fig[data-reveal] figcaption, .js .proj[data-reveal] .proj__cap { opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease) .25s, transform .7s var(--ease) .25s; }
.js .fig.is-in .ph, .js .proj.is-in .ph { clip-path: inset(0 0 0 0 round var(--r)); }
.js .fig.is-in .ph img, .js .proj.is-in .ph img { transform: none; }
.js .fig.is-in figcaption, .js .proj.is-in .proj__cap { opacity: 1; transform: none; }
.js .fig--zoom.is-in:hover .ph img, .js .proj.is-in:hover .ph img { transform: scale(1.035); transition-delay: 0s; transition-duration: .8s; }

/* Rules draw in from the left */
.js .facts > div, .js .stats > div, .js .steps > div, .js .office { border-top-color: transparent; position: relative; }
.js .facts > div::before, .js .stats > div::before, .js .steps > div::before, .js .office::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease), background .3s; transition-delay: var(--d, 0s);
}
.js .is-in.facts > div::before, .js .facts > div.is-in::before, .js .stats > div.is-in::before, .js .steps > div.is-in::before, .js .office.is-in::before { transform: scaleX(1); }
.steps > div:hover::before { background: var(--ink); }
.steps > div .num { transition: color .3s; }
.steps > div:hover .num { color: var(--ink); }

/* Header hides on scroll down, returns on scroll up */
.hdr { transition: border-color .3s, transform .45s var(--ease); }
.hdr.is-hidden { transform: translateY(-100%); }

/* Nav underline */
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav a:not(.btn):is(:hover, [aria-current="page"])::after { transform: scaleX(1); transform-origin: left; }

/* Buttons: soft fill + magnetic nudge (set by JS) */
.btn { position: relative; overflow: hidden; isolation: isolate; translate: var(--mx, 0) var(--my, 0); transition: background .25s, color .25s, border-color .25s, translate .35s var(--ease), opacity .8s var(--ease), transform .8s var(--ease); }
.btn--line::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .45s var(--ease); }
.btn--line:hover { color: #fff; border-color: var(--ink); background: transparent; }
.btn--line:hover::before { transform: none; }

/* Tiles & list rows */
.tile { transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease); }
.tile:hover { border-color: var(--line-2); box-shadow: 0 18px 40px -24px rgba(10,10,10,.25); transform: translateY(-3px); }
.tile .pill::before, .pill::before { transition: transform .3s var(--ease); }
.tile:hover .pill::before { transform: scale(1.6); }
.list__title b { transition: transform .4s var(--ease); }
.list li:hover .list__title b { transform: translateX(6px); }
.list__thumb { transition: transform .5s var(--ease); }
.list li:hover .list__thumb { transform: scale(1.06) rotate(-1.5deg); }
.link { background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 1px no-repeat; transition: background-size .4s var(--ease), border-color .2s; }
.link:hover { background-size: 100% 1px; border-color: transparent; }

/* Floating preview for the service list */
.preview { position: fixed; left: 0; top: 0; z-index: 30; width: 280px; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .3s, transform .45s var(--ease); box-shadow: 0 24px 50px -20px rgba(10,10,10,.35); }
.preview.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.preview img.is-on { opacity: 1; }

/* Cursor label over photos */
.cursor { position: fixed; left: 0; top: 0; z-index: 60; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; pointer-events: none; transform: scale(0); transition: transform .35s var(--ease); }
.cursor.is-on { transform: scale(1); }

/* Page enter / leave */
.js main { animation: page-in .6s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.is-leaving main, body.is-leaving .foot { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }

/* Lightbox slide change */
.lightbox__stage img { transition: opacity .3s ease, transform .4s var(--ease); }
.lightbox__stage img.is-swapping { opacity: 0; transform: scale(.985); }
.lightbox.is-open .lightbox__stage img { animation: lb-in .45s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* Photo loading shimmer (removed once the image has loaded) */
.ph:not(.is-loaded), .show__stage:not(.is-loaded) { background: linear-gradient(100deg, var(--soft) 30%, #ececea 50%, var(--soft) 70%) 0 0 / 220% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* Scroll parallax inside photo frames (set by JS via --py) */
[data-par] .ph img, [data-par].ph img { scale: 1.08; translate: 0 var(--py, 0px); }

/* Project cards: soft 3D tilt toward the cursor */
.proj .ph { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js .proj[data-reveal] .ph { transition: clip-path 1.2s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s), 0s; }

/* Card spotlight that follows the cursor */
.tile { position: relative; overflow: hidden; isolation: isolate; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), rgba(31,98,65,.08), transparent 60%); }
.tile:hover::after { opacity: 1; }

/* Closing statements darken word by word as you scroll */
.statement[data-scrub] .w > span { color: #c9c9c9; transition: transform .9s var(--ease), color .35s ease; transition-delay: calc(var(--i, 0) * 45ms), 0s; }
.statement[data-scrub] .w.lit > span { color: var(--ink); }


/* Button arrow loops on hover */
.btn:hover .arr { transform: none; animation: arrow-loop .55s var(--ease); }
@keyframes arrow-loop { 0% { transform: none; } 45% { transform: translateX(140%); opacity: 0; } 46% { transform: translateX(-140%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.btn .arr { display: inline-block; }

/* Mobile menu links slide in one by one */
.menu__links li { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--i, 0) * 50ms + .05s); }
body.menu-open .menu__links li { opacity: 1; transform: none; }

/* Logo and back-to-top micro-interactions */
.brand img { transition: opacity .25s; }
.brand:hover img { opacity: .7; }
.to-top { display: inline-flex; gap: 6px; }
.to-top:hover { animation: nudge-up .6s var(--ease); }
@keyframes nudge-up { 40% { transform: translateY(-4px); } }

/* ======================================================================
   Bold layer
   ====================================================================== */

/* Home headline: letters flip up one by one, then lift near the cursor */
[data-chars] .w { overflow: visible; perspective: 700px; }
[data-chars] .w > span { transform: none !important; }
[data-chars] .c { display: inline-block; transform-origin: 50% 100%; transform: translateY(70%) rotateX(-85deg); opacity: 0; translate: 0 var(--lift, 0px); transition: transform 1s var(--ease), opacity .6s ease, translate .35s var(--ease), color .3s; transition-delay: calc(var(--ci, 0) * 26ms + .1s), calc(var(--ci, 0) * 26ms + .1s), 0s, 0s; }
[data-chars].is-in .c { transform: none; opacity: 1; }
[data-chars] .c.is-near { color: var(--green); }

/* Photo trail in the home intro */
.intro { position: relative; isolation: isolate; }
.intro > .wrap { position: relative; z-index: 2; }
.trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.trail img { position: absolute; width: clamp(140px, 14vw, 220px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 20px 40px -18px rgba(10,10,10,.4); translate: -50% -50%; rotate: var(--r, 0deg); animation: trail-pop 1.1s var(--ease) forwards; }
@keyframes trail-pop {
  0% { opacity: 0; scale: .3; }
  14% { opacity: 1; scale: 1; }
  65% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: .85; translate: -50% -30%; }
}

/* Selected work: pinned section, cards slide sideways as you scroll */
.hs { position: relative; }
.hs__sticky { padding-block: clamp(72px, 9vw, 120px); }
.hs__track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; padding-inline: var(--gutter); max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; }
.hs__end { display: none; }
@media (min-width: 981px) {
  .js .hs.is-pinned { height: var(--hs-h, 300vh); }
  .js .hs.is-pinned .hs__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-block: 0; }
  .js .hs.is-pinned .hs__sticky .sh { margin-bottom: clamp(24px, 3vw, 40px); }
  .js .hs.is-pinned .hs__track { display: flex; align-items: flex-start; gap: 28px; max-width: none; margin: 0; padding-inline: var(--hs-pad, var(--gutter)); width: max-content; transform: translate3d(var(--hx, 0px), 0, 0) skewX(var(--skew, 0deg)); will-change: transform; }
  .js .hs.is-pinned .hs__track .proj { width: min(40vw, 560px); flex: none; }
  .js .hs.is-pinned .hs__end { display: flex; flex-direction: column; justify-content: space-between; width: min(28vw, 380px); aspect-ratio: 3 / 4; flex: none; padding: 28px; border-radius: var(--r); background: var(--ink); color: #fff; transition: background .3s; }
  .hs__end .label { color: rgba(255,255,255,.6); }
  .hs__end b { font-size: clamp(28px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
  .hs__arrow { font-size: 40px; line-height: 1; transition: transform .5s var(--ease); }
  .hs__end:hover { background: var(--green); }
  .hs__end:hover .hs__arrow { transform: translateX(10px) rotate(-45deg); }
  .hs__bar { position: absolute; left: var(--hs-pad, var(--gutter)); right: var(--hs-pad, var(--gutter)); bottom: 40px; height: 1px; background: var(--line); }
  .hs__bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--hp, 0)); }
}

/* Photo grids lean with fast scrolling */
.masonry, .grid3 { transform: skewY(var(--skew-y, 0deg)); transform-origin: center; will-change: transform; }

/* Stats odometer */
.odo { display: inline-flex; vertical-align: top; }
.odo span { margin: 0; font: inherit; color: inherit; letter-spacing: 0; }
.odo__col { display: block; height: 1em; overflow: hidden; line-height: 1; }
.odo__col > span { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -1em)); transition: transform 1.8s var(--ease); transition-delay: calc(var(--k, 0) * 120ms); }
.odo__col > span > span { display: block; height: 1em; line-height: 1; }

/* Rolling text on hover (nav links and buttons) */
.roll { display: inline-grid; overflow: hidden; vertical-align: top; line-height: 1.3; height: 1.3em; }
.roll > span { grid-area: 1 / 1; transition: transform .5s var(--ease); }
.roll > span:last-child { transform: translateY(105%); }
a:hover > .roll > span:first-child, button:hover > .roll > span:first-child { transform: translateY(-105%); }
a:hover > .roll > span:last-child, button:hover > .roll > span:last-child { transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 980px) {
  :root { --hdr-h: 64px; }
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .intro__row, .sh, .split, .phead__grid, .estimate { grid-template-columns: 1fr; }
  .intro__row .btns { justify-content: flex-start; }
  .sh { gap: 16px; }
  .split--rev .split__media { order: 0; }
  .split__media, .estimate__aside { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .list li { grid-template-columns: 80px minmax(0, 1fr) auto; }
  .list__thumb { width: 80px; }
  .list__desc { grid-column: 2 / -1; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .phead .fig--portrait { justify-self: start; }
  .show__stage { height: 62vw; }
}
@media (max-width: 640px) {
  .facts, .stats, .steps, .tiles, .tiles--2, .grid2, .grid3, .offices, .fields, .foot__grid { grid-template-columns: 1fr; }
  .facts, .stats { gap: 0; }
  .facts > div, .stats > div { padding-bottom: 18px; }
  .list li { grid-template-columns: 72px 1fr; gap: 16px; }
  .list__thumb { width: 72px; }
  .list .more { display: none; }
  .list__desc { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .foot__bottom { flex-direction: column; }
  .brand img { width: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation: none !important; }
  .js [data-reveal], .js [data-split] .w > span, .js .ph img, .js figcaption, .js .proj__cap { opacity: 1 !important; transform: none !important; }
  .js .ph, .js .show__stage { clip-path: none !important; }
  .js .facts > div::before, .js .stats > div::before, .js .steps > div::before, .js .office::before { transform: none !important; }
  .preview, .cursor { display: none; }
  [data-par] .ph img, [data-par].ph img { scale: 1; translate: none; }
  .show__stage { clip-path: inset(0 var(--gutter) round var(--r)); }
  .trail { display: none !important; }
  [data-chars] .c, .odo__col > span { transform: none !important; opacity: 1 !important; }
  .hs__track { transform: none !important; }
  .roll > span:last-child { display: none; }
  .proj .ph { transform: none; }
  .menu__links li { opacity: 1; transform: none; }
  .statement[data-scrub] .w > span { color: var(--ink); }
}
