/* ==========================================================
   SAMAIA Studio — main stylesheet
   ========================================================== */
:root {
  --limestone: #E3E1DA;
  --stone: #CBC6BA;
  --ink: #1F2421;
  --ink-soft: #5B5F59;
  --paper: #F3F1EA;
  --line: rgba(31, 36, 33, .22);
  --accent: #B0703F;
  --brand: #67031B;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 2vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Mask / line reveal helpers ---------- */
.mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.mask > span { display: block; will-change: transform; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--gutter);
  pointer-events: none;
  color: #fff;
}
.site-header .nav, .site-header .menu-toggle { mix-blend-mode: difference; }
.site-header > * { pointer-events: auto; }
.logo { display: block; width: 58px; transition: width .45s var(--ease); }
.logo svg { display: block; width: 100%; height: auto; fill: var(--brand); }
.nav { display: flex; align-items: center; gap: 30px; font-size: 13.5px; font-weight: 700; letter-spacing: .01em; }
.nav a { position: relative; opacity: .7; transition: opacity .3s; }
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; font-size: 12px; font-weight: 600; }
/* Contact: the menu sits on the light paper half, so it turns solid ink for contrast (desktop) */
@media (min-width: 901px) {
  .contact-page .site-header .nav { mix-blend-mode: normal; color: var(--ink); }
  .contact-page .site-header .nav a { opacity: .55; }
  .contact-page .site-header .nav a:hover, .contact-page .site-header .nav a.is-active { opacity: 1; }
}

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  display: grid; grid-template-columns: 1fr 1fr;
}
.curtain__half { background: var(--stone); transform: translateY(0); will-change: transform; }
.curtain__fill {
  position: fixed; inset: 0; z-index: 201; pointer-events: none;
  background: var(--accent); transform: translateY(100%);
}
.is-leaving { pointer-events: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 300; background: var(--limestone);
  display: grid; place-items: center;
}
.preloader__mark { width: min(24vw, 230px); }
.preloader__mark svg { width: 100%; height: auto; overflow: visible; }
.preloader__mark path { fill: var(--limestone); stroke: rgba(31,36,33,.25); stroke-width: 1.2; filter: url(#emboss); }
.preloader__side {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--ink-soft);
}
.preloader__side--l { left: 18vw; }
.preloader__side--r { right: 18vw; }
.preloader__count {
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  font-family: var(--display); font-size: 12px; font-weight: 600;
}
.preloader__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }

/* ==========================================================
   HOME — split slideshow
   ========================================================== */
.home { height: 100vh; height: 100svh; overflow: hidden; position: relative; touch-action: none; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
body[data-page="home"] { overflow: hidden; overscroll-behavior: none; }
html:has(body[data-page="home"]) { overscroll-behavior: none; }
.home .home-card { cursor: pointer; }
.split { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.split__col { position: relative; overflow: hidden; }
.split__img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path, transform;
}
.split__img.is-current { clip-path: inset(0 0 0 0); }

.split__img { clip-path: inset(0 0 100% 0); }
.split__img.is-base { clip-path: none; }

.home-cards {
  position: absolute; left: 50%; top: 50%; z-index: 10;
  /* explicit height instead of aspect-ratio: iOS Safari derived the width from min-height and pushed the card off screen */
  width: min(732px, 86vw); height: max(118px, calc(min(732px, 86vw) * 0.2186)); max-width: calc(100vw - 32px);
  transform: translate(-50%, -50%);
}
.home-card {
  position: absolute; inset: 0; display: block; overflow: hidden;
  background: var(--card, var(--accent)); color: var(--ink);
  clip-path: inset(100% 0 0 0);
}
.home-card.is-base { clip-path: none; }
/* paper grain inside the card */
.home-card::after, .card__panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; mix-blend-mode: soft-light; opacity: .8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.home-card__inner { position: relative; z-index: 2; height: 100%; padding: 22px 26px 20px 26px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; }
.home-card__title { font-family: var(--display); font-weight: 800; font-stretch: 88%; font-size: clamp(19px, 1.75vw, 26px); line-height: 1.02; letter-spacing: -.025em; max-width: 13ch; }
.home-card__arrow { position: absolute; top: 11px; right: 12px; width: 10px; height: 10px; transition: transform .4s var(--ease); }
.home-card:hover .home-card__arrow { transform: translate(2px, -2px); }
.home-card__meta { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; font-size: 13px; font-weight: 500; line-height: 1.45; }
.home-card__meta-r { text-align: right; }
.home-card__stamp {
  position: absolute; left: 50%; top: 50%; z-index: 1; height: 80%; aspect-ratio: 437 / 446;
  transform: translate(-50%, -50%); pointer-events: none;
}
.home-card__stamp svg { display: block; width: 100%; height: 100%; overflow: visible; }
.home-card__stamp svg { filter: url(#bevel); }
.home-card__stamp path { fill: var(--card, var(--accent)); }
.home-hint { position: absolute; left: 50%; bottom: var(--gutter); transform: translateX(-50%); margin: 0; font-size: 11px; font-weight: 600; color: #fff; mix-blend-mode: difference; z-index: 12; }

/* Film grain over the whole site */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 150; pointer-events: none; opacity: .09;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ==========================================================
   PROJECTS
   ========================================================== */
.projects-hero { height: 112vh; padding: 17vh var(--gutter) 0; position: relative; }
.big-title {
  font-family: var(--display); font-weight: 200; font-stretch: 80%;
  font-size: clamp(38px, 5.4vw, 92px); line-height: .9; letter-spacing: -.035em;
  text-align: center; margin: 0; text-transform: uppercase;
}

.filters {
  position: fixed; left: 50%; top: 52vh; z-index: 45; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 16px 22px; background: var(--stone); will-change: top;
}
.filters { transition: filter .35s; }
.filters.is-away { filter: opacity(0); pointer-events: none; }
.filters button { font-size: 12px; font-weight: 500; padding: 4px 10px; position: relative; color: var(--ink); opacity: .75; transition: opacity .3s; }
.filters button.is-active, .filters button:hover { opacity: 1; }
.filters button.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 1px; background: var(--ink); }

.rows { padding: 0 .55vw 16vh; display: flex; flex-direction: column; gap: 3.2vw; }
.row { display: grid; gap: .55vw; }
.row--3 { grid-template-columns: repeat(3, 1fr); }
.row--4 { grid-template-columns: repeat(4, 1fr); }
.card { position: relative; display: block; }
.card__media { position: relative; overflow: hidden; background: var(--stone); }
.row--3 .card__media { aspect-ratio: 1 / 1.18; }
.row--4 .card__media { aspect-ratio: 1 / 1.1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__panel {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%; min-height: 96px;
  transform: translateY(101%); transition: transform .8s var(--ease);
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px;
}
.card:hover .card__panel, .card:focus-visible .card__panel { transform: translateY(0); }
.card__panel-title { font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: clamp(16px, 1.4vw, 22px); line-height: 1; letter-spacing: -.015em; }
.card__panel-meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; }
.card__panel .home-card__stamp { width: auto; height: 74%; }
.card__panel { z-index: 1; }
.card__panel > span:not(.home-card__stamp) { position: relative; z-index: 2; }
.card__caption { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; padding-top: 10px; }
.card__caption span:last-child { font-weight: 500; color: var(--ink-soft); }
.card.is-morphing { visibility: hidden; }

.morph { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.morph__item { position: absolute; left: 0; top: 0; background-size: cover; background-position: center; will-change: transform, width, height; }

/* Form fields (footer newsletter) */
.site-foot .field { position: relative; margin-top: 18px; }
.site-foot .field input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  font: inherit; font-size: 12px; padding: 8px 26px 8px 0; color: var(--ink); border-radius: 0;
}
.site-foot .field label { position: absolute; left: 0; top: 8px; font-size: 11px; font-weight: 600; transition: transform .4s var(--ease), opacity .4s; pointer-events: none; }
.site-foot .field input:focus + label, .site-foot .field input:not(:placeholder-shown) + label { transform: translateY(-18px); opacity: .6; }
.site-foot .field input:focus { outline: none; border-bottom-width: 2px; }
.site-foot .form-status { font-size: 11px; margin: 8px 0 0; min-height: 16px; }

/* Shared footer */
.site-foot { position: relative; background: var(--limestone); }
.site-foot__top { display: flex; justify-content: space-between; align-items: flex-end; padding: 8vh 2.5vw 4vh; gap: 24px; }
.site-foot__lead { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.08; letter-spacing: -.015em; max-width: 22ch; margin: 0; }
.site-foot__links { display: flex; gap: 42px; font-size: 11px; font-weight: 700; }
.site-foot__links a { display: inline-flex; gap: 8px; align-items: center; }
.site-foot__links svg { width: 7px; transition: transform .4s var(--ease); }
.site-foot__links a:hover svg { transform: translate(2px, -2px); }
.site-foot__field { position: relative; height: 50vh; min-height: 360px; overflow: hidden; }
.site-foot__field svg.pattern { position: absolute; inset: 0; width: 100%; height: 100%; }
.site-foot__frame {
  position: absolute; left: 33%; top: 8%; width: 34%; height: 84%;
  display: grid; grid-template-columns: 1fr 1fr; background: var(--limestone);
  box-shadow: inset 0 0 0 1px var(--line); padding: 3%;
}
.site-foot__news { background: var(--stone); padding: 22px; display: flex; flex-direction: column; }
.site-foot__news h2 { font-family: var(--display); font-size: 15px; font-weight: 700; margin: 0 0 auto; }
.site-foot__news .field { margin-top: 0; }
.field__go { position: absolute; right: 0; top: 6px; width: 16px; height: 16px; }
.field__go svg { width: 8px; }
.site-foot__place { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; font-size: 11px; font-weight: 700; }
.site-foot__place svg { width: 40%; overflow: visible; }
.site-foot__place path { fill: var(--limestone); filter: url(#emboss); }
.site-foot__place p { margin: 0; line-height: 1.3; }
.site-foot__rule { width: 1px; height: 26px; background: var(--ink); opacity: .5; }
.site-foot__bar { display: flex; gap: 40px; padding: 18px 1vw; font-size: 10px; font-weight: 700; }
.site-foot__bar span:last-child { margin-left: auto; }

/* ==========================================================
   PROJECT (horizontal)
   ========================================================== */
.project-page { background: var(--paper); }
.hscroll { height: 100vh; height: 100svh; overflow: hidden; position: relative; }
.htrack { display: flex; height: 100%; width: max-content; will-change: transform; }
.panel { height: 100%; flex: 0 0 auto; position: relative; }

.p-intro { width: 29vw; min-width: 340px; background: var(--accent); padding: 13vh 2.6vw 3vh; display: flex; flex-direction: column; }
.p-intro__meta { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; width: 100%; max-width: 250px; margin: 0 auto 10px; }
.p-intro__frame { position: relative; width: 100%; max-width: 250px; aspect-ratio: 5/6; margin: 0 auto; }
.p-intro__frame i { position: absolute; background: currentColor; opacity: .55; }
.p-intro__frame .t, .p-intro__frame .b { left: -8px; right: -8px; height: 1px; transform: scaleX(0); }
.p-intro__frame .l, .p-intro__frame .r { top: -8px; bottom: -8px; width: 1px; transform: scaleY(0); }
.p-intro__frame .t { top: -8px; transform-origin: left; } .p-intro__frame .b { bottom: -8px; transform-origin: right; }
.p-intro__frame .l { left: -8px; transform-origin: bottom; } .p-intro__frame .r { right: -8px; transform-origin: top; }
.p-intro__frame img { width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); }
.p-intro__tag { font-size: 12px; font-weight: 600; text-align: center; max-width: 250px; margin: 16px auto 0; line-height: 1.35; }
.p-intro__name {
  margin-top: auto; font-family: var(--display); font-weight: 200; font-stretch: 85%;
  font-size: clamp(44px, 4.8vw, 92px); line-height: .88; letter-spacing: -.04em;
}

.p-hero { width: 50vw; overflow: hidden; }
.p-hero img, .p-shot img { width: 100%; height: 100%; object-fit: cover; }
.p-hero img { transform-origin: center; }

.p-text { width: 36vw; min-width: 380px; padding: 13vh 3vw 3vh 2.6vw; display: flex; flex-direction: column; }
.p-text__lead { font-family: var(--display); font-weight: 600; font-size: clamp(16px, 1.45vw, 24px); line-height: 1.12; text-transform: uppercase; letter-spacing: -.005em; max-width: 22ch; margin: 0; }
.services { list-style: none; margin: 7vh 0 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.services li::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--ink); transform: rotate(45deg); flex: none; }
.services li span { margin-left: auto; color: var(--ink-soft); font-size: 11px; }
.p-text__area { margin-top: auto; font-family: var(--display); font-weight: 500; font-size: clamp(80px, 10vw, 170px); line-height: .8; letter-spacing: -.05em; display: flex; align-items: flex-start; }
.p-text__area sup { font-size: .16em; letter-spacing: 0; margin: .5em 0 0 .2em; }

.p-gallery { display: flex; align-items: center; gap: 2.2vw; padding: 0 4vw; }
.p-shot { position: relative; overflow: hidden; flex: none; }
.p-shot { background: var(--ink); }
.p-shot--a { width: 20vw; height: 100vh; margin-left: -4vw; }
.p-shot--b { width: 14vw; height: 44vh; align-self: flex-start; margin-top: 20vh; }
.p-shot--c { width: 14vw; height: 84vh; }
.p-shot--d { width: 12vw; height: 44vh; }
.p-shot--e { width: 44vw; height: 82vh; }
.p-shot img { width: 120%; max-width: none; margin-left: -10%; }
/* Gallery items at natural proportions: height sets the size, width follows the image ratio */
.p-shot.g-item { width: auto; aspect-ratio: var(--ar); }
.p-shot.g-item img { width: 100%; margin-left: 0; }
.g-port.g-big { height: 80vh; } .g-port.g-small { height: 60vh; }
.g-land.g-big { height: 66vh; } .g-land.g-small { height: 50vh; }
.g-sq.g-big { height: 70vh; }   .g-sq.g-small { height: 54vh; }
.g-top { align-self: flex-start; margin-top: 11vh; }
.g-bottom { align-self: flex-end; margin-bottom: 11vh; }

.p-next { width: 70vw; display: grid; grid-template-columns: 1fr 1fr; background: var(--limestone); }
.p-next__text { padding: 13vh 3vw 3vh; display: flex; flex-direction: column; }
.p-next__label { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.p-next__name { margin-top: auto; font-family: var(--display); font-weight: 200; font-stretch: 85%; font-size: clamp(48px, 6vw, 104px); line-height: .88; letter-spacing: -.04em; }
.p-next__cta { display: inline-flex; margin-top: 24px; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--ink); width: max-content; padding-bottom: 4px; }
.p-next__media { overflow: hidden; position: relative; }
.p-next__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.p-next:hover .p-next__media img { transform: scale(1.04); }

.hprogress { position: fixed; left: 0; bottom: 0; height: 2px; background: var(--ink); width: 100%; transform: scaleX(0); transform-origin: left; z-index: 60; }
.scroll-hint { position: fixed; right: var(--gutter); bottom: var(--gutter); z-index: 60; font-size: 11px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.scroll-hint i { width: 26px; height: 1px; background: currentColor; display: block; }

/* ==========================================================
   CONTACT — split screen with a frame across the middle
   ========================================================== */
.contact-page { background: var(--paper); overflow: hidden; }
.ct { position: relative; height: 100vh; height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.ct__media { position: relative; overflow: hidden; background: var(--stone); }
.ct__slides, .ct__slide { position: absolute; inset: 0; }
.ct__slide { background-size: cover; background-position: center; clip-path: inset(0 0 0 0); }
.ct__foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 48px; padding: 0 2.5vw 3.2vh 1.2vw;
  font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 12px rgba(0,0,0,.18);
}
.ct__foot-icon { width: 10px; height: 10px; margin-left: 12vw; }
.ct__foot span:last-child { margin-left: auto; }

.ct__info { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 41.7vh 0 0 30%; text-align: center; }
.ct__title { font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: 15px; letter-spacing: -.01em; margin: 0 0 6vh; }
.ct__line { font-size: 14px; line-height: 1; margin-bottom: 2.6vh; position: relative; }
.ct__line::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.ct__line:hover::after { transform: scaleX(1); transform-origin: left; }

.ct__frame {
  position: absolute; z-index: 5; left: 34.8vw; top: 31.5vh; width: 30.2vw; height: 37.5vh; min-width: 460px; min-height: 300px;
  display: grid; grid-template-columns: calc(50vw - 34.8vw - 20px) 1fr; padding: 14px 0 14px 20px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.55),
    inset 3px 3px 0 2px rgba(31,36,33,.06),
    0 0 0 1px rgba(31,36,33,.05);
}
.ct__frame::before { content: ""; position: absolute; inset: 5px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 1px 1px 0 rgba(31,36,33,.05); }
.ct__news { background: #D9D3C8; padding: 13% 16% 12%; display: flex; flex-direction: column; position: relative; }
.ct__news h2 { font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: 15px; letter-spacing: -.01em; margin: 0 0 auto; }
.ct__field { position: relative; border-bottom: 1px solid var(--ink); }
.ct__field input { width: 100%; background: transparent; border: 0; font: inherit; font-size: 11px; padding: 8px 22px 10px 0; color: var(--ink); border-radius: 0; }
.ct__field input:focus { outline: none; }
.ct__field label { position: absolute; left: 0; top: 8px; font-size: 11px; font-weight: 500; transition: transform .4s var(--ease), opacity .4s; pointer-events: none; }
.ct__field input:focus + label, .ct__field input:not(:placeholder-shown) + label { transform: translateY(-18px); opacity: .55; }
.ct__field button { position: absolute; right: 0; top: 0; width: 18px; height: 18px; }
.ct__field button svg { width: 7px; transition: transform .4s var(--ease); }
.ct__field button:hover svg { transform: translate(2px, -2px); }
.ct__status { position: absolute; left: 16%; right: 10%; bottom: 3%; margin: 0; font-size: 10px; }
.ct__place { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 17%; font-size: 11px; font-weight: 700; text-align: center; }
.ct__mark { width: 40%; overflow: visible; margin-bottom: 9%; }
.ct__mark path { fill: var(--paper); filter: url(#emboss); }
.ct__rule { width: 2px; height: 11%; background: var(--paper); box-shadow: 1px 1px 1px rgba(31,36,33,.12), -1px -1px 1px rgba(255,255,255,.9); margin-bottom: 20%; }
.ct__place p { margin: 0; line-height: 1.15; }

/* ==========================================================
   PROCESS
   ========================================================== */
.ph { height: 420vh; position: relative; }
.ph__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.ph__title {
  margin: 0; text-align: center; text-transform: uppercase;
  font-family: var(--display); font-weight: 200; font-stretch: 80%;
  font-size: clamp(46px, 7.4vw, 142px); line-height: .86; letter-spacing: -.035em;
}
.ph__title--a { position: absolute; left: 0; right: 0; top: 70vh; }
.ph__border { position: absolute; background: #F7F4EE; box-shadow: 0 0 0 1px rgba(31,36,33,.08), inset 0 0 0 1px rgba(255,255,255,.9); z-index: 2; }
.ph__media { position: absolute; inset: 0; z-index: 3; overflow: hidden; will-change: clip-path; }
.ph__img { position: absolute; inset: 0; background-size: cover; background-position: center; will-change: transform; }
.ph__label { position: absolute; left: 50%; top: 6vh; transform: translateX(-50%); z-index: 5; font-size: 10px; font-weight: 600; color: #fff; opacity: 0; }
.ph__words {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--gutter) * 2 + 60px + 2vh); z-index: 6; /* sits below the header (logo + nav) */ display: flex; justify-content: space-between;
  font-family: var(--display); font-weight: 200; font-stretch: 80%; text-transform: uppercase;
  font-size: clamp(26px, 3.7vw, 72px); line-height: .9; letter-spacing: -.03em; color: #fff; pointer-events: none;
}
.ph__words .mask > span { transform: translateY(105%); }
.ph__card {
  position: absolute; left: 50%; bottom: 13vh; z-index: 5; width: min(740px, 88vw); height: clamp(84px, 13vh, 120px);
  transform: translateX(-50%); background: rgba(233, 227, 218, .94);
  display: flex; align-items: center; justify-content: center; padding: 0 12%; text-align: center;
  opacity: 0;
}
.ph__card p { margin: 0; font-size: 10px; font-weight: 700; line-height: 1.35; text-transform: uppercase; letter-spacing: .02em; }
.ph__card-mark { position: absolute; top: 50%; transform: translateY(-50%); height: 62%; overflow: visible; }
.ph__card-mark path { fill: rgba(233,227,218,1); filter: url(#emboss); }
.ph__card-mark--l { left: 3%; } .ph__card-mark--r { right: 3%; }
.ph-after { padding: 7vh var(--gutter) 16vh; background: var(--limestone); position: relative; z-index: 2; }

.steps { position: relative; height: 600vh; }
.steps__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.st { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; will-change: clip-path; }
.st__img { position: relative; overflow: hidden; }
.st__img img { width: 100%; height: 100%; object-fit: cover; }
.st__panel { position: relative; background: var(--tint); }
.st__title { position: absolute; left: 5%; top: 5vh; margin: 0; font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: clamp(20px, 1.75vw, 32px); letter-spacing: -.02em; }
.st__num { position: absolute; right: 5%; top: 5vh; font-family: var(--display); font-weight: 700; font-size: clamp(20px, 1.75vw, 32px); letter-spacing: -.02em; }
.st__frame {
  position: absolute; left: 50%; top: 41.5vh; transform: translate(-50%, -50%);
  width: 13.5vw; min-width: 150px; aspect-ratio: 1 / 1.32; padding: 9px; background: rgba(233,227,218,.55);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7), inset -1px -1px 0 rgba(31,36,33,.08), 0 0 0 1px rgba(255,255,255,.25);
}
.st__frame img { width: 100%; height: 100%; object-fit: cover; }
.st__text { position: absolute; left: 50%; top: 77vh; transform: translate(-50%, -50%); width: min(38ch, 80%); margin: 0; text-align: center; font-size: 14px; line-height: 1.45; }
.steps__labels {
  position: absolute; z-index: 20; left: 50%; right: 0; top: 41.5vh; transform: translateY(-50%);
  display: flex; justify-content: center; gap: calc(13.5vw + 190px); pointer-events: none;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; position: fixed; inset: 0; background: var(--ink); flex-direction: column; justify-content: center; gap: 26px; font-size: 22px; }
  .nav.is-open { display: flex; }
  .menu-toggle { display: block; position: relative; z-index: 2; font-size: 14px; font-weight: 700; padding: 6px 0; letter-spacing: .01em; }
  .site-header:has(.nav.is-open) { mix-blend-mode: normal; }
  /* compact header on phones: smaller logo, and a solid bar once the page scrolls so nothing runs under it */
  .site-header { padding: 14px 16px; transition: background-color .45s var(--ease), padding .45s var(--ease), box-shadow .45s; }
  .logo { width: 48px; }
  .site-header.is-scrolled { background: rgba(227, 225, 218, .96); padding-top: 9px; padding-bottom: 9px; box-shadow: 0 1px 0 rgba(31,36,33,.08); }
  .site-header.is-scrolled .logo { width: 38px; }
  .site-header.is-scrolled .menu-toggle { padding-top: 10px; }
  .nav a { padding: 6px 12px; }
  /* ---- Projects list: one flowing 2-column grid, a full-width card every third ---- */
  .projects-hero { height: auto; min-height: 0; padding: 20vh 5vw 150px; }
  .projects-hero .big-title { font-size: clamp(34px, 11vw, 60px); }
  .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 10px; padding: 0 10px 14vh; }
  .row { display: contents; }
  .row .card__media, .row--3 .card__media, .row--4 .card__media { aspect-ratio: 4 / 5; }
  .rows .card.is-wide { grid-column: 1 / -1; }
  .rows .card.is-wide .card__media { aspect-ratio: 4 / 3; }
  .card__caption { padding-top: 8px; font-size: 11px; gap: 8px; }
  .card__caption span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card__panel { display: none; }
  .morph { display: none; }
  .card.is-morphing { visibility: visible; }
  .filters { padding: 6px 8px; max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { font-size: 12px; padding: 8px 9px; white-space: nowrap; }
  .site-foot__top { flex-direction: column; align-items: flex-start; padding: 8vh 6vw 5vh; }
  .site-foot__links { gap: 24px; flex-wrap: wrap; }
  .site-foot__field { height: auto; min-height: 0; padding: 40px 0; }
  .site-foot__frame { position: relative; left: auto; top: auto; margin: 0 auto; width: 88%; height: 300px; }
  .site-foot__bar { flex-wrap: wrap; gap: 14px 24px; padding: 18px 6vw; }

  /* ---- Project detail: vertical story instead of horizontal scroll ---- */
  .hscroll { height: auto; overflow: visible; }
  .htrack { display: block; width: 100%; height: auto; transform: none !important; }
  .panel { height: auto; }
  .p-intro { width: 100%; min-width: 0; min-height: 100vh; min-height: 100svh; padding: 90px 6vw 7vw; }
  .p-intro__meta, .p-intro__frame, .p-intro__tag { max-width: 64vw; }
  .p-intro__frame { width: 64vw; }
  .p-intro__tag { font-size: 13px; margin-top: 20px; }
  .p-intro__name { font-size: clamp(46px, 15vw, 84px); line-height: .9; padding-top: 8vh; overflow-wrap: anywhere; }
  .p-hero { width: 100%; aspect-ratio: 4 / 5; }
  .p-text { width: 100%; min-width: 0; padding: 14vw 6vw 12vw; }
  .p-text__lead { font-size: 18px; max-width: none; }
  .services { margin-top: 9vw; }
  .services li { font-size: 14px; padding: 15px 0; }
  .p-text__area { margin-top: 12vw; font-size: clamp(88px, 30vw, 150px); }
  .p-gallery { display: flex; flex-direction: column; gap: 5vw; padding: 0 0 6vw; width: 100%; overflow: hidden; }
  .p-shot { position: relative; width: auto !important; height: auto !important; margin: 0 !important; align-self: flex-start !important; background: var(--stone); flex: none; }
  .p-shot img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; max-width: none; object-fit: cover; }
  .p-shot--a { width: 70% !important; aspect-ratio: 4 / 5; margin-left: 6vw !important; }
  .p-shot--b { width: 60% !important; aspect-ratio: 3 / 4; align-self: flex-end !important; margin-right: 6vw !important; margin-top: -16vw !important; z-index: 2; }
  .p-shot--c { width: 56% !important; aspect-ratio: 3 / 4; margin-left: 6vw !important; }
  .p-shot--d { width: 100% !important; aspect-ratio: 1 / 1; }
  .p-shot--e { width: 82% !important; aspect-ratio: 4 / 3; align-self: flex-end !important; margin-right: 6vw !important; }
  .p-gallery { gap: 7vw; padding-top: 2vw; }
  .p-gallery .p-shot.g-item { aspect-ratio: var(--ar); }
  .p-gallery .p-shot.g-land.g-big { width: 100% !important; }
  .p-gallery .p-shot.g-land.g-small { width: 86% !important; align-self: flex-end !important; margin-right: 6vw !important; }
  .p-gallery .p-shot.g-port.g-big, .p-gallery .p-shot.g-sq.g-big { width: 76% !important; margin-left: 6vw !important; }
  .p-gallery .p-shot.g-port.g-small, .p-gallery .p-shot.g-sq.g-small { width: 64% !important; align-self: flex-end !important; margin-right: 6vw !important; }
  .p-next { width: 100%; display: flex; flex-direction: column; }
  .p-next__text { padding: 14vw 6vw 8vw; }
  .p-next__name { margin-top: 10vw; font-size: clamp(44px, 14vw, 80px); }
  .p-next__media { aspect-ratio: 4 / 3; }
  .scroll-hint { display: none; }
  .ph__card { bottom: 8vh; padding: 0 18%; }
  .ph__card p { font-size: 9px; }
  .st { grid-template-columns: 1fr; grid-template-rows: 42vh 58vh; }
  .st__title, .st__num { top: 3vh; }
  .st__frame { top: 44%; width: 30vw; }
  .st__text { top: auto; bottom: 4vh; transform: translateX(-50%); }
  .steps__labels { display: none; }
  .contact-page { overflow: auto; }
  .ct { height: auto; grid-template-columns: 1fr; }
  .ct__media { height: 52vh; height: 52svh; }
  .ct__foot { gap: 20px; padding: 0 16px 14px; }
  .ct__foot-icon { margin-left: 0; }
  .ct__frame { position: relative; left: auto; top: auto; width: auto; min-width: 0; height: 300px; margin: 16px 16px 0; grid-template-columns: 1fr 1fr; background: var(--paper); order: 3; padding: 14px; margin-bottom: 12vh; }
  .ct__info { order: 2; padding: 7vh 6vw 4vh; }
  .ct__title { margin-bottom: 4vh; font-size: 17px; }
  .ct__line { font-size: 16px; padding: 6px 0; margin-bottom: 1.6vh; }
}
@media (max-width: 560px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .home-cards { width: calc(100vw - 32px); height: 128px; }
  .home-card__inner { padding: 18px 18px 16px; }
  .home-card__title { font-size: 19px; max-width: 38%; }
  .home-card__meta { font-size: 12px; }
  .home-card__stamp { height: 66%; }
  .home-hint { bottom: calc(var(--gutter) + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
