/* The scroll-driven way into the booth, on top of the landing (see tools/add_intro.py). Names start with i- so they never meet the landing's own. */

/* The way in is driven by scroll: #intro is tall, the stage inside stays pinned. */
#intro { height: 900vh; position: relative; color: #EDEBE6; }
.i-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #0B0909; }
/* soft, blurred copy of the picture behind it, so wide screens are not two black bars */
#amb { position: absolute; inset: -10%; width: 120%; height: 120%; filter: blur(48px) brightness(.5) saturate(1.1); }
/* the 9:16 picture: always as tall as the screen, centred (phones crop a little off the sides) */
/* it starts as a card under the opening words and grows to fill the screen (intro.js sets the transform) */
.i-frame { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 9 / 16; transform: translateX(-50%); transform-origin: 50% 0; overflow: hidden; will-change: transform; }
/* wider than the picture: melt its edges into the backdrop */
@media (min-aspect-ratio: 9/16) { .i-frame { -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--m, 7%), #000 calc(100% - var(--m, 7%)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--m, 7%), #000 calc(100% - var(--m, 7%)), transparent); } }
.i-world { position: absolute; inset: 0; transform-origin: 68.75% 53%; will-change: transform; }
.i-world > img, .i-world > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#a, #v, #d { opacity: 0; }

/* on the inside wall (positions measured on d.jpg, in % of the picture) */
#inside { position: absolute; inset: 0; opacity: 0; }
#sign { position: absolute; left: 55.2%; top: 18.2%; width: 27%; height: 9.2%; }
#screen { position: absolute; left: 14.7%; top: 27.4%; width: 21.7%; height: 9%; display: flex; align-items: center; justify-content: center; container-type: size; }
#count { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 78cqh; line-height: 1; color: #EDEBE6; }
#dots { position: absolute; display: flex; gap: 6cqw; opacity: 0; }
#dots i { width: 7cqw; height: 7cqw; border-radius: 50%; border: 1px solid #EDEBE6; box-sizing: border-box; }
#dots i.on { background: #EDEBE6; }
#slot { position: absolute; left: 56.25%; top: 31.8%; width: 25%; height: 41.6%; overflow: hidden; }
/* the strip: same proportions as the app's 1 × 4 (84 × 417 units); it tips over on its bottom-right corner */
#strip { position: absolute; left: 14%; bottom: 1.5%; width: 57.2%; aspect-ratio: 84 / 417; background: #F2F0EA; container-type: inline-size; box-shadow: 0 2px 6px rgba(0,0,0,.4); transform-origin: 100% 100%; will-change: transform; }
#strip .ph { position: absolute; left: 4.76cqw; width: 90.48cqw; aspect-ratio: 76 / 95; background: #EDEBE7; overflow: hidden; }
#strip .ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); opacity: 0; display: block; }
#lbl { position: absolute; left: 0; right: 0; bottom: 5cqw; text-align: center; font-family: 'Reenie Beanie', cursive; font-size: 15cqw; line-height: 1; color: #151112; }

#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .1; mix-blend-mode: overlay; pointer-events: none; }

/* words over the picture */
.i-over { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; padding: 0 24px; }
/* the opening: logo and languages, the headline, one line and the store badges; all of it leaves as you scroll */
#bar { top: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; pointer-events: auto; z-index: 3; }
#bar img { width: 52px; height: auto; display: block; }
/* the language menu (28/11): the current language, and the app's 10 in their own names */
#bar .langs { position: relative; }
#bar summary { list-style: none; cursor: pointer; color: #EDEBE6; opacity: .8; font-size: 10px; letter-spacing: .12em; padding: 12px 6px; user-select: none; }
#bar summary::-webkit-details-marker { display: none; }
#bar summary:focus-visible { outline: 1px solid #EDEBE6; outline-offset: 2px; border-radius: 4px; }
#bar .langs nav { position: absolute; right: -4px; text-align: left; top: calc(100% + 2px); display: grid; min-width: 168px; padding: 6px; border-radius: 14px;
  background: rgba(20, 16, 17, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: .5px solid rgba(237, 235, 230, .16);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45); animation: langs-in .18s ease-out; }
@keyframes langs-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { #bar .langs nav { animation: none; } }
#bar .langs a { color: #EDEBE6; opacity: .72; text-decoration: none; padding: 10px 12px; font-size: 11px; letter-spacing: .03em; border-radius: 9px; }
#bar .langs a:hover, #bar .langs a:focus-visible { opacity: 1; background: rgba(237, 235, 230, .08); outline: none; }
#bar .langs a[aria-current] { opacity: 1; }
#bar .langs a[aria-current]::after { content: ' ·'; }
#hello { top: clamp(84px, 13vh, 150px); z-index: 2; will-change: transform; }
#hello h1 { margin: 0 0 16px; font-size: clamp(36px, 6vw, 62px); line-height: 1.02; font-weight: 400; }
#lead { max-width: 34em; margin: 0 auto 22px; font-size: 11px; line-height: 1.7; letter-spacing: .04em; opacity: .75; }
#hint { margin: 20px 0 0; font-size: 9.5px; letter-spacing: .12em; opacity: .55; }
#skip { position: absolute; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 3; padding: 14px; border: 0; background: none; color: #EDEBE6; font-size: 10px; letter-spacing: .14em; opacity: 0; cursor: pointer; }
/* the last words get the bottom third to themselves; the strip stays in view above */
#cta { bottom: 0; height: 34%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px max(14px, env(safe-area-inset-bottom)); background: #0B0909; opacity: 0; }
#cta::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 90px; background: linear-gradient(to top, #0B0909, rgba(11,9,9,0)); }
#cta h2 { margin: 0 0 8px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.05; font-weight: 400; }
#cta p { margin: 0 0 20px; font-size: 10px; letter-spacing: .1em; opacity: .7; }
.i-stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Paper without photos (26/11): flat colour plus a drawn grain that stays sharp at any width. The JPEG papers were
   stretched up to 4x on big screens and looked pixelated. The grain keeps the analog feel. */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='m' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cfilter id='g' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23m)' opacity='.05'/%3E%3Crect width='280' height='280' filter='url(%23g)' opacity='.07'/%3E%3C/svg%3E") 0 0 / 280px 280px; }
.p-white { background: var(--grain), #ECEAE5 !important; }
.p-light { background: var(--grain), #F7F6F2 !important; }
.p-bur { background: var(--grain), #6B2123 !important; }
.p-deep { background: var(--grain), #460C14 !important; }
.p-char { background: var(--grain), #262324 !important; }

/* all the frames, as a sheet over the page */
.frames-sheet { width: min(1180px, 100vw); max-width: 100vw; height: min(92vh, 100dvh); max-height: 100dvh; margin: auto; padding: 0; border: 0; color: #151112; overflow: auto; box-shadow: 0 30px 80px rgba(20,0,4,.45); }
.frames-sheet::backdrop { background: rgba(32,6,9,.62); backdrop-filter: blur(2px); }
.frames-sheet header { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 14px; padding: 28px clamp(18px, 4vw, 48px) 18px; background: inherit; }
.frames-sheet h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 400; line-height: 1; }
.frames-sheet header span { font-size: 11px; opacity: .55; }
.frames-sheet header button { margin-left: auto; min-height: 44px; padding: 0 4px; border: 0; background: none; color: inherit; font-size: 11px; letter-spacing: .08em; cursor: pointer; }
.frames-sheet ul { list-style: none; margin: 0; padding: 8px clamp(18px, 4vw, 48px) 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 30px 18px; }
.frames-sheet li:nth-child(3n+1) .fr { transform: rotate(-1.6deg); } .frames-sheet li:nth-child(3n+2) .fr { transform: rotate(1.2deg); }
.frames-sheet .fr { position: relative; aspect-ratio: 9 / 16; background-size: cover; background-position: center; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 12px 24px rgba(0,0,0,.12); }
.frames-sheet .pol { position: absolute; left: 50%; top: 49%; width: 46%; padding: 4% 4% 14%; background: #F4F1EA; transform: translate(-50%, -50%) rotate(-1deg); box-sizing: border-box; }
.frames-sheet .pol img { display: block; width: 100%; aspect-ratio: 66 / 86; object-fit: cover; filter: grayscale(1) contrast(1.04) brightness(1.08); }
.frames-sheet p { margin: 12px 0 0; font-size: 10px; letter-spacing: .08em; opacity: .75; }
.frames-sheet em { font-style: normal; color: #9E1C2C; }
.frames-more { border: 0; background: none; color: inherit; font-size: 9px; letter-spacing: .06em; text-decoration: underline; min-height: 40px; padding: 0 4px; cursor: pointer; }
@keyframes frIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .frames-sheet[open] { animation: frIn .3s ease-out both; } }
