/* Lucette: film grain and the veil between pages */

/* Film grain over everything ------------------------------------------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 140; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Veil between pages ---------------------------------------------------- */
.veil, html.veil-in body::after {
  position: fixed; inset: 0; z-index: 160;
  display: grid; place-items: center;
  background: var(--wine); color: var(--salt);
  font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 8vw, 6rem); letter-spacing: .24em; text-indent: .24em;
}
html.veil-in body::after { content: "LUCETTE"; }
.veil { transform: translateY(101%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s .28s; }
.veil.is-covering { transform: none; visibility: visible; transition: transform .28s var(--ease); }
.veil.is-leaving { transform: translateY(-101%); visibility: visible; transition: transform .35s var(--ease); }

/* Living light on the home hero (positions come from js/candles.js) ------ */
.glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.glow { contain: strict; }
.glow i { position: absolute; display: block; border-radius: 50%; opacity: 0; will-change: opacity; }
.glow i.glow__flame { will-change: opacity, transform; }
.glow__halo { background: radial-gradient(closest-side, rgba(255,150,55,.38), rgba(255,120,40,.14) 45%, rgba(255,110,30,0)); }
.glow__halo--lamp { background: radial-gradient(closest-side, rgba(255,185,105,.38), rgba(255,140,60,.13) 45%, rgba(255,120,40,0)); }
.glow__table { background: radial-gradient(closest-side, rgba(255,165,70,.46), rgba(255,140,50,0)); }
.glow__core { background: radial-gradient(closest-side, rgba(255,196,110,.72), rgba(255,150,50,0)); }
.glow__core--lamp { background: radial-gradient(closest-side, rgba(255,235,200,.55), rgba(255,205,140,.3) 55%, rgba(255,180,100,0)); }
.glow i.glow__flame { background: radial-gradient(closest-side, #fff8e4, rgba(255,214,130,.9) 45%, rgba(255,160,60,0)); transform-origin: 50% 85%; }

/* phones: no full-screen grain, it costs smoothness and is barely visible there */
@media (max-width: 960px) { body::before { display: none; } }
