/* IMAGINE DISPLAY VILLAGE - a GLASS demonstration.
   A magazine page that opens into the 3-D, plays itself, and closes back into one. Over the 3-D there are
   no panels, no glass, no outlines: only writing, like the launch ads (26 Sep: "as minimal and
   magazine-like as possible"). */
:root {
  --paper: #f2ede4; --ink: #1a1815; --ink-2: #5f584d; --ink-3: #8d8578; --rule: rgba(26,24,21,.16);
  --brass: #a8834f; --on3d: #fbf8f2; --on3d-2: rgba(251,248,242,.76); --on3d-3: rgba(251,248,242,.5);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif; --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --gut: clamp(18px, 4.4vw, 72px);
  --lift: 0 1px 2px rgba(0,0,0,.35), 0 2px 22px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e0f11; color: var(--ink); }
body { font-family: var(--sans); font-weight: 300; overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* the builders' logos, in white over the 3-D and in ink on the paper */
.lg { display: block; height: auto; filter: brightness(0) invert(1); }
.lg-pg { width: 116px; } .lg-lane { width: 92px; } .lg-cv { width: 118px; } .lg-gj { width: 150px; }
.lg.big.lg-pg { width: 170px; } .lg.big.lg-lane { width: 132px; } .lg.big.lg-cv { width: 176px; } .lg.big.lg-gj { width: 230px; }

/* ══════════ THE ENGINE ══════════ */
#shell { position: fixed; inset: 0; z-index: 0; background: #0e0f11; will-change: transform; }
#shell canvas, #shell #ui { position: absolute !important; inset: 0; }
#shell canvas { width: 100%; height: 100%; display: block; }
#shell #ui { display: none !important; }
.sheet { position: fixed; inset: 0; z-index: 2; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.sheet.held { cursor: grabbing; }
body.roaming .sheet { cursor: move; }
.shade { position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8,8,10,.34) 100%),
              linear-gradient(90deg, rgba(10,10,12,var(--shadeL, 0)) 0%, rgba(10,10,12,calc(var(--shadeL, 0) * .55)) 32%, rgba(10,10,12,0) 62%),
              linear-gradient(0deg, rgba(10,10,12,.42) 0%, rgba(10,10,12,0) 28%),
              linear-gradient(180deg, rgba(10,10,12,.34) 0%, rgba(10,10,12,0) 24%); }
.loading { position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%); text-align: center; pointer-events: none; transition: opacity .8s; }
.loading.off { opacity: 0; }
.loading span { font-size: 10px; letter-spacing: .36em; text-transform: uppercase; color: var(--on3d-2); padding-left: .36em; }
.loading i { display: block; width: 180px; height: 1px; background: rgba(255,255,255,.16); margin: 14px auto 0; }
.loading b { display: block; height: 100%; width: 0; background: rgba(255,255,255,.8); transition: width .3s; }

/* ══════════ THE GLASS MARK (the only words stuck to the screen, with the controls) ══════════ */
.badge { position: fixed; left: var(--gut); top: clamp(18px, 3.6vh, 36px); z-index: 8; margin: 0; display: flex; align-items: baseline; gap: 12px;
  color: var(--on3d); text-shadow: var(--lift); pointer-events: none; opacity: 0; transition: opacity .8s; }
body.in3d .badge { opacity: 1; }
.badge b { font-weight: 500; font-size: 12px; letter-spacing: .5em; }
.badge span { font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--on3d-2); }

/* ══════════ THE 3-D WORDS: a CSS camera that matches the engine's ══════════ */
#space { position: fixed; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }
#space .cam { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-style: preserve-3d; }
#space .w3 { position: absolute; left: 0; top: 0; transform-style: preserve-3d; pointer-events: none; will-change: transform, opacity; backface-visibility: hidden; }
#space .w3 > .cap { position: relative !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; translate: none !important; }
body.roaming .note { opacity: 0 !important; }
/* ══════════ THE CAPTIONS: writing only ══════════ */
#caps { position: fixed; inset: 0; z-index: 6; pointer-events: none; transition: opacity .5s; }
.cap { position: absolute; color: var(--on3d); opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; text-shadow: var(--lift); }
.cap.on { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; }
.cap > *, .cap .l, .cap ol li { transform: translateY(18px); opacity: 0; transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity .9s ease; }
.cap.on > *, .cap.on .l, .cap.on ol li { transform: none; opacity: 1; }
.cap .l { display: block; }
.cap.on > :nth-child(2), .cap.on .l:nth-child(1) { transition-delay: .08s; }
.cap.on .l:nth-child(2), .cap.on > :nth-child(3) { transition-delay: .18s; }
.cap.on > :nth-child(4) { transition-delay: .28s; } .cap.on > :nth-child(5) { transition-delay: .36s; } .cap.on > :nth-child(6) { transition-delay: .44s; }
.cap.on ol li:nth-child(1) { transition-delay: .12s; } .cap.on ol li:nth-child(2) { transition-delay: .2s; }
.cap.on ol li:nth-child(3) { transition-delay: .28s; } .cap.on ol li:nth-child(4) { transition-delay: .36s; }
.cap .lg { filter: brightness(0) invert(1) drop-shadow(0 1px 10px rgba(0,0,0,.45)); }
.kick { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 11px; font-weight: 400; letter-spacing: .34em; text-transform: uppercase; }
.kick em { display: block; width: 38px; height: 1px; background: currentColor; opacity: .6; }
.it { font-style: italic; font-weight: 300; }
.cap h2, .cap h3 { font-family: var(--serif); font-weight: 300; margin: 0; line-height: .92; letter-spacing: -.01em; }
.cap .body { max-width: 30em; font-size: 15px; line-height: 1.6; color: var(--on3d-2); margin: 0; }

/* the layout each piece is placed from (in #caps, where it is measured before it goes into the 3-D) */
#caps { position: fixed; inset: 0; z-index: 1; pointer-events: none; visibility: hidden; }
.pos-left-mid { left: var(--gut); top: 50%; translate: 0 -50%; }
.pos-left-low { left: var(--gut); bottom: clamp(140px, 22vh, 220px); }
.pos-right-mid { right: calc(var(--gut) + 20px); top: 50%; translate: 0 -50%; }
.pos-top-left { left: var(--gut); top: calc(clamp(18px, 3.6vh, 36px) + 34px); }
.cap-title h2 { font-size: clamp(56px, min(8.6vw, 15vh), 150px); margin: 26px 0 30px; }
.cap-index ol { list-style: none; margin: 20px 0 0; padding: 0; min-width: 300px; border-top: 1px solid rgba(255,255,255,.3); }
.cap-index li { display: flex; gap: 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.cap-index li b { font-weight: 400; font-size: 11px; letter-spacing: .3em; color: var(--on3d-2); width: 22px; }
.cap-home .no { margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(56px, 6vw, 100px); line-height: 1; color: var(--on3d-3); }
.cap-home .lg { margin-bottom: 20px; }
.cap-home .kick { margin-bottom: 14px; color: var(--on3d-2); }
.cap-hero .lg { margin-bottom: 26px; }
.cap-hero h2 { font-size: clamp(46px, min(6.2vw, 10vh), 108px); margin: 0 0 34px; }
.cap-hero h2 .big { font-size: 1.9em; font-style: italic; line-height: 1; }
.note { width: min(340px, 72vw); }
.note p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--on3d-2); }
.note b { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; color: var(--on3d); margin-bottom: 2px; }
.gj-a .kick, .gj-c .kick { color: var(--on3d-2); }
.gj-a h3 { font-size: clamp(64px, min(7vw, 12vh), 124px); margin: 18px 0 24px; }
.gj-a h3 .it { padding-left: .45em; }
.gj-b .facts { width: 560px; padding: 18px 0; } .gj-b .facts li { font-size: 12px; gap: 10px; } .gj-b .facts svg { width: 36px; height: 36px; } .gj-b .facts b { font-size: 40px; font-weight: 400; }
.gj-c .addr { margin: 16px 0 0; font-family: var(--serif); font-weight: 300; font-size: clamp(40px, min(4.4vw, 8vh), 76px); line-height: 1; color: var(--on3d); }
.gj-d { text-align: right; } .gj-d .lg { width: 220px; margin: 0 0 22px auto; }
.gj-d .textlink { pointer-events: auto; color: var(--on3d); font-size: 12px; }
.facts { display: flex; list-style: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.facts li + li { border-left: 1px solid var(--rule); }
.facts svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); }
.facts b { text-transform: none; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: 0; line-height: 1; }
.cap .facts { border-color: rgba(255,255,255,.28); }
.cap .facts li { color: var(--on3d-2); } .cap .facts li + li { border-color: rgba(255,255,255,.2); }
.cap .facts svg, .cap .facts b { color: var(--on3d); }
.textlink { display: inline-flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 11px; font-weight: 400; letter-spacing: .32em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid currentColor; }
.textlink span { letter-spacing: 0; transition: transform .3s; }
.textlink:hover span { transform: translateX(4px); }

/* ══════════ THE CONTROLS: writing only ══════════ */
.nav { position: fixed; left: 50%; bottom: clamp(18px, 4.2vh, 42px); transform: translateX(-50%); z-index: 9; text-align: center; color: var(--on3d);
  opacity: 0; pointer-events: none; transition: opacity .8s; text-shadow: var(--lift); }
body.in3d .nav { opacity: 1; pointer-events: auto; }
.nav .row { display: flex; align-items: baseline; justify-content: center; gap: clamp(22px, 4vw, 48px); }
.nav button { font-size: 11px; font-weight: 400; letter-spacing: .34em; text-transform: uppercase; padding: 10px 4px; opacity: .78; transition: opacity .3s; white-space: nowrap; }
.nav button:hover { opacity: 1; }
.nav .mid { font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: .02em; text-transform: none; opacity: 1; min-width: 5.5em; }
.nav .bar { position: relative; width: min(260px, 60vw); height: 12px; margin: 2px auto 0; cursor: pointer; }
.nav .bar::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.25); }
.nav .bar i { position: absolute; left: 0; top: 50%; height: 1px; width: 0; background: rgba(255,255,255,.9); }
.nav .hint { margin: 0 0 6px; min-height: 1.2em; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--on3d-2); transition: opacity .5s; }

/* ══════════ THE COVER ══════════ */
#cover { position: fixed; inset: 0; z-index: 10; color: var(--ink); pointer-events: none; }
#cover.gone { visibility: hidden; }
#cover .win { position: absolute; left: 0; top: 0; width: 100px; height: 100px; box-shadow: 0 0 0 300vmax var(--paper); }
#cover .corner { position: absolute; width: 18px; height: 18px; border: 0 solid var(--ink); opacity: var(--cornerA, 1); }
#cover .corner.a { left: -9px; top: -9px; border-left-width: 1px; border-top-width: 1px; }
#cover .corner.b { right: -9px; bottom: -9px; border-right-width: 1px; border-bottom-width: 1px; }
.mast { position: absolute; left: var(--gut); right: var(--gut); top: clamp(18px, 3.4vh, 34px); display: flex; align-items: baseline; gap: 28px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.mast .brand { font-size: 13px; font-weight: 500; letter-spacing: .62em; text-transform: uppercase; }
.mast .issue { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); }
.mast .issue.r { margin-left: auto; color: var(--brass); }
.cv-text { position: absolute; left: var(--gut); top: 50%; width: min(40vw, 620px); transform: translateY(-46%); pointer-events: auto; }
.cv-text .kick { color: var(--brass); }
#cover h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, min(8.4vw, 15vh), 150px); line-height: .88; letter-spacing: -.015em; margin: 24px 0 26px; }
#cover h1 .l { display: block; } #cover h1 .it { padding-left: .55em; }
.lede { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 32em; margin: 0 0 24px; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 0 0 34px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.logos .lg, .also .lg { filter: brightness(0); opacity: .82; }
.logos .lg-pg { width: 92px; } .logos .lg-lane { width: 70px; } .logos .lg-cv { width: 94px; } .logos .lg-gj { width: 124px; }
.start { display: inline-flex; align-items: center; gap: 18px; padding: 8px 0; border-bottom: 1px solid var(--ink); }
.start .go { font-family: var(--serif); font-style: italic; font-size: 30px; font-weight: 400; }
.start b { font-size: 13px; transition: transform .3s; }
.start:hover b { transform: translateX(5px); }
.start.wait { border-color: var(--ink-3); color: var(--ink-3); }
.meta { margin: 14px 0 0; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); }
.frame-home { position: absolute; right: var(--gut); top: calc(clamp(18px, 3.4vh, 34px) + 58px); bottom: clamp(60px, 9vh, 90px); width: min(46vw, 900px); }
#cover .credit, #end .credit { position: absolute; margin: 0; font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
#cover .credit { right: var(--gut); bottom: clamp(30px, 5vh, 56px); }

/* ══════════ THE END PAGE (slides up over the 3-D at the end; scrolls inside) ══════════ */
#end { position: fixed; inset: 0; z-index: 11; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  color: var(--ink); transform: translateY(100%); visibility: hidden; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
#end.up { visibility: visible; }
.end-grid { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 90px);
  padding: clamp(40px, 8vh, 90px) var(--gut) clamp(30px, 6vh, 60px); align-items: stretch; }
.end-text { position: relative; z-index: 1; align-self: center; }
.end-text .kick, .pitch .kick { color: var(--brass); }
#end h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, min(7.2vw, 13vh), 132px); line-height: .9; margin: 24px 0 34px; }
#end h2 .l { display: block; } #end h2 .it { padding-left: .5em; }
.end-text .logo { display: block; width: 200px; height: auto; margin: 0 0 22px; }
.end-text .addr { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0 0 22px; }
.end-text .facts { max-width: 420px; }
.end-links { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 30px; }
.end-pic { position: relative; min-height: 52vh; }
.end-hole { position: absolute; inset: 0 0 34px 0; box-shadow: 0 0 0 300vmax var(--paper); }
#end .credit { right: 0; bottom: 8px; z-index: 1; }
.pitch { position: relative; z-index: 1; padding: clamp(40px, 8vh, 90px) var(--gut) clamp(50px, 9vh, 100px); border-top: 1px solid var(--rule); margin: 0 var(--gut); padding-left: 0; padding-right: 0; }
.pitch .body { max-width: 40em; font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 30px; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 34px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.also .lg-pg { width: 96px; } .also .lg-lane { width: 74px; } .also .lg-cv { width: 98px; } .also .lg-gj { width: 128px; }

/* ══════════ PHONES ══════════ */
@media (max-width: 820px) {
  .mast .issue:not(.r) { display: none; }
  .mast .issue.r { font-size: 9px; letter-spacing: .2em; }
  .mast .brand { letter-spacing: .4em; }
  .cv-text { top: calc(clamp(18px, 3.4vh, 34px) + 44px); width: auto; right: var(--gut); transform: none; }
  #cover h1 { font-size: clamp(46px, 13vw, 84px); margin: 12px 0 12px; }
  .lede { font-size: 13px; line-height: 1.55; margin-bottom: 12px; }
  .logos { gap: 10px 18px; margin-bottom: 14px; padding: 10px 0; }
  .logos .lg-pg { width: 66px; } .logos .lg-lane { width: 50px; } .logos .lg-cv { width: 68px; } .logos .lg-gj { width: 90px; }
  .start .go { font-size: 24px; }
  .meta { display: none; }
  .frame-home { left: var(--gut); right: var(--gut); width: auto; top: auto; bottom: 56px; height: 30svh; }
  #cover .credit { bottom: 32px; }
  .note p { font-size: 12px; } .note b { font-size: 18px; }
  .cap-title.pos-left-mid { top: 42%; }
  .cap-title h2 { font-size: clamp(46px, 13vw, 80px); }
  .pos-left-low { bottom: 150px; }  .pos-right-mid { right: auto; left: var(--gut); top: auto; bottom: 150px; translate: none; }  .gj-d { text-align: left; } .gj-d .lg { margin-left: 0; }
  .cap-home .no { font-size: 46px; margin-bottom: 8px; }
  .lg.big.lg-pg { width: 130px; } .lg.big.lg-lane { width: 100px; } .lg.big.lg-cv { width: 134px; } .lg.big.lg-gj { width: 180px; }
  .cap-hero h2 { font-size: 42px; }
  .gj-a h3 { font-size: 58px; } .gj-b .facts { width: calc(100vw - 2 * var(--gut)); } .gj-b .facts b { font-size: 26px; } .gj-b .facts svg { width: 28px; height: 28px; } .gj-b .facts li { font-size: 9px; } .gj-c .addr { font-size: 38px; }
  .cap { max-width: calc(100vw - 2 * var(--gut)); } .cap .body { max-width: 100%; }
  .nav button { font-size: 10px; letter-spacing: .24em; }
  .end-grid { grid-template-columns: 1fr; min-height: 0; }
  .end-pic { min-height: 40svh; }
}
@media (prefers-reduced-motion: reduce) { .start b, .textlink span { transition: none; } }
