:root {
  --paper: #eff0ef;      /* the warm white of the page */
  --sage: #c4cfc6;       /* the pale sage of the sky */
  --ink: #0d1015;        /* the blue-black of the type */
  --sky-top: #c4cfc6;    /* the sage laid over the photo */
  --sky-low: #e3e7e3;    /* the frame behind the photo while it loads */
  --margin: clamp(8px, 1.6vmin, 18px);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.scena {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  padding: var(--margin);
}
/* a very fine grain on the paper */
.scena::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .06 0 0 0 0 .08 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.inner {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: filter;
}

/* the film */
.tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--sky-low);
  clip-path: inset(100% 0% 0% 0% round 16px);
  transform-origin: 50% 50%;
  will-change: transform, clip-path;
}
.film { position: absolute; inset: 0; overflow: hidden; }
/* the photo: GSAP only moves the img (a slow zoom and drift), the colour grade stays on it in CSS */
.film-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 46%;
  filter: saturate(.62) brightness(1.1) contrast(.9);
  transform-origin: 50% 55%;
  will-change: transform;
}
/* a band of soft light that slides slowly over the water */
.sheen {
  position: absolute;
  left: -40%;
  top: 56%;
  width: 60%;
  height: 34%;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
  opacity: .9;
}
/* a pale veil of paper: the photo goes towards the sage of the page and the ink reads on it */
.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(239, 240, 239, .5) 0%, rgba(239, 240, 239, .2) 30%, rgba(239, 240, 239, .34) 50%, rgba(239, 240, 239, .14) 72%, rgba(239, 240, 239, .55) 100%);
}
/* the sage of the page laid over the photo in colour mode: one palette for the film and the type */
.veil::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sky-top);
  mix-blend-mode: color;
  opacity: .45;
}
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  opacity: .16;
  pointer-events: none;
}

/* the type over the film */
.mask {
  display: block;
  overflow: hidden;
  /* room for the ascenders and the italics, as the site does */
  padding: .2em .12em .2em 0;
  margin: -.2em -.12em -.2em 0;
}
.nav {
  position: absolute;
  top: clamp(12px, 3.2vmin, 30px);
  left: clamp(14px, 3.6vmin, 36px);
  right: clamp(14px, 3.6vmin, 36px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  font: 500 clamp(9px, 1.25vmin, 12px)/1.3 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-side { display: flex; gap: clamp(12px, 2.6vmin, 30px); }
.nav-side.right { justify-content: flex-end; }
.nav a, .cta { color: var(--ink); text-decoration: none; display: inline-block; }
.nav-side a { transition: opacity .3s; }
@media (hover: hover) {
  .nav-side:hover a { opacity: .45; }
  .nav-side a:hover { opacity: 1; }
}
.logo { justify-self: center; }
.logo-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, .8vmin, 8px);
}
.mark { width: clamp(22px, 3.6vmin, 36px); height: auto; overflow: visible; }
.mark circle, .mark path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.mark .mark-ref { opacity: .45; }
.word {
  font: 400 clamp(15px, 2.6vmin, 26px)/1 var(--serif);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.title {
  position: absolute;
  left: clamp(14px, 3.6vmin, 36px);
  right: clamp(14px, 3.6vmin, 36px);
  top: 50%;
  transform: translateY(-46%);
  font: 400 min(10.5vw, 14.5vh)/.92 var(--serif);
  letter-spacing: -.015em;
}
.title em { font-style: italic; }
.line { display: inline-block; white-space: nowrap; transform-origin: 0% 100%; will-change: transform; }
.l1 { padding-left: 0; }
.l2 { text-align: center; }
.l3 { text-align: right; }

.caption {
  position: absolute;
  left: clamp(14px, 3.6vmin, 36px);
  bottom: clamp(14px, 3.6vmin, 36px);
  max-width: 62%;
  font: 500 clamp(9px, 1.25vmin, 12px)/1.45 var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.caption-text { margin-bottom: clamp(8px, 1.8vmin, 16px); }
.cta { display: inline-flex; align-items: center; gap: .7em; }
.cta-arrows {
  position: relative;
  width: 1.15em;
  height: 1.15em;
  overflow: hidden;
  display: inline-block;
}
.arrow { position: absolute; inset: 0; width: 100%; height: 100%; }
.arrow path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.a2 { transform: translateX(-120%); }
.arrow { transition: transform .55s cubic-bezier(.645, .045, .355, 1); }
@media (hover: hover) {
  .cta:hover .a1 { transform: translateX(120%); }
  .cta:hover .a2 { transform: translateX(0); }
}

.replay {
  position: absolute;
  right: clamp(14px, 3.6vmin, 36px);
  bottom: clamp(14px, 3.6vmin, 36px);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .85em 1.25em;
  border: 1px solid rgba(13, 16, 21, .22);
  border-radius: 999px;
  background: rgba(239, 240, 239, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font: 500 clamp(9px, 1.25vmin, 12px)/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
}
.replay svg { width: 1.2em; height: 1.2em; }
.replay path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.replay:focus-visible, .nav a:focus-visible, .cta:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* phone: fewer links, the headline still as big as the box allows */
@media (max-width: 560px) {
  .hide-s { display: none; }
  .caption { max-width: 70%; }
  .title { font-size: min(12.4vw, 13vh); }
}
