/* ---------- Tokens ---------- */
:root {
  --black: #000000;
  --white: #ffffff;
  --grey-1: #161616;
  --grey-2: #2a2a2a;
  --grey-3: #6f6f6f;
  --grey-4: #a8a8a8;
  --blue: #3e9ffe;       /* sampled from the Sara Consult logo square */
  --blue-dark: #2f86e0;
  --blue-light: #8cc6ff;

  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  --font: 'Archivo', 'Arial Narrow', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--black); overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.is-loading body { overflow: hidden; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-variation-settings: 'wdth' 100;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: var(--black); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--white); color: var(--black); padding: 10px 14px;
}
.skip:focus { left: 8px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  background: var(--black);
}
.loader__square { width: 64px; height: 64px; background: var(--blue); }
.loader__count {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * .6);
  font-weight: 850; font-variation-settings: 'wdth' 62;
  font-size: clamp(64px, 14vw, 200px); line-height: .8;
  font-variant-numeric: tabular-nums;
}
.loader__count::after { content: '%'; font-size: .35em; vertical-align: top; margin-left: .1em; color: var(--blue); }
html:not(.is-loading) .loader { pointer-events: none; }

/* ---------- Crosshair ---------- */
.xh { position: fixed; inset: 0; z-index: 120; pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity .3s; }
.xh.is-on { opacity: 1; }
.xh__x, .xh__y { position: absolute; background: rgba(255, 255, 255, .22); }
.xh__x { left: 0; right: 0; top: 0; height: 1px; }
.xh__y { top: 0; bottom: 0; left: 0; width: 1px; }
.xh__label {
  position: absolute; top: 0; left: 0;
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--white);
  transform: translate(10px, 10px); white-space: nowrap;
}
@media (pointer: coarse) { .xh { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background-color .3s, border-color .3s, color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: var(--black); border-bottom-color: var(--grey-2); }
.site-header.on-blue { background: var(--blue); border-bottom-color: transparent; color: var(--black); }

.wordmark { position: relative; display: inline-flex; align-items: center; text-decoration: none; height: 44px; padding-right: 8px; }
.wordmark__name {
  position: relative; z-index: 1;
  font-weight: 900; font-variation-settings: 'wdth' 62;
  font-size: 26px; letter-spacing: -0.01em; line-height: 1;
}
.wordmark__square { position: absolute; z-index: 0; width: 20px; height: 20px; left: 54%; top: 33px; background: var(--blue); }
.on-blue .wordmark__square { background: var(--black); }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }
.site-nav a {
  text-decoration: none; font-size: 15px; font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.site-nav a:hover { background-size: 100% 1px; }
.site-nav .site-nav__cta { padding: 9px 14px; white-space: nowrap; background: var(--white); color: var(--black); }
.site-nav .site-nav__cta:hover { background: var(--blue); }
.on-blue .site-nav .site-nav__cta { background: var(--black); color: var(--white); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1.5px solid var(--white);
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--white); color: var(--black); }
.btn--solid:hover { background: var(--blue); border-color: var(--blue); }
.btn--line { color: var(--white); }
.btn--line:hover { background: var(--white); color: var(--black); }
.btn--ink { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--ink:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--ink-line { color: var(--black); border-color: var(--black); }
.btn--ink-line:hover { background: var(--black); color: var(--blue); }

/* ---------- Story stage ---------- */
.story { position: relative; height: 620vh; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hud { position: absolute; inset: 0; pointer-events: none; font-size: 12px; color: var(--grey-4); font-variant-numeric: tabular-nums; }
.hud__tl { position: absolute; top: calc(var(--header-h) + 16px); right: var(--gutter); }
.hud__phase b { color: var(--white); font-weight: 600; }
.hud__steps {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
  font-size: 13px;
}
.hud__steps li { display: flex; align-items: center; gap: 10px; transition: color .4s; }
.hud__steps li::after { content: ''; width: 18px; height: 1px; background: var(--grey-3); transition: width .4s var(--ease), background-color .4s; }
.hud__steps li.is-active { color: var(--white); }
.hud__steps li.is-active::after { width: 44px; background: var(--blue); }
.hud__steps li.is-done::after { background: var(--white); }
.hud__bl { position: absolute; left: var(--gutter); bottom: 24px; line-height: 1.5; }
.hud__br { position: absolute; right: var(--gutter); bottom: 24px; display: flex; align-items: center; gap: 14px; }
.ruler { position: relative; width: 220px; height: 14px; }
.ruler__ticks {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--grey-3) 0 1px, transparent 1px 8px);
}
.ruler::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--grey-4) 0 1px, transparent 1px 40px);
}
.ruler__head { position: absolute; top: -3px; bottom: -3px; left: 0; width: 2px; background: var(--blue); }

.chapter {
  position: absolute; left: var(--gutter); bottom: clamp(80px, 14vh, 140px);
  width: min(560px, calc(100% - var(--gutter) * 2));
  opacity: 0; visibility: hidden;
}
.chapter.is-active { opacity: 1; visibility: visible; }
.chapter--hero { top: calc(var(--header-h) + clamp(24px, 8vh, 90px)); bottom: auto; width: min(720px, calc(100% - var(--gutter) * 2)); }
.hero__title {
  font-weight: 850; font-variation-settings: 'wdth' 62;
  font-size: clamp(56px, 8.4vw, 136px);
  line-height: .86; letter-spacing: -0.02em; text-transform: uppercase;
}
.hero__title .line { display: block; overflow: hidden; padding: .14em 0 .04em; margin-top: -.14em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { margin-top: 24px; max-width: 34ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--grey-4); }

.chapter__k { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--blue); }
.chapter__k::before { content: ''; width: 10px; height: 10px; background: var(--blue); }
.chapter__t {
  margin-top: 16px;
  font-weight: 800; font-variation-settings: 'wdth' 70;
  font-size: clamp(36px, 4.4vw, 68px); line-height: .98; letter-spacing: -0.02em;
}
.chapter__p { margin-top: 18px; max-width: 42ch; color: var(--grey-4); font-size: 18px; }

.stage__hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  font-size: 12px; color: var(--grey-4);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.stage__hint::after { content: ''; width: 1px; height: 32px; background: var(--white); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Statement ---------- */
.statement { padding: clamp(120px, 18vw, 260px) var(--gutter); }
.statement__text {
  max-width: 20ch;
  font-weight: 750; font-variation-settings: 'wdth' 72;
  font-size: clamp(36px, 6vw, 96px);
  line-height: 1; letter-spacing: -0.025em;
}
.statement__text .w { display: inline-block; }

/* ---------- Projects ---------- */
.projects__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter) clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--grey-2);
}
.mega {
  font-weight: 850; font-variation-settings: 'wdth' 62;
  font-size: clamp(72px, 15vw, 260px);
  line-height: .8; letter-spacing: -0.03em; text-transform: uppercase;
}
.projects__sub { max-width: 32ch; color: var(--grey-4); font-size: 18px; padding-bottom: .5em; }

.case { position: relative; border-bottom: 1px solid var(--grey-2); padding-bottom: clamp(64px, 9vw, 120px); }
.case__cover { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.case__media {
  position: absolute; inset: 0;
  clip-path: inset(14% 22% 14% 22%);
  will-change: clip-path;
}
.case__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); will-change: transform; }
.case__title {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 6vh, 64px);
  max-width: 980px;
}
.case__title h3 {
  margin-top: 14px;
  font-weight: 850; font-variation-settings: 'wdth' 64;
  font-size: clamp(44px, 6.4vw, 112px);
  line-height: .9; letter-spacing: -0.025em; text-transform: uppercase;
  text-wrap: balance;
}
.case__title h3, .case__place { text-shadow: 0 2px 24px rgba(0, 0, 0, .55); }
.case__place { margin-top: 12px; font-size: 20px; font-weight: 500; }
.case__status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--black);
  font-size: 14px; font-weight: 600;
}
.dot { width: 10px; height: 10px; background: var(--white); }
.dot--live { background: var(--blue); animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }

.case__body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--gutter);
  padding: clamp(48px, 7vw, 96px) var(--gutter) 0;
}
.case__desc {
  font-weight: 600; font-variation-settings: 'wdth' 85;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.25; letter-spacing: -0.01em;
  max-width: 28ch;
}
.facts { border-top: 1.5px solid var(--white); }
.facts > div {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--grey-2);
}
.facts dt { font-size: 14px; color: var(--grey-4); }
.facts dd { font-size: 15px; font-weight: 600; }
.case__aside { grid-column: 2; margin-top: 8px; }
.case__aside img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1); transition: filter .6s; }
.case__aside:hover img { filter: none; }
.case__aside figcaption, .gallery figcaption { margin-top: 10px; font-size: 13px; color: var(--grey-4); }
.legend { grid-column: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--grey-4); }
.legend { gap: 8px 20px; }
.legend__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.key { display: inline-block; width: 18px; height: 2px; }
.key--old { background: var(--grey-3); }
.key--new { background: var(--blue); height: 3px; }
.case__pair {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--gutter);
  align-items: end; padding: clamp(48px, 7vw, 96px) var(--gutter) 0;
}
.case__photo img { width: 100%; max-width: 440px; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1); transition: filter .6s; }
.case__photo:hover img { filter: none; }
.case__photo figcaption { margin-top: 10px; font-size: 13px; color: var(--grey-4); }
.case__drawing { background: var(--grey-1); padding: clamp(24px, 4vw, 56px); }
.case__drawing .iso { aspect-ratio: 4 / 3; height: auto; }
.case__drawing .legend { margin-top: 16px; }
.credit { padding: 24px var(--gutter) 0; font-size: 12px; color: var(--grey-3); }

.gallery { margin-top: clamp(48px, 7vw, 96px); overflow: hidden; }
.gallery__track { display: flex; gap: 16px; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.gallery figure { width: clamp(280px, 42vw, 640px); flex: none; }
.gallery figure:nth-child(even) { margin-top: 48px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Smaller projects */
.more { padding: clamp(96px, 12vw, 180px) var(--gutter) 0; display: grid; gap: clamp(96px, 12vw, 180px); }
.mini { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); align-items: start; }
.mini--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.mini--flip .mini__text { order: 2; }
.mini h3 {
  margin: 14px 0 8px;
  font-weight: 850; font-variation-settings: 'wdth' 64;
  font-size: clamp(34px, 3.6vw, 60px);
  line-height: .92; letter-spacing: -0.02em; text-transform: uppercase; text-wrap: balance;
}
.mini__desc { margin: 28px 0 32px; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; color: var(--grey-4); max-width: 42ch; }
.mini__media { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.mini__main { grid-column: 1 / span 11; }
.mini__second { grid-column: 5 / span 8; margin-top: -12%; position: relative; }
.mini__frame { overflow: hidden; }
.mini__frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mini__second .mini__frame { outline: 12px solid var(--black); }
.mini figcaption { margin-top: 10px; font-size: 13px; color: var(--grey-4); }
.mini__second figcaption { text-align: right; }

/* Dark iso drawing (ASECNA) */
.iso { display: block; width: 100%; height: 100%; overflow: visible; }
.iso .stroke, .iso .face { stroke-linejoin: round; stroke-linecap: round; }
.iso .face { stroke: var(--white); stroke-width: 1.6; fill: var(--grey-1); }
.iso .tone-white.f-right { fill: #202020; }
.iso .tone-white.f-top { fill: #262626; }
.iso .tone-blue.f-left { fill: var(--blue); }
.iso .tone-blue.f-right { fill: var(--blue-dark); }
.iso .tone-blue.f-top { fill: var(--blue-light); }
.iso .stroke { stroke: var(--white); stroke-width: 1.4; }
.iso .grid { stroke: var(--grey-2); stroke-width: 1; }
.iso .mullion { stroke: var(--white); stroke-width: 1; opacity: .35; }
.iso .existing.face { stroke: var(--grey-3); }
.iso .existing.mullion { stroke: var(--grey-3); opacity: .7; }
.iso .blue-line { stroke: var(--blue); stroke-width: 2.6; }

/* ---------- Marquee ---------- */
.marquee { padding: clamp(56px, 8vw, 110px) 0; overflow: hidden; border-bottom: 1px solid var(--grey-2); }
.marquee__row { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); width: max-content; will-change: transform; }
.marquee__row span {
  font-weight: 850; font-variation-settings: 'wdth' 62;
  font-size: clamp(64px, 10vw, 168px); line-height: 1; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1.5px var(--white);
  transition: color .3s;
}
.marquee__row span:hover { color: var(--white); }
.marquee__row i { width: clamp(20px, 2.4vw, 40px); aspect-ratio: 1; background: var(--blue); flex: none; }

/* ---------- Contact ---------- */
.contact { background: var(--blue); color: var(--black); padding: clamp(120px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px); }
.mega--ink { max-width: 9ch; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter); margin-top: clamp(48px, 6vw, 96px); }
.contact__lede { max-width: 30ch; font-size: 20px; font-weight: 500; }
.contact__links { display: flex; flex-direction: column; gap: 4px; }
.contact__big {
  width: fit-content;
  font-weight: 800; font-variation-settings: 'wdth' 75;
  font-size: clamp(30px, 4.4vw, 68px); line-height: 1.12; letter-spacing: -0.015em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: background-size .4s var(--ease);
}
.contact__big:hover { background-size: 100% 3px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding: 24px var(--gutter);
  font-size: 14px; color: var(--grey-4);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  :root { --header-h: 60px; }
  .site-nav a:not(.site-nav__cta) { display: none; }
  .wordmark__name { font-size: 22px; }
  .wordmark__square { width: 16px; height: 16px; top: 32px; }

  .hud__steps, .hud__bl { display: none; }
  .hud__br .ruler { width: 120px; }
  .chapter { bottom: 72px; }
  .chapter--hero { top: auto; bottom: 64px; }
  .actions .btn { flex: 1 1 auto; }
  .stage__hint { display: none; }

  .case__media { clip-path: inset(10% 8% 30% 8%); }
  .case__body, .contact__grid { grid-template-columns: 1fr; }
  .case__aside, .legend { grid-column: 1; }
  .case__pair { grid-template-columns: 1fr; }
  .mini, .mini--flip { grid-template-columns: 1fr; }
  .mini--flip .mini__text { order: 0; }
  .mini__main { grid-column: 1 / -1; }
  .mini__second { grid-column: 3 / -1; margin-top: 20px; }
  .mini__second .mini__frame { outline: none; }
  .case__photo img { max-width: none; aspect-ratio: 4 / 3; }
  .gallery figure:nth-child(even) { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .case__media { clip-path: none; }
  .case__media img { transform: none; }
  .gallery { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .gallery figure { scroll-snap-align: start; }
}

/* Long project names get a smaller cover title. */
.case--long .case__title h3 { font-size: clamp(36px, 4.8vw, 84px); }
