/* Chhaya · the first-person studio. The room is dark; the site that follows is bright. */
:root { --night: #07090d; --ink: #f4ece2; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--night); color: var(--ink); font: 15px/1.5 Manrope, system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vig { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 95% at 50% 48%, transparent 58%, rgba(0, 0, 0, .5) 100%); }
body::after { content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background: 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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* the loader covers the whole screen (the scene is drawn behind it while it waits) and lifts as one */
.load { position: fixed; inset: 0; z-index: 6; margin: 0; display: grid; gap: 14px; place-content: center; justify-items: center; background: #07090d; transition: opacity .9s ease; }
.load:not(.gone) ~ .chip { opacity: 0; }
.load span { font: italic 400 34px/1 'Instrument Serif', serif; }
.load i { display: block; width: 120px; height: 1px; background: rgba(244, 236, 226, .2); position: relative; overflow: hidden; }
.load i::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .3s; }
.load.gone { opacity: 0; pointer-events: none; }
.dbg { position: fixed; left: 8px; bottom: 8px; z-index: 9; padding: 6px 8px; border-radius: 6px; font: 11px/1.35 ui-monospace, Menlo, monospace; background: rgba(0, 0, 0, .6); color: #fff; max-width: 70vw; }
.hint { position: fixed; left: 50%; bottom: 13vh; z-index: 6; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; font-size: 13px; letter-spacing: .02em;
  background: rgba(10, 10, 12, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink); pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.hint.gone, .chip.gone { opacity: 0; }
.chip { position: fixed; right: 18px; top: 52px; z-index: 6; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(244, 236, 226, .55); pointer-events: none; transition: opacity .6s, color .4s; }
.chip.hot { color: var(--ink); }
.joy { position: fixed; z-index: 7; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 1px solid rgba(244, 236, 226, .28); background: rgba(10, 10, 12, .18); opacity: 0; pointer-events: none; transition: opacity .2s; }
.joy.on { opacity: 1; }
.joy i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(244, 236, 226, .5); }
.tip { position: fixed; left: 50%; top: 14vh; z-index: 6; transform: translateX(-50%); padding: 9px 15px; border-radius: 999px; font-size: 13px; letter-spacing: .02em;
  color: #2b1d16; background: rgba(255, 246, 234, .82); backdrop-filter: blur(6px); pointer-events: none; transition: opacity .5s; white-space: nowrap; }
.tip.gone { opacity: 0; }
.fade { position: fixed; inset: 0; z-index: 20; background: #fff7ee; opacity: 0; pointer-events: none; transition: opacity .9s ease-in; }
.fade.on { opacity: 1; }
.fade.void { background: #000; }
.fade.white { background: #fffaf3; opacity: 1; transition: opacity .4s ease-out; }
.skip { position: fixed; right: 18px; top: 16px; z-index: 7; font-size: 12px; letter-spacing: .06em; color: rgba(244, 236, 226, .7); text-decoration: none;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(244, 236, 226, .22); background: rgba(10, 10, 12, .25); backdrop-filter: blur(6px); transition: color .3s, border-color .3s, opacity .6s; }
.skip:hover { color: #fff; border-color: rgba(244, 236, 226, .6); }
.lb { position: fixed; left: 0; right: 0; height: 0; background: #000; z-index: 8; pointer-events: none; transition: height 1.1s cubic-bezier(.6, 0, .2, 1); }
.lb.t { top: 0; } .lb.b { bottom: 0; }
body.cine .hint, body.cine .tip, body.cine .chip, body.cine .skip, body.cine .tw-bar { opacity: 0 !important; pointer-events: none; }

/* phones: full screen (landscape) and tilt-to-look, bottom-left, the same height as the Twilight pill opposite */
.mob { position: fixed; left: calc(12px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 8; display: flex; gap: 8px; }
.mob[hidden] { display: none; }
.mbtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 11px; border-radius: 999px; border: 0; cursor: pointer;
  font: 500 12px/1 Manrope, system-ui, sans-serif; letter-spacing: .04em; color: #fbf3e8; background: rgba(7, 9, 24, .72);
  box-shadow: 0 0 0 1px rgba(251, 243, 232, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-tap-highlight-color: transparent; }
.mbtn[hidden] { display: none; }
.mbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mbtn.round { width: 38px; padding: 0; justify-content: center; }
.mbtn[aria-pressed="true"] { color: #1b0f0b; background: rgba(251, 243, 232, .92); }
.mbtn:active { transform: scale(.96); }
body.cine .mob { opacity: 0; pointer-events: none; transition: opacity .4s; }

/* sound: top-left, the skip link's quiet style */
.snd { position: fixed; left: calc(16px + env(safe-area-inset-left)); top: 14px; z-index: 7; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(244, 236, 226, .25); background: rgba(7, 9, 13, .35); color: rgba(244, 236, 226, .8); transition: color .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.snd:hover { color: #fff; border-color: rgba(244, 236, 226, .6); }
.snd svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.snd .off { display: none; } .snd[aria-pressed="false"] .on { display: none; } .snd[aria-pressed="false"] .off { display: inline; }
body.cine .snd { opacity: 0; pointer-events: none; }
