/* The hall as a still stage, for the pages beside the landing (privacy/, support/), over style.css. See README.md.
   The night sky, his two arches at the window's sides, his stroke between their crowns, and the page's words scrolling
   between the arches in a lane of night, under a still cap along the stroke; the landing's foot ends it. */

/* one language at a time (the head's script sets data-one, from the landing's own switch or an address into one article) */
html[data-one="az"] #en, html[data-one="az"] [data-for="en"], html[data-one="en"] #az, html[data-one="en"] [data-for="az"] { display: none; }

.hs { background: var(--night); --sh: 100lvh; --lane: 42rem; }
@supports not (height: 100lvh) { .hs { --sh: 100vh; } }

/* ═════ the stage ═════ */
.hs-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; height: var(--sh); }
/* the sky: the landing's hall sky under the night, a little taller than the window so it can drift as the policy is read
   (stage.js moves it, at most --drift, from the top of the page to its end) */
.hs-sky { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--sh) * 1.25); will-change: transform; }
.hs-sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hs-sky::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgb(19 31 40 / .35), rgb(19 31 40 / .5) 40%, rgb(19 31 40 / .75)); }

/* the arches, a window high, each as wide as the room beside the lane allows (never wider than the painting itself): its
   outer pillar always whole, its opening running in toward the lane and melting into the sky
   — and on a window too narrow for that, the arches stand wider at first, round the title, and draw back to their pillars
   as the policy comes up (stage.js sets --t from 0 at the top to 1 a window down) */
.hs { --P: calc(var(--sh) * 760 / 2026); --room: min(var(--P), max(64px, calc((100vw - var(--lane)) / 2 + 40px))); --room0: var(--room); }
.hs-arch { position: absolute; top: 0; height: var(--sh); width: calc(var(--room0) + (var(--room) - var(--room0)) * var(--t, 1)); }
.hs-arch-l { left: 0; } .hs-arch-r { right: 0; }
.hs-arch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hs-arch-l img { object-position: 0 0;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent), linear-gradient(#000 70%, transparent 98%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 55%, transparent), linear-gradient(#000 70%, transparent 98%); mask-composite: intersect; }
.hs-arch-r img { object-position: 100% 0;
  -webkit-mask-image: linear-gradient(-90deg, #000 55%, transparent), linear-gradient(#000 70%, transparent 98%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(-90deg, #000 55%, transparent), linear-gradient(#000 70%, transparent 98%); mask-composite: intersect; }
/* the torch stands on each pillar's foot, 15.4 % into the painting's own width (the painting is as tall as the window) */
.hs-arch .torch { width: calc(var(--sh) * .3); top: 78.6%; }
.hs-arch .sparks { top: 77.6%; }
.hs-arch-l .torch, .hs-arch-l .sparks { left: calc(var(--sh) * 760 / 2026 * .154); }
.hs-arch-r .torch, .hs-arch-r .sparks { left: calc(100% - var(--sh) * 760 / 2026 * .154); }

/* ═════ the cap: the stage's own sky and crowns once more, over what scrolls, cut along his stroke between the arches
   (ridge-3-cap.webp: solid above the stroke's lower edge, then melting over a short tail), so the policy passes under the
   stroke and fades out beneath it; the stroke and the name stand on the cap (.hs-top), still. --cy, --cw, --cx: the
   stroke's top, width and left, as the landing's hall lays it. ═════ */
.hs-cap { position: fixed; inset: 0; z-index: 3; height: var(--sh); overflow: hidden; pointer-events: none;
  --cy: clamp(4px, 1.2vw, 24px); --cw: 110vw; --cx: -5vw; --ch: calc(var(--cw) * 246 / 1792);
  -webkit-mask: url("scene/ridge-3-cap.webp") var(--cx) var(--cy) / var(--cw) var(--ch) no-repeat, linear-gradient(#000 0 0) 0 0 / 100% calc(var(--cy) + 1px) no-repeat;
  mask: url("scene/ridge-3-cap.webp") var(--cx) var(--cy) / var(--cw) var(--ch) no-repeat, linear-gradient(#000 0 0) 0 0 / 100% calc(var(--cy) + 1px) no-repeat; }
.hs-cap::after { content: ""; position: absolute; inset: 0 0 auto; height: calc(var(--cy) + var(--ch)); background: linear-gradient(rgb(19 31 40 / .55), rgb(19 31 40 / .2)); }
.hs-top { position: fixed; z-index: 4; inset: 0 0 auto; height: 0; }
.hs-lintel { top: 0; height: 16vw; }
/* mist at the arches' feet */
.hs-mist { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(transparent, rgb(19 31 40 / .55) 55%, rgb(19 31 40 / .8)); }

/* ═════ what scrolls ═════ */
.hs-head, .hs-main, .hs-foot { position: relative; z-index: 1; }
/* the first window: the name, then the title standing between the arches, low enough to clear the stroke */
.hs-head { min-height: calc(var(--sh) * .82); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(14vw + 20px) var(--gut) 60px; text-align: center; }
.hs .top-nav { position: fixed; z-index: 5; }   /* the language stays at hand, on the cap */
.hs-home { position: fixed; top: clamp(22px, 2.6vw, 36px); left: 50%; translate: -50% 0; font-size: clamp(30px, 2.8vw, 40px);
  text-decoration: none; color: var(--ink-2); text-shadow: 0 1px 18px rgb(0 0 0 / .8); transition: color .3s; z-index: 3; }
.hs-home:hover { color: var(--gold-hi); }
/* a pool of the night behind the title, so it reads over the crowns and banners round it */
.hs-title { position: relative; isolation: isolate; }
.hs-title::before { content: ""; position: absolute; z-index: -1; inset: -40% -30%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(15 24 32 / .7), rgb(15 24 32 / .35) 60%, transparent); }
.hs-title h1 { font: 500 clamp(48px, 6vw, 92px)/1.02 var(--display); color: var(--ink); text-wrap: balance;
  text-shadow: 0 2px 30px rgb(10 12 20 / .8), 0 0 80px rgb(255 226 170 / .14); }
.hs-title .ornament { margin: 20px 0 14px; }
.hs-when { margin: 0; font-size: 16px; letter-spacing: .04em; color: var(--ink-2); text-shadow: 0 1px 14px rgb(0 0 0 / .8); }
.hs-title { animation: pv-rise 1.4s var(--ease) both; }
@keyframes pv-rise { from { opacity: 0; transform: translateY(18px); } }

/* the lane: a band of night between the arches, its sides melting into the sky, so his words read over the painting */
.hs-main { padding: 0 var(--gut) clamp(48px, 6vw, 96px); }
.hs-main { --band: linear-gradient(90deg, transparent, rgb(15 24 32 / .72) 22%, rgb(15 24 32 / .72) 78%, transparent); }
.hs-head { --band: linear-gradient(90deg, transparent, rgb(15 24 32 / .72) 22%, rgb(15 24 32 / .72) 78%, transparent); }
.hs-head::after, .hs-main::before, .hs-main::after { content: ""; position: absolute; z-index: -1; left: 50%; width: min(100%, calc(var(--lane) + 18rem)); translate: -50% 0; pointer-events: none; background: var(--band); }
/* the band itself, as tall as the page's words: a plain gradient, no mask (a mask on so tall a box showed a seam in Safari) */
.hs-main::before { top: 0; bottom: 120px; }
/* its two ends, short boxes: it melts in under the title, and melts away again into the foot's veil */
.hs-head::after { bottom: 0; height: 160px; -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.hs-main::after { bottom: 0; height: 120px; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
/* ═════ the foot: the landing's own (the owner, 12-04: "we had nice footer, it was very good on the landing page"), no stroke
   over it: the stage blurred under the landing's frosted veil (style.css § the foot's veil), which begins at the foot's top
   here, so it never blurs the page's last words ═════ */
.hs-foot::after { top: 0; }
@media (min-width: 700px) and (max-width: 1023px) {
  .hs { --room0: max(var(--room), 31vw); }   /* a tablet's first window: the arches round the title with their banners */
}
@media (max-width: 699px) {
  /* a phone: the arches stand round the title in the first window, then, as the words come up, step out past the window's
     sides while the stage goes to the plain night, so the words are read on night alone and the painting stays only in the
     cap above the stroke (the owner, 12-04, of slivers of pillar beside the words: "I would rather just have not see the
     background rather than seeing it in this way") */
  .hs { --room: 40vw; --room0: 40vw; }
  .hs-arch-l { transform: translateX(calc(-100% * var(--t, 1))); }
  .hs-arch-r { transform: translateX(calc(100% * var(--t, 1))); }
  .hs-stage::after { content: ""; position: absolute; z-index: 2; inset: 0; background: rgb(15 24 32); opacity: var(--t, 1); }
  .hs-arch .torch { width: 40vw; }
  .hs-head { min-height: calc(var(--sh) * .72); padding: 150px 28px 40px; }
  .hs-title h1 { font-size: clamp(42px, 12vw, 54px); }
  .hs-main { padding: 0 max(24px, 9vw) 48px; }
  .hs-main { --band: linear-gradient(90deg, transparent, rgb(15 24 32 / .72) 12%, rgb(15 24 32 / .72) 88%, transparent); }
  .hs-head { --band: linear-gradient(90deg, transparent, rgb(15 24 32 / .72) 12%, rgb(15 24 32 / .72) 88%, transparent); }
  .hs-head::after, .hs-main::before, .hs-main::after { width: 100%; }
  .hs-cap { --cy: 26px; --cw: 190vw; --cx: -37vw; }   /* the phone's hall stroke, as the landing lays it */
  .hs-lintel { height: 40vw; }   /* room for the larger stroke's dip */
}
@media (prefers-reduced-motion: reduce) { .hs-title { animation: none; } }
