/*
 * css/landing.css: the landing page only. A fixed WebGL hall behind the page; the rooms scroll over it as wall
 * labels. Wide screens: the painting on one side, its label on the other. Tall screens: the painting above, the
 * label below. Without WebGL (html.no-gl) the same rooms show the paintings as framed pictures.
 */
.landing { background: #070504; }
#hall {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0;
  opacity: 0; transition: opacity 1.4s var(--ease);
  background: radial-gradient(90% 70% at 60% 40%, #3a140d 0%, #130b08 55%, #070504 100%);
}
.gl-on #hall { opacity: 1; }
.veil {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; height: 100lvh;
  background:
    radial-gradient(130% 100% at 50% 42%, transparent 46%, rgba(7, 5, 4, 0.72) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.1'/%3E%3C/svg%3E");
}
.landing main { position: relative; z-index: 1; }
.landing .foot { z-index: 2; }
.tk { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.02em; white-space: nowrap; }

/* ---------------------------------------------------------------- a room */
.room {
  position: relative; min-height: 135vh; display: grid; align-items: center;
  padding: 0 clamp(18px, 5vw, 84px);
}
.room .placard { width: min(440px, 100%); }
.room[data-side="L"] .placard { justify-self: end; }
.room[data-side="R"] .placard { justify-self: start; }
.room-no { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay-deep); margin: 0; }
.room-no .ic { width: 26px; height: 26px; color: var(--red); stroke-width: 1.3; }
.placard .room-no + h2 { margin-top: 14px; }
.placard h2 em { display: block; font-size: 0.72em; line-height: 1.08; margin-top: 4px; }
.plate { display: none; margin: 0; }

/* ---------------------------------------------------------------- the hero */
.hero { min-height: 100vh; min-height: 100svh; padding-top: var(--head-h); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 5, 4, 0.88) 0%, rgba(8, 5, 4, 0.66) 30%, rgba(8, 5, 4, 0.28) 48%, rgba(8, 5, 4, 0) 64%);
}
.hero-copy { position: relative; max-width: 640px; }
.hero-copy .display { margin-top: 18px; font-size: clamp(44px, 7.4vw, 110px); }
.hero-copy .lede { margin-top: 22px; font-size: clamp(16px, 1.45vw, 20px); max-width: 44ch; color: rgba(240, 220, 192, 0.82); }
.cta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; }
.hero-copy .note { margin-top: 22px; max-width: 46ch; color: rgba(240, 220, 192, 0.62); }
.hero-copy .note b { color: var(--gilt-hi); font-family: var(--mono); font-weight: 500; }

/* ---------------------------------------------------------------- the room rail: numerals along the floor */
.rail { position: fixed; z-index: 30; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease); }
.rail.on { opacity: 1; pointer-events: auto; }
.rail a { position: relative; display: grid; place-items: center; width: 44px; height: 40px; text-decoration: none; color: var(--faint); }
.rail i { font-family: var(--display); font-style: normal; font-size: 16px; }
.rail span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px); padding: 4px 9px; background: rgba(14, 10, 8, 0.92); border: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; white-space: nowrap; }
.rail a::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 0; height: 1px; background: var(--gilt-hi); transform: translateX(-50%); transition: width 0.3s var(--ease); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translate(-50%, -2px); }
.rail a:hover { color: var(--cream); }
.rail a[aria-current="true"] { color: var(--gilt-hi); }
.rail a[aria-current="true"]::after { width: 22px; }

/* ---------------------------------------------------------------- after the hall: flat, on glaze */
.after { position: relative; z-index: 2; background: var(--pit); }
.after::before { content: ""; position: absolute; left: 0; right: 0; top: -34vh; height: 34vh; background: linear-gradient(rgba(14, 10, 8, 0), var(--pit)); pointer-events: none; }
.after > .key { margin: 0; }
.band { padding: clamp(60px, 9vw, 120px) 0; border-bottom: 1px solid var(--line-2); }
.band .title { margin-top: 12px; }
.band .lede { margin-top: 14px; }
.band .two { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 70px); align-items: start; }
.band.last { border-bottom: 0; background: radial-gradient(70% 90% at 50% 100%, rgba(126, 42, 28, 0.42), transparent 70%); }
.band .center { text-align: center; display: grid; justify-items: center; }
.band .center .cta { justify-content: center; }
.jar-mark { width: 62px; height: 62px; color: var(--clay); margin-bottom: 18px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 38px 0 0; border: 1px solid var(--line); box-shadow: 0 0 0 4px var(--pit), 0 0 0 5px rgba(201, 163, 90, 0.3); }
.stats > div { padding: 22px clamp(14px, 2vw, 26px); border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gilt); }
.stats dd { margin: 10px 0 2px; font-family: var(--display); font-size: clamp(34px, 4.4vw, 58px); line-height: 1; color: var(--cream); font-variant-numeric: lining-nums tabular-nums; }
.stats span { font-size: 12.5px; color: var(--faint); }
#house-note { margin-top: 18px; }

.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-child { border-top: 1px solid var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-family: var(--display); font-size: clamp(22px, 2.2vw, 27px); font-weight: 500; color: var(--cream); min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 13px; height: 13px; background: linear-gradient(var(--gilt), var(--gilt)) center / 13px 1.5px no-repeat, linear-gradient(var(--gilt), var(--gilt)) center / 1.5px 13px no-repeat; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--dim); max-width: 62ch; }

/* ---------------------------------------------------------------- tall screens: painting above, label below */
@media (max-aspect-ratio: 102/100) {
  .room { min-height: 165vh; align-items: end; padding: 0 var(--gut) 9vh; }
  .room .placard, .room[data-side="L"] .placard, .room[data-side="R"] .placard { width: 100%; max-width: 520px; justify-self: center; }
  .hero { min-height: 100vh; min-height: 100svh; align-items: end; padding-bottom: 7vh; }
  .hero::before { background: linear-gradient(0deg, rgba(8, 5, 4, 0.96) 0%, rgba(8, 5, 4, 0.86) 40%, rgba(8, 5, 4, 0) 62%); }
  .hero-copy .display { font-size: clamp(42px, 13vw, 76px); margin-top: 12px; }
  .hero-copy .lede { margin-top: 14px; }
  .cta { gap: 14px; margin-top: 22px; }
  .cta .btn { flex: 1 1 auto; }
  .hero-copy .note { margin-top: 16px; }
  .rail { display: none; }
}
@media (max-width: 860px) {
  .band .two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .room .placard { padding: 20px 20px 16px; }
  .placard .room-no + h2 { margin-top: 10px; }
  .room .placard h2 { font-size: 32px; }
  .room .placard p { font-size: 14.5px; margin-top: 9px; line-height: 1.5; }
  .room .placard .facts { margin-top: 12px; }
  .room .placard .facts li { padding: 7px 0; font-size: 13px; gap: 10px; }
  .room .placard .facts b { font-size: 12.5px; }
  .room .placard .credit { font-size: 14px; margin-top: 10px; }
  .room .placard a.more { margin-top: 6px; }
  .stats dd { font-size: 32px; }
}
@media (max-width: 340px) {
  .placard .facts li { flex-direction: column; gap: 1px; }
}

/* ---------------------------------------------------------------- no WebGL: the same rooms, as pictures */
.no-gl #hall, .no-gl .veil, .no-gl .rail { display: none; }
.no-gl.landing, .no-gl .landing { background: var(--pit); }
.no-gl .room { min-height: 0; padding: clamp(44px, 7vw, 90px) var(--gut); grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(22px, 4vw, 60px); align-items: center; background: radial-gradient(90% 80% at 50% 0%, rgba(126, 42, 28, 0.5), transparent 70%); border-bottom: 1px solid var(--line-2); }
.no-gl .room[data-side="R"] .plate { order: 2; }
.no-gl .room .placard { justify-self: stretch; width: auto; max-width: 480px; }
.no-gl .plate { display: block; justify-self: center; padding: 14px; background: linear-gradient(135deg, #e7c77e, #9a742f 28%, #d9b566 52%, #7c5a22 78%, #c9a35a); box-shadow: 0 0 0 1px #5a4118, 0 30px 60px -20px #000, inset 0 0 0 5px rgba(0, 0, 0, 0.22); }
.no-gl .plate img { max-height: 70vh; width: auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.no-gl .hero { min-height: 92vh; padding-top: calc(var(--head-h) + 30px); }
.no-gl .hero::before { display: none; }
.no-gl .hero-plate { background: none; box-shadow: none; padding: 0; color: var(--clay); }
.no-gl .hero-plate svg { width: min(300px, 50vw); height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7)); }
.no-gl .after::before { display: none; }
@media (max-width: 860px) {
  .no-gl .room { grid-template-columns: 1fr; }
  .no-gl .room[data-side="R"] .plate { order: 0; }
  .no-gl .hero-plate { order: -1; }
  .no-gl .hero-plate svg { width: 150px; }
}

/* the fog under the flat half of the landing page: a sticky sheet inside .after, faded in at its top edge */
.fog-bed { display: none; position: sticky; top: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(transparent, #000 34%); mask-image: linear-gradient(transparent, #000 34%); }
.fog-on .fog-bed { display: block; }
.fog-bed canvas { width: 100%; height: 100%; }
.after > .key, .after > .band { position: relative; z-index: 1; }
.fog-on .band.last { background: none; }
