/* Glass Estate Homes — 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: .6; }
.giant { font-size: clamp(54px, min(11vw, 19vh), 230px); font-weight: 200; line-height: .92; letter-spacing: -.025em; 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; }
.big2 { font-size: clamp(30px, 2.8vw, 48px); margin: 0 0 .4em; }
.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); }

/* 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 3D, cut into strips by its clip path */
#window { position: fixed; inset: 0; z-index: 1; clip-path: path('M0 0z'); }
#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(.88) contrast(1.06) brightness(.94) sepia(.06); }
#window .grade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 50%, rgba(0,0,0,.38) 100%), linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 65%, rgba(0,0,0,.35)); }
#window .grain { position: absolute; inset: -50%; pointer-events: none; opacity: .08; 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); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* the bright rooms: a deeper shade so white words read */
body[data-chapter="ch-inside"] #window .grade, body[data-chapter="ch-rooms"] #window .grade { background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.18) 30%, rgba(0,0,0,.5) 100%), linear-gradient(180deg, rgba(0,0,0,.3), rgba(0,0,0,.08) 35%, rgba(0,0,0,.12) 60%, rgba(0,0,0,.55)); }
body[data-chapter="ch-inside"] .cue, body[data-chapter="ch-rooms"] .cue { text-shadow: 0 2px 50px rgba(0,0,0,.65), 0 0 12px rgba(0,0,0,.25); }

body[data-chapter="ch-rooms"] #gl { background: var(--ink); }

/* labels on the split's strips */
#labels { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
#labels .lab { position: absolute; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
#labels .lab b { display: block; font-size: clamp(30px, 3.2vw, 60px); font-weight: 200; line-height: 1; margin-top: .25em; }
#labels .lab { text-shadow: 0 2px 30px rgba(0,0,0,.7); }

/* 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; }
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; left: 0; right: 0; bottom: 0; height: 2px; background: var(--bone); opacity: .6; transform-origin: left; transform: scaleX(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 { pointer-events: auto; }
.cue { position: absolute; opacity: 0; visibility: hidden; will-change: transform, opacity; text-shadow: 0 2px 40px rgba(0,0,0,.45); }
.cue.fly { left: 50%; top: 50%; text-align: center; white-space: nowrap; }
.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.title { left: var(--pad); right: var(--pad); bottom: 9vh; }
.cue.title .giant { margin: .25em 0 .35em; }
.cue.band { left: 0; right: 0; top: 50%; margin-top: -.5em; text-align: center; white-space: nowrap; }
.cue.band.top { top: 13vh; margin: 0; }
.giant.thin { font-weight: 200; font-size: clamp(60px, min(15vw, 24vh), 300px); }
.cue.specs { left: var(--pad); right: var(--pad); bottom: 9vh; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(239,233,223,.35); }
.cue.specs div { padding-top: 1.4em; }
.cue.specs b { display: block; font-size: clamp(44px, min(6vw, 11vh), 110px); font-weight: 200; line-height: 1; letter-spacing: -.03em; margin-bottom: .3em; }
.cue.card { left: var(--pad); right: var(--pad); bottom: 8vh; }
.cue.card::before { content: ""; position: absolute; left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); bottom: -8vh; height: 150%; z-index: -1; background: linear-gradient(0deg, rgba(10,9,8,.85), rgba(10,9,8,.55) 55%, rgba(10,9,8,0)); }
.cue.card .giant { font-size: clamp(46px, min(8vw, 14vh), 170px); margin: .25em 0 .35em; }
.cue.card .row { display: flex; gap: 2.4em; flex-wrap: wrap; margin-bottom: 1.6em; font-size: 1.1em; }
.cue.card .row b { font-weight: 500; }
.cue.card .btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }

/* 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; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .5em 2em; margin: 0; font-size: .92em; }
.hours dt { font-size: .7em; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; padding-top: .35em; opacity: .7; }
.hours dd { margin: 0; }
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, #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; }
  .cue.fly b { font-size: clamp(46px, 15vw, 90px); }
  .cue.specs { grid-template-columns: repeat(2, 1fr); row-gap: 1em; }
  .cue.specs b { font-size: 44px; }
  .cue.band.top { top: 9vh; white-space: normal; padding: 0 var(--pad); }
  .giant.thin { font-size: 22vw; }
  .cue.card .row { gap: 1.2em; }
  .grid3 { grid-template-columns: 1fr; }
}
