@font-face {
  font-family: Hanken;
  src: url("assets/hanken.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}
@font-face {
  font-family: Instrument;
  src: url("assets/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #151d22;
  --ink: #f6f4ed;
  --paper: #dce5e9;
  --paper-ink: #17262e;
  --edge: clamp(1.25rem, 5vw, 5.25rem);
  --display: Instrument, Georgia, serif;
  background: var(--night);
  color: var(--ink);
  font-family: Hanken, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p, figure { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .24em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: var(--night);
  transform: translateY(calc(-100% - 1.5rem));
}
.skip-link:focus { transform: none; }

.stage { position: relative; isolation: isolate; }
.scene-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .25rem 1.5rem;
  flex-wrap: wrap;
  padding: .85rem var(--edge) 1.1rem;
  background: linear-gradient(#101a22e8, #101a2270 67%, transparent);
}
.brand, .header-link, .motion-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}
.scene-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.4rem;
  align-items: center;
  font-size: .875rem;
}
.motion-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .24em;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle[aria-pressed="true"] { font-weight: 750; }

.shot {
  position: relative;
  display: grid;
  align-content: end;
  min-height: min(54rem, 88svh);
  padding: 7rem var(--edge) clamp(4rem, 12vh, 8rem);
  isolation: isolate;
  overflow: hidden;
}
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.shot-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.shot-copy { position: relative; }
.shot-copy h1, .shot-copy h2, .gallery h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.027em;
  line-height: .93;
}
.shot h1 { font-size: clamp(4.15rem, 13vw, 12rem); }
.shot h2 { font-size: clamp(3.85rem, 8vw, 8rem); }
.shot-copy p {
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  line-height: 1.52;
  max-width: 28ch;
}
.shot-copy h2 + p { margin-top: 1.15rem; }
.fjord {
  min-height: 100svh;
  background: #263d50;
}
.fjord .shot-image { object-position: 50% 53%; }
.fjord::after {
  background:
    linear-gradient(0deg, #0d1821dd, transparent 57%),
    linear-gradient(90deg, #11202a76, transparent 65%);
}
.fjord-copy .place {
  font-size: 1rem;
  margin: 0 0 1rem .2rem;
}
.valley {
  background: #282c2b;
  text-align: right;
  justify-items: end;
}
.valley .shot-image { object-position: 50% 66%; }
.valley-copy p { margin-inline-start: auto; }
.valley::after {
  background:
    linear-gradient(0deg, #101819a0, transparent 48%),
    linear-gradient(270deg, #13191ac7, #13191a30 45%, transparent 70%);
}
.reveal { background: #151612; }
.reveal .shot-image { object-position: 62% 52%; }
.reveal h2 { font-size: clamp(3.55rem, 7.25vw, 7rem); }
.reveal::after {
  background: linear-gradient(90deg, #0f1311b8, #0f131130 36%, transparent 55%);
}
.scene-footer { display: none; }

[data-motion="active"] .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
[data-motion="active"] .shot {
  position: absolute;
  inset: 0;
  min-height: 0;
}
[data-motion="active"] .fjord .shot-image {
  transform: scale(calc(1 + .12 * var(--fjord-drift, 0)));
  transform-origin: 56% 52%;
}
[data-motion="active"] .fjord-copy { opacity: var(--fjord-copy, 1); }
[data-motion="active"] .valley {
  opacity: var(--valley-enter, 0);
  visibility: hidden;
}
[data-motion="active"] .stage[data-valley] .valley { visibility: visible; }
[data-motion="active"] .valley::after {
  box-shadow: inset 0 0 0 100vmax rgb(13 18 18 / calc(.33 * var(--door-open, 0)));
}
[data-motion="active"] .valley-copy {
  opacity: var(--valley-copy, 0);
  transform: translateY(calc(10px * (1 - var(--valley-copy, 0))));
}
[data-motion="active"] .reveal-copy {
  visibility: hidden;
  opacity: var(--inside-copy, 0);
  transform: translateY(calc(14px * (1 - var(--inside-copy, 0))));
}
[data-motion="active"] .stage[data-interior-copy] .reveal-copy { visibility: visible; }

[data-motion="active"] .scene-footer {
  position: absolute;
  z-index: 4;
  inset: auto var(--edge) 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  pointer-events: none;
  text-shadow: 0 2px 8px #0c1418;
}
.scroll-cue {
  font-size: .875rem;
  opacity: var(--scroll-cue, 1);
}
.scroll-track {
  width: min(24vw, 12rem);
  height: 2px;
  background: #f6f4ed65;
  box-shadow: 0 0 0 1px #18212976;
}
.scroll-track::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

.gallery {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 4rem);
  padding: clamp(3rem, 9vw, 8rem) var(--edge) 2.5rem;
  color: var(--paper-ink);
  background: var(--paper);
}
.gallery:focus { outline: none; }
.gallery h2 { font-size: clamp(3rem, 6vw, 6.25rem); }
.gallery p { margin-top: 1rem; line-height: 1.55; max-width: 40ch; }
.gallery .credit { margin-top: 1.6rem; color: #3d515b; }
.gallery-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.43;
  object-fit: cover;
  object-position: 50% 43%;
}
.gallery-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid #84959e;
}

.action {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  padding: .55rem 1.25rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-weight: 680;
  text-decoration: none;
}
.action:hover { background: #c8d5dd; }
.action-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #344c59;
  opacity: .18;
  clip-path: circle(0 at var(--press-x, 50%) var(--press-y, 50%));
  transition: clip-path 240ms cubic-bezier(.23, 1, .32, 1);
}
.action.is-pressing .action-wash { clip-path: circle(140% at var(--press-x, 50%) var(--press-y, 50%)); }
.action-label { position: relative; }
[data-motion="still"] .action-wash { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .action-wash { transition: none; }
}

@media (max-width: 760px) {
  .scene-header { gap: 0 .9rem; }
  .scene-controls { gap: 0 .85rem; }
  .shot { padding-bottom: clamp(4.8rem, 13vh, 8rem); }
  .shot h1 { font-size: clamp(4.55rem, 17vw, 7.4rem); }
  .shot h2 { font-size: clamp(3.55rem, 11vw, 5.35rem); }
  .reveal h2 { font-size: clamp(3.55rem, 11vw, 5.35rem); }
  .fjord .shot-image { object-position: 52% 55%; }
  .valley { justify-items: start; text-align: left; }
  .valley .shot-image { object-position: 38% 55%; }
  .valley-copy p { margin-inline-start: 0; }
  .valley::after { background: linear-gradient(0deg, #11181aee, #11181a65 38%, transparent 65%); }
  .reveal .shot-image {
    --inside-height: min(67%, 125vw);
    inset: 0 0 auto;
    height: var(--inside-height);
    object-position: 66% 46%;
  }
  .reveal::after {
    background: linear-gradient(0deg, #151612 16%, #151612f8 26%, #15161200 58%);
  }
  [data-motion="active"] .scene-footer { bottom: 1.1rem; }
  .gallery { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-aspect-ratio: 5/4) {
  .reveal .shot-image { object-position: 68% center; }
  .reveal::after { background: linear-gradient(0deg, #151612 3%, #151612b0 30%, transparent 62%); }
}

@media (max-height: 530px) {
  .shot { min-height: 28rem; }
}
@media (max-width: 350px) {
  .scene-header { align-items: start; }
  .scene-controls { gap: 0 .75rem; font-size: .82rem; }
  .shot h1 { font-size: 4.05rem; }
}
