/* Passage Projects website. Design rules: see DESIGN.md. Type: Hanken Grotesk (SIL Open Font License 1.1, self-hosted). */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url(fonts/HankenGrotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url(fonts/HankenGrotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #FAFAF8;
  --ink: #121210;
  --ink-soft: #3A3A36;
  --muted: #71716C;
  --line: #E4E4DF;
  --wash: #F3F2EE;
  --blue: #4A93B5;
  --blue-deep: #2F7495;
  --blue-pale: #B9DAE7;
  --page: min(100vw, 1920px);                      /* the page never grows wider than this */
  --gutter: max(20px, calc(var(--page) * .04));
  --section: clamp(84px, 11vw, 150px);
  --ease: cubic-bezier(.22, .61, .2, 1);
  --header: 84px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
/* On the home page the page is also never wider than a 16:9 frame that fits the height of the screen,
   so the opening photograph is always seen whole in its chosen crop. */
.home { --page: min(100vw, 1920px, calc(100vh * 16 / 9)); }
@supports (height: 100svh) { .home { --page: min(100vw, 1920px, calc(100svh * 16 / 9)); } }
body {
  max-width: var(--page);
  margin: 0 auto;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; }
.on-image a:hover, .hero a:hover { color: var(--blue-pale); }
.on-image :focus-visible, .hero :focus-visible { outline-color: var(--blue-pale); }
::selection { background: var(--ink); color: var(--paper); }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 10px 14px; background: var(--paper); color: var(--ink); }
.skip:focus { left: var(--gutter); }

.label { display: block; margin: 0 0 34px; font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .24em; text-transform: lowercase; color: var(--muted); }
.headline { margin: 0; max-width: 21ch; font-weight: 200; font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1.2; letter-spacing: -.005em; text-transform: lowercase; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; padding: 12px var(--gutter); }
.site-header.on-image { position: absolute; top: 0; left: 0; right: 0; z-index: 40; color: var(--paper); }
/* With the script: pinned, slides away on the way down, returns on the way up */
.js .site-header { position: sticky; top: 0; z-index: 40; background: var(--paper); transition: transform .35s var(--ease), background-color .3s, color .3s, box-shadow .3s; }
.js .site-header.on-image { position: fixed; left: 50%; right: auto; width: min(100%, var(--page)); margin-left: calc(min(100%, var(--page)) / -2); background: transparent; }
.js .site-header.on-image.solid { background: var(--paper); color: var(--ink); }
.js .site-header.scrolled:not(.on-image), .js .site-header.solid { box-shadow: 0 1px 0 var(--line); }
.js .site-header.away { transform: translateY(-102%); }
.on-image.solid a:hover { color: var(--blue-deep); }
.on-image.solid :focus-visible { outline-color: var(--blue-deep); }
#works, #all, #contact { scroll-margin-top: var(--header); }
.logo { display: flex; align-items: center; line-height: 0; }
.logo a { display: block; padding: 14px 0; }
.logo svg { display: block; }
.logo .w2 { color: var(--blue); }
.logo .w2:hover { color: var(--blue-deep); }
.on-image .logo .w2 { color: inherit; }
.on-image .logo .w2:hover { color: var(--blue-pale); }
.on-image.solid .logo .w2 { color: var(--blue); }
.on-image.solid .logo .w2:hover { color: var(--blue-deep); }
.site-nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: .14em; text-transform: lowercase; }
.site-nav a { padding: 14px 0; }
.site-nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }

/* Opening photographs */
.hero { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); color: var(--paper); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.slide.is-on { z-index: 1; opacity: 1; visibility: visible; transition: opacity 1.8s var(--ease); }
.slide.was-on { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(10, 10, 9, .62) 0%, rgba(10, 10, 9, 0) 36%), linear-gradient(to bottom, rgba(10, 10, 9, .58) 0%, rgba(10, 10, 9, 0) 28%); }
.slide.bright::after { background: linear-gradient(to top, rgba(10, 10, 9, .7) 0%, rgba(10, 10, 9, 0) 40%), linear-gradient(to bottom, rgba(10, 10, 9, .78) 0%, rgba(10, 10, 9, .3) 22%, rgba(10, 10, 9, 0) 44%); }
/* Climate: the text is set on the photograph, in the paper colour, over a deeper shade so that it reads.
   The frame keeps the home page's proportions and grows only if the text needs more room (phones). */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero.words { aspect-ratio: auto; min-height: calc(var(--page) * 9 / 16); display: flex; align-items: flex-end; }
.hero.words .slide::after { background: linear-gradient(to top, rgba(10, 10, 9, .82) 0%, rgba(10, 10, 9, .5) 45%, rgba(10, 10, 9, .28) 75%, rgba(10, 10, 9, .55) 100%); }
.on-photo { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 34em); gap: 1.1em; padding: calc(var(--header) + 40px) var(--gutter) clamp(36px, 5vw, 72px); color: var(--paper); }
.on-photo p { margin: 0; font-weight: 300; font-size: clamp(1.05rem, 1.45vw, 1.4rem); line-height: 1.55; }
.hero-caption { position: absolute; left: var(--gutter); bottom: 30px; z-index: 2; display: block; padding: 6px 0; opacity: 0; transition: opacity .7s ease-in-out; }
/* One name fades away, then the next fades in: never both readable at once */
.slide.is-on .hero-caption { opacity: 1; transition: opacity .8s ease-in-out .7s; }
.hero-caption .t { display: block; font-size: clamp(1.05rem, 1.9vw, 1.4rem); text-transform: lowercase; }
.hero-caption .l { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .2em; text-transform: lowercase; opacity: .85; }
.hero-dots { position: absolute; right: calc(var(--gutter) - 5px); bottom: 24px; z-index: 3; display: flex; }
.hero-dots button { appearance: none; width: 34px; height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.hero-dots button::before { content: ""; display: block; height: 1px; margin: 0 5px; background: currentColor; opacity: .45; transition: opacity .3s; }
.hero-dots button:hover::before { opacity: 1; }
.hero-dots button[aria-current]::before { height: 2px; opacity: 1; }

/* Statement */
.statement { padding: var(--section) var(--gutter); }
.statement h1 { margin: 0; max-width: 21ch; font-weight: 200; font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1.2; letter-spacing: -.005em; text-transform: lowercase; }
.statement h1 b { font-weight: 600; }
.statement p { margin: 56px 0 0; max-width: 560px; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.7; }
.statement p strong { color: var(--ink); font-weight: 500; }

/* Selected works */
.works { padding: 0 var(--gutter) var(--section); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(34px, 3.6vw, 56px) clamp(18px, 2.4vw, 34px); }
.grid a { display: block; }
.grid a:hover { color: inherit; }
.grid a:hover .t { color: var(--blue-deep); }
.grid .frame { display: block; overflow: hidden; background: var(--line); }
.grid .frame img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.4s var(--ease); }
.grid a:hover .frame img, .grid a:focus-visible .frame img { transform: scale(1.035); }
.grid .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding-top: 12px; }
.grid .t { font-size: clamp(.95rem, 1.3vw, 1.1rem); line-height: 1.3; text-transform: lowercase; }
.grid .loc { font-size: 12px; letter-spacing: .16em; text-transform: lowercase; color: var(--muted); white-space: nowrap; }
/* The work, opened under its row of photographs */
.grid .panel { grid-column: 1 / -1; padding: clamp(20px, 2.4vw, 32px) 0 clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.panel .wait { margin: 0; min-height: 40vh; font-size: 12px; letter-spacing: .2em; text-transform: lowercase; color: var(--muted); }
.panel .work-hero { padding: 0; }
.panel .work-hero img { max-height: max(320px, calc(100vh - 150px)); }
.panel .work-body { margin-top: clamp(24px, 3vw, 40px); }
.panel .gallery { padding: clamp(28px, 4vw, 56px) 0 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; margin-bottom: clamp(16px, 2.2vw, 28px); padding-right: 84px; }
.panel-title { margin: 0; font-weight: 200; font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.12; letter-spacing: -.008em; text-transform: lowercase; outline: none; }
.panel-head .loc { font-size: 12px; letter-spacing: .22em; text-transform: lowercase; color: var(--muted); }
.panel .shut { display: inline-block; padding: 14px 0; font-size: 12px; letter-spacing: .22em; text-transform: lowercase; }
/* The top "close" stays in view for the whole height of an open work: pinned at the top right of the window,
   at the header's own top padding when the header is away and directly below the header when it is there
   (the script keeps --shut-top; without the script the header scrolls away and 12px is right).
   It takes no room of its own, so the heading row sits beside it as before. */
.panel .shut.top { position: sticky; top: var(--shut-top, 12px); z-index: 30; display: block; width: max-content; height: 44px; margin: calc((clamp(1.7rem, 3.4vw, 3rem) * 1.12 - 44px) / 2) -10px -44px auto; padding: 0 10px; line-height: 44px; background: var(--paper); }
.panel .shut.end { display: block; width: max-content; margin: clamp(20px, 3vw, 36px) 0 0 auto; }
.works.page { padding-top: clamp(36px, 5vw, 72px); }

/* Practice page */
.practice { padding: clamp(56px, 8vw, 120px) var(--gutter) var(--section); }

/* Climate page */
.climate { padding: var(--section) var(--gutter); }
.climate .lead, .practice .lead { margin: clamp(8px, 2vw, 28px) 0 0; max-width: 31em; font-weight: 200; font-size: clamp(1.4rem, 2.5vw, 2.2rem); line-height: 1.38; letter-spacing: -.005em; }
.climate .lead + .lead { margin-top: 1.1em; }
.process { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; margin-top: var(--section); }
.process figure { margin: 0; background: var(--line); }
.process img { width: 100%; height: auto; }
.process .lead { margin: 0; max-width: 16em; }
/* Closing, on every page: registration on the left, email and address on the right */
.closing { padding: 0 var(--gutter) clamp(48px, 6vw, 84px); }
.closing::before { content: ""; display: block; height: 1px; background: var(--line); }
.closing .ends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 4vw; padding-top: 22px; font-size: .95rem; line-height: 1.6; }
.closing .reach { display: flex; flex-direction: column; align-items: flex-start; }
.closing .reach a { padding: 10px 0; color: var(--muted); text-transform: lowercase; }
.closing .reach .mail { color: var(--ink); text-transform: none; }
.closing address { padding: 10px 0; color: var(--muted); font-style: normal; }
/* the company's registration on the left, the email and address on the right; a legal name, so never in lowercase */
.closing .reach { grid-column: 3; grid-row: 1; }
.closing .legal { grid-column: 1; grid-row: 1; margin: 0; padding: 10px 0; color: var(--muted); text-transform: none; }

/* Work page */
.work-hero { margin: 0; padding: clamp(20px, 3vw, 44px) var(--gutter) 0; }
.work-hero img { width: auto; max-width: 100%; height: auto; max-height: max(320px, calc(100vh - 214px)); }
.work-body.solo { grid-template-columns: minmax(0, 520px); }
.work-body { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(28px, 6vw, 90px); margin-top: 44px; }
.facts { margin: 0; align-self: start; }
.facts div { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.5; }
.facts dt { display: inline; margin-right: 10px; font-size: 12px; letter-spacing: .12em; text-transform: lowercase; color: var(--muted); }
.facts dd { display: inline; margin: 0; }
.work-text p { margin: 0 0 18px; max-width: 58ch; color: var(--ink-soft); font-size: clamp(1rem, 1.25vw, 1.08rem); line-height: 1.75; }
/* Each photograph keeps its own proportions at the top of its row; an uneven pair leaves plain page beneath the shorter one */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: max(16px, 2vw); padding: 0 var(--gutter) var(--section); }
.gallery figure { margin: 0; }
.gallery .wide { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; }

@media (max-width: 760px) {
  .work-body { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .process { grid-template-columns: minmax(0, 1fr); }
  .on-photo { grid-template-columns: minmax(0, 1fr); gap: 1.1em; }
  .closing .ends { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .closing .reach, .closing .legal { grid-column: auto; grid-row: auto; }
  .closing .legal { padding-top: 18px; }
}
@media (max-width: 640px) {
  .site-header { padding-top: 6px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 8px; letter-spacing: .1em; }
  .site-nav a { padding: 12px 0 16px; }
  :root { --header: 128px; }
  .home { --page: 100vw; }
  .hero { aspect-ratio: 4 / 5; }
  .hero.words { min-height: calc(var(--page) * 5 / 4); }
  .slide img { object-position: var(--focus-phone, 50% 50%); }
  .slide::after, .slide.bright::after { background: linear-gradient(to top, rgba(10, 10, 9, .66) 0%, rgba(10, 10, 9, 0) 40%), linear-gradient(to bottom, rgba(10, 10, 9, .74) 0%, rgba(10, 10, 9, .34) 24%, rgba(10, 10, 9, 0) 44%); }
  .hero-dots { left: calc(var(--gutter) - 5px); right: auto; bottom: 86px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .grid .cap { flex-direction: column; gap: 2px; padding-top: 9px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a { transition: color .2s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .grid .frame img { transform: none; transition: none; }
  .slide.is-on { transition: none; }
  .hero-caption, .slide.is-on .hero-caption { transition: none; }
  .js .site-header { transition: none; }
}
