/* Linden Square: a walk through the village, driven by scroll. */
@font-face { font-family: "Osbert Sans"; src: url("../assets/fonts/OsbertSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Osbert Sans"; src: url("../assets/fonts/OsbertSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Osbert Sans"; src: url("../assets/fonts/OsbertSans-Bold.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

:root { --ivory: #FFF7F0; --ink: #1E1A1A; --ease: cubic-bezier(.2, .7, .2, 1); --pad: clamp(16px, 3vw, 32px); }
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--ink); color: var(--ivory); font: 400 17px/1.45 "Osbert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; touch-action: none; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.scrim { position: fixed; inset: 0; pointer-events: none; transition: opacity 1s; background: linear-gradient(to bottom, rgba(24, 16, 14, .34), transparent 22%, transparent 66%, rgba(24, 16, 14, .5)); }

.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) var(--pad) 0; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; text-decoration: none; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.logo img { border-radius: 8px; }
.round { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 247, 240, .6); border-radius: 50%; background: rgba(30, 26, 26, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.round svg { width: 22px; height: 22px; }
.round[aria-pressed="false"] .waves { opacity: .2; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.skip { font-size: 15px; font-weight: 500; text-decoration: none; padding: 10px 6px; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.skip:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Gate */
.gate { position: fixed; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; transition: opacity .9s var(--ease), visibility .9s; background: radial-gradient(ellipse at 50% 50%, rgba(24, 16, 14, .3), rgba(24, 16, 14, .12) 70%); text-shadow: 0 2px 30px rgba(40, 20, 10, .5); }
.gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.gate h1 { font-size: clamp(52px, 9vw, 124px); line-height: 1; letter-spacing: -.028em; font-weight: 700; }
.gate p { font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; text-shadow: 0 1px 3px rgba(30, 16, 10, .6), 0 2px 18px rgba(30, 16, 10, .7); }
.enter { position: relative; width: 132px; height: 132px; margin-top: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(30, 26, 26, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-weight: 500; font-size: 15px; transition: transform .25s var(--ease), background .25s; }
.enter svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.enter circle { fill: none; stroke-width: 1.4; }
.enter .track { stroke: rgba(255, 247, 240, .3); }
.enter .fill { stroke: var(--ivory); stroke-dasharray: 295.3; stroke-dashoffset: 295.3; transition: stroke-dashoffset .3s linear; }
.enter:not(:disabled):hover { transform: scale(1.05); background: rgba(30, 26, 26, .4); }
.enter:disabled { cursor: progress; }

/* Words in the walk */
.title { position: fixed; z-index: 2; left: 0; right: 0; top: 40%; text-align: center; font-weight: 700; font-size: clamp(52px, 9vw, 124px); line-height: 1; letter-spacing: -.028em; opacity: 0; pointer-events: none; text-shadow: 0 2px 40px rgba(40, 20, 10, .35); will-change: opacity, transform; }
.card { position: fixed; z-index: 2; left: 50%; top: 50%; width: min(620px, calc(100vw - 48px)); padding: clamp(22px, 3vw, 34px); border-radius: 24px; text-align: center; background: rgba(30, 24, 22, .44); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); opacity: 0; visibility: hidden; transform: translate(-50%, calc(-50% + 18px)); transition: opacity .55s var(--ease), transform .55s var(--ease), visibility .55s; }
.card.on { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.card .eyebrow { font-weight: 500; font-size: 15px; color: #F3C9B4; margin-bottom: 8px; }
.card .big { font-weight: 700; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; letter-spacing: -.016em; text-wrap: balance; }
.card .small { margin-top: 10px; opacity: .86; }

.hint { position: fixed; z-index: 2; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; font-size: 14.5px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .6s; pointer-events: none; }
.hint.on { opacity: 1; }
.hint .ring { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255, 247, 240, .7); border-radius: 50%; animation: bob 2.4s ease-in-out infinite; }
.hint svg { width: 22px; height: 22px; }
@keyframes bob { 50% { transform: translateY(5px); } }
.hint-auto { padding: 8px 12px; border: 0; background: none; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hint.on .hint-auto { pointer-events: auto; }

.line { position: fixed; z-index: 3; left: 50%; bottom: max(40px, calc(env(safe-area-inset-bottom) + 28px)); width: min(760px, calc(100vw - 40px)); transform: translateX(-50%); text-align: center; font-weight: 500; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.32; text-wrap: balance; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 18px rgba(0, 0, 0, .55); opacity: 0; transition: opacity .4s; pointer-events: none; }
.line.on { opacity: 1; }

.rail { position: fixed; z-index: 2; right: calc(var(--pad) - 2px); top: 50%; width: 2px; height: 120px; margin-top: -60px; border-radius: 2px; background: rgba(255, 247, 240, .3); overflow: hidden; opacity: 0; transition: opacity .6s; }
.rail.on { opacity: 1; }
.rail i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--ivory); transform-origin: top; transform: scaleY(0); }

/* The seal: the words are in the picture, and this ring is the only thing laid over it */
.seal { position: fixed; z-index: 3; inset: 0; display: grid; place-items: end center; padding-bottom: max(116px, calc(env(safe-area-inset-bottom) + 100px)); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }
.seal.on { opacity: 1; visibility: visible; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hold { position: relative; pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 26px 8px 8px; border: 0; border-radius: 999px; background: rgba(30, 24, 22, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ivory); font-weight: 500; font-size: 17px; touch-action: none; -webkit-touch-callout: none; transition: transform .25s var(--ease), background .25s; }
.hold svg { flex: none; width: 48px; height: 48px; transform: rotate(-90deg); }
.hold-track, .hold-fill { fill: #B4342A; stroke-width: 7; }
.hold-track { stroke: rgba(255, 247, 240, .22); }
.hold-fill { fill: none; stroke: #F3C9B4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.hold:hover { background: rgba(30, 24, 22, .74); }
.hold.pressing { transform: scale(.97); }

/* At the fountain: the only things laid over him are what you say */
.talk { position: fixed; z-index: 3; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(620px, calc(100vw - 32px)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s; }
.talk.on { opacity: 1; visibility: visible; }
.said { max-width: 100%; font-size: 15.5px; font-weight: 500; opacity: .9; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.said:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chips[hidden] { display: none; }
.chips button { min-height: 38px; padding: 0 14px; border: 1px solid rgba(255, 247, 240, .4); border-radius: 999px; background: rgba(30, 24, 22, .46); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14.5px; font-weight: 500; transition: background .2s; }
.chips button:hover { background: rgba(30, 24, 22, .7); }
.ask { position: relative; width: 100%; display: flex; }
.ask input[name="text"] { flex: 1; min-width: 0; height: 56px; padding: 0 60px 0 22px; border: 1px solid rgba(255, 247, 240, .45); border-radius: 999px; background: rgba(30, 24, 22, .62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ivory); font: inherit; -webkit-user-select: text; user-select: text; touch-action: auto; outline: none; transition: border-color .2s; }
.ask input[name="text"]::placeholder { color: rgba(255, 247, 240, .72); }
.ask input[name="text"]:focus { border-color: var(--ivory); }
.ask button { position: absolute; right: 7px; top: 7px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ivory); color: #29272B; }
.ask button svg { width: 20px; height: 20px; }
.talk.busy .ask { opacity: .6; pointer-events: none; }
.talk-foot { font-size: 13.5px; text-shadow: 0 1px 8px rgba(0, 0, 0, .65); }
.talk-foot button { padding: 6px 4px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }
body[data-scene="fountain"] .line { bottom: 176px; }
.crisis-out { position: fixed; z-index: 4; left: 50%; bottom: 44px; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--ivory); color: #29272B; font-weight: 500; text-decoration: none; }

/* The valley from above */
.sky { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s; }
.sky.on { opacity: 1; visibility: visible; }
.sky-words { position: absolute; left: var(--pad); top: 78px; text-shadow: 0 1px 3px rgba(40, 24, 20, .55), 0 2px 22px rgba(40, 24, 20, .55); }
.sky-words h2 { font-weight: 700; font-size: clamp(34px, 3.8vw, 54px); line-height: 1.02; letter-spacing: -.024em; }
.sky-words p { margin-top: 6px; font-size: 16px; font-weight: 500; }
.sky-msg:empty { display: none; }
/* A spot is a lantern on the place, with its name above it. The tag is centred on the lantern, whose position comes from the film. */
.spot { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; color: var(--ivory); pointer-events: auto; will-change: transform; }
.sky:not(.on) .spot { pointer-events: none; }
.spot i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #FFF3D9 0 34%, rgba(255, 214, 150, .55) 36%, rgba(255, 214, 150, 0) 72%); }
.spot i::before, .spot i::after { content: ""; position: absolute; inset: -6px; border: 1.5px solid rgba(255, 240, 214, .9); border-radius: 50%; animation: halo 2.8s ease-out infinite; }
.spot i::after { animation-delay: 1.4s; }
@keyframes halo { from { transform: scale(.5); opacity: .95; } to { transform: scale(1.75); opacity: 0; } }
.spot-tag { position: absolute; left: 0; bottom: 20px; transform: translateX(calc(-50% + var(--dx, 0px))); display: grid; justify-items: center; padding: 6px 13px 7px; border-radius: 12px; background: rgba(30, 24, 22, .56); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); white-space: nowrap; transition: background .22s, padding .22s var(--ease); }
.spot-tag b { font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.spot-tag em { font-style: normal; font-size: 14px; line-height: 1.25; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s var(--ease), opacity .2s; }
.spot-tag img { position: absolute; left: 50%; bottom: calc(100% - 8px); height: 112px; transform: translate(-50%, 30px) scale(.7); transform-origin: 50% 100%; opacity: 0; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(30, 16, 10, .45)); transition: transform .34s cubic-bezier(.3, 1.5, .5, 1), opacity .18s; }
.spot.lit { z-index: 2; }
.spot.lit .spot-tag { background: rgba(30, 24, 22, .78); padding-bottom: 9px; }
.spot.lit .spot-tag em { max-height: 22px; opacity: .92; }
.spot.lit .spot-tag img { transform: translate(-50%, 0) scale(1); opacity: 1; }
.spot:disabled { cursor: default; }
.spot:disabled i { opacity: .55; }
.spot:disabled i::before, .spot:disabled i::after { animation: none; opacity: 0; }

.wait { position: fixed; z-index: 3; left: 0; right: 0; bottom: 40px; text-align: center; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

/* End */
.end { position: fixed; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; padding: clamp(76px, 12vh, 120px) 24px 24px; text-align: center; opacity: 0; visibility: hidden; transition: opacity 1.4s var(--ease), visibility 1.4s; background: linear-gradient(to bottom, rgba(24, 14, 12, .5), rgba(24, 14, 12, .3) 34%, rgba(24, 14, 12, 0) 58%); text-shadow: 0 2px 26px rgba(30, 14, 10, .6); }
.end.on { opacity: 1; visibility: visible; }
body.mapped .scrim { opacity: 0; }
.end h2 { font-weight: 700; font-size: clamp(46px, 6.6vw, 92px); line-height: 1; letter-spacing: -.026em; }
.end p { max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); }
.end-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; background: #29272B; color: #fff; font-weight: 500; text-decoration: none; transition: transform .16s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: rgba(30, 24, 22, .3); color: var(--ivory); border-color: rgba(255, 247, 240, .6); text-shadow: none; }

/* The videos stay on the page, too small to see: an iPhone won't start one that isn't there. */
.reels { position: fixed; top: 0; left: 0; z-index: -1; width: 2px; height: 2px; overflow: hidden; opacity: .01; pointer-events: none; }
.reels video { display: block; width: 2px; height: 2px; }

.noscript { position: fixed; inset: auto 0 40px; text-align: center; z-index: 6; }

@media (prefers-reduced-motion: reduce) {
  .hint .ring { animation: none; }
}
@media (max-width: 560px) {
  .skip { font-size: 14px; padding: 10px 2px; }
  .logo span { display: none; }
}
