/* The day: everything after "Good morning". --bg and --ink follow the clock, set by day.js */
html { scroll-behavior: smooth; }
html.intro { overflow: hidden; }
html.intro main, html.intro #bar, html.intro #rail { display: none; }
html:not(.intro) canvas { pointer-events: none; z-index: -1; }
html:has(dialog.project[open]) canvas { visibility: hidden; } /* the ball belongs to the day, not to the project pages on top of it */
html:not(.intro), html:not(.intro) body { height: auto; overflow: visible; overflow-x: clip; background: var(--bg, #f3e6d3); color: var(--ink, #2a2140); }
html:not(.intro) body { -webkit-user-select: auto; user-select: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The first page: fits one screen, and takes its colours from the visitor's real time of day */
#landing { display: none; position: fixed; z-index: 10; inset: 0; overflow-y: auto; padding: clamp(24px, 6vh, 72px) clamp(16px, 8vw, 120px); background: linear-gradient(var(--top, var(--bg, #07080c)), var(--bg, #07080c) 75%); color: var(--ink, #eef0f6); opacity: 0; pointer-events: none; transition: opacity 0.5s; -webkit-user-select: text; user-select: text; }
html.landing #landing { display: block; }
#landing .hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 72px); align-items: center; min-height: calc(100svh - 2 * clamp(24px, 6vh, 72px)); }
#landing.ready { opacity: 1; pointer-events: auto; }
#landing a { color: inherit; }
#landing h1 { margin: 0; font-weight: 800; font-size: clamp(52px, 8vw, 132px); line-height: 0.98; letter-spacing: -0.04em; }
#landing .where { margin: 16px 0 0; font: 400 13px/1.5 var(--mono); opacity: 0.75; }
#landing .lead { margin: 18px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; max-width: 46ch; }
#now { margin: 10px 0 0; font: 400 13px/1.5 var(--mono); opacity: 0.75; }
/* The intro gets the screen; the invitation to walk sits apart, in one quiet band below it */
#landing .start { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding: clamp(20px, 3vw, 32px); border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 20px; background: color-mix(in srgb, currentColor 5%, transparent); }
#landing .start .label { margin: 0 0 8px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
#landing .start .act { display: grid; justify-items: start; gap: 12px; }
#landing .start .tip, #landing .start .others { margin: 0; }
#walk { display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px 15px 18px; border-radius: 999px; background: var(--ink, #eef0f6); color: var(--bg, #07080c); font-weight: 600; font-size: clamp(16px, 2vw, 22px); line-height: 1; }
#walk:hover { opacity: 0.85; }
#walk i { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8ec, #ee9b58); box-shadow: 0 0 14px rgba(255, 190, 120, 0.8); animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 22px rgba(255, 190, 120, 1); } }
#landing .others { margin: 18px 0 0; font: 400 13px/1.8 var(--mono); }
#landing .photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 70vh; object-fit: cover; border-radius: 20px; justify-self: end; }
@media (prefers-reduced-motion: reduce) { #landing { transition: none; } #walk i { animation: none; } }
@media (max-width: 800px) {
  #landing .hero { grid-template-columns: minmax(0, 1fr); align-content: start; }
  #landing .photo { order: -1; aspect-ratio: 1; width: 96px; border-radius: 50%; justify-self: start; object-position: 50% 20%; }
}

/* Biking home, seen from the side */
.stop.ride { display: block; height: 160vh; padding: 0; scroll-margin-top: 0; }
.night { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #07080c; color: #eef0f6; --x: 50%; --y: 50%; }
/* The world only exists where the light falls, and only while the light is on */
.world { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; -webkit-mask: radial-gradient(circle 34vmin at var(--x) var(--y), #000 15%, transparent); mask: radial-gradient(circle 34vmin at var(--x) var(--y), #000 15%, transparent); }
[data-ride="riding"] .world, [data-ride="steer"] .world { opacity: 1; }
#ride .night { --ground: 14vh; --rider: min(22vh, 30vw); --kiosk: min(26vh, 36vw); background: transparent; }
#ride .night::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--ground); background: linear-gradient(color-mix(in srgb, currentColor 10%, transparent), color-mix(in srgb, currentColor 4%, transparent)); border-top: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); } /* the same road the ride was on */
/* The ride before ReCycle slows to a stop, and the scene takes over exactly where it stopped: same bike, same spot */
.journey[data-stop] + #ride { margin-top: -100vh; height: 260vh; } /* it holds still for a while once the bike has stopped */
.journey[data-stop] .rider { translate: calc(var(--ax, 0) * 28vw) 0; } /* while the world slows down, the bike rolls on to the middle */
.journey[data-stop] + #ride .night { visibility: hidden; }
.journey[data-stop].past + #ride .night { visibility: visible; }
.journey[data-stop].past .view { visibility: hidden; }
#ride .beat { transition: opacity 0.8s 0.2s, visibility 0.8s 0.2s; }
.journey[data-stop]:not(.past) + #ride .beat { opacity: 0; visibility: hidden; transition: none; } /* the words come once the bike has stopped */
.roll { width: 200vw; translate: 0; filter: brightness(0.8); animation: roll 7s linear infinite paused; }
[data-ride="riding"] .roll { animation-play-state: running; }
@keyframes roll { to { translate: -100vw 0; } }
#bike { position: absolute; z-index: 1; left: 40vw; bottom: calc(var(--ground) - 6px); height: var(--rider); aspect-ratio: 190 / 172; padding: 0; border: 0; background: none; opacity: 0.5; pointer-events: none; transition: opacity 0.8s; }
#bike .rider { position: static; display: block; width: 100%; height: 100%; }
#ride .night:not([data-ride]) #bike, #ride [data-ride=""] #bike { opacity: 1; filter: brightness(0.62) saturate(0.8); } /* as it was on the ride */
#ride [data-ride]:not([data-ride=""]) .rider :is(.tyre, .bar, .crank, .ring) { stroke: #8a879a; }
[data-ride="riding"] #bike { opacity: 0.95; }
[data-ride="steer"] #bike { opacity: 0.75; pointer-events: auto; cursor: pointer; }
.mount { position: absolute; left: 74%; top: 47%; width: 44px; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; }
[data-ride="steer"] .mount { border: 1.5px dashed #eef0f6; }
#ride .beat { top: clamp(72px, 12vh, 120px); bottom: auto; z-index: 1; max-width: min(38vw, 560px); }
#ride .beat h2 { font-size: clamp(30px, 3.8vw, 60px); }
.beat { position: absolute; left: clamp(16px, 8vw, 120px); bottom: clamp(32px, 10vh, 96px); max-width: min(620px, calc(100vw - 32px)); pointer-events: none; }
/* The way into a project: a real button, always in the colours of the moment around it */
.beat a, .open { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 14px 22px; border-radius: 999px; background: var(--pill, #eef0f6); color: var(--pill-ink, #07080c); font: 600 14px/1 var(--mono); text-decoration: none; pointer-events: auto; transition: translate 0.2s, box-shadow 0.2s; }
.beat a:hover, .open:hover { translate: 0 -2px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); }
.beat a span, .open span { transition: translate 0.2s; }
.beat a:hover span, .open:hover span { translate: 4px 0; }
.open, .clawscene .beat a { --pill: var(--ink, #2a2140); --pill-ink: var(--bg, #f3e6d3); }
.woke .beat a { --pill: #2a2140; --pill-ink: #f3e6d3; }
#machine { position: absolute; z-index: 1; right: clamp(24px, 14vw, 220px); bottom: calc(var(--ground) - 4px); display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: #eef0f6; font: 600 13px/1.2 var(--mono); }
#machine svg { display: block; height: var(--kiosk); overflow: visible; }
#machine i { position: absolute; left: 50%; bottom: calc(var(--kiosk) * 0.72); translate: -50% 50%; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8ec, #ee9b58); box-shadow: 0 0 24px rgba(255, 190, 120, 0.9); }
#machine:disabled { cursor: default; opacity: 0.6; }
#machine:disabled i { background: #4a4752; box-shadow: none; }
/* Atempo: eyes closed, and every ring in place lets in more morning */
.wake .night { --dawn: 0; background: color-mix(in srgb, #f3e6d3 calc(var(--dawn) * 100%), #07080c); color: color-mix(in srgb, #2a2140 calc(var(--dawn) * 100%), #eef0f6); transition: background 1.4s, color 1.4s; }
.dial { user-select: none; -webkit-user-select: none; position: absolute; right: clamp(32px, 12vw, 200px); top: 50%; translate: 0 -50%; width: min(72vh, 44vw); aspect-ratio: 1; border-radius: 50%; pointer-events: none; touch-action: none; }
.tuning .dial { pointer-events: auto; cursor: grab; }
.dial .art { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s 1s; pointer-events: none; } /* a press turns the ring, it never picks up the drawing */
.woke .dial .art { opacity: 1; }
.dial img.art { object-fit: contain; }
.dial .atempo { position: absolute; inset: 6%; width: 88%; height: 88%; overflow: visible; color: #eef0f6; transition: opacity 0.8s; } /* the alarm going off, until you reach for it */
.tuning .dial .atempo, .woke .dial .atempo { opacity: 0; }
.atempo .ringing { transform-origin: 0 0; }
/* Which project a moment is */
.stop time:has(+ .tag) { display: inline-block; vertical-align: middle; }
.tag { display: inline-block; margin: 0 0 18px 12px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; font: 600 10px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; vertical-align: middle; opacity: 0.8; }
/* Every hands-on moment can be skipped, straight to its page */
.beat .skip-to { display: block; width: fit-content; margin-top: 14px; padding: 0; background: none; color: inherit; font: 400 12px/1.4 var(--mono); opacity: 0.7; box-shadow: none; pointer-events: auto; }
.beat .skip-to:hover { opacity: 1; translate: none; box-shadow: none; }
.beat a:not([hidden], .skip-to) ~ .skip-to { display: none; } /* once it's done, the real link takes over */
.woke .dial { mix-blend-mode: multiply; } /* the white of the photo melts into the morning */
.wake .beat { z-index: 1; max-width: min(36vw, 520px); }
.wake .beat h2 { font-size: clamp(30px, 3.8vw, 60px); }
.wake .go:hover { background: none; color: inherit; opacity: 0.7; }
@media (max-width: 800px) {
  .dial { left: 50%; right: auto; top: 76px; translate: -50% 0; width: min(88vw, 48vh); }
  .wake .beat { max-width: calc(100vw - 32px); bottom: 64px; }
}

/* Pass It On: the real machine, and the game full screen once you step up to it */
.clawscene .night { background: transparent; color: var(--ink); } /* the afternoon sky runs straight through */
.machine svg { display: block; width: 100%; height: 100%; overflow: visible; }
.arcade text { fill: #f3e6d3; font: 600 13px/1 var(--mono); letter-spacing: 0.2em; }
.machine { position: absolute; right: clamp(40px, 12vw, 200px); top: 50%; translate: 0 -50%; height: 84%; aspect-ratio: 1273 / 1983; }
.machine img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.slot { position: absolute; left: 44%; top: 32%; width: 2px; height: 2px; }
.clawscene .beat { z-index: 1; max-width: min(44vw, 560px); }
.clawscene .beat h2 { font-size: clamp(28px, 3.4vw, 52px); }
.clawscene .go:hover { background: none; color: inherit; opacity: 0.7; }
.clawscene .go:disabled { opacity: 0.4; }
.play { color: inherit; }
.play:hover { background: none; color: inherit; opacity: 0.7; }
#arcade { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #000; }
#arcade[open] { animation: arcade 0.7s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes arcade { from { opacity: 0; transform: scale(0.35); } }
#arcade iframe { display: block; width: 100%; height: 100%; border: 0; }
#arcade form { position: fixed; left: 50%; top: 12px; translate: -50% 0; }
#arcade .to-day { padding: 9px 14px; border: 1px solid #1f2633; border-radius: 999px; background: #fff; color: #1f2633; font: 600 12px/1 var(--mono); white-space: nowrap; }
html:not(.intro):has(#arcade[open]), html:not(.intro):has(#arcade[open]) body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { #arcade[open] { animation: none; } }
@media (max-width: 800px) {
  .machine { left: 50%; right: auto; top: 76px; translate: -50% 0; height: 42%; }
  .clawscene .beat { max-width: calc(100vw - 32px); bottom: 64px; }
}

/* On the phone: the note you won, and the one you write back */
#notecard { position: fixed; z-index: 7; inset: 40% 16px auto; display: grid; color: #2b2a33; -webkit-user-select: text; user-select: text; }
#notecard[hidden] { display: none; }
#notecard:has(.compose:not([hidden])) { top: 7%; } /* above the phone keyboard */
#notecard .read, #notecard .compose { display: grid; gap: 14px; padding: 22px; border-radius: 8px; background: #fffdf6; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }
#notecard .read[hidden], #notecard .compose[hidden] { display: none; }
#notecard small, #notecard label { font: 600 12px/1.4 var(--mono); color: #7a7f8c; }
#notecard .written { margin: 0; font-weight: 800; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
#notecard .write, #notecard .seal { padding: 15px; border-radius: 999px; background: #2b2a33; color: #fffdf6; font: 600 15px/1 var(--mono); }
#notecard .seal:disabled { opacity: 0.35; }
#notecard .later { padding: 4px; font: 600 12px/1 var(--mono); color: #7a7f8c; }
#notecard textarea { width: 100%; padding: 12px; border: 1px solid #d6d2c6; border-radius: 6px; background: #fff; color: inherit; font: 800 20px/1.25 var(--display); resize: none; }
.colours { display: flex; flex-wrap: wrap; gap: 10px; }
.colours button { width: 32px; height: 32px; border-radius: 50%; }
.colours button.on { box-shadow: 0 0 0 3px #fffdf6, 0 0 0 5px #2b2a33; }

/* The Salmons: a dark wall, and four musicians who light up when woken. The black of the art melts into the night. */
.band { position: absolute; left: clamp(16px, 4vw, 60px); right: clamp(16px, 4vw, 60px); top: 20vh; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(4px, 1vw, 16px); }
.band img { display: block; width: 100%; height: auto; mix-blend-mode: screen; opacity: 0.22; filter: grayscale(1) brightness(0.8); transition: opacity 0.9s, filter 0.9s; }
.band img.awake { opacity: 1; filter: none; animation: sway 2.4s ease-in-out infinite alternate; }
.band img:nth-child(even).awake { animation-delay: -1.2s; }
.ready .band { cursor: pointer; }
.band img.picked { outline: 2px solid #ffd9a0; outline-offset: 6px; border-radius: 10px; opacity: 0.55; } /* the paddle in your hand */
.band img.picked.awake { opacity: 1; }
@keyframes sway { from { transform: translateY(-1%) rotate(-1deg); } to { transform: translateY(1%) rotate(1deg); } }
.river .beat { z-index: 1; bottom: clamp(24px, 6vh, 60px); max-width: min(52vw, 640px); }
.river .beat h2 { font-size: clamp(26px, 3vw, 46px); }
@media (prefers-reduced-motion: reduce) { .band img.awake { animation: none; } }
@media (max-width: 800px) {
  .band { top: 76px; grid-template-columns: repeat(2, minmax(0, 1fr)); left: 40px; right: 40px; }
  .river .beat { max-width: calc(100vw - 32px); bottom: 56px; }
}

/* The sky: a gradient that follows the clock, with stars when it's dark. Drawn under everything. */
html:not(.intro) body, html.landing body { background: transparent; }
html:not(.intro), html.landing { background: var(--bg, #07080c); }
html:not(.intro) body::before, html:not(.intro) body::after, #landing::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
html:not(.intro) body::before { background: linear-gradient(var(--top, var(--bg)), var(--bg, #f3e6d3) 75%); }
html:not(.intro) body::after, #landing::before { opacity: var(--night, 0); transition: opacity 0.6s; background: radial-gradient(1.4px 1.4px at 22px 34px, #fff 60%, transparent), radial-gradient(1px 1px at 140px 90px, #fff 60%, transparent), radial-gradient(1.8px 1.8px at 210px 20px, #fff 60%, transparent), radial-gradient(1px 1px at 80px 150px, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 260px 170px, #fff 60%, transparent) 0 0 / 300px 220px; -webkit-mask: linear-gradient(#000 40%, transparent 85%); mask: linear-gradient(#000 40%, transparent 85%); }

/* The alarm clock at 07:00, before you open your eyes */
.alarm { position: relative; height: 130vh; }
.alarm .view, .journey .view { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.clock { position: absolute; left: 50%; top: 52%; translate: -50% -50%; height: min(46vh, 62vw); overflow: visible; }
.ringing { animation: shake 0.09s linear infinite alternate; }
.hammer { animation: hammer 0.09s linear infinite alternate; transform-origin: 0 -84px; }
.waves path { animation: waves 0.6s ease-out infinite; }
.waves path:nth-child(even) { animation-delay: 0.15s; }
@keyframes shake { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-3px); } }
@keyframes hammer { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes waves { from { opacity: 0.9; } to { opacity: 0; } }

/* On your way: you ride, and the world passes underneath */
.journey { --ground: 14vh; --rider: min(22vh, 30vw); position: relative; height: 240vh; color: var(--ink, #2a2140); pointer-events: none; }
.journey:not(.here) *, .journey:not(.here) *::before, .journey:not(.here) *::after { animation-play-state: paused !important; }
.scene { position: absolute; inset: 0; will-change: transform; }
.view { opacity: calc(1 - max(0, var(--z, 0) - 0.45) / 0.55); } /* the second half of the zoom fades into the moment after it */
.view::after { content: ""; position: absolute; inset: 0; background: var(--fade, transparent); opacity: min(1, var(--z, 0) * 1.4); pointer-events: none; } /* only into a dark scene */
.journey[data-zoom] + .stop.short, .journey[data-zoom] + .clawscene { margin-top: -50vh; position: relative; z-index: 1; opacity: var(--arrive, 1); translate: 0 calc((1 - var(--arrive, 1)) * 4vh); } /* the next moment rises and appears only once you're through the door */
.reeds { height: min(7vh, 10vw); }
.clouds { position: absolute; left: 0; top: 7vh; width: 320vw; height: 30vh; translate: calc(var(--q, 0) * -50vw) 0; opacity: calc(0.85 - var(--night, 0)); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 200'%3E%3Cg fill='%23fff' opacity='.75'%3E%3Cellipse cx='90' cy='60' rx='60' ry='16'/%3E%3Cellipse cx='120' cy='48' rx='34' ry='16'/%3E%3Cellipse cx='420' cy='130' rx='80' ry='18'/%3E%3Cellipse cx='450' cy='116' rx='40' ry='18'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 60vw 30vh repeat-x; pointer-events: none; }
.journey.dusk .land, .journey.dusk .rider { filter: brightness(0.92) saturate(0.95); }
.journey.dark .land, .journey.dark .rider { filter: brightness(0.62) saturate(0.8); }
.journey.dark .lamp ellipse { filter: drop-shadow(0 0 10px #ffd9a0); }
.land .waver { position: absolute; bottom: calc(var(--ground) - 4px); width: clamp(110px, 13vw, 190px); pointer-events: auto; }
.land .waver.pong { width: min(38vw, 400px); }
.land .waver.pub { width: clamp(160px, 20vw, 280px); }
.led { animation: led 1.4s ease-in-out infinite alternate; }
@keyframes led { to { opacity: 0.3; } }
.kick { animation: kick 2.6s ease-in infinite; }
@keyframes kick { 0% { transform: translate(0, 0); opacity: 1; } 60% { transform: translate(112px, -60px); } 80% { transform: translate(122px, -42px); opacity: 1; } 81%, 100% { opacity: 0; transform: translate(122px, -42px); } }
.soos text, .hall text { fill: #f3e6d3; font: 600 10px/1 var(--mono); letter-spacing: 0.2em; }
.soos { height: min(34vh, 46vw); }
.venue { height: min(36vh, 50vw); }
.hall { height: min(38vh, 52vw); }
.canopy { height: min(22vh, 30vw); }
.lanterns { width: 70vw; bottom: 46vh !important; }
.lantern circle { filter: drop-shadow(0 0 6px #ffd9a0); animation: led 2s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.install { height: min(34vh, 46vw); }
.haze ellipse { fill: #fff; opacity: 0.1; }
.beam { stroke-width: 4.5; stroke-linecap: round; filter: drop-shadow(0 0 6px #ffffff80); transform-origin: 130px 28px; animation: sweep 3.2s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes sweep { from { rotate: -14deg; } to { rotate: 14deg; } }
.falls { height: min(40vh, 54vw); }
.fall path { animation: fall 0.8s linear infinite; }
@keyframes fall { to { stroke-dashoffset: -22; } }
.land { position: absolute; left: 0; bottom: 0; width: 300vw; height: 100%; translate: calc(var(--q, 0) * -200vw) 0; }
.land::before { content: ""; position: absolute; left: -10vw; right: -10vw; bottom: 0; height: var(--ground); background: linear-gradient(color-mix(in srgb, currentColor 10%, transparent), color-mix(in srgb, currentColor 4%, transparent)); border-top: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); }
[data-kind="water"] .land::after { content: ""; position: absolute; left: -10vw; right: -10vw; bottom: calc(var(--ground) * 0.45); height: 5px; border-radius: 3px; background: #7eaed6; opacity: 0.55; }
.land > svg { position: absolute; bottom: calc(var(--ground) - 4px); display: block; overflow: visible; }
.shade { fill: #1d1c21; opacity: 0.12; }
.tree { height: calc(min(26vh, 32vw) * var(--h, 1)); }
.home { height: min(26vh, 36vw); }
.carehome { height: min(28vh, 40vw); }
.home text, .tent text, .shop text { fill: #f3e6d3; font: 600 11px/1 var(--mono); letter-spacing: 0.25em; }
.home text { font-size: 13px; letter-spacing: 0; }
.tent text { fill: #2a2140; }
.smoke circle { fill: #fff; opacity: 0; animation: smoke 3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke circle:nth-child(2) { animation-delay: -1s; }
.smoke circle:nth-child(3) { animation-delay: -2s; }
@keyframes smoke { from { opacity: 0.7; transform: translateY(18px) scale(0.5); } to { opacity: 0; transform: translateY(-10px) scale(1.3); } }
.lamp { height: min(30vh, 40vw); }
.shop { height: min(32vh, 44vw); }
.sheep { height: min(8vh, 12vw); }
.gov { height: min(34vh, 46vw); }
.canal { height: min(40vh, 54vw); }
.bridge { width: min(36vw, 340px); }
.stall { height: min(22vh, 30vw); }
.tent { height: min(40vh, 56vw); }
.evoluon { height: min(36vh, 50vw); }
.bunting { width: 80vw; bottom: 52vh !important; }
.balloons { height: min(20vh, 26vw); bottom: calc(var(--ground) + 4vh) !important; }
.float { animation: float 3s ease-in-out infinite alternate; }
@keyframes float { to { transform: translateY(-8px) rotate(2deg); } }
.van { position: absolute; left: 0; bottom: calc(var(--ground) - 8px); width: min(32vw, 320px); translate: calc((-0.45 + var(--q, 0) * 1.7) * 100vw) 0; overflow: visible; }
.cafe { height: min(36vh, 50vw); }
.cafe text, .shop text { fill: #f3e6d3; font: 600 11px/1 var(--mono); letter-spacing: 0.3em; }
.mill { height: min(38vh, 46vw); }
.city { height: min(32vh, 44vw); }
.birds { height: min(4.5vh, 7vw); bottom: 58vh !important; }
.birds path { fill: none; stroke: #2a2140; stroke-width: 2.5; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: flap 0.5s ease-in-out infinite alternate; }
.birds path:nth-child(2) { animation-delay: -0.2s; }
.birds path:nth-child(3) { animation-delay: -0.35s; }
@keyframes flap { to { transform: scaleY(-0.6); } }
.steam path { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 2; stroke-linecap: round; animation: steam 2.2s ease-in-out infinite; }
.cafe .steam path { stroke: #2a2140; }
.art .steam path { stroke: #f3e6d3; }
.steam path:nth-child(2) { animation-delay: -0.8s; }
.steam path:nth-child(3) { animation-delay: -1.5s; }
@keyframes steam { from { transform: translateY(6px); opacity: 0; } 50% { opacity: 1; } to { transform: translateY(-10px); opacity: 0; } }
.sails { transform-box: view-box; transform-origin: 70px 86px; animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.plane { position: absolute; top: 16vh; left: 0; width: min(28vw, 280px); translate: calc((1.2 - var(--q, 0) * 1.6) * 100vw) 0; }
.plane svg { display: block; width: 100%; height: auto; overflow: visible; }
.plane::after { content: ""; position: absolute; left: 92%; top: 44%; width: 120vw; height: 2px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, currentColor 25%, transparent), transparent); }
.prop { fill: #2a2140; opacity: 0.45; transform-box: fill-box; transform-origin: center; animation: prop 0.08s linear infinite alternate; }
@keyframes prop { to { transform: scaleY(0.2); } }
.rider { position: absolute; left: 12vw; bottom: calc(var(--ground) - 6px); height: var(--rider); overflow: visible; }
.rider .tyre { fill: none; stroke: #1d1c21; stroke-width: 5; }
.rider .rim { fill: none; stroke: #1d1c21; stroke-opacity: 0.25; stroke-width: 1.2; }
.rider .spokes { fill: none; stroke: #1d1c21; stroke-opacity: 0.3; stroke-width: 1; }
.rider .ring { fill: none; stroke: #1d1c21; stroke-width: 2.5; }
.rider .frame { fill: none; stroke: #d23a3f; stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.rider .bar, .rider .crank { fill: none; stroke: #1d1c21; stroke-width: 3.5; stroke-linecap: round; }
.rider .arm { fill: none; stroke: #7470bd; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.rider .leg { fill: none; stroke: #2a2140; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.rider .leg.back { stroke: #48425c; }
.still .art { display: block; width: 100%; height: auto; max-height: 62vh; border-radius: 8px; }
.art text { fill: #2a2140; font: 600 13px/1 var(--mono); }
.pin .pulse { fill: none; stroke: #d23a3f; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes pulse { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.mine { animation: spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.sound path { fill: none; stroke: #3b3248; stroke-width: 2.5; stroke-linecap: round; animation: waves 1.5s ease-out infinite; animation-delay: var(--d, 0s); }
/* Ketelpong: a small game on the square, just like the helmet it sits at the side */
.waver.pong { left: 47%; }
.ball-x { animation: ball-x 1.1s linear infinite alternate; }
.ball-y { animation: ball-y 1.1s ease-in-out infinite; }
@keyframes ball-x { to { transform: translateX(140px); } }
@keyframes ball-y { 50% { transform: translateY(-34px); } }
.paddle { transform-box: fill-box; animation: swing 1.1s ease-in-out infinite alternate; }
.paddle.l { transform-origin: 100% 0; }
.paddle.r { transform-origin: 0 0; animation-direction: alternate-reverse; }
@keyframes swing { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .beam, .roll, .led, .kick, .lantern circle, .fall path, .ringing, .hammer, .waves path, .sound path, .birds path, .steam path, .sails, .prop, .smoke circle, .float, .pin .pulse, .mine, .ball-x, .ball-y, .paddle { animation: none; } }
.view > .ping { position: absolute; left: 12vw; bottom: calc(var(--ground) + var(--rider) + 18px); margin: 0; white-space: nowrap; }
@media (max-width: 800px) { .view > .ping { left: 16px; } .rider { left: 6vw; } }

/* A message opened from your phone: it pops up here, big, for a moment */
#opened { position: fixed; z-index: 30; left: 50%; top: 18vh; width: min(440px, calc(100vw - 32px)); translate: -50% 0; padding: 22px 24px; border-radius: 22px; background: rgba(34, 33, 40, 0.96); color: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); text-align: left; cursor: pointer; animation: opened 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
#opened small { display: block; font: 600 12px/1.3 var(--mono); opacity: 0.65; }
#opened span { display: inline-block; margin-top: 14px; font: 600 13px/1 var(--mono); border-bottom: 1px solid currentColor; padding-bottom: 3px; }
#opened p { margin: 8px 0 0; font-weight: 800; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
#opened.away { opacity: 0; translate: -50% -30px; transition: opacity 0.35s, translate 0.35s; }
@keyframes opened { from { opacity: 0; translate: -50% -60px; scale: 0.9; } }
@media (prefers-reduced-motion: reduce) { #opened { animation: none; } }

/* A message on your phone, shown here too: the day reaches you through your phone */
.ping { display: block; width: fit-content; max-width: min(360px, 100%); margin: 0 0 20px; padding: 11px 15px; border-radius: 16px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: color-mix(in srgb, currentColor 8%, transparent); opacity: 0; translate: 0 -12px; transition: opacity 0.5s, translate 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.ping.on { opacity: 1; translate: 0 0; }
.ping small { font: 600 11px/1.3 var(--mono); opacity: 0.7; }
.ping p { margin: 3px 0 0; font-size: 16px; line-height: 1.3; }
.ping.hint { display: flex; align-items: center; gap: 14px; padding: 0; border: 0; background: none; }
.ping.hint small { display: none; }
.ping.hint p { margin: 0; font: 600 15px/1.3 var(--mono); }
.ping.hint::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: #ff3b30; animation: ping-dot 1.2s infinite; }
@keyframes ping-dot { from { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); } 70%, to { box-shadow: 0 0 0 16px rgba(255, 59, 48, 0); } }
@media (prefers-reduced-motion: reduce) { .ping { transition: none; } .ping.hint::before { animation: none; } }

/* An easter egg: the waving helmet, just chilling at the side of the page */
.egg { position: relative; z-index: 1; height: 0; } /* takes no room: it just sits on the edge between two moments */
.waver { position: absolute; left: 40%; bottom: -6px; display: block; width: clamp(110px, 13vw, 190px); transition: scale 0.2s; }
.waver svg { display: block; width: 100%; height: auto; overflow: visible; }
.waver:hover { scale: 1.12; }
.forearm { transform-box: view-box; transform-origin: 110px 48px; animation: wave-arm 1.5s ease-in-out infinite alternate; }
.palm { transform-box: view-box; transform-origin: 110px -22px; animation: wave-hand 0.5s ease-in-out infinite alternate; }
.waver:hover .forearm { animation-duration: 0.45s; }
@keyframes wave-arm { from { transform: rotate(-38deg); } to { transform: rotate(14deg); } }
@keyframes wave-hand { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .forearm, .palm { animation: none; } }
@media (max-width: 800px) { .waver { left: auto; right: 12px; width: 110px; } }

/* Beatbond seen from above, with one disc on each side */
.jam .night { background: #1c1426; transition: background 0.8s; }
.jam .night.playing { background: #231a33; }
.box { --s: min(46vh, 34vw); position: absolute; right: clamp(40px, 15vw, 240px); top: 50%; translate: 0 -50%; width: var(--s); height: var(--s); border-radius: 12%; background: #d9cdb8; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.screen { position: absolute; inset: 22%; z-index: 1; display: grid; place-content: center; gap: 6px; padding: 6px; text-align: center; border-radius: 6px; color: #fff; background: radial-gradient(circle at 0 0, #7dd65c 22%, transparent 23%), radial-gradient(circle at 100% 100%, #f3a7c8 22%, transparent 23%), #2f6fd8; }
.screen b { font: 800 clamp(13px, 1.6vw, 20px)/1 var(--display); }
.screen small { min-height: 1.3em; font: 600 clamp(10px, 1vw, 13px)/1.3 var(--mono); }
.disc { position: absolute; width: 40%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #14131a; color: #eef0f6; font: 600 13px/1 var(--mono); font-style: normal; box-shadow: 0 0 0 0 transparent; transition: box-shadow 0.2s; }
.friend.n { left: 30%; top: -24%; }
.friend.w { left: -24%; top: 30%; }
.friend.e { right: -24%; top: 30%; }
.you { left: 30%; bottom: -24%; touch-action: none; }
.playing .you { cursor: grab; translate: 0 calc(55% * (1 - var(--push, 0))); transition: translate 0.25s; }
.playing .you.in { translate: 0 0; }
.you.from-l { animation: from-l 0.3s ease-out; } .you.from-r { animation: from-r 0.3s ease-out; }
@keyframes from-l { from { transform: translateX(-45%); opacity: 0.2; } }
@keyframes from-r { from { transform: translateX(45%); opacity: 0.2; } }
.disc.added { box-shadow: 0 0 0 4px #7dd65c, 0 0 30px #7dd65c; }
.jam .beat { z-index: 1; max-width: min(42vw, 560px); }
.jam .beat h2 { font-size: clamp(30px, 3.6vw, 56px); }
@media (max-width: 800px) {
  .box { --s: 46vw; left: 50%; right: auto; top: 96px; translate: -50% 0; margin-top: 12vw; }
  .jam .beat { max-width: calc(100vw - 32px); bottom: 56px; }
}

/* How far along you are: a line through the whole day, and the way onward from a scene */
#bar::after { content: ""; position: absolute; left: 0; bottom: 0; width: calc(var(--day, 0) * 100%); height: 3px; background: linear-gradient(90deg, transparent, #ee9b58); box-shadow: 4px 0 10px rgba(238, 155, 88, 0.8); }
.onward { position: absolute; z-index: 1; right: clamp(16px, 4vw, 56px); bottom: clamp(16px, 4vh, 40px); padding-bottom: 8px; color: inherit; text-decoration: none; font: 600 13px/1.2 var(--mono); background: linear-gradient(currentColor, currentColor) left bottom / calc(var(--through, 0) * 100%) 2px no-repeat, linear-gradient(rgba(238, 240, 246, 0.25), rgba(238, 240, 246, 0.25)) left bottom / 100% 2px no-repeat; }
.onward i { display: inline-block; font-style: normal; animation: nudge 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .onward i { animation: none; } }
.lit .onward { color: #eef0f6; }
@media (max-width: 800px) { .onward { right: auto; left: 16px; bottom: 16px; } }

/* Sound: always within reach, in the visitor's hands */
#sound { position: fixed; z-index: 11; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid currentColor; border-radius: 999px; background: var(--bg, #07080c); color: var(--ink, #eef0f6); font: 600 12px/1 var(--mono); }
#sound .cross { display: none; }
.muted #sound .cross { display: inline; }
.muted #sound .wave { display: none; }
#landing .invite { margin: 0; font-weight: 800; font-size: clamp(20px, 2vw, 28px); line-height: 1.15; letter-spacing: -0.02em; max-width: 26ch; }
#landing .tip { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 12px/1.4 var(--mono); opacity: 0.75; }
#landing .tip .cross { display: none; }
@media (max-width: 800px) { #sound { left: auto; right: 16px; } #ride .beat { max-width: calc(100vw - 32px); } #bike { left: 34vw; } #machine { right: 12px; } }

.go { display: block; margin-top: 22px; padding: 13px 22px; border: 1px solid currentColor; border-radius: 999px; font: 600 13px/1 var(--mono); pointer-events: auto; }
.go:hover { background: #eef0f6; color: #07080c; }
.go[hidden], .pass[hidden] { display: none; }
.pass { display: block; margin-top: 18px; font: 600 12px/1 var(--mono); text-decoration: underline; text-underline-offset: 4px; opacity: 0.75; pointer-events: auto; }
.museum .night { transition: background 0.8s; }
.museum .night.lit { background: #04141d; }
.room { --pan: 0px; --x: 50%; --y: 40%; position: absolute; top: 0; bottom: 0; left: 0; width: 170%; translate: calc(var(--pan) * -1) 0; background: linear-gradient(#0000 72%, #eef0f655 72%, #eef0f622 calc(72% + 2px), #26242e calc(72% + 3px)) center / 100% 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104'%3E%3Cpath d='M0 0h120L60 104zM60 104h120M-60 104H60' fill='none' stroke='%23eef0f6' stroke-opacity='.3'/%3E%3C/svg%3E") top / 120px 104px repeat-x, #17151f; }
.piece { position: absolute; display: block; width: auto; }
.painting { top: 16vh; height: 34vh; }
.stand { top: calc(72% - 42vh); height: 42vh; }
.hanging { top: 0; height: 58vh; }
.painting.last { height: 26vh; }
@media (max-width: 800px) { .hanging { display: none; } .painting { height: 26vh; } }
.room::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle 34vmin at var(--x) var(--y), #07080c00 10%, #07080c 100%); transition: opacity 0.8s; pointer-events: none; }
.lit .room { transition: translate 0.8s; }
.lit .room::after { opacity: 0; }
.exhibit { position: absolute; z-index: 1; left: 60%; width: 30%; top: 14vh; display: grid; justify-items: center; gap: 22px; }
/* The exhibit: a little deep sea, grey and still until the ball is in its holder */
.sea { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; opacity: 0.3; filter: grayscale(1); transition: opacity 1.2s, filter 1.2s, box-shadow 1.2s; }
.sea svg { display: block; width: 100%; height: 100%; }
.lit .sea { opacity: 1; filter: none; animation: glowing 4s ease-in-out infinite; }
@keyframes glowing { 0%, 100% { box-shadow: 0 0 30px #2fd6c922; } 50% { box-shadow: 0 0 110px #2fd6c966; } }
.sea .bell { fill: #8ff5ea55; stroke: #b8fff6; stroke-width: 1.2; }
.sea .arms { fill: none; stroke: #8ff5ea; stroke-width: 1.2; stroke-linecap: round; opacity: 0.6; }
.sea .kelp { fill: none; stroke: #0f3b3a; stroke-width: 5; stroke-linecap: round; }
.sea .mote { fill: #bffff7; opacity: 0.25; }
.sea .jelly, .sea .bell, .sea .arms { transform-box: fill-box; transform-origin: 50% 0; }
.lit .sea .jelly { animation: drift 8s ease-in-out var(--d) infinite alternate; }
.lit .sea .bell { animation: breathe 4s ease-in-out infinite; }
.lit .sea .arms { animation: trail 4s ease-in-out infinite; }
.lit .sea .mote { animation: twinkle 3s ease-in-out var(--d) infinite alternate; }
@keyframes drift { to { translate: 0 -8px; } }
@keyframes breathe { 0%, 100% { scale: 1 1; fill: #8ff5ea44; } 50% { scale: 1.1 0.88; fill: #8ff5eaaa; } }
@keyframes trail { 0%, 100% { scale: 1 1; } 50% { scale: 0.9 1.08; } }
@keyframes twinkle { to { opacity: 0.8; } }
#holder { position: relative; width: 84px; height: 84px; border: 2px dashed #eef0f6; border-radius: 50%; }
.lit #holder { border: 2px solid #2fd6c9; background: #04141d; }
/* Fish crossing, bubbles rising, and the exhibit's labels popping up one by one */
.sea .fish, .sea .bubble { transform-box: view-box; }
.lit .sea .fish { animation: swim var(--t) linear var(--d) infinite; }
.lit .sea .bubble { animation: rise var(--t) ease-in var(--d) infinite; }
.sea .bubble { fill: none; stroke: #bffff7; stroke-width: 0.6; opacity: 0; }
@keyframes swim { from { translate: calc(-40px * var(--dx)) 0; } to { translate: calc(380px * var(--dx)) 0; } }
.sea .tail { transform-box: fill-box; transform-origin: 100% 50%; }
.sea .swim { transform-box: fill-box; transform-origin: 50% 50%; }
.lit .sea .tail { animation: wag 0.45s ease-in-out infinite alternate; }
.lit .sea .swim { animation: bob 2.2s ease-in-out var(--d) infinite alternate; }
@keyframes wag { from { rotate: -14deg; } to { rotate: 14deg; } }
@keyframes bob { from { translate: 0 -2px; rotate: -3deg; } to { translate: 0 2px; rotate: 3deg; } }
@keyframes rise { 0% { translate: 0 0; opacity: 0; } 15% { opacity: 0.7; } 100% { translate: 6px -170px; opacity: 0; } }
.sea .notes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.sea .notes li { position: absolute; padding: 5px 9px; border-radius: 6px; background: #04141dcc; border: 1px solid #2fd6c955; color: #e8fffb; font: 400 clamp(9px, 0.8vw, 12px)/1.3 var(--mono); max-width: 60%; opacity: 0; translate: 0 6px; }
.lit .sea .notes li { animation: pop 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.3) calc(0.8s + var(--i) * 1.4s) forwards; }
@keyframes pop { to { opacity: 1; translate: 0 0; } }
/* The sound comes from the ball: rings go out from the holder */
.lit #holder::before, .lit #holder::after { content: ""; position: absolute; inset: -2px; border: 2px solid #7ff3e6; border-radius: 50%; opacity: 0; animation: sing 2s ease-out infinite; pointer-events: none; }
.lit #holder::after { animation-delay: 1s; }
@keyframes sing { from { scale: 1; opacity: 0.7; } to { scale: 3.4; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lit .sea, .lit .sea *, .lit #holder::before, .lit #holder::after { animation: none !important; } .lit .sea .notes li { opacity: 1; translate: none; } }
.museum .beat { z-index: 1; max-width: min(40vw, 520px); }
/* A soft dark pane behind the words, so they stay readable over the paintings and the glow */
.museum .beat::before { content: ""; position: absolute; z-index: -1; inset: -28px -32px; border-radius: 20px; background: rgb(7 8 12 / 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.museum.stop { overflow: clip; }
@media (max-width: 800px) {
  .room { width: 220%; }
  .exhibit { left: 57%; width: 36%; top: 76px; }
  .museum .beat { max-width: calc(100vw - 32px); bottom: 24px; }
}
#back { position: fixed; z-index: 3; left: 50%; translate: -50% 0; top: 24px; padding: 12px 18px; border: 1px solid currentColor; border-radius: 999px; font: 600 13px/1 var(--mono); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .road, .hints { animation: none !important; } }

#start { position: fixed; z-index: 3; left: 50%; translate: -50% 0; bottom: calc(15vh - 62px); padding: 13px 22px; border: 1px solid currentColor; border-radius: 999px; font: 600 14px/1 var(--mono); white-space: nowrap; }
#start:hover { background: var(--ink, #2a2140); color: var(--bg, #f3e6d3); }
#start span { display: inline-block; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { #start span { animation: none; } }

#bar { background: var(--top, var(--bg, #f3e6d3)); position: fixed; z-index: 5; inset: 0 0 auto 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px clamp(16px, 4vw, 56px); font: 600 12px/1 var(--mono); }
#bar .name { font: 800 18px/1 var(--display); letter-spacing: -0.02em; }
#bar a { color: inherit; text-decoration: none; }
#bar .contact { justify-self: end; }
#clock { font: 600 14px/1 var(--mono); padding: 10px 14px; border: 1px solid currentColor; border-radius: 999px; }
#bar a:hover, #clock:hover { opacity: 0.65; }

#rail { position: fixed; z-index: 4; right: 10px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 2px; }
#rail a { display: flex; justify-content: flex-end; align-items: center; gap: 8px; height: 18px; color: inherit; text-decoration: none; font: 400 11px/1 var(--mono); }
#rail i { display: block; width: 12px; height: 1.5px; background: currentColor; opacity: 0.45; transition: width 0.2s, opacity 0.2s; }
#rail span { opacity: 0; transition: opacity 0.15s; white-space: nowrap; pointer-events: none; }
#rail a:hover span, #rail a:focus-visible span { opacity: 1; } /* only on hover: a label never lies over a drawing */
#rail a.on i, #rail a:hover i { width: 26px; opacity: 1; }
@media (max-width: 800px) { #rail { display: none; } }

#index { width: min(520px, calc(100vw - 32px)); max-height: 80vh; padding: 20px; border: 1px solid currentColor; border-radius: 12px; background: var(--bg, #f3e6d3); color: var(--ink, #2a2140); }
#index::backdrop { background: rgba(7, 8, 12, 0.45); }
#index a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 9px 0; color: inherit; text-decoration: none; font-size: 17px; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
#index a:hover { opacity: 0.65; }
#index time { font: 400 13px/1.6 var(--mono); }
#index .close { float: right; font: 600 12px/1 var(--mono); padding: 4px 0 12px; }
#index p { margin: 0 0 12px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }

#morning { height: 100vh; height: 100svh; }

main { display: block; }
.stop { padding: clamp(72px, 12vh, 140px) clamp(16px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; scroll-margin-top: 40px; }
.stop .text { position: sticky; top: 96px; min-width: 0; }
.stop time { display: block; font: 600 14px/1 var(--mono); margin-bottom: 18px; }
.stop h2 { margin: 0; font-weight: 800; font-size: clamp(38px, 5.2vw, 84px); line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; overflow-wrap: anywhere; }
.stop .where { margin: 14px 0 0; font: 400 13px/1.5 var(--mono); opacity: 0.75; }
.stop .lead { margin: 18px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; max-width: 46ch; }
.stop.signature h2 { font-size: clamp(52px, 8vw, 132px); }
.stop.quick { padding-block: clamp(40px, 7vh, 80px); }
.stop.quick h2 { font-size: clamp(28px, 3.4vw, 52px); }
.stop.bare { grid-template-columns: minmax(0, 1fr); }
.stop.bare .text { position: static; max-width: 760px; }

.media { display: grid; gap: 12px; min-width: 0; }
.media img { display: block; width: 100%; height: auto; border-radius: 6px; }
.media .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.media.tall { max-width: 460px; justify-self: center; width: 100%; }

/* A short moment in the day, leading to its project */
.stop.short { min-height: 70vh; align-items: center; }
.stop.short .text { position: static; }
.stop.short h2 { font-size: clamp(30px, 3.8vw, 60px); line-height: 1.05; letter-spacing: -0.03em; }
.still img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: cover; border-radius: 6px; }

/* A project page: full screen over the day, which stays where it was */
html:not(.intro):has(.project[open]), html:not(.intro):has(.project[open]) body { overflow: hidden; }
.project { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; overflow-y: auto; background: var(--bg, #f3e6d3); color: var(--ink, #2a2140); -webkit-user-select: text; user-select: text; }
.project a { color: inherit; }
/* The page focuses this button as it opens: no box around it then, a thicker underline for keyboard focus instead */
.project .to-day:focus, dialog.project:focus { outline: none; }
.project .to-day:focus-visible { text-decoration-thickness: 3px; }
.project .to-day { position: sticky; z-index: 1; top: 0; display: block; padding: 22px clamp(16px, 8vw, 120px); font: 600 13px/1 var(--mono); text-decoration: underline; text-underline-offset: 4px; }
.project form { position: sticky; z-index: 1; top: 0; background: var(--bg, #f3e6d3); }
.project .stop { padding-top: clamp(24px, 5vh, 56px); }
.project .stop .text { position: static; }
.project p, .project li { max-width: 54ch; }
.project .text > p:not(.where):not(.lead) { font-size: 16px; line-height: 1.6; }
.project h3 { margin: 26px 0 0; font: 600 13px/1.4 var(--mono); }
.media video { display: block; width: 100%; height: auto; border-radius: 6px; background: #000; }
.media video.tall { width: auto; max-width: 100%; max-height: 80vh; justify-self: center; }

#contact .big { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#contact .email { font: 600 clamp(16px, 2vw, 22px)/1 var(--display); padding: 15px 26px; border-radius: 999px; background: var(--ink, #eef0f6); color: var(--bg, #07080c); }
#contact a { color: inherit; }
#contact { min-height: 90vh; align-content: center; }

@media (max-width: 800px) {
  .stop { grid-template-columns: minmax(0, 1fr); }
  .stop .text { position: static; }
  .stop.signature h2 { font-size: clamp(48px, 15vw, 96px); }
  #bar .name { font-size: 15px; }
  #clock { padding: 8px 11px; font-size: 13px; }
  #bar { padding-inline: 12px; }
}

/* A collectible you won: it shows here, then drops towards the phone */
.gift { position: fixed; z-index: 60; left: 50%; top: 45%; width: min(28vw, 260px); aspect-ratio: 1; padding: 22px; border-radius: 32px; background: radial-gradient(circle at 50% 40%, rgba(255, 217, 160, 0.6), rgba(255, 217, 160, 0) 70%); pointer-events: none; }
.gift > :first-child { display: block; width: 100% !important; height: 100% !important; max-height: none !important; position: static !important; translate: none !important; margin: 0 !important; }
.gift small { position: absolute; left: 50%; top: 100%; translate: -50% 0; white-space: nowrap; font: 600 12px/1 var(--mono); color: var(--ink, #2a2140); }
/* The end of the warm-up: the burst's light fills the screen */
.flash { position: fixed; z-index: 70; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 100%, #fffaf0, #ffe3b0 45%, #ffc98a); }

/* Home below the hero, and the projects page (?projects) */
#landing.projects .hero, #landing.projects .home, #landing:not(.projects) .work { display: none; }
#landing .home > section { padding-top: clamp(72px, 14vh, 160px); }
#landing .sec { margin: 0 0 clamp(20px, 3vh, 36px); font-weight: 800; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.03em; }
#landing .more { margin: 28px 0 0; font: 600 14px/1 var(--mono); }
#landing .cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
#landing .cols .text p { margin: 0 0 1.1em; max-width: 60ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; }
#landing .skills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
#landing .skills li { position: relative; border: 1px solid currentColor; border-radius: 999px; font: 600 12px/1.3 var(--mono); transition: background 0.2s, color 0.2s; }
#landing .skills a { display: block; padding: 9px 14px; color: inherit; text-decoration: none; }
#landing .skills li:hover, #landing .skills li:focus-within { background: var(--ink); color: var(--bg); }
#landing .skills a::after { content: "See projects \2192"; position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 4px; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font: 400 11px/1 var(--mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.2s; }
#landing .skills a:hover::after, #landing .skills a:focus-visible::after { opacity: 1; translate: -50% 0; }
#landing .reach { padding-bottom: clamp(72px, 14vh, 160px); }
#landing .reach .links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 0; }
#landing .work h1 { margin-top: 28px; }
#landing .work > .lead { margin-bottom: clamp(32px, 6vh, 64px); }
#landing .top { display: flex; justify-content: space-between; gap: 16px; margin: 0; font: 600 13px/1 var(--mono); }
#landing .work .cards { padding-bottom: clamp(48px, 10vh, 120px); }
/* A project card: its photo, with the little object you collect on the phone as a sticker */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.cards.big { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; display: block; color: inherit; text-decoration: none; }
.card .pic { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, currentColor 8%, transparent); }
.cards.big .pic { aspect-ratio: 4 / 5; }
.card .pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
.card:hover .pic img, .card:focus-visible .pic img { scale: 1.04; }
.card .pic .obj { position: absolute; inset: 14%; transition: scale 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
.card:hover .pic .obj { scale: 1.06; }
.card .sticker { position: absolute; right: 12px; bottom: 12px; width: clamp(56px, 22%, 84px); aspect-ratio: 1; padding: 8px; border-radius: 50%; background: var(--bg, #07080c); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transition: rotate 0.4s; }
.card:hover .sticker { rotate: -8deg; }
.card .obj > *, .card .sticker > * { display: block; width: 100% !important; height: 100% !important; max-height: none !important; position: static !important; translate: none !important; margin: 0 !important; overflow: visible; }
.card small { display: block; margin-top: 14px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.04em; opacity: 0.65; }
.card b { display: block; margin-top: 4px; font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -0.02em; }
.cards.big .card b { font-size: clamp(24px, 2.2vw, 32px); }
.card .lead { display: -webkit-box; margin-top: 6px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; opacity: 0.85; }
.cards.big .card .lead { -webkit-line-clamp: 3; font-size: 15px; }
.card.soon .pic { display: grid; place-items: center; border: 1px dashed currentColor; background: none; font: 600 12px/1 var(--mono); opacity: 0.8; }
@media (max-width: 800px) { #landing .cols { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .card .pic img, .card .pic .obj, .card .sticker { transition: none; } }

/* A project page: a case study. Title, intro and facts; a hero; then the story, with the photos between its parts. */
.case { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 6vh, 64px) clamp(16px, 6vw, 96px) clamp(64px, 12vh, 140px); }
.case h2 { margin: 0; font-weight: 800; font-size: clamp(44px, 7.5vw, 120px); line-height: 0.95; letter-spacing: -0.045em; text-wrap: balance; overflow-wrap: anywhere; }
.case .intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; margin-top: clamp(24px, 4vh, 48px); }
.project .case .lead { margin: 0; max-width: 34ch; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.4; letter-spacing: -0.01em; }
.project .case .where { margin: 0; max-width: none; padding-top: 6px; border-top: 1px solid currentColor; font: 400 13px/1.5 var(--mono); }
.case .where span { display: block; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.case .where i { display: none; }
.case figure { margin: 0; }
.case .hero { margin-top: clamp(32px, 6vh, 72px); }
.case figure img, .case figure video { display: block; width: 100%; height: auto; border-radius: 12px; }
.case figure video { background: #000; }
.case .hero img, .case .hero video, .case .shot img, .case .shot video { max-height: 86vh; width: auto; max-width: 100%; margin-inline: auto; }
.case .hero.art { display: grid; place-items: center; aspect-ratio: 16 / 7; border-radius: 12px; background: color-mix(in srgb, currentColor 6%, transparent); }
.case .hero.art > * { width: min(46%, 420px) !important; height: auto !important; max-height: 90% !important; position: static !important; translate: none !important; margin: 0 !important; overflow: visible; }
.case .pair { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: clamp(10px, 1.4vw, 20px); align-items: start; }
.case .tall:not(.hero) img, .case .tall video { max-width: 520px; }
.case .story { display: grid; gap: clamp(40px, 8vh, 96px); margin-top: clamp(48px, 9vh, 112px); }
.case .part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: clamp(16px, 4vw, 64px); }
.project .case h3 { margin: 0; padding-top: 4px; font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.project .case .part p { max-width: 62ch; margin: 0 0 1em; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.7; }
.case .part p:last-child { margin-bottom: 0; }
.project .case .note { margin: 0; font: 400 12px/1.5 var(--mono); opacity: 0.65; }
.case figcaption { margin-top: 10px; font: 400 12px/1.5 var(--mono); opacity: 0.65; text-align: center; }
.case .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(10px, 1.4vw, 20px); align-items: start; }
@media (max-width: 800px) {
  .case .intro, .case .part { grid-template-columns: minmax(0, 1fr); }
  .case .part { gap: 8px; }
  .case .part > span:empty { display: none; }
}
/* Cut-outs: transparent photos that stand on the page, whatever its colour. */
.case .cutout img { border-radius: 0; }
.case .cutout .pair { align-items: center; }
.case .cutout .pair > figure { align-self: end; }
/* "You found it" is said only in the day walk, never on the projects pages */
html.landing .project .found { display: none; }
/* A small row of supporting images, kept modest on purpose */
.case .thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: clamp(8px, 1vw, 14px); max-width: 860px; margin-inline: auto; }
.case .thumbs img { border-radius: 8px; }
/* Links, in two weights. The one experience on a page is a filled pill with an arrow;
   everything that leaves for elsewhere (a report, Instructables, LinkedIn) is a quiet outline pill with ↗. */
.project .go.play { display: inline-flex; align-items: center; gap: 10px; margin-top: 0; border-color: transparent; background: var(--ink, #2a2140); color: var(--bg, #f3e6d3); }
.project .go.play::after { content: "\2192"; transition: translate 0.2s; }
.project .go.play:hover { background: var(--ink, #2a2140); color: var(--bg, #f3e6d3); opacity: 0.88; }
.project .go.play:hover::after { translate: 3px 0; }
.more, #landing .others a, #landing .reach .links a, #contact .big a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 999px; color: inherit; font: 400 13px/1 var(--mono); text-decoration: none; transition: border-color 0.2s; }
.more::after, #landing .others a::after, #landing .reach .links a::after, #contact .big a::after { content: "\2197"; transition: translate 0.2s; }
.more[href^="#"]::after { content: "\2192"; } /* to another page on this site, not out of it */
.more:hover, #landing .others a:hover, #landing .reach .links a:hover, #contact .big a:hover { border-color: currentColor; }
.more:hover::after, #landing .others a:hover::after, #landing .reach .links a:hover::after, #contact .big a:hover::after { translate: 2px -2px; }
#landing .others { display: flex; flex-wrap: wrap; gap: 8px; }
#landing .others a[href^="?"]::after { content: "\2192"; }
#landing .reach .links a, #contact .big a { padding: 15px 26px; font: 600 clamp(16px, 2vw, 22px)/1 var(--display); }
#landing .reach .links a.email, #contact .big a.email { border-color: transparent; background: var(--ink, #eef0f6); color: var(--bg, #07080c); }
@media (prefers-reduced-motion: reduce) { .more::after, .project .go.play::after, #landing .others a::after, #landing .reach .links a::after, #contact .big a::after { transition: none; } }

/* A row where the first photo sets the height and the rest fill it; a .stack puts two photos in one column */
.case .fill { align-items: stretch; }
.case .fill > img:first-child { width: 100%; height: auto; max-height: none; }
.case .fill > :not(:first-child) { contain: size; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.case .stack { display: flex; flex-direction: column; gap: clamp(10px, 1.4vw, 20px); }
.case .screens img { border-radius: 14px; }
.case .stack img { flex: 1 1 0; min-height: 0; width: 100%; max-height: none; object-fit: cover; }
.case .hero.narrow { max-width: 900px; margin-inline: auto; }
.case .watch { font: 400 12px/1 var(--mono); color: inherit; background: none; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 99px; padding: 5px 11px; margin-left: 6px; cursor: pointer; }
.case .watch::before { content: "\25B6"; font-size: 9px; margin-right: 6px; }
dialog.film { border: 0; padding: 0; background: none; max-width: min(92vw, 1100px); overflow: visible; }
dialog.film::backdrop { background: rgb(0 0 0 / 0.8); }
dialog.film video { display: block; width: 100%; max-height: 82vh; border-radius: 12px; }
dialog.film form { text-align: center; margin-top: 12px; }
dialog.film form button { font: 600 13px/1 var(--mono); color: #1d1c21; background: #fff; border: 0; border-radius: 99px; padding: 7px 14px; cursor: pointer; }

/* Project tags: under the lead, their bottom level with the facts; and the filter pills on the projects page */
.case .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; grid-column: 1; grid-row: 2; align-self: end; }
.case .intro { row-gap: 0; }
.case .intro .lead { grid-column: 1; grid-row: 1; }
.project .case .intro .where { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 800px) {
  .case .intro .lead, .case .tags, .project .case .intro .where { grid-column: auto; grid-row: auto; }
  .project .case .intro .where { order: 1; margin-top: 28px; }
}
.case .tags span { padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, currentColor 8%, transparent); font: 400 11px/1.3 var(--mono); opacity: 0.8; }
#landing .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: clamp(20px, 4vh, 40px) 0 clamp(28px, 5vh, 52px); }
#landing .filters button { padding: 8px 14px; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 99px; background: none; color: inherit; font: 400 13px/1 var(--mono); cursor: pointer; transition: background 0.2s, color 0.2s; }
#landing .filters button:hover { border-color: currentColor; }
#landing .filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
.card[hidden] { display: none; }
/* Rolled over with the ball from the phone: the thing a tap would press */
.ball-over { outline: 3px solid #ffd9a0; outline-offset: 5px; box-shadow: 0 0 24px rgba(255, 200, 140, 0.6); transition: outline-offset 0.15s; }
