:root {
  --ground: #d9d0bd;   /* primed canvas */
  --cream: #f9f0df;
  --ink: #121838;
  --edge-x: clamp(22px, 6vw, 104px);
}

* { box-sizing: border-box; }

/* The page is one fixed picture. It does not scroll: gestures move the light from
   stop to stop (main.js). */
html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html { background: var(--ground); }

body {
  margin: 0;
  color: var(--cream);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: pinch-zoom;   /* swipes go to the page script; pinch still zooms */
}

#painting {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;   /* the tall viewport: a phone's address bar never resizes the picture */
  display: block;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(20px, 3.2vh, 38px) var(--edge-x) 0;
  opacity: 0;
}

.nav a { color: var(--cream); text-decoration: none; }

.mark {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 600;
  font-size: clamp(22px, 1.75vw, 28px);
  letter-spacing: 0.01em;
}

.talk {
  font-size: clamp(16px, 1.15vw, 19px);
  letter-spacing: 0.01em;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(249, 240, 223, 0.55);
  transition: border-color 0.3s;
}
.talk:hover { border-color: var(--cream); }

/* ---------- copy ---------- */

.copy {
  position: fixed;
  left: var(--edge-x);
  bottom: clamp(40px, 9.5vh, 104px);
  z-index: 2;
  width: min(44rem, calc(100vw - 2 * var(--edge-x)));
  pointer-events: none;
  visibility: hidden;
  text-shadow: 0 1px 22px rgba(10, 14, 44, 0.45);
}
.copy a { pointer-events: auto; }

.copy .ln { display: block; opacity: 0; will-change: opacity, transform; }

h1, h2, p { margin: 0; font-weight: 500; }

h1 {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 500;
  font-size: clamp(42px, 6.1vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.012em;
}

.lede {
  margin-top: clamp(16px, 2.4vh, 28px);
  font-size: clamp(19px, 1.6vw, 26px);
  line-height: 1.3;
}

.statement {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 500;
  font-size: clamp(30px, 3.5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.nb { white-space: nowrap; }

.body {
  margin-top: clamp(16px, 2.6vh, 30px);
  max-width: 31em;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.36;
}

.close h2 {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 500;
  font-size: clamp(64px, 10.5vw, 184px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}
.close .lede {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-style: italic;
  font-size: clamp(24px, 2.5vw, 42px);
  margin-top: clamp(10px, 1.6vh, 20px);
}

.cta {
  display: inline-block !important;
  margin-top: clamp(22px, 3.6vh, 40px);
  padding: 0.62em 1.5em 0.7em;
  color: var(--ink);
  background: var(--cream);
  border-radius: 999px;
  font-size: clamp(17px, 1.25vw, 20px);
  letter-spacing: 0.01em;
  text-decoration: none;
  text-shadow: none;
  transition: background 0.3s;
}
.cta:hover { background: #fff; }

/* No WebGL2: a still gradient stands in for the painting. */
.nogl #painting { display: none; }
.nogl body {
  background: linear-gradient(180deg, #1b2452 0%, #3a3f7c 38%, #8a6592 56%, #2c3766 70%, #141a3e 100%) fixed;
}

@media (max-width: 640px) {
  .copy { bottom: clamp(34px, 7vh, 64px); }
}
