/* Hillinghead — landing page
   Left half: feather-grey text page. Right half: the photograph,
   with equal white on all four sides. Neutral throughout so the
   page never shifts how a photograph's colour reads. */

:root {
  --feather: #f4f4f3;
  --paper: #ffffff;
  --ink: #000000;

  --m: clamp(120px, 8.5vw, 200px);       /* white around the photograph */
  --edge: clamp(28px, 4.5vw, 80px);      /* margin of the text page */
  --rise: clamp(30px, 2.1vw, 48px);      /* menu sits this far above the photograph */
  --nav: clamp(9px, .62vw, 12px);        /* menu type size */
  --top: calc(var(--m) - var(--rise) - var(--nav));

  /* photograph box: fills the right half inside --m, kept between 0.68 and 0.80 wide-to-tall */
  --frame-w: min(50vw - 2 * var(--m), (100svh - 2 * var(--m)) * 0.8);

  --sans: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --body-weight: 300;                    /* running text: Outfit Light */
  --body-size: clamp(14px, 1vw, 18px);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

/* Landing ----------------------------------------------------------- */

.home {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
}

.text-page { background: var(--feather); }

.mark {
  position: absolute;
  top: var(--top);
  left: var(--edge);
  display: block;
  line-height: 0;
}
.mark img { width: clamp(170px, 12vw, 300px); height: auto; }

.menu {
  position: absolute;
  top: calc(var(--top) - 1px);
  right: calc(var(--m) + (50vw - 2 * var(--m) - var(--frame-w)) / 2);
  display: flex;
  gap: 2em;
  margin: 0;
  font-size: var(--nav);
  padding: 0;
  list-style: none;
}
.menu a {
  display: block;
  font-size: var(--nav);
  line-height: 1;
  letter-spacing: .18em;
  margin-right: -.18em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}
/* Bold on hover. A hidden bold copy reserves the width,
   so nothing shifts when the weight changes. */
.menu a::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 600;
}
.menu li:last-child { margin-left: -.1em; }
.menu li:last-child a { text-align: right; }
.menu a:hover,
.menu a:focus-visible,
.menu a[aria-current="page"] { font-weight: 600; }

.statement {
  position: absolute;
  left: var(--edge);
  bottom: calc(var(--m) - .45em);
  margin: 0;
  font-size: clamp(16px, 1.12vw, 20px);
  line-height: 1.45;
  letter-spacing: .005em;
}

.image-page {
  display: grid;
  place-items: center;
  padding: var(--m);
  min-height: 0;
}

.frame {
  width: var(--frame-w);
  height: min(100%, (50vw - 2 * var(--m)) / 0.68);
  margin: 0;
  background: var(--feather);
}
.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contact ----------------------------------------------------------- */

.contact-copy {
  margin: 0;
  text-align: center;
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: 1.7;
  letter-spacing: .01em;
  text-wrap: balance;
}
.contact-copy a {
  display: inline-block;
  margin-top: .45em;
  font-size: clamp(16px, 1.12vw, 20px);  /* the address keeps its size and weight */
  font-weight: 400;
  letter-spacing: .005em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
}

/* Studio ------------------------------------------------------------ */

.studio-copy {
  width: var(--frame-w);
  margin: 0;
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: 1.75;
  letter-spacing: .01em;
  hanging-punctuation: first;
}
.studio-copy .title { font-weight: 400; }   /* publication names: Regular instead of a faux italic */

/* Phones and narrow windows ----------------------------------------- */

@media (max-width: 820px) {
  .home { display: block; height: auto; min-height: 0; }
  .text-page { padding: 32px 24px 40px; }
  .mark, .menu, .statement { position: static; }
  .mark img { width: 180px; }
  .menu { margin-top: 36px; gap: 18px; flex-wrap: wrap; }
  .statement { margin-top: 56px; font-size: 17px; }
  .image-page { display: block; padding: 24px 24px 48px; }
  .frame { width: 100%; height: auto; aspect-ratio: 3 / 4; }
  .contact .image-page { padding: 72px 24px 112px; }
  .studio .image-page { padding: 56px 24px 96px; }
  .studio-copy { width: auto; font-size: 15px; }
  .contact-copy { font-size: 15px; }
  .contact-copy a { font-size: 17px; }
}

/* Password gate ---------------------------------------------------- */

.gate-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
}
.gate-page .mark { position: absolute; }
.gate {
  display: flex;
  width: clamp(280px, 38vw, 640px);
  height: clamp(56px, 4.6vw, 80px);
  margin: 0;
  background: var(--feather);
}
.gate input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
  font: 400 clamp(18px, 1.4vw, 24px)/1 var(--sans);
  letter-spacing: .3em;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.gate input::-webkit-credentials-auto-fill-button { visibility: hidden; position: absolute; right: 0; }
.gate input::-ms-reveal { display: none; }
.gate input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 200px var(--feather) inset;
  -webkit-text-fill-color: var(--ink);
}
.gate.refused { animation: refuse .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes refuse {
  15%, 85% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(5px); }
  45%, 55% { transform: translateX(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .gate.refused { animation: none; }
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Work: contents page --------------------------------------------- */

.contents {
  position: absolute;
  left: var(--edge);
  bottom: calc(var(--m) - .62em);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(11px, .8vw, 14px);
}
.contents a {
  display: flex;
  align-items: baseline;
  gap: 1.8em;
  padding: .55em 0;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
}
.contents .num { flex: 0 0 1.9em; font-size: .82em; letter-spacing: .12em; opacity: .45; font-variant-numeric: tabular-nums; }
.contents .name { display: inline-block; }
.contents .name::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 600;
}
.contents a.active .name,
.contents a:hover .name,
.contents a:focus-visible .name { font-weight: 600; }
.contents .thumb { display: none; }

.cover { position: relative; display: block; }
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s ease;
}
.cover img.shown { opacity: 1; }

@media (max-width: 820px) {
  .contents { position: static; margin-top: 56px; font-size: 13px; }
  .contents li + li { margin-top: 40px; }
  .contents a { flex-wrap: wrap; row-gap: 14px; }
  .contents .thumb { display: block; flex-basis: 100%; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .works .image-page { display: none; }
}

/* Project spreads -------------------------------------------------- */

.spread-page {
  --sp-side: clamp(56px, 6vw, 120px);
  --sp-top: clamp(40px, 8vh, 110px);
  --sp-gutter: clamp(32px, 4vw, 80px);
  height: 100vh;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
}
.spread {
  position: absolute;
  inset: var(--sp-top) var(--sp-side);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--sp-gutter);
}
.page { position: relative; }
.page img {
  position: absolute;
  display: block;
  opacity: 0;
  transition: opacity .7s ease .15s;
}
.page img.shown { opacity: 1; }
.page img.leaving { opacity: 0; transition: opacity .4s ease 0s; }

.turn {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 120px;
  margin-top: -60px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  opacity: .45;
  cursor: pointer;
  transition: opacity .2s ease;
}
.turn:hover, .turn:focus-visible { opacity: 1; }
.turn[aria-disabled="true"] { visibility: hidden; }
.turn svg { width: 12px; height: 24px; overflow: visible; }
.turn.prev { left: calc((var(--sp-side) - 56px) / 2); }
.turn.next { right: calc((var(--sp-side) - 56px) / 2); }

.folio {
  position: absolute;
  right: var(--sp-side);
  bottom: calc(var(--sp-top) / 2 - 5px);
  line-height: 0;
  opacity: .4;
  transition: opacity .2s ease;
}
.folio:hover, .folio:focus-visible { opacity: .85; }
.folio img { width: clamp(96px, 7vw, 132px); height: auto; }

@media (prefers-reduced-motion: reduce) {
  .page img, .page img.leaving { transition-duration: .01s; transition-delay: 0s; }
}
@media (max-width: 820px) {
  .spread { inset: 48px 20px 96px; grid-template-columns: 1fr; }
  .page.right { display: none; }
  .turn { top: auto; bottom: 20px; margin-top: 0; height: 56px; }
  .turn.prev { left: calc(50% - 60px); }
  .turn.next { left: calc(50% + 4px); right: auto; }
  .folio { right: 20px; bottom: 40px; }
}

/* Placeholder pages ------------------------------------------------- */

.blank { min-height: 100vh; background: var(--paper); }
