/* ==========================================================================
   Night of Ideas
   A Salon held at night: Tanner's nocturne, a claret gallery wall,
   gilt frames and a livret for a catalogue.
   ========================================================================== */

/* ---------- Faces ---------- */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/assets/fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/assets/fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/assets/fonts/old-standard-tt.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/assets/fonts/old-standard-tt-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Old Standard TT";
  src: url("/assets/fonts/old-standard-tt-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* Night: Tanner's blue-green nocturne */
  --night: #0a1215;

  /* Moonlight: text on night */
  --moon: #ece6d6;
  --moon-2: #bfb8a6;
  --moon-3: #948e7f;

  /* Gilt */
  --gilt: #c9a55a;
  --gilt-hi: #f0d99a;
  --gilt-lo: #6d4e1c;

  /* The Salon wall */
  --claret: #3e0f15;
  --claret-text: #f1e2d2;
  --claret-text-2: #d8c0ae;

  /* The Annunciation room */
  --umber: #1a0f04;
  --umber-text: #f6ead0;
  --umber-text-2: #e0cba4;

  --display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --text: "Old Standard TT", "Bodoni 72", Georgia, "Times New Roman", serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 4.6vw, 76px);
  --masthead: 68px;
}

/* ---------- Ground ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--night);
  color: var(--moon);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead) + 12px);
  scrollbar-color: var(--gilt-lo) var(--night);
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--night);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--gilt-hi);
  overflow-x: clip;
}

/* A fine grain over everything, like varnish over canvas */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--gilt); color: var(--night); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--gilt-lo); border: 2px solid var(--night); border-radius: 10px; }

[hidden] { display: none !important; }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gilt-hi);
  outline-offset: 4px;
}

h1, h2, h3, p { margin: 0; }

i, em { font-style: italic; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  text-transform: none;
  letter-spacing: normal;
}

.caps {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.86em;
}

.skip {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gilt);
  color: var(--night);
  font: 500 0.8rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ---------- Shared type ---------- */

.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 30;
  font-size: clamp(2.6rem, 5.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 34em;
  font-size: 1.1875rem;
  line-height: 1.58;
  color: var(--moon-2);
  text-wrap: pretty;
}

.plate-note {
  font-family: var(--display);
  font-variation-settings: "opsz" 11;
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--moon-3);
}
.plate-note i { color: var(--moon-2); }

/* ---------- Buttons & links ---------- */

.btn-gilt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  padding: 1.1em 1.55em 1.05em;
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1d1405;
  background-color: #d4b36b;
  border: 1px solid #5d4213;
  box-shadow: inset 0 1px 0 rgba(255, 248, 222, 0.55), 0 16px 28px -16px rgba(0, 0, 0, 0.85);
  transition: transform 0.16s var(--ease-out), background-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-gilt__icon {
  width: 0.95em;
  height: 0.95em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  transition: transform 0.25s var(--ease-out);
}
.btn-gilt:active { transform: scale(0.97); }
.btn-gilt:focus-visible { outline-color: var(--moon); }

@media (hover: hover) and (pointer: fine) {
  .btn-gilt:hover { background-color: #e2c682; }
  .btn-gilt:hover .btn-gilt__icon { transform: translate(2px, -2px); }
}

.btn-gilt--large {
  font-size: 1rem;
  padding: 1.2em 1.8em 1.15em;
}

.link-quiet {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: rgba(201, 165, 90, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.55em;
  color: var(--moon);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .link-quiet:hover { color: var(--gilt-hi); text-decoration-color: var(--gilt-hi); }
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  padding: 1em 1.45em 0.95em;
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gilt-hi);
  border: 1px solid rgba(201, 165, 90, 0.55);
  transition: transform 0.16s var(--ease-out), border-color 0.25s ease, background-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-line__icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: miter;
}
.btn-line:active { transform: scale(0.97); }
.btn-line:focus-visible { outline-color: var(--moon); }
@media (hover: hover) and (pointer: fine) {
  .btn-line:hover { border-color: var(--gilt-hi); background-color: rgba(201, 165, 90, 0.08); }
}

/* An inline link inside running text: a gilt rule under the word. */
.article p a {
  color: var(--moon);
  text-decoration: underline;
  text-decoration-color: rgba(201, 165, 90, 0.6);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .article p a:hover { color: var(--gilt-hi); text-decoration-color: var(--gilt-hi); }
}

/* ---------- Masthead ---------- */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--masthead);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background-color 0.45s ease, box-shadow 0.45s ease;
}
.masthead.is-solid {
  background-color: var(--night);
  box-shadow: 0 1px 0 rgba(201, 165, 90, 0.2);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--moon);
}
.mark__moon { width: 24px; height: 24px; flex: none; }
.mark__dark { fill: #172529; }
.mark__lit { fill: #ecdcae; }
.mark__rim { fill: none; stroke: rgba(233, 212, 155, 0.4); stroke-width: 1; }
.mark__word {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 38px);
}
.masthead__nav a {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.78rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--moon);
  white-space: nowrap;
  transition: color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .masthead__nav a:hover { color: var(--gilt-hi); }
}
.masthead__nav .masthead__apply {
  padding: 0.85em 1.15em 0.8em;
  border: 1px solid rgba(201, 165, 90, 0.7);
  color: var(--gilt-hi);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.16s var(--ease-out);
}
.masthead__nav .masthead__apply:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .masthead__nav .masthead__apply:hover { background: var(--gilt); color: var(--night); }
}

@media (max-width: 719px) {
  .mark__word { display: none; }
  .masthead__how { display: none; }
}

/* ---------- I. The nocturne ---------- */

.nocturne {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: calc(var(--masthead) + 5vh) var(--gutter) clamp(40px, 7vh, 88px);
  isolation: isolate;
  overflow: hidden;
}

.nocturne__painting,
.nocturne__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.nocturne__painting picture,
.annunciation__painting picture { width: 100%; height: 100%; }
.nocturne__painting img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 24%;
  filter: saturate(0.92) brightness(0.86) contrast(1.04);
}
.nocturne__veil {
  background:
    linear-gradient(180deg, rgba(10, 18, 21, 0.8) 0%, rgba(10, 18, 21, 0) 20%),
    linear-gradient(0deg, var(--night) 0%, rgba(10, 18, 21, 0.55) 18%, rgba(10, 18, 21, 0) 42%),
    linear-gradient(90deg, rgba(8, 14, 17, 0.95) 0%, rgba(8, 14, 17, 0.84) 30%, rgba(8, 14, 17, 0.35) 58%, rgba(8, 14, 17, 0.06) 82%);
}

.nocturne__inner {
  position: relative;
  max-width: 1320px;
  width: 100%;
}

/* The lockup: NIGHT / (moon)F / IDEAS */
.lockup {
  display: inline-grid;
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 60;
  font-size: clamp(4.4rem, 12.2vw, 13.25rem);
  line-height: 0.8;
  letter-spacing: -0.004em;
  text-transform: uppercase;
  color: var(--moon);
  text-shadow: 0 2px 30px rgba(5, 10, 12, 0.45);
}
.lockup__line { display: block; white-space: nowrap; }
.lockup__night { margin-left: -0.035em; }
.lockup__of,
.lockup__ideas { justify-self: end; }
.lockup__of {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
}
.lockup__moon {
  width: 0.71em;
  height: 0.71em;
  align-self: baseline;
  transform: translateY(0.012em);
  overflow: visible;
  filter: drop-shadow(0 0 0.14em rgba(240, 214, 150, 0.32)) drop-shadow(0 0 0.5em rgba(240, 214, 150, 0.16));
}

.livret-line {
  margin-top: clamp(22px, 3.2vh, 36px);
  max-width: 31em;
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 20;
  font-size: clamp(1rem, 1.3vw, 1.1875rem);
  line-height: 1.45;
  color: var(--gilt-hi);
  text-wrap: balance;
}

.offer {
  margin-top: 14px;
  max-width: 33em;
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.58;
  color: var(--moon);
  text-wrap: pretty;
}

.actions {
  margin-top: clamp(24px, 3.4vh, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}

.nocturne__note {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(18px, 3vh, 30px);
  text-align: right;
}

@media (max-width: 899px) {
  .nocturne {
    padding-top: calc(var(--masthead) + 22vh);
  }
  .nocturne__painting img { object-position: 70% 30%; }
  .nocturne__veil {
    background:
      linear-gradient(180deg, rgba(10, 18, 21, 0.75) 0%, rgba(10, 18, 21, 0.2) 18%, rgba(10, 18, 21, 0.55) 40%, rgba(10, 18, 21, 0.92) 64%, var(--night) 100%);
  }
  .lockup { font-size: min(24.5vw, 10rem); }
  .nocturne__note { position: static; margin-top: 36px; text-align: left; }
}

/* The opening: the name surfaces as the moon waxes */
.motion .nocturne__painting img {
  animation: nocturne-in 2.6s var(--ease-slow) both;
}
.motion .lockup__line {
  animation: line-in 1.5s var(--ease-slow) both;
}
.motion .lockup__night { animation-delay: 0.25s; }
.motion .lockup__of { animation-delay: 0.42s; }
.motion .lockup__ideas { animation-delay: 0.58s; }
.motion .lockup__moon {
  animation: moon-in 1.6s var(--ease-slow) 0.3s both;
}
.motion .livret-line,
.motion .offer,
.motion .actions,
.motion .nocturne__note {
  animation: rise-in 1.1s var(--ease-out) both;
}
.motion .livret-line { animation-delay: 1.05s; }
.motion .offer { animation-delay: 1.15s; }
.motion .actions { animation-delay: 1.25s; }
.motion .nocturne__note { animation-delay: 1.6s; }
.motion .masthead { animation: rise-in 1s var(--ease-out) 1.3s both; }

@keyframes nocturne-in {
  from { opacity: 0; transform: scale(1.07); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes line-in {
  from { opacity: 0; filter: blur(14px); transform: translateY(0.07em); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes moon-in {
  from { opacity: 0; filter: blur(8px); }
  to { opacity: 1; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Frames (shared by the hang and the plates) ---------- */

.frame {
  --mold: clamp(26px, 3.8vw, 56px);
  --slip: clamp(5px, 0.6vw, 9px);
  position: relative;
  display: block;
  border: var(--mold) solid #9c7a36;
  border-image: url("/assets/frames/gilt.webp") 150 / var(--mold) stretch;
  background: #1a1206;
  box-shadow:
    0 34px 44px -26px rgba(0, 0, 0, 0.9),
    0 80px 110px -60px rgba(0, 0, 0, 0.75);
  text-decoration: none;
  color: inherit;
}
/* The slip: a plain linen liner inside gilt, a gilt fillet inside ebony */
.frame__slip {
  position: relative;
  display: block;
  padding: var(--slip);
  background: #d8ccb1;
  box-shadow: inset 0 0 0 1px rgba(40, 26, 6, 0.5), inset 2px 3px 6px rgba(40, 26, 6, 0.4);
}
.frame__slip::after {
  /* the upper molding's shadow falling across the top of the work */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 12px 16px -10px rgba(20, 12, 2, 0.55);
}
.frame__slip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(20, 12, 2, 0.6);
}

/* The lamp above lights the top rail and leaves the bottom rail in shade */
.frame::after {
  content: "";
  position: absolute;
  inset: calc(var(--mold) * -1);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.38) 0%, rgba(255, 244, 214, 0) 34%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.5) 100%);
  mix-blend-mode: soft-light;
}

.frame--ebony { border-image-source: url("/assets/frames/ebony.webp"); border-color: #1a1714; }
.frame--ebony .frame__slip {
  background: #c9a55a;
  box-shadow: inset 0 0 0 1px rgba(40, 26, 6, 0.65), inset 1px 2px 4px rgba(40, 26, 6, 0.45);
}

.frame--wide { --mold: clamp(32px, 4.8vw, 70px); }

/* Lamp glare on the glass; follows the pointer on the lit work */
.frame__glare {
  position: absolute;
  inset: var(--slip);
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--gx, 30%) var(--gy, 16%), rgba(255, 244, 220, 0.2), transparent 42%),
    linear-gradient(112deg, transparent 30%, rgba(255, 252, 240, 0.07) 41%, rgba(255, 252, 240, 0.02) 47%, transparent 54%);
  mix-blend-mode: screen;
}
/* Varnish and glass tone the pale works too: warm at the edges, a darker band
   beside the streak. A sibling of the glare, so it multiplies against the work itself. */
.frame__slip picture { position: relative; }
.frame__slip picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 24%, rgba(92, 64, 20, 0.16) 34%, rgba(92, 64, 20, 0.05) 39%, transparent 43%),
    radial-gradient(ellipse 78% 88% at 50% 45%, transparent 55%, rgba(92, 64, 20, 0.22) 100%);
  mix-blend-mode: multiply;
}

/* ---------- II. The hang ---------- */

.hang {
  --fw: clamp(280px, 54vw, 760px);
  --cord: clamp(52px, 6.4vw, 96px);
  position: relative;
  padding: clamp(110px, 13vw, 190px) 0 clamp(90px, 10vw, 150px);
  color: var(--claret-text);
  background-color: var(--claret);
  background-image:
    radial-gradient(ellipse 70% 42% at 50% 44%, rgba(255, 176, 120, 0.1), transparent 72%),
    linear-gradient(180deg, var(--night) 0, rgba(10, 18, 21, 0) 180px),
    linear-gradient(0deg, var(--night) 0, rgba(10, 18, 21, 0) 160px);
  overflow: hidden;
  isolation: isolate;
}
/* Damask-dark corners, as if the room were lit only near the works */
.hang::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 90% 70% at 50% 46%, transparent 35%, rgba(12, 2, 4, 0.7) 100%);
  pointer-events: none;
}

.hang__head {
  padding: 0 var(--gutter);
  max-width: 1440px;
  margin: 0 auto clamp(44px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  align-items: end;
  gap: 24px 64px;
}
.hang__head .section-lede { color: var(--claret-text-2); margin-top: 0; }

@media (max-width: 899px) {
  .hang__head { grid-template-columns: 1fr; }
}

/* The picture rail */
.hang__viewport {
  position: relative;
}
.hang__viewport::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 7px;
  z-index: 1;
  background: #b48c44;
  border-top: 1px solid #ead08f;
  border-bottom: 1px solid #4a3310;
  box-shadow: 0 10px 14px -6px rgba(0, 0, 0, 0.6);
}

/* Without script: a plain horizontal scroll of works */
.hang__wall {
  list-style: none;
  margin: 0;
  padding: 7px var(--gutter) 64px;
  display: flex;
  gap: clamp(24px, 4vw, 64px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hang__wall::-webkit-scrollbar { display: none; }
.work {
  flex: none;
  width: var(--fw);
  scroll-snap-align: center;
}
.work__hanger {
  position: relative;
  transform-origin: 50% 0;
}
.work__cord {
  width: 70%;
  height: var(--cord);
  margin: 0 auto;
  overflow: visible;
  fill: none;
  stroke: #1d1004;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.work__cord path { vector-effect: non-scaling-stroke; }
/* the hook on the rail */
.work__hanger::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #c9a55a;
  border: 1px solid #4a3310;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}
/* the pool of light a lamp throws on the lit work */
.work__hanger::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -2%;
  width: 180%;
  height: 150%;
  transform: translateX(-50%);
  /* a lamp above the work: brightest at the top edge, falling off down the wall */
  background:
    radial-gradient(ellipse 34% 32% at 50% 33%, rgba(255, 214, 150, 0.42), rgba(255, 206, 142, 0.13) 55%, transparent 100%),
    radial-gradient(ellipse 46% 46% at 50% 48%, rgba(255, 190, 130, 0.12), transparent 100%);
  opacity: var(--lit, 1);
  pointer-events: none;
}

.work .frame {
  filter: brightness(calc(0.5 + 0.5 * var(--lit, 1))) saturate(calc(0.6 + 0.4 * var(--lit, 1)));
}

/* With script: the wall moves, the works hang absolutely */
.js .hang__viewport {
  height: calc(var(--cord) + (var(--fw) * 0.5625) + 120px);
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.js .hang__viewport.is-dragging { cursor: grabbing; }
.js .hang__wall {
  position: absolute;
  inset: 0;
  padding: 0;
  overflow: visible;
  display: block;
}
.js .work {
  position: absolute;
  left: 0;
  top: 3px;
  will-change: transform;
}
.js .work .frame { -webkit-user-drag: none; }
.js .work img { pointer-events: none; -webkit-user-drag: none; }

.hang__label {
  margin: clamp(8px, 2vw, 20px) auto 0;
  padding: 0 var(--gutter);
  max-width: 1080px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: start;
  gap: clamp(12px, 3vw, 40px);
}
.no-js .hang__label { grid-template-columns: 1fr; }

.hang__step {
  width: 52px;
  height: 52px;
  margin-top: 12px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 154, 0.55);
  background: rgba(31, 7, 10, 0.35);
  color: var(--gilt-hi);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.16s var(--ease-out), opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hang__step svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
}
.hang__step:active { transform: scale(0.95); }
.hang__step[aria-disabled="true"] { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .hang__step:not([aria-disabled="true"]):hover { background: rgba(240, 217, 154, 0.12); border-color: var(--gilt-hi); }
}

/* The cartels */
.cartels {
  display: grid;
  gap: 48px;
}
.js .cartels { gap: 0; }
.cartel {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}
.js .cartel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  filter: blur(4px);
  transform: translateY(6px);
  transition: opacity 0.18s ease, filter 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.js .cartel.is-active {
  opacity: 1;
  visibility: visible;
  filter: none;
  transform: none;
  transition: opacity 0.42s var(--ease-out) 0.08s, filter 0.42s var(--ease-out) 0.08s, transform 0.42s var(--ease-out) 0.08s, visibility 0s;
}
.cartel__no {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 11;
  font-variant-numeric: lining-nums;
  color: var(--gilt-hi);
  margin-right: 0.15em;
}
.cartel__name {
  margin-top: 0;
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 8;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--claret-text);
}
.cartel__title {
  margin-top: 12px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 22;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.cartel__sub {
  margin-top: 6px;
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 20;
  font-size: 1.0625rem;
  color: var(--claret-text-2);
  text-wrap: balance;
}
.cartel__desc {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--claret-text-2);
  text-wrap: pretty;
}
.cartel__link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gilt-hi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(240, 217, 154, 0.5);
  text-underline-offset: 0.6em;
  transition: text-decoration-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .cartel__link:hover { text-decoration-color: var(--gilt-hi); }
}

.hang__foot {
  max-width: 1080px;
  margin: clamp(56px, 7vw, 88px) auto 0;
  padding: 0 var(--gutter);
}

/* The catalogue: the livret's index */
.catalogue {
  border-top: 1px solid rgba(240, 217, 154, 0.3);
  padding-top: 26px;
}
.catalogue__title {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gilt-hi);
}
.catalogue__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
}
.catalogue__list li { break-inside: avoid; }
.catalogue__list button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 0 9px 22px;
  position: relative;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--claret-text-2);
  cursor: pointer;
  transition: color 0.2s ease;
}
.catalogue__list button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 12px;
  height: 1px;
  background: var(--gilt-hi);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.catalogue__list button[aria-current="true"] { color: var(--claret-text); }
.catalogue__list button[aria-current="true"]::before { transform: scaleX(1); }
.catalogue__list button[aria-current="true"] i { color: var(--gilt-hi); }
@media (hover: hover) and (pointer: fine) {
  .catalogue__list button:hover { color: var(--claret-text); }
}
.catalogue__no {
  font-family: var(--display);
  font-variation-settings: "opsz" 8;
  font-variant-numeric: lining-nums;
}

.hors-concours {
  margin-top: 36px;
  max-width: 44em;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--claret-text-2);
}
.hors-concours__term {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 20;
  color: var(--gilt-hi);
}

@media (max-width: 719px) {
  .hang { --fw: 80vw; }
  .hang__label {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "prev next" "label label";
    gap: 20px 16px;
  }
  .hang__step { width: 48px; height: 48px; margin-top: 0; }
  .hang__step--prev { grid-area: prev; justify-self: end; }
  .hang__step--next { grid-area: next; justify-self: start; }
  .cartels { grid-area: label; }
  .catalogue__list { columns: 1; }
  .cartel__desc { font-size: 1rem; }
}

/* ---------- III. The règlement ---------- */

.reglement {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(100px, 12vw, 180px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(44px, 6vw, 112px);
  align-items: start;
}

.reglement__plate {
  margin: 0;
  position: sticky;
  top: calc(var(--masthead) + 40px);
}
.frame--plate { --mold: clamp(16px, 1.9vw, 28px); --slip: clamp(8px, 1vw, 14px); }
.frame--plate .frame__slip img { aspect-ratio: auto; }
.reglement__plate .plate-note { margin-top: 18px; }

.reglement__text .section-lede { margin-bottom: clamp(36px, 5vw, 56px); }

.articles {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article {
  padding: 26px 0 30px;
  border-top: 1px solid rgba(201, 165, 90, 0.28);
}
.article:last-child { border-bottom: 1px solid rgba(201, 165, 90, 0.28); }
.article__head {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 18;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.004em;
}
.article__no {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 11;
  color: var(--gilt);
  margin-right: 0.2em;
}
.article p {
  margin-top: 10px;
  max-width: 34em;
  color: var(--moon-2);
  text-wrap: pretty;
}

@media (max-width: 999px) {
  .reglement { grid-template-columns: 1fr; }
  .reglement__plate { position: relative; top: 0; max-width: 680px; }
}

/* ---------- IV. The annunciation ---------- */

.annunciation {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 140px var(--gutter) clamp(56px, 9vh, 110px);
  color: var(--umber-text);
  background: var(--umber);
  isolation: isolate;
  overflow: hidden;
}
.annunciation__painting,
.annunciation__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.annunciation__painting img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 35%;
}
.annunciation__veil {
  background:
    linear-gradient(180deg, var(--night) 0%, rgba(10, 18, 21, 0) 16%),
    linear-gradient(0deg, rgba(20, 11, 3, 0.97) 0%, rgba(20, 11, 3, 0.86) 24%, rgba(20, 11, 3, 0.3) 50%, rgba(20, 11, 3, 0) 70%),
    linear-gradient(90deg, rgba(20, 11, 3, 0.35) 0%, rgba(20, 11, 3, 0) 45%);
}
.annunciation__inner {
  max-width: 44rem;
}
.annunciation__title {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 30;
  font-size: clamp(2.75rem, 6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.014em;
  text-wrap: balance;
}
.annunciation__body {
  margin-top: 20px;
  max-width: 32em;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--umber-text-2);
  text-wrap: pretty;
}
.annunciation .btn-gilt { margin-top: 30px; }
.annunciation__aside {
  margin-top: 22px;
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 20;
  font-size: 1.0625rem;
  color: var(--umber-text-2);
}
.annunciation__note {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(18px, 3vh, 30px);
  color: rgba(246, 234, 208, 0.62);
}
.annunciation__note i { color: rgba(246, 234, 208, 0.8); }

@media (max-width: 899px) {
  .annunciation { padding-top: 46vh; }
  .annunciation__painting img { object-position: 68% 38%; }
  .annunciation__painting { bottom: auto; height: 70%; }
  .annunciation__veil {
    background:
      linear-gradient(180deg, var(--night) 0%, rgba(10, 18, 21, 0) 12%),
      linear-gradient(0deg, var(--umber) 30%, rgba(26, 15, 4, 0.85) 45%, rgba(26, 15, 4, 0.1) 72%);
  }
  .annunciation__note { position: static; margin-top: 40px; }
}

/* ---------- Colophon ---------- */

.colophon {
  padding: clamp(80px, 10vw, 130px) var(--gutter) clamp(48px, 6vw, 72px);
  background: var(--night);
  border-top: 1px solid rgba(201, 165, 90, 0.2);
}
.colophon__inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}
.colophon__mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.colophon__moon { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(240, 214, 150, 0.25)); }
.colophon__about {
  margin-top: 18px;
  color: var(--moon-2);
}
.colophon__contact { margin-top: 30px; }
.colophon__address {
  margin-top: 12px;
  font-family: var(--display);
  font-variation-settings: "opsz" 11;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--moon-3);
}
.colophon__links {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 32px;
}
.colophon__links a {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "opsz" 8;
  font-size: 0.78rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gilt-hi);
}
@media (hover: hover) and (pointer: fine) {
  .colophon__links a:hover { text-decoration: underline; text-underline-offset: 0.5em; }
}
.colophon__credits {
  margin: 44px auto 0;
  max-width: 36em;
  font-family: var(--display);
  font-variation-settings: "opsz" 11;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--moon-3);
}

/* ---------- Reveals (script-gated; content is visible without script) ---------- */

.motion [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.motion [data-reveal="plate"] {
  opacity: 1;
  transform: none;
}
.motion [data-reveal="plate"] .frame {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.6s var(--ease-slow);
}
.motion [data-reveal="plate"] .frame img {
  transform: scale(1.08);
  transition: transform 2.2s var(--ease-slow);
}
.motion [data-reveal="plate"].is-in .frame { clip-path: inset(-40px -80px -160px -80px); }
.motion [data-reveal="plate"].is-in .frame img { transform: none; }
.motion [data-reveal="plate"] .plate-note {
  opacity: 0;
  transition: opacity 0.8s ease 0.9s;
}
.motion [data-reveal="plate"].is-in .plate-note { opacity: 1; }
.motion .articles .article:nth-child(2) { transition-delay: 0.06s; }
.motion .articles .article:nth-child(3) { transition-delay: 0.12s; }
.motion .articles .article:nth-child(4) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
