/* ATOE Finds · home. The 3D wall fills the screen; the keys are enamel objects mounted on it, lit by the same light. */
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --ink: #111214; --chalk: #F5F4F0; --signal: #FF4F12; --plaster: #E9E3D8;
  --text: var(--ink); --muted: rgba(17, 18, 20, .58);
  /* the key light, set by the scene every frame it changes: shadow direction, strength, colour */
  --shx: .55; --shy: .85; --lit: 1; --key: #FFF4E6;
  --pad: clamp(18px, 4.6vw, 64px);
  --land: cubic-bezier(.16, 1, .3, 1);
  --leave: cubic-bezier(.5, 0, .75, 0);
}
html[data-dark] { --text: var(--chalk); --muted: rgba(245, 244, 240, .62); }

html, body { margin: 0; height: 100%; background: var(--plaster); color: var(--text); overflow: hidden; overscroll-behavior: none; }
html[data-dark] { background: #15130F; }
body { font: 450 16px/1.3 Archivo, system-ui, sans-serif; font-stretch: 100%; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; touch-action: pan-y; cursor: ew-resize; }
html.lit #scene { opacity: 1; }
.still { position: fixed; inset: 0; background: url(/img/still.jpg) center 30% / cover; display: none; }
html.no-gl .still { display: block; }
/* film grain, fixed to the glass: felt, not seen; kills banding in the dusk sky */
.grain { position: fixed; inset: -50%; pointer-events: none; z-index: 5; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }

/* ── header ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
.top { position: fixed; z-index: 3; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: max(env(safe-area-inset-top), 18px) var(--pad) 0; pointer-events: none; }
.brand { margin: 0; line-height: 0; color: var(--text); }
html.lit:not(.phone) .brand { visibility: hidden; }
.brand svg { height: clamp(20px, 2.2vw + 10px, 30px); width: auto; display: block; }
.where { margin: 0; display: flex; gap: 14px; color: var(--muted); font-size: clamp(12.5px, .25vw + 11.5px, 14.5px); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.where .city { color: var(--text); }
#clock { color: var(--muted); }
@media (max-width: 700px) { .pick { display: none; } }

/* ── the dock: a line and three keys on the wall ──────────────────────────────────────────────────────────────────── */
.dock { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) max(env(safe-area-inset-bottom), clamp(16px, 3vh, 34px));
  display: grid; justify-items: center; gap: clamp(12px, 1.8vh, 18px); pointer-events: none; }
.line { margin: 0; text-align: center; color: var(--muted); font-size: clamp(14px, .5vw + 11.5px, 18px); letter-spacing: -.01em; text-wrap: balance; }
.line b { color: var(--text); font-weight: 560; }
.keys { width: min(1120px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); pointer-events: auto; }
.hint { margin: 0; color: var(--muted); font-size: 12.5px; opacity: .8; }
@media (pointer: coarse) { .hint { display: none; } }

/* A key: cast enamel on the wall. Lit rim up top, shaded foot, a gloss streak, and a two-part shadow (contact + ambient)
   that falls away from the scene's key light. Pressing closes the shadow up. */
.key {
  --base: #121214; --fg: var(--chalk); --sub: rgba(245, 244, 240, .62); --h: 76px; --r: 18px;
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: var(--h); padding: 10px 18px 10px 10px; box-sizing: border-box; border-radius: var(--r); color: var(--fg); isolation: isolate;
  background:
    radial-gradient(120% 140% at calc(50% - var(--shx) * 45%) -40%, color-mix(in oklab, var(--key) 22%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in oklab, var(--base), white 9%) 0%, var(--base) 38%, color-mix(in oklab, var(--base), black 30%) 100%);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--key) 55%, transparent),
    inset 0 -1.5px 1px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    calc(var(--shx) * 1.5px) calc(var(--shy) * 2.5px) 3px -.5px rgba(10, 8, 6, calc(.5 * var(--lit))),
    calc(var(--shx) * 16px) calc(var(--shy) * 24px) 40px -12px rgba(10, 8, 6, calc(.45 * var(--lit) + .15));
  transition: transform .35s var(--land), box-shadow .35s var(--land);
}
/* lacquer: a soft reflection of the key light across the top, like the letters' faces */
.key::before { content: ""; position: absolute; z-index: -1; left: 1px; right: 1px; top: 1px; height: 55%; border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0;
  background: linear-gradient(180deg, color-mix(in oklab, var(--key) 16%, transparent), transparent); opacity: calc(.4 + .6 * var(--lit)); pointer-events: none; }
.key.shop { --base: #FF4F12; --fg: #fff; --sub: rgba(255, 255, 255, .88); }
.key.shop::before { background: linear-gradient(180deg, rgba(255, 230, 210, .32), rgba(255, 230, 210, 0)); }
.key.shop { box-shadow:
    inset 0 1px 0 rgba(255, 220, 200, .7), inset 0 -1.5px 1px rgba(120, 30, 0, .35),
    calc(var(--shx) * 1.5px) calc(var(--shy) * 2.5px) 3px -.5px rgba(10, 8, 6, calc(.5 * var(--lit))),
    calc(var(--shx) * 16px) calc(var(--shy) * 24px) 40px -12px rgba(60, 20, 0, calc(.45 * var(--lit) + .15)); }

.txt { display: grid; gap: 2px; min-width: 0; }
.name { font-size: clamp(18px, .5vw + 15px, 22px); font-weight: 640; font-stretch: 110%; letter-spacing: -.03em; line-height: 1.05; }
.sub { color: var(--sub); font-size: clamp(12.5px, .2vw + 11.5px, 14px); font-weight: 460; letter-spacing: -.005em; font-variant-numeric: tabular-nums; text-wrap: balance; }
.sub em { font-style: normal; font-weight: 620; color: #fff; }
.arr { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; transition: translate .4s var(--land); }

/* the peek: a little Aperture window set into the enamel, with the real thing in it */
.peek { position: relative; width: 70px; aspect-ratio: 328 / 263; border-radius: 18.6% / 23.2%; overflow: hidden; background: #fff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(0, 0, 0, .1); }
.peek::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 3px 6px -2px rgba(0, 0, 0, .35); pointer-events: none; z-index: 2; }
.pane { position: absolute; inset: 0; }
.pane img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; box-sizing: border-box; background: #fff; }
.ig .pane img { object-fit: cover; padding: 0; }
.pane img.in { animation: open .9s cubic-bezier(.76, 0, .18, 1) both; }
@keyframes open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.price { position: absolute; z-index: 3; left: 4px; bottom: 4px; padding: 2px 6px 1px; border-radius: 99px; background: var(--chalk); color: var(--ink);
  font-size: 11.5px; font-weight: 680; font-stretch: 105%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.price:empty { display: none; }
.glyph { display: grid; place-items: center; background: #26272B; }
.glyph svg { width: 26px; height: 26px; fill: var(--chalk); }
.ig .peek:not(:has(img)) { background: #26272B; }

/* ── states ───────────────────────────────────────────────────────────────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .key:hover { transform: translateY(-2px); }
  .key:hover .arr { translate: 2px -2px; }
}
.key:active, .key.chosen {
  transform: translateY(2px) scale(.99);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .8), inset 0 -1px 1px rgba(0, 0, 0, .12),
    calc(var(--shx) * .5px) calc(var(--shy) * 1px) 1.5px 0 rgba(10, 8, 6, calc(.45 * var(--lit))),
    calc(var(--shx) * 6px) calc(var(--shy) * 9px) 18px -8px rgba(10, 8, 6, .3);
}
.key:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

/* arrival: the keys land once the camera has backed out of the room */
html.js .key, html.js .line, html.js .top, html.js .hint { opacity: 0; transform: translateY(26px); }
html.js .top { transform: translateY(-10px); }
html.arrived .key, html.arrived .line, html.arrived .top, html.arrived .hint {
  opacity: 1; transform: none;
  transition: opacity .7s ease calc(var(--i, 0) * 90ms + 60ms), transform 1s var(--land) calc(var(--i, 0) * 90ms + 60ms), box-shadow .35s var(--land), filter 1.6s ease;
}
html.arrived .line { --i: -.5; } html.arrived .hint { --i: 4; }
html.no-gl .key, html.no-gl .line, html.no-gl .top { opacity: 1; transform: none; }
/* leaving: everything on the wall falls away fast (leave beats land), the camera goes through the o */
html.leaving .key:not(.chosen), html.leaving .line, html.leaving .top, html.leaving .hint { opacity: 0; transform: translateY(16px); transition: opacity .3s var(--leave), transform .35s var(--leave); }
html.leaving .key.chosen { opacity: 0; transition: opacity .35s ease .25s, transform .2s ease; }
html.scrubbing .dock, html.scrubbing .top .pick { opacity: .25; transition: opacity .3s; }

/* ── phones: the keys stack, the shop first and largest ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .keys { grid-template-columns: 1fr; gap: 10px; }
  .key { --h: 66px; padding-right: 16px; }
  .key.shop { --h: 78px; }
  .peek { width: 60px; }
  .key.shop .peek { width: 72px; }
}
@media (max-height: 640px) and (max-width: 760px) { .line { display: none; } .key { --h: 58px; } .key.shop { --h: 66px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.js .key, html.js .line, html.js .top, html.js .hint { opacity: 1; transform: none; }
}

/* scrubbing the hour: the time, as big as the screen allows */
.hour { position: fixed; z-index: 4; left: 0; right: 0; top: 50%; margin: 0; translate: 0 -50%; text-align: center; pointer-events: none;
  font-size: clamp(72px, 16vw, 260px); font-weight: 620; font-stretch: 112%; letter-spacing: -.055em; line-height: 1; color: var(--chalk);
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); opacity: 0; scale: .96; transition: opacity .25s, scale .5s var(--land); }
html.scrubbing .hour { opacity: 1; scale: 1; }

/* ?bare: the scene alone (share image, fallback still) */
html.bare .top, html.bare .dock, html.bare .grain { display: none; }
