/* Gilded Night on the public website, to match the dashboard (gilded.css), 26 Nov 2026.
   Loaded last on every public page (never on the dashboard, the studio or the flipbook reader). The storybook stays:
   paper, letters, the map, the candle, wax seals, covers and every picture are untouched. What changes is around them:
   - slow gold, teal and wine light in the night behind the page (the dark sections let it through at their edges);
   - the header, the menu, the small round buttons and dark panels as glass with a thread of gold light;
   - gold-foil pill buttons and gold-foil italic words in the big headings.
   Colours, light and motion only: no size, spacing or layout changes, so phones stay exactly as they are.
   Nothing moves with "reduce motion" or the site's "Still pictures" switch (html.calm). */

body:not(.dash-body) {
  --gs-foil: linear-gradient(100deg, #f9e7b0 0%, #c9a24a 32%, #fff6d6 48%, #d7b25c 60%, #8a6a2a 100%);
  --gs-gold-btn: linear-gradient(145deg, #fff0c2, #e1bb62 45%, #9b7428);
  --gs-glow: 0 10px 28px -8px rgba(240,190,90,.6);
  --gs-glass: linear-gradient(158deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 55%, rgba(255,255,255,.04)), rgba(14,12,18,.55);
  --gs-line: rgba(255,255,255,.11);
  scrollbar-color: rgba(240,211,140,.3) var(--night);
}
body:not(.dash-body) ::selection { background: rgba(240,211,140,.35); }

/* ---------- The light behind the page (as on the dashboard, a little softer around the pictures) ---------- */
body:not(.dash-body)::before {
  content: ""; position: fixed; inset: -16vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 14% 10%, rgba(214,170,80,.34), transparent 70%),
    radial-gradient(44vmax 34vmax at 92% 24%, rgba(30,120,108,.44), transparent 70%),
    radial-gradient(48vmax 32vmax at 54% 106%, rgba(130,36,52,.4), transparent 72%);
  will-change: transform;
  animation: gs-drift 52s ease-in-out infinite alternate;
}
@keyframes gs-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-3vmax, 2vmax, 0) rotate(4deg); }
  100% { transform: translate3d(2vmax, -2vmax, 0) rotate(-3deg); }
}
/* The dark sections keep their candle glow but let the night light through around it */
body:not(.dash-body) .hero { background: radial-gradient(ellipse 70% 60% at 75% 40%, rgba(42,29,26,.92) 0%, rgba(14,11,13,0) 70%); }
body:not(.dash-body) .hero5 { background: radial-gradient(ellipse 55% 70% at 74% 62%, rgba(43,26,21,.92) 0%, rgba(14,11,13,0) 72%); }
body:not(.dash-body) .page-head:not(.page-head--paper) { background: radial-gradient(ellipse 55% 75% at 82% 45%, rgba(44,31,27,.9) 0%, rgba(14,11,13,0) 72%); }
body:not(.dash-body) .doors { background: linear-gradient(180deg, rgba(14,11,13,0), rgba(21,17,26,.45)); }
body:not(.dash-body) .section-dark { background: linear-gradient(180deg, rgba(21,17,26,.45), rgba(14,11,13,0)); }
@media (max-width: 1040px) {
  body:not(.dash-body) .hero5 { background: transparent; }
}

/* ---------- Header: frosted glass with a gold hairline, as the dashboard's rail ---------- */
body:not(.dash-body) .site-header.is-scrolled {
  background: rgba(12,10,15,.64); border-bottom-color: rgba(240,211,140,.24);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.04), 0 20px 40px -30px rgba(0,0,0,.85);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
@media (max-width: 1240px) {
  body:not(.dash-body) .site-header { background: rgba(12,10,15,.72); border-bottom-color: rgba(240,211,140,.24);
    -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
  /* The menu sheet stays solid (nothing shows through under the words), lit like the dashboard */
  body:not(.dash-body) .site-nav {
    background: radial-gradient(70% 34% at 100% 0%, rgba(30,120,108,.26), transparent 70%), radial-gradient(80% 30% at 0% 100%, rgba(201,162,74,.16), transparent 70%), linear-gradient(180deg, #17121a, #0e0b0d 220px);
    border-left-color: rgba(240,211,140,.24);
  }
}
html.menu-open body:not(.dash-body) .site-header { background: #0e0b0d; }
body:not(.dash-body) .site-nav a.nav-cta { border-radius: 999px; border-color: rgba(255,255,255,.35); background: var(--gs-gold-btn); color: #1b1206; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), var(--gs-glow); }
body:not(.dash-body) :is(.secrets-chip, .account-btn, .cart-btn--lite) { border-color: rgba(240,211,140,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
body:not(.dash-body) .account-btn.is-in { background: var(--gs-gold-btn); box-shadow: var(--gs-glow); }
body:not(.dash-body) .brand img { filter: drop-shadow(0 0 12px rgba(240,200,110,.5)); }
body:not(.dash-body) .cart-btn--lite .cart-count { background: var(--gs-gold-btn); }

/* ---------- Buttons: gold-foil pills and glass pills ---------- */
body:not(.dash-body) .btn { border-radius: 999px; }
body:not(.dash-body) .btn-gold {
  background: var(--gs-gold-btn); border-color: rgba(255,255,255,.35); color: #1b1206;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), var(--gs-glow);
}
body:not(.dash-body) .btn-gold:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 36px -10px rgba(240,190,90,.85); }
body:not(.dash-body) .btn-ghost {
  background: rgba(255,255,255,.05); border-color: rgba(240,211,140,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 12px 28px -18px rgba(0,0,0,.8);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
}
body:not(.dash-body) .btn-ghost:hover { background: rgba(240,211,140,.1); border-color: rgba(240,211,140,.6); }
body:not(.dash-body) .btn-ghost::before { left: 22%; right: 22%; }

/* ---------- Gold-foil words in the big headings on the night (the paper pages keep their wine-red) ---------- */
body:not(.dash-body) :is(.hero h1, .hero5 h1, .page-head:not(.page-head--paper) h1, .lost h1, .letter-band h2, .lv-wordmark, .doors .section-head h2, .section-dark .section-head h2) em,
body:not(.dash-body) .lv-wordmark span {
  background: var(--gs-foil); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
body:not(.dash-body) :is(.hero h1, .hero5 h1, .page-head:not(.page-head--paper) h1) em { animation: gs-foil 10s linear infinite; }
@keyframes gs-foil { from { background-position: 0% 0; } to { background-position: 220% 0; } }
/* The eyebrow's line becomes a thread of gold light */
body:not(.dash-body) .eyebrow::before { background: linear-gradient(90deg, transparent, currentColor); box-shadow: 0 0 8px rgba(240,211,140,.55); }
body:not(.dash-body) .page-head--paper .eyebrow::before, body:not(.dash-body) .diary .eyebrow::before { box-shadow: none; }

/* ---------- Glass for the small dark panels and controls on the night ---------- */
body:not(.dash-body) :is(.lb-btn, .lb-close, .cover-concept, .desk-card-action) {
  background: var(--gs-glass); border-color: var(--gs-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 34px -20px rgba(0,0,0,.85);
}
body:not(.dash-body) .door-arch { border-color: rgba(240,211,140,.45); box-shadow: 0 30px 50px -28px #000, 0 0 40px -18px rgba(240,200,110,.45); }
body:not(.dash-body) .door:hover .door-arch, body:not(.dash-body) .door:focus-visible .door-arch { box-shadow: 0 40px 60px -28px #000, 0 0 60px -8px rgba(240,200,110,.5); }
body:not(.dash-body) .arch { box-shadow: 0 0 0 1px rgba(240,211,140,.55), 0 0 0 10px rgba(14,11,13,.88), 0 0 0 11px rgba(240,211,140,.28), 0 40px 80px -30px #000, 0 0 110px -18px rgba(255,190,100,.42); }

/* The cart's summary: the dark ledger beside the books becomes night glass */
body:not(.dash-body) .cart-summary { border: 1px solid rgba(240,211,140,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 34px 70px -40px rgba(0,0,0,.9), 0 0 60px -36px rgba(240,200,110,.5); }

/* The footer: a gold hairline where the street meets the night */
body:not(.dash-body) .site-footer { box-shadow: inset 0 1px 0 rgba(240,211,140,.22); }

/* ---------- Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body:not(.dash-body)::before, body:not(.dash-body) :is(.hero h1, .hero5 h1, .page-head h1) em { animation: none !important; }
}
html.calm body:not(.dash-body)::before { animation: none !important; } /* calm ("Still pictures") stops every animation in styles.css too */
