/* Atelier Maren. Direction: Photographs at uneven sizes (taste-skill seed 1158755923).
   Palette: the dealt proportions (pale ground, black ink, one deep accent, one dark band late),
   in the colours of the brief: off-white and the deep teal of the lake. */

:root {
  --bg: #f6f6f4;
  --surface: #ebebe8;
  --ink: #111312;
  --muted: #4a4f4d;
  --accent: #1d5a57;
  --accent-ink: #ffffff;
  --field-1: #121414;
  --field-1-ink: #f6f6f4;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.4rem, 8.3vw, 8rem);

  --m: 6vw;                                   /* page margin */
  --u: calc((100vw - 2 * var(--m)) / 12);     /* one grid column */
  --gap: clamp(140px, 16vw, 240px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sentient", Georgia, serif;
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ul, ol, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 300; letter-spacing: -0.015em; line-height: 1; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.btn:hover { background: var(--ink); }
.btn:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; transition: text-decoration-color 0.3s var(--ease-out); }
.link:hover, .link:focus-visible { text-decoration-color: currentColor; }

/* Navigation: a link hard left, the wordmark centred, the action hard right */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--m);
  font-size: var(--step-small);
}
.nav__left { display: flex; gap: 24px; }
.nav__mark { font-size: var(--step-body); text-decoration: none; letter-spacing: -0.01em; }
.nav .btn { justify-self: end; min-height: 44px; font-size: var(--step-small); }

/* Hero: stepped title, two photographs */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: clip; }
.hero h1 {
  position: absolute;
  left: calc(var(--m) + var(--u));
  top: calc(44svh - 0.92 * var(--step-display));
  font-size: var(--step-display);
  letter-spacing: -0.03em;
  line-height: 1;
  z-index: 2;
}
.hero h1 .line { display: block; overflow: clip; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero h1 .line > span { display: block; }
.hero h1 .line:nth-child(2) { padding-left: calc(4 * var(--u)); }
.hero__small {
  position: absolute;
  left: calc(var(--m) + 9.5 * var(--u));
  width: calc(2.5 * var(--u));
  top: 9svh;
  aspect-ratio: 16 / 10;
  overflow: clip;
}
.hero__tall {
  position: absolute;
  left: calc(var(--m) + var(--u));
  width: calc(4 * var(--u) - 24px);
  top: calc(44svh + 24px);
  aspect-ratio: 4 / 5;
  overflow: clip;
}
.hero__small img, .hero__tall img { width: 100%; height: 100%; object-fit: cover; }
.hero__lead {
  position: absolute;
  left: calc(var(--m) + 5 * var(--u));
  top: calc(44svh + 1.1 * var(--step-display) + 32px);
  max-width: 36ch;
  font-size: var(--step-lead);
  line-height: 1.35;
  color: var(--muted);
}

/* Window: the lake opens to the whole screen */
.window .scene-stage { position: relative; }
.window figure { position: relative; height: 100svh; overflow: clip; }
.window img { width: 100%; height: 100%; object-fit: cover; }
.window figcaption {
  position: absolute;
  left: var(--m);
  bottom: var(--m);
  max-width: 22ch;
  padding: 20px 24px;
  background: var(--bg);
  font-size: var(--step-lead);
  line-height: 1.3;
}

/* Intro: title, note, facts row */
.intro { padding: var(--gap) var(--m) 0; }
.intro__top { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
.intro h2 { grid-column: 1 / 7; font-size: var(--step-head); }
.intro__note { grid-column: 10 / 13; }
.facts { display: flex; justify-content: space-between; gap: 24px; margin-top: 120px; }
.facts li { min-width: 0; }
.facts b { display: block; font-weight: 300; font-size: var(--step-head); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts span { display: block; margin-top: 10px; font-size: var(--step-small); color: var(--muted); max-width: 22ch; }
.intro__pic { margin: 80px 0 0 calc(7 * var(--u)); width: calc(5 * var(--u)); aspect-ratio: 4 / 3; overflow: clip; }
.intro__pic img { width: 100%; height: 100%; object-fit: cover; }

/* Territory: loose scatter with pauses */
.scatter { padding: var(--gap) var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; }
.scatter h2 { grid-column: 1 / -1; font-size: var(--step-head); margin-bottom: 18vh; }
.place { margin: 0 0 24vh; }
.place .name { font-size: var(--step-small); color: var(--muted); margin-bottom: 10px; }
.place .frame { overflow: clip; }
.place img, .place video { width: 100%; height: 100%; object-fit: cover; }
.place figcaption { margin-top: 12px; font-size: var(--step-body); }
.place.a { grid-column: 1 / 7; }
.place.a .frame { aspect-ratio: 3 / 2; }
.place.b { grid-column: 9 / 13; margin-top: -80px; }
.place.b .frame { aspect-ratio: 4 / 5; }
.place.c { grid-column: 3 / 10; }
.place.c .frame { aspect-ratio: 16 / 9; }
.remark { grid-column: 2 / 6; align-self: center; font-size: var(--step-lead); line-height: 1.3; margin-bottom: 24vh; }
.scatter .place.b + .remark { grid-row: auto; }

/* What we draw: one scene, stepping statements */
.steps { position: relative; }
.steps .scene-stage { position: relative; height: 100svh; overflow: clip; }
.steps__bg { position: absolute; inset: 0; }
.steps__bg img { width: 100%; height: 100%; object-fit: cover; }
.steps__scrim { position: absolute; inset: 0 0 auto 0; height: 46%; background: rgb(17 19 18 / 0.66); }
.steps__list {
  position: absolute;
  top: 9svh;
  left: 50%;
  translate: -50% 0;
  display: grid;
  gap: 10px;
  text-align: center;
  font-size: var(--step-lead);
  line-height: 1.2;
  color: #c9cdcb;
  z-index: 2;
  width: min(30ch, 84vw);
}
.steps__list h2, .steps__list li { font-size: inherit; font-weight: 300; letter-spacing: -0.005em; transition: color 0.35s var(--ease-out); }
.steps__list .is-on { color: #ffffff; }
.steps__list h2 { color: #ffffff; margin-bottom: 6px; }
.pair { position: absolute; inset: 0; pointer-events: none; }
.pair figure { position: absolute; overflow: clip; }
.pair img { width: 100%; height: 100%; object-fit: cover; }
.pair figure:first-child { left: calc(var(--m) + var(--u)); top: 54svh; width: 200px; aspect-ratio: 4 / 5; }
.pair figure:last-child { right: calc(var(--m) + var(--u)); top: 62svh; width: 240px; aspect-ratio: 3 / 2; }
.steps.is-rest .pair { display: none; }
.steps.is-rest .steps__list li { color: #ffffff; }

/* Light: the live thing */
.light { padding: var(--gap) var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; row-gap: 40px; }
.light__text { grid-column: 1 / 5; }
.light h2 { font-size: var(--step-head); }
.light__text p { margin-top: 24px; max-width: 38ch; }
.light__figure { grid-column: 6 / 13; grid-row: 1 / 3; background: var(--surface); }
.light__figure svg { width: 100%; }
.light__controls { grid-column: 1 / 5; display: grid; gap: 24px; align-content: start; }
.seasons { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seasons legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seasons label { position: relative; }
.seasons input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seasons span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--surface); transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out); }
.seasons label:hover span { background: #dededa; }
.seasons input:checked + span { background: var(--ink); color: var(--bg); }
.seasons input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.hour { display: grid; gap: 6px; }
.hour label { font-size: var(--step-small); color: var(--muted); }
.hour input { width: 100%; accent-color: var(--accent); height: 32px; cursor: pointer; }
.light__readout { font-size: var(--step-lead); line-height: 1.3; min-height: 3.9em; }

/* Method: a row of moments, their pictures rising and falling */
.moments { padding: var(--gap) var(--m) 0; }
.moments h2 { font-size: var(--step-head); }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 72px 48px; margin-top: 56px; }
.moment { max-width: 400px; }
.moment { display: flex; flex-direction: column; }
.moment h3 { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.moment p { margin-top: 8px; font-size: var(--step-body); line-height: 1.45; }
.moment figure { margin-top: var(--space, 100px); aspect-ratio: 4 / 5; overflow: clip; }
.moment img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--ease-out); }
.moment:hover img { scale: 1.05; }

/* Materials: pinned title, pictures pass */
.materials { position: relative; margin-top: var(--gap); }
.materials__title {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}
.materials h2 { font-size: var(--step-display); letter-spacing: -0.03em; line-height: 0.85; text-align: center; }
.materials__list { position: relative; margin-top: -100svh; padding: 60svh var(--m) 40svh; display: grid; grid-template-columns: repeat(12, 1fr); row-gap: 40svh; z-index: 1; }
.material { width: 100%; }
.material:nth-child(odd) { grid-column: 2 / 5; }
.material:nth-child(even) { grid-column: 9 / 12; }
.material .frame { aspect-ratio: 4 / 5; overflow: clip; }
.material img { width: 100%; height: 100%; object-fit: cover; }
.material h3 { margin-top: 14px; font-size: var(--step-body); font-weight: 500; letter-spacing: 0; }
.material .role { font-size: var(--step-small); color: var(--muted); }
.material p { margin-top: 8px; font-size: var(--step-body); max-width: 300px; }

/* Contact: sentence, picture, two links */
.contact { padding: 160px var(--m) 120px; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; align-items: start; }
.contact__sentence { grid-column: 1 / 6; font-size: var(--step-lead); line-height: 1.3; max-width: 26ch; }
.contact__pic { grid-column: 8 / 10; width: 160px; aspect-ratio: 1; overflow: clip; }
.contact__pic img { width: 100%; height: 100%; object-fit: cover; }
.contact__links { grid-column: 10 / 13; display: grid; gap: 8px; }
.contact__links h2 { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; line-height: 1.3; margin-bottom: 12px; }
.contact__links a { font-size: var(--step-body); text-decoration: underline; text-underline-offset: 0.2em; }
.contact__links a:hover { color: var(--accent); }
.contact__links .where { margin-top: 12px; font-size: var(--step-small); color: var(--muted); }
.contact__links .btn { margin-top: 16px; justify-self: start; color: var(--accent-ink); text-decoration: none; }
.contact__links .btn:hover { color: var(--accent-ink); }

/* Footer: name first, places under it */
.foot { background: var(--field-1); color: var(--field-1-ink); padding: 72px var(--m) 40px; min-height: 90svh; display: grid; align-content: space-between; overflow: clip; }
.foot__name { font-size: 14.8vw; font-weight: 300; letter-spacing: -0.045em; line-height: 0.82; white-space: nowrap; }
.foot__row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; margin-top: 72px; }
.foot__places { grid-column: 1 / 6; display: grid; gap: 6px; font-size: var(--step-head); line-height: 1.1; }
.foot__places a { text-decoration: none; color: #9fd0c9; transition: color 0.25s var(--ease-out); }
.foot__places a:hover { color: var(--field-1-ink); }
.foot__links { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: var(--step-small); }
.foot__links ul { display: grid; gap: 8px; align-content: start; }
.credits { margin-top: 72px; font-size: var(--step-small); color: #b7bbb9; max-width: 60ch; }
.credits a { color: var(--field-1-ink); }
.foot__legal { display: flex; justify-content: space-between; margin-top: 40px; font-size: var(--step-small); color: #b7bbb9; }
.foot__legal a { color: var(--field-1-ink); }

/* Entrances: hidden only when the script runs and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] > * { opacity: 0; translate: 0 28px; transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  html.js [data-reveal].in > * { opacity: 1; translate: 0 0; }
  html.js .hero h1 .line > span { translate: 0 105%; transition: translate 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + 120ms); }
  html.js .hero.is-loaded h1 .line > span { translate: 0 0; }
  html.js .hero__lead, html.js .hero__small, html.js .hero__tall { opacity: 0; translate: 0 24px; transition: opacity 0.9s var(--ease-out) 0.6s, translate 0.9s var(--ease-out) 0.6s; }
  html.js .hero__small { transition-delay: 0.45s; }
  html.js .hero.is-loaded .hero__lead, html.js .hero.is-loaded .hero__small, html.js .hero.is-loaded .hero__tall { opacity: 1; translate: 0 0; }
}

/* Tablet */
@media (max-width: 1023px) {
  .row { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
  .hero__lead { right: var(--m); max-width: none; }
  .light__text, .light__controls { grid-column: 1 / -1; }
  .light__figure { grid-column: 1 / -1; grid-row: auto; }
  .contact__sentence { grid-column: 1 / -1; margin-bottom: 40px; }
  .contact__pic { grid-column: 1 / 4; }
  .contact__links { grid-column: 5 / 13; }
}

/* Phone: its own composition */
@media (max-width: 767px) {
  :root { --m: 20px; --gap: 96px; }
  .nav { grid-template-columns: auto 1fr; padding: 16px var(--m); }
  .nav__left { display: none; }
  .nav__mark { justify-self: start; }
  .hero { height: auto; min-height: 0; padding: 96px var(--m) 0; display: flex; flex-direction: column; }
  .hero h1 { position: static; order: 2; font-size: 15vw; margin-top: 24px; }
  .hero h1 .line:nth-child(2) { padding-left: 22vw; }
  .hero__small { position: static; order: 1; width: 46%; align-self: flex-end; }
  .hero__tall { position: static; order: 3; width: 72%; margin-top: 28px; }
  .hero__lead { position: static; order: 4; margin: 24px 0 0; font-size: var(--step-body); }
  .window figcaption { left: var(--m); right: var(--m); bottom: var(--m); }

  .intro__top { display: block; }
  .intro h2 { font-size: 11vw; }
  .intro__note { margin-top: 20px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 16px; margin-top: 56px; }
  .facts b { font-size: 26px; }
  .intro__pic { margin: 48px 0 0; width: 100%; }

  .scatter { display: block; }
  .scatter h2 { margin-bottom: 48px; }
  .place { margin: 0 0 72px; }
  .place.a { width: 100%; }
  .place.b { width: 68%; margin: 0 0 72px auto; }
  .place.c { width: 82%; }
  .remark { margin: 0 0 72px; }

  .steps__list { top: auto; bottom: 7svh; left: var(--m); translate: none; text-align: left; font-size: 17px; width: auto; right: var(--m); }
  .steps__scrim { inset: auto 0 0 0; height: 48%; }
  .pair figure:first-child { left: auto; right: var(--m); top: 12svh; width: 44vw; }
  .pair figure:last-child { display: none; }

  .light { display: block; }
  .light__figure { margin-top: 32px; }
  .light__controls { margin-top: 24px; }

  .row { display: block; }
  .moment { width: 78%; margin-bottom: 56px; }
  .moment:nth-child(even) { margin-left: auto; width: 68%; }
  .moment figure { margin-top: 20px; }

  .materials h2 { font-size: 17vw; }
  .materials__title { height: auto; top: 16px; padding-top: 16px; place-items: start center; }
  .materials__list { display: block; margin-top: 64px; padding: 0 var(--m) 64px; }
  .material { width: 72%; margin-bottom: 48px; }
  .material:nth-child(even) { margin-left: auto; }

  .contact { display: grid; grid-template-columns: 96px 1fr; gap: 24px 16px; padding: 96px var(--m); }
  .contact__sentence { grid-column: 1 / -1; font-size: 22px; margin: 0; }
  .contact__pic { grid-column: 1; width: 96px; }
  .contact__links { grid-column: 2; }

  .foot { padding: 48px var(--m) 24px; min-height: 0; }
  .foot__row { display: block; margin-top: 40px; }
  .foot__places { font-size: 26px; }
  .foot__links { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .foot__legal { gap: 16px; }
}

/* Pictures in right-hand frames zoom from their right edge, so nothing reaches past the margin */
.place.b img, .material:nth-child(even) img, .intro__pic img, .pair figure:last-child img { transform-origin: 100% 50%; }
