/* Marc the Architect — website styles.
   Tokens follow the brand kit (01-brand-guidelines/tokens.css). */

/* Fonts are hosted with the site, so no visitor data goes to Google. Licenses in assets/fonts. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url("../fonts/archivo-black-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --surface: #ffffff;
  --concrete: #e8e6e1;
  --line: #dad8d2;
  --ink: #161716;
  --ink-muted: #5b5a55;
  --olive: #5f6650;
  --on-olive: #ffffff;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-wordmark: "Archivo Black", "Arial Black", sans-serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --page: 56px;
  --gap: 14px;
  --header: 76px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 900px) { :root { --page: 24px; --header: 64px; } }
@media (max-width: 600px) { :root { --page: 16px; --gap: 8px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* Phones: the quick flash when a link or button is tapped is a light olive instead of the default blue. */
* { -webkit-tap-highlight-color: rgba(95, 102, 80, .2); }
ul { list-style: none; }
::selection { background: var(--olive); color: var(--on-olive); }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: .92;
}
.wordmark {
  font-family: var(--font-wordmark);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}
.label {
  font: 600 11px/1.3 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-muted);
}
.h1 { font-size: clamp(52px, 8.4vw, 148px); }
.h2 { font-size: clamp(44px, 6.4vw, 112px); }
.h3 { font-size: clamp(30px, 3vw, 46px); }
.display.h3 { font-weight: 500; letter-spacing: -.01em; line-height: 1; }
.lead { font-size: clamp(18px, 1.6vw, 23px); line-height: 1.45; }
.muted { color: var(--ink-muted); }
.wrap { padding-inline: var(--page); }

/* Links to other pages: an olive box so they read clearly as clickable. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 13px 18px; color: var(--on-olive); background: var(--olive);
  transition: background .2s;
}
.link-arrow:hover { background: var(--ink); }
.link-arrow svg { width: 14px; transition: transform .2s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: #fff;
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--olive); }
.btn-olive { background: var(--olive); }
.btn-olive:hover { background: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-line:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--page);
  background: var(--surface);
  max-width: 100vw;
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, color .25s, transform .8s var(--ease-out), opacity .8s;
}
.site-header.scrolled { border-color: var(--line); }
.site-header.on-dark { background: transparent; color: #fff; border-color: transparent; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { width: 32px; height: auto; }
.brand .wordmark { font-size: 13px; }
.header-right { display: flex; align-items: center; gap: 40px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative; padding: 6px 0;
  font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; padding: 10px 0; }

@media (max-width: 900px) {
  .brand .wordmark { font-size: 12px; }
  .menu-btn { display: block; }
  .header-right { gap: 22px; }
  .nav {
    position: fixed; inset: var(--header) 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 20px var(--page) 40px;
    background: var(--surface); color: var(--ink);
    opacity: 0; pointer-events: none; transform: translateY(-10px);
    transition: opacity .25s, transform .3s var(--ease-out);
  }
  .nav a {
    font-family: var(--font-display); font-weight: 600;
    text-transform: uppercase; letter-spacing: -.02em;
    font-size: 52px; line-height: 1; padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .nav a::after { display: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; pointer-events: auto; transform: none; }
  body.menu-open .site-header { background: var(--surface); color: var(--ink); border-color: var(--line); }
}
@media (max-width: 420px) { .brand .wordmark { display: none; } }

/* ---------- Hero + intro (home) ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  background: var(--ink); color: #fff; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.8s var(--ease);
}
.hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-media video.on { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(22,23,22,.35) 0%, rgba(22,23,22,.05) 35%, rgba(22,23,22,.15) 60%, rgba(22,23,22,.6) 100%);
  transition: opacity 1.4s;
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }

.hero-content {
  position: absolute; left: var(--page); right: var(--page); bottom: clamp(28px, 5vw, 56px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  transition: opacity 1.2s .2s, transform 1.4s var(--ease-out) .2s;
}
.hero-content h1 { max-width: 12ch; }
.hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; text-align: right; }
.hero-meta .label { color: rgba(255,255,255,.8); }
.scroll-cue { display: flex; align-items: center; gap: 10px; }
@media (max-width: 600px) {
  .hero-content { flex-direction: column-reverse; align-items: flex-start; gap: 16px; bottom: 80px; }
  .hero-meta { align-items: flex-start; text-align: left; }
  .scroll-cue { display: none; }
}
.scroll-cue i { display: block; width: 1px; height: 40px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* intro state: small window, logo drawing, counter */
.intro-layer {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center;
}
.intro-mark { width: clamp(96px, 11vw, 150px); opacity: 0; transition: opacity .9s, transform 1.6s var(--ease); }
.intro-mark path {
  fill: #fff; fill-opacity: 0;
  stroke: #fff; stroke-width: 26;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.intro-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(28px, 6vh, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0; transition: opacity .8s;
}
.intro-foot .intro-name { color: #fff; font-size: 15px; }
.intro-count { font: 600 11px/1 var(--font-sans); letter-spacing: .14em; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.intro-skip {
  position: absolute; right: var(--page); top: 24px; pointer-events: auto;
  font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6);
  opacity: 0; transition: opacity .6s;
}
.intro-skip:hover { color: #fff; }

body.intro { overflow: hidden; }
body.intro .site-header { opacity: 0; transform: translateY(-100%); pointer-events: none; }
body.intro .whatsapp-float { opacity: 0; pointer-events: none; }
body.intro .hero-media { clip-path: inset(31% 35% 31% 35%); }
body.intro .hero-shade { opacity: 1; background: rgba(22,23,22,.42); }
body.intro .hero-content { opacity: 0; transform: translateY(40px); }
body.intro .intro-mark, body.intro .intro-foot, body.intro .intro-skip { opacity: 1; }
body.intro.draw .intro-mark path { animation: draw 2.4s var(--ease) forwards, ink .9s ease 2.1s forwards; }
body.intro.open .hero-media { clip-path: inset(0 0 0 0); }
body.intro.open .intro-mark { opacity: 0; transform: scale(.9); }
body.intro.open .intro-foot, body.intro.open .intro-skip { opacity: 0; }
@media (max-width: 700px) { body.intro .hero-media { clip-path: inset(33% 18% 33% 18%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink { to { fill-opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(88px, 11vw, 168px); }
.section-tight { padding-block: clamp(56px, 7vw, 104px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }

.studio .studio-mark { grid-column: 1 / 4; }
.studio .studio-mark svg { display: block; width: auto; height: clamp(56px, 5vw, 76px); color: var(--ink); }
@media (max-width: 900px) { .studio .studio-mark svg { height: auto; width: 64px; } }
.studio .studio-text { grid-column: 4 / 11; }
.studio .lead { margin-bottom: 36px; font-size: clamp(22px, 2.4vw, 36px); line-height: 1.3; }
.studio .body { color: var(--ink-muted); font-size: 17px; line-height: 1.7; margin-bottom: 20px; max-width: 40em; }
.studio .body + .link-arrow { margin-top: 20px; }
@media (max-width: 900px) {
  .studio .studio-mark, .studio .studio-text { grid-column: 1 / -1; }
  .studio .studio-mark { margin-bottom: 28px; }
}

/* ---------- Project grid (projects page + home) ---------- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px var(--gap); }
.pcard { display: block; }
.pcard .ph { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--concrete); }
/* Covers share one calm, warm monochrome tone; colour returns on hover. */
.pcard img, .next-proj img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.001);
  filter: grayscale(1) sepia(.14) contrast(.94) brightness(1.04);
  transition: transform 1.6s var(--ease-out), opacity .8s, filter .9s ease;
}
.pcard:hover img { transform: scale(1.06); }
.pcard:hover img, .pcard:focus-visible img, .next-proj:hover img { filter: none; }
.pcard .ph::after {
  content: ""; position: absolute; inset: 0; background: var(--ink); opacity: 0; transition: opacity .6s;
}
.pcard:hover .ph::after { opacity: .08; }
.pcard .cap {
  padding-top: 12px;
  font: 600 11px/1.3 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
}
.pcard .cap .meta { display: block; color: var(--ink-muted); margin-top: 4px; font-weight: 500; letter-spacing: .1em; }
.pgap { display: block; }
@media (max-width: 900px) { .pgrid { grid-template-columns: repeat(2, 1fr); gap: 28px var(--gap); } .pgap { display: none; } }

/* ---------- Full-bleed image with gentle motion ---------- */
.bleed { position: relative; height: 92vh; min-height: 480px; overflow: hidden; background: var(--ink); color: #fff; }
.bleed img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; will-change: transform; }
.bleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,23,22,0) 40%, rgba(22,23,22,.55)); }
.bleed .bleed-text { position: absolute; z-index: 1; left: var(--page); right: var(--page); bottom: clamp(32px, 5vw, 64px); }

/* ---------- Process teaser (home) ---------- */
.steps-teaser { border-top: 1px solid var(--line); }
.steps-teaser li {
  display: grid; grid-template-columns: 80px 1fr auto; align-items: baseline; gap: var(--gap);
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.steps-teaser .num { font: 600 11px/1 var(--font-sans); letter-spacing: .14em; color: var(--ink-muted); }
.steps-teaser .t { font-size: clamp(26px, 3vw, 44px); }
.how-teaser .grid12 > :first-child { grid-column: 1 / 5; }
.how-teaser .grid12 > :last-child { grid-column: 6 / -1; }
.how-teaser .lead { margin: 24px 0 32px; color: var(--ink-muted); max-width: 22em; }
@media (max-width: 900px) { .how-teaser .grid12 > * { grid-column: 1 / -1 !important; } .how-teaser .grid12 > :last-child { margin-top: 24px; } }

/* ---------- CTA (olive: one per page) ---------- */
.cta { margin: 0 var(--page) var(--gap); background: var(--olive); color: var(--on-olive); padding: clamp(48px, 7vw, 104px) clamp(24px, 5vw, 72px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; }
.cta p { font-size: clamp(17px, 1.4vw, 20px); max-width: 26em; opacity: .9; margin-bottom: 28px; }
.cta .btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer (black: one per page) ---------- */
.site-footer { background: var(--ink); color: #fff; margin: 0 var(--page) var(--page); padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 56px) 28px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: clamp(48px, 7vw, 96px); }
.footer-cols .label { color: rgba(255,255,255,.5); margin-bottom: 14px; }
.footer-cols a, .footer-cols p { display: block; font-size: 14px; line-height: 1.9; color: rgba(255,255,255,.9); }
.footer-cols a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-cols a.ig-link { display: inline-flex; align-items: center; gap: 10px; }
.footer-cols a.ig-link svg { width: 22px; height: 22px; flex: none; }
.footer-word { font-size: 7vw; line-height: .82; white-space: nowrap; overflow: hidden; padding-top: .06em; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; margin-top: 22px; border-top: 1px solid rgba(255,255,255,.15); }
.footer-base .label { color: rgba(255,255,255,.5); }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer-cols > div { min-width: 0; }
.footer-cols a, .footer-cols p { overflow-wrap: anywhere; }
@media (max-width: 600px) { .footer-cols > div:nth-child(2) { order: -1; grid-column: 1 / -1; } }
@media (max-width: 600px) { .site-footer { margin: 0 0 0; } .cta { margin-inline: 0; } .footer-base { flex-direction: column; } }

/* ---------- WhatsApp button ---------- */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 14px;
  background: var(--olive); color: #fff;
  font: 600 11px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background .3s, opacity .6s;
}
.whatsapp-float svg { width: 20px; height: 20px; }
.whatsapp-float:hover { background: var(--ink); }
@media (max-width: 600px) { .whatsapp-float { padding: 0; width: 48px; justify-content: center; right: 12px; bottom: 12px; } .whatsapp-float span { display: none; } }

/* ---------- Page heads ---------- */
.pagehead { padding-top: calc(var(--header) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(40px, 5vw, 72px); }
.pagehead .label { margin-bottom: 22px; }
.pagehead .row { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.pagehead h1 { grid-column: 1 / 9; }
.pagehead .lead { grid-column: 9 / -1; color: var(--ink-muted); font-size: 17px; line-height: 1.6; }
@media (max-width: 900px) { .pagehead h1, .pagehead .lead { grid-column: 1 / -1; } .pagehead .lead { margin-top: 20px; } }

/* ---------- Project detail ---------- */
.proj { display: grid; grid-template-columns: minmax(300px, 1fr) 2.3fr; gap: clamp(24px, 4vw, 64px); padding-top: calc(var(--header) + 40px); padding-bottom: clamp(64px, 8vw, 120px); }
.proj-info { position: sticky; top: calc(var(--header) + 40px); align-self: start; }
.proj-info .back { margin-bottom: 40px; }
.proj-info h1 { font-size: clamp(48px, 5.6vw, 96px); margin-bottom: 24px; }
.proj-info .desc { color: var(--ink-muted); max-width: 30em; }
.proj-info .desc.soon { font-style: italic; }
.facts { margin-top: 32px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { font: 600 11px/1.9 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { font-weight: 600; }
.proj-info .actions { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.gallery button { display: block; position: relative; overflow: hidden; background: var(--concrete); aspect-ratio: 4 / 5; cursor: zoom-in; }
.gallery button.wide { grid-column: span 2; aspect-ratio: 3 / 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.gallery button:hover img { transform: scale(1.04); }
.next-proj { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: end; margin: 0 var(--page) var(--gap); padding-top: 40px; border-top: 1px solid var(--line); }
.next-proj .ph { aspect-ratio: 16 / 9; overflow: hidden; background: var(--concrete); }
.next-proj:hover img { transform: scale(1.04); }
.next-proj .label { margin-bottom: 14px; }
@media (max-width: 900px) {
  .proj { grid-template-columns: 1fr; }
  .proj-info { position: static; }
  .next-proj { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } .gallery button, .gallery button.wide { grid-column: auto; aspect-ratio: 4 / 5; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(22,23,22,.97); color: #fff; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: calc(100vw - 2 * var(--page)); max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox .lb-bar { position: absolute; left: var(--page); right: var(--page); top: 22px; display: flex; justify-content: space-between; }
.lightbox .lb-bar .label { color: rgba(255,255,255,.7); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; }
.lightbox .lb-prev { left: 8px; } .lightbox .lb-next { right: 8px; }
.lightbox .lb-nav svg { width: 22px; }
.lightbox button { color: #fff; }

/* ---------- How we work: a list of steps, click a step to open it ---------- */
.steps { padding-top: 4px; }
.step { border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-head { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; align-items: center; gap: 12px; padding: 16px 0; text-align: left; }
.step-head .num { font: 600 11px/1 var(--font-sans); letter-spacing: .14em; color: var(--ink-muted); transition: color .4s; }
.step-head .t { font-size: clamp(26px, 2.6vw, 42px); color: var(--ink-muted); transition: color .4s; }
.step-head .pm { position: relative; width: 14px; height: 14px; justify-self: end; }
.step-head .pm::before, .step-head .pm::after { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: currentColor; transition: transform .5s var(--ease); }
.step-head .pm::after { transform: rotate(90deg); }
.step.open .step-head .t { color: var(--ink); }
.step.open .step-head .num { color: var(--olive); }
.step.open .step-head .pm::after { transform: rotate(0); }
.step-head:hover .t { color: var(--ink); }
.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.step.open .step-body { grid-template-rows: 1fr; }
.step-body > div { overflow: hidden; }
/* Open step: the text, then the points in two short columns. */
.step-inner { padding: 4px 0 28px 76px; }
.step-inner p { margin: 0; max-width: 56ch; line-height: 1.65; }
.step-inner ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.step-inner li { font-size: 14px; line-height: 1.45; padding: 8px 0; border-top: 1px solid var(--line); }
/* The photo beside the open step. */
.steps-grid { position: relative; display: grid; grid-template-columns: 1.3fr .75fr; gap: clamp(32px, 6vw, 96px); }
.steps-pic { position: relative; }
.steps-frame { position: absolute; left: 0; right: 0; overflow: hidden; background: var(--concrete); opacity: 0; transition: opacity .5s ease; }
.steps-frame.on { opacity: 1; }
.steps-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.steps-frame img.on { opacity: 1; }
/* Drawings on white paper are shown whole, never cropped, on a light olive ground that fills the frame.
   Multiply turns the white paper into the same olive tone, so the drawing sits directly on it. */
.steps-frame.white { background: #e4e6dc; }
.steps-frame img.contain { object-fit: contain; mix-blend-mode: multiply; }
/* Phones: the photo moves inside the open step, below the text. */
.step-pic-m { display: none; }
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-pic { display: none; }
  .step-pic-m { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin: 22px 0 4px; background: var(--concrete); }
  .step-pic-m.white { background: #e4e6dc; }
  .step-pic-m img { width: 100%; height: 100%; object-fit: cover; }
  .step-pic-m img.contain { object-fit: contain; mix-blend-mode: multiply; }
  .step-inner { padding-left: 0; }
  .step-inner ul { grid-template-columns: 1fr; }
  .step-head { grid-template-columns: 36px minmax(0, 1fr) 24px; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); }
.portrait { aspect-ratio: 4 / 5; background: var(--concrete); display: grid; place-items: center; align-self: start; }
.portrait svg { width: 30%; opacity: .14; }
.portrait .label { position: absolute; left: 16px; bottom: 16px; }
.about-blocks > div { display: grid; grid-template-columns: 160px 1fr; gap: var(--gap); padding: 28px 0; border-top: 1px solid var(--line); }
.about-blocks > div:first-child { border-top: 0; padding-top: 0; }
.about-blocks p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }
.elements { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.element { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--ink); color: #fff; }
.element video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 8s ease-out; }
.element video.on { opacity: 1; transform: scale(1); }
.element::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,23,22,.12) 0%, rgba(22,23,22,.05) 30%, rgba(22,23,22,.55) 55%, rgba(22,23,22,.88) 100%); }
.element-text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.element-text .h3 { margin-bottom: 10px; }
.element-text p { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.88); max-width: 22em; }
@media (max-width: 1100px) { .elements { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; }
  .about-blocks > div { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 600px) { .elements { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding-bottom: clamp(64px, 8vw, 120px); }
.contact-list { border-top: 1px solid var(--line); margin-top: 40px; }
.contact-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list a, .contact-list .place { font-weight: 600; }
.contact-list a:hover { color: var(--olive); }
.form-panel { background: var(--concrete); padding: clamp(24px, 4vw, 48px); }
.form-panel form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font: 600 11px/1.3 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.field input, .field textarea {
  font: 400 15px/1.5 var(--font-sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  padding: 14px; width: 100%; outline: none; transition: border-color .3s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.form-note { grid-column: 1 / -1; font-size: 14px; }
.form-note:empty { display: none; }
.form-panel input[aria-invalid=true] { border-color: #9a3b2e; box-shadow: inset 0 0 0 1px #9a3b2e; }
/* After sending: the thank-you note sits in the middle of the panel. */
.form-panel:has(form.sent) { display: flex; }
.form-panel form.sent { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.form-panel form.sent .form-note { font-size: 17px; text-align: center; max-width: 32ch; }
.hidden { display: none !important; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .form-panel form { grid-template-columns: 1fr; } .contact-list > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { overflow: hidden; }
.reveal-img img { transform: scale(1.12); transition: transform 2.2s var(--ease-out), filter .9s ease; }
.reveal-img.in img { transform: scale(1.001); }
.pcard.reveal-img.in:hover img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Simple text pages (privacy, 404) */
.textpage { max-width: 46em; padding-bottom: clamp(72px, 9vw, 128px); }
.textpage h2 { font: 700 13px/1.3 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; margin: 40px 0 10px; }
.textpage p, .textpage li { color: var(--ink-muted); margin-bottom: 10px; }
.textpage ul { list-style: disc; padding-left: 20px; }
.textpage a { color: var(--olive); border-bottom: 1px solid currentColor; }
.notfound { min-height: 78vh; padding-top: calc(var(--header) + 24px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; }
.notfound [data-mark] { width: clamp(72px, 9vw, 120px); }
.footer-base a { border-bottom: 1px solid currentColor; }

@media (max-width: 600px) { .site-header { padding-inline: 20px; } }
html, body { max-width: 100%; }
.hero, .hero-media { overflow: hidden; }

/* Very small phones (iPhone SE and similar) */
.nav { max-width: 100vw; }
@media (max-width: 900px) { .nav a { font-size: clamp(38px, 12vw, 52px); overflow-wrap: anywhere; } }
@media (max-width: 380px) {
  .step-head { grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 10px; }
  .step-head .t { font-size: 24px; }
}
@media (max-width: 600px) {
  .h1 { font-size: min(52px, calc((100vw - 32px) / 7.4)); }
}
@media (max-width: 380px) {
  .h1 { font-size: min(44px, calc((100vw - 32px) / 7.4)); }
  .h2 { font-size: 38px; }
  .section-head { flex-wrap: wrap; gap: 14px; }
}

/* ---------- Medium headlines: same face, quieter than the few giant ones ---------- */
.h-mid { font-size: clamp(34px, 4.4vw, 72px); }
.steps-teaser .t { font-size: clamp(22px, 2.1vw, 32px); }
.step-head .t { font-size: clamp(22px, 2vw, 32px); }

/* ---------- Project grids ---------- */
.pgrid { container-type: inline-size; }
/* Homepage: one large project across the full width, three below. */
.pgrid-feature { grid-template-columns: repeat(3, 1fr); }
.pgrid-feature .pcard.wide { grid-column: 1 / -1; }
.pgrid-feature .pcard.wide .ph { aspect-ratio: 21 / 9; }
/* Projects page: one wide photo plus two upright ones per row, exactly as tall as the upright ones. */
.pgrid-rhythm .pcard.wide { grid-column: span 2; }
.pgrid-rhythm .pcard.wide .ph { aspect-ratio: auto; height: calc((100cqw - 3 * var(--gap)) / 4 * 1.25); }
@media (max-width: 900px) {
  .pgrid-feature { grid-template-columns: repeat(2, 1fr); }
  .pgrid-feature .pcard:last-child { grid-column: 1 / -1; }
  .pgrid-feature .pcard:last-child .ph, .pgrid-feature .pcard.wide .ph { aspect-ratio: 3 / 2; }
  .pgrid-rhythm .pcard.wide .ph { height: auto; aspect-ratio: 3 / 2; }
}
/* Phones: the card in the middle of the screen shows its colours. */
@media (hover: none) { .pcard.lit img { filter: none; } }

/* ---------- Portrait ---------- */
.portrait { margin: 0; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.square { aspect-ratio: 1 / 1; }

/* ---------- Measured lines between sections (drawn like a dimension line) ---------- */
.dim { position: relative; height: 15px; color: var(--ink-muted); }
.dim i { position: absolute; display: block; background: currentColor; }
.dim .run { left: 0; right: 0; top: 7px; height: 1px; transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease-out); opacity: .55; }
.dim .ext { top: 0; width: 1px; height: 15px; opacity: 0; transition: opacity .5s ease; }
.dim .ext.l { left: 0; } .dim .ext.r { right: 0; }
.dim .tick { top: 2px; width: 1px; height: 11px; transform: rotate(45deg) scaleY(0); opacity: .9; transition: transform .45s var(--ease-out); }
.dim .tick.l { left: 0; } .dim .tick.r { right: 0; }
.dim.drawn .run { transform: scaleX(1); }
.dim.drawn .ext { opacity: .55; }
/* About: the line sits halfway between the nature squares and the next section. */
.dim-mid { margin-top: calc(clamp(88px, 11vw, 168px) * .66); }
.dim-mid + .section { padding-top: calc(clamp(88px, 11vw, 168px) * .34); }
.dim.drawn .ext.r { transition-delay: 1.2s; }
.dim.drawn .tick { transform: rotate(45deg) scaleY(1); }
.dim.drawn .tick.l { transition-delay: .2s; }
.dim.drawn .tick.r { transition-delay: 1.4s; }

/* ---------- Page not found: the logo draws itself ---------- */
.nf-draw { width: clamp(200px, 26vw, 320px); aspect-ratio: 1.2; }
.nf-draw svg { width: 100%; height: 100%; display: block; }
.nf-draw .lbl { font-family: var(--font-sans); font-weight: 600; letter-spacing: .06em; }
.dim { margin-block: clamp(28px, 3.5vw, 56px); }

/* ---------- Homepage: one photo across the full width, a calm pause between intro and projects ---------- */
.how-teaser h2 + .link-arrow { margin-top: clamp(24px, 3vw, 40px); }
