/* Glass Estate — the scroll film */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 300 var(--u)/1.65 'Jost', system-ui, sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.name { font-family: 'Cormorant', Georgia, serif; font-weight: 300; }
.caps-sm { font-size: .66em; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; }
.dim { opacity: .55; }
.giant { font-size: clamp(54px, min(11vw, 19vh), 230px); font-weight: 200; line-height: .95; letter-spacing: -.02em; margin: .2em 0 .25em; }
.big { font-size: clamp(40px, min(5.2vw, 9vh), 96px); font-weight: 200; line-height: 1; letter-spacing: -.015em; margin: .35em 0 .45em; }
.pill { display: inline-flex; padding: 1.05em 2em; border: 1px solid currentColor; border-radius: 999px; font-size: .64em; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; transition: background .4s var(--ease), color .4s var(--ease); }
.pill:hover { background: var(--bone); color: var(--ink); }
.pill.solid { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.pill.solid:hover { background: transparent; color: var(--bone); }
.link { font-size: .66em; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: .5em; }

/* ---------- loading ---------- */
#loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--ink); text-align: center; transition: opacity 1.2s var(--ease), visibility 1.2s; }
#loader.gone { opacity: 0; visibility: hidden; }
#loader .track { width: min(240px, 50vw); height: 1px; margin: 22px auto; background: rgba(239,233,223,.15); overflow: hidden; }
#loader i { display: block; height: 100%; background: var(--bone); transform: scaleX(0); transform-origin: left; transition: transform .3s; }

/* ---------- the window onto the 3D ---------- */
#window { position: fixed; inset: 0; z-index: 1; clip-path: inset(50% 50% 50% 50%); will-change: clip-path; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: linear-gradient(180deg, #2c5aa0 0%, #4f7fbf 30%, #8eaed3 52%, #b9c9d8 70%, #8c8a7c 100%); filter: saturate(.84) contrast(1.07) brightness(.9) sepia(.09); }
#window .grade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,.42) 100%), linear-gradient(180deg, rgba(20,12,4,.18), rgba(0,0,0,0) 40%, rgba(0,0,0,.28)); }
#window .grain { position: absolute; inset: -50%; pointer-events: none; opacity: .09; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }


/* viewfinder corners */
#marks { position: fixed; z-index: 2; pointer-events: none; opacity: 0; }
#marks i { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(239,233,223,.8); }
#marks i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
#marks i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
#marks i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
#marks i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }

/* ---------- header ---------- */
header { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 30px; padding: 24px var(--pad); mix-blend-mode: difference; color: #fff; }
.wordmark { font-size: .74em; font-weight: 500; letter-spacing: .5em; text-transform: uppercase; white-space: nowrap; }
#chapterName { opacity: .6; flex: 1; transition: opacity .6s; }
header nav { display: flex; gap: clamp(16px, 2.2vw, 40px); }
header nav a { font-size: .62em; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; opacity: .78; }
header nav a:hover { opacity: 1; }
header .pill { padding: .9em 1.7em; font-size: .6em; }
#menuBtn { display: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 8px 0; }
#progress { position: fixed; z-index: 20; right: 0; top: 0; width: 2px; height: 100vh; background: var(--bone); opacity: .5; transform-origin: top; transform: scaleY(0); }

/* ---------- chapters ---------- */
main { position: relative; z-index: 5; }
.ch { position: relative; height: var(--len); }
.hold { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; pointer-events: none; }
.hold a, .hold button { pointer-events: auto; }
.cue { position: absolute; opacity: 0; visibility: hidden; will-change: transform, opacity; }
.cue.fly, .cue.track { left: 50%; top: 50%; text-align: center; white-space: nowrap; text-shadow: 0 2px 40px rgba(0,0,0,.45); }
.cue.fly b { display: block; font-size: clamp(56px, min(12vw, 20vh), 240px); font-weight: 200; line-height: .95; letter-spacing: -.02em; }
.cue.fly .caps-sm { display: block; margin-bottom: 1.6em; }
.cue.fly b + .caps-sm { margin: 1.8em 0 0; }
.cue.track { font-size: clamp(16px, 1.4vw, 26px); }
.cue.track.low { top: 82%; }
.centreTitle { left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; max-width: none; }
#ch-open .centreTitle .giant { mix-blend-mode: normal; text-shadow: 0 4px 60px rgba(0,0,0,.6); }
.scrollHint { display: block; margin-top: 2em; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .2; } }

/* words beside a window (on the page colour, outside the 3D) */
.side { max-width: 30em; }
.side.centreTitle { max-width: none; }
.side.left { left: var(--pad); top: 50%; margin-top: -14em; width: min(36vw, 30em); }
.side.right { right: var(--pad); top: 50%; margin-top: -14em; width: min(34vw, 28em); }
.side p { margin: 0 0 1.6em; color: rgba(239,233,223,.72); max-width: 26em; }
.archLabel { left: 0; right: 0; top: 4.5vh; text-align: center; max-width: none; }
.archLabel .big { font-size: clamp(30px, min(3.4vw, 7vh), 64px); margin: .3em 0 0; }
.side.under { left: 0; right: 0; bottom: 6vh; text-align: center; max-width: none; }
.side.under .giant { font-size: clamp(44px, min(7vw, 12vh), 150px); margin: 0 0 .3em; }
.list { list-style: none; padding: 0; margin: 0 0 2.2em; border-top: 1px solid var(--line); }
.list li { display: flex; justify-content: space-between; gap: 20px; padding: .85em 0; border-bottom: 1px solid var(--line); font-size: .92em; }
.list b { font-weight: 400; }
.list span { color: rgba(239,233,223,.55); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .5em 2em; margin: 0 0 2.4em; font-size: .9em; }
.hours dt { font-size: .7em; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; padding-top: .35em; opacity: .7; }
.hours dd { margin: 0; }
.side.flankL { right: calc(50% + 14vw + 3vw); top: 50%; transform: none; text-align: right; width: auto; margin-top: -2.4em; }
.side.flankR { left: calc(50% + 14vw + 3vw); top: 50%; width: min(24vw, 22em); margin-top: -2em; }
.side.flankR p { font-size: .95em; }
.edge { left: 0; right: 0; text-align: center; }
.edge.top { top: 11vh; }
.edge.bottom { bottom: 11vh; }

/* ---------- after the film ---------- */
.after { position: relative; z-index: 6; background: var(--ink); padding: clamp(100px, 14vw, 200px) var(--pad) 40px; border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(40px, 5vw, 90px); }
.grid3 h3 { margin: 0 0 1.4em; }
.grid3 p { margin: 0 0 1.4em; }
.news { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 90px); align-items: end; border-top: 1px solid var(--line); padding-top: clamp(50px, 6vw, 90px); margin-top: clamp(70px, 9vw, 140px); }
.news h3 { font-size: clamp(28px, 3.2vw, 56px); font-weight: 200; line-height: 1.1; margin: 0; }
.news form { display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.news input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--bone); font: inherit; padding: 1em 0; outline: none; }
.news input::placeholder { color: rgba(239,233,223,.45); }
.news button { background: none; border: 0; color: var(--bone); font: inherit; cursor: pointer; }
footer { margin-top: clamp(90px, 12vw, 180px); }
footer .huge { font-size: clamp(56px, 15vw, 300px); font-weight: 200; letter-spacing: -.03em; line-height: .9; white-space: nowrap; }
footer .legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .75em; color: rgba(239,233,223,.5); }

/* ---------- Mobile ---------- */
@media (max-width: 860px), (orientation: portrait) {
  header nav, header .pill { display: none; }
  #chapterName { display: none; }
  header { justify-content: space-between; padding: 18px var(--pad); }
  #menuBtn { display: block; }
  body.menuOpen header { mix-blend-mode: normal; }
  body.menuOpen header nav { display: flex; position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 34px; background: var(--ink); }
  body.menuOpen header nav a { font-size: .95em; }
  .side.left, .side.right { left: var(--pad); right: var(--pad); width: auto; top: 56%; margin-top: 0; }
  .side.left .big, .side.right .big { font-size: clamp(34px, 9vw, 54px); margin: .25em 0 .35em; }
  .side p { font-size: .92em; margin-bottom: 1.1em; }
  .list { margin-bottom: 1.4em; }
  .list li { padding: .55em 0; font-size: .86em; }
  .hours { margin-bottom: 1.6em; font-size: .86em; }
  .cue.fly b { font-size: clamp(46px, 15vw, 90px); }
  .side.flankL { right: auto; left: var(--pad); top: 6vh; margin: 0; text-align: left; }
  .side.flankL .big { font-size: 34px; }
  .side.flankR { left: var(--pad); right: var(--pad); top: auto; bottom: 3vh; width: auto; margin: 0; }
  .side.flankR p { font-size: .88em; margin-bottom: .6em; }
  .cue.track { white-space: normal; width: 86vw; font-size: 15px; }
  .grid3, .news { grid-template-columns: 1fr; }
}
