/* MOORSACHI · The Seventh Thread — painted imagery woven through the site.
   Every painting carries the gold 7; each placement is built around it.
   Motion is transform + opacity only, scrubbed by scroll (never hijacked),
   and every piece has a still state for reduced motion. Driven by art.js. */

/* ─── The descent (home): scroll down into the seventh sun ─── */
.descent { position: relative; height: 220vh; background: var(--moor-surface-base, #09080E); }
.descent__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.descent__art, .descent__art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.descent__art img {
  object-fit: cover;
  /* object-position and transform-origin share a point: the sun sits at 43% of the
     painting's height, and cover keeps that point at 43% of the screen, so the zoom
     travels straight into the 7 at any viewport shape */
  object-position: 50% 43%;
  transform-origin: 50% 43%;
  transform: scale(var(--d-scale, 1));
  will-change: transform;
}
.descent__veil {
  position: absolute; inset: 0; pointer-events: none;
  /* soft top and bottom edges into the page; the darkness at the end is the cut */
  background:
    linear-gradient(var(--moor-surface-base, #09080E), transparent 18%, transparent 62%, rgba(9,8,14,.88) 100%);
}
.descent__dark { position: absolute; inset: 0; background: #09080E; opacity: var(--d-dark, 0); pointer-events: none; }
.descent__line {
  position: absolute; left: 50%; bottom: 11vh;
  width: min(36rem, calc(100% - 3rem));
  margin: 0; transform: translateX(-50%);
  text-align: center;
  font-family: var(--font-display, 'Newsreader', Georgia, serif);
  font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem); line-height: 1.3;
  color: #F0ECF5;
  text-shadow: 0 2px 18px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.9);
  opacity: var(--d-line, 1);
}
.descent__line em { color: #E3CC96; font-style: italic; }
@media (max-width: 768px) { .descent { height: 180vh; } }
@media (prefers-reduced-motion: reduce) {
  .descent { height: auto; }
  .descent__stage { position: relative; }
  .descent__art img { transform: none; }
  .descent__dark { display: none; }
  .descent__line { opacity: 1; }
}

/* ─── The lantern (Our Story): a circle of light finds the portrait ─── */
.lantern { max-width: 26rem; margin: 0 auto 3rem; text-align: center; }
.lantern__frame {
  position: relative; overflow: hidden; container-type: inline-size;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--moor-gold-faint, rgba(200,175,120,.22));
  background: #09080E;
}
.lantern__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lantern__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle var(--lr, 36cqw) at var(--lx, 50%) var(--ly, 32%),
    rgba(9,8,14,0) 0%, rgba(9,8,14,.08) 40%, rgba(9,8,14,.9) 100%);
  transition: opacity .9s ease;
}
.lantern.is-lit .lantern__veil { opacity: 0; }
.lantern figcaption {
  margin-top: 1rem;
  font: 500 .8125rem/1.4 var(--font-utility, 'Barlow Condensed', sans-serif);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--moor-ink-secondary);
}
.lantern__toggle {
  margin-top: .5rem; min-height: 44px; padding: 0 .25rem;
  background: none; border: 0; cursor: pointer;
  font: italic 400 1rem/1.3 var(--font-display, 'Newsreader', Georgia, serif);
  color: var(--moor-purple-ink);
  text-decoration: underline; text-decoration-color: var(--moor-hairline); text-underline-offset: 4px;
}
.lantern__toggle:focus-visible { outline: 2px solid var(--moor-purple-bright, #B591E0); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .lantern__veil { display: none; } .lantern__toggle { display: none; } }

/* ─── Silk ground (Our Story tenets): the scarf behind "We dress as a practice" ─── */
.silk-ground { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.silk-ground img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; opacity: .34; }
.silk-ground::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--moor-surface-elevated, #120F1A), rgba(18,15,26,.55) 22%, rgba(18,15,26,.72) 60%, var(--moor-surface-elevated, #120F1A)),
    radial-gradient(ellipse at 50% 55%, rgba(18,15,26,.35), rgba(18,15,26,.85) 75%);
}
.silk-ground + .section__inner { position: relative; z-index: 1; }
[data-register="light"] .silk-ground img { opacity: .2; }
[data-register="light"] .silk-ground::after {
  background:
    linear-gradient(var(--moor-surface-elevated), rgba(250,246,238,.7) 22%, rgba(250,246,238,.82) 60%, var(--moor-surface-elevated)),
    radial-gradient(ellipse at 50% 55%, rgba(250,246,238,.45), rgba(250,246,238,.9) 75%);
}
