/* Creative Conviction — the landing page opening. The beats run by themselves on the first load of a visit (scrolling moves them on sooner):
   load      the wordmark assembles from scattered letters; the tagline follows
   beat 1    the board of pictures, full width behind the words, comes into focus out of grain and blur; the words fade
   beat 2    every picture that isn't a face becomes a colour square; the faces run down to their rows; the titles arrive */
body.opening { overflow: hidden; }
.intro { position: fixed; inset: 56px 0 0 0; z-index: 22; display: grid; place-items: center; text-align: center; pointer-events: none; transition: opacity .8s ease; }
.intro.out { opacity: 0; }
.intro h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 15.5vw, 240px); line-height: .88; letter-spacing: -.035em; margin: 0; }
.intro h1 .line { display: block; }
.intro h1 .l2 { color: var(--magenta); }
.intro .ch { display: inline-block; opacity: 0; will-change: transform; transition: transform .95s cubic-bezier(.2, 1.25, .3, 1), opacity .35s ease; transition-delay: var(--dl, 0ms), var(--dl, 0ms); }
.intro.go .ch { opacity: 1; transform: none !important; }
.intro .tag { color: var(--ink-2); font-family: var(--serif); font-size: clamp(20px, 2.1vw, 30px); line-height: 1.3; margin: clamp(22px, 3vw, 40px) auto 0; opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .9s var(--ease); transition-delay: 1.1s; }
.intro.go .tag { opacity: 1; transform: none; }
/* A thin line that drops, to say there is more below */
.cue { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 23; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.cue.on { opacity: 1; }
.cue i { display: block; width: 1px; height: 26px; background: var(--ink-3); animation: cue-drop 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes cue-drop { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
/* The board */
.stage { position: fixed; left: 0; right: 0; top: 56px; bottom: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.stage.live .board { pointer-events: auto; }
.stage.live .tile { cursor: pointer; }
.stage.gone { display: none; }
.peek { z-index: 24; }
.board { display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); grid-auto-rows: var(--cell); gap: var(--gap); opacity: 0; filter: blur(22px); will-change: filter, opacity; }
.board.in { opacity: 1; filter: blur(0); transition: opacity 1.5s ease, filter 1.8s cubic-bezier(.3, .6, .2, 1); }
.grain { position: absolute; inset: -20%; z-index: 3; pointer-events: none; opacity: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.15  0 0 0 0 0.3  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 300px 300px; mix-blend-mode: multiply; }
.grain.on { animation: grain-move .35s steps(4) infinite, grain-fade 2s ease forwards; }
@keyframes grain-move { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } 100% { transform: translate(3%, 3%); } }
@keyframes grain-fade { 0% { opacity: .55; } 35% { opacity: .5; } 100% { opacity: 0; } }
.board .tile { position: relative; width: var(--cell); height: var(--cell); transform-origin: 50% 50%; }
.board .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board .tile.pic::before { content: ""; position: absolute; inset: 0; background: var(--c); opacity: 0; }
.board .tile.pic img { position: relative; transition: opacity .35s ease; transition-delay: calc(var(--dl, 0ms) * .5); }
.stage.colour .tile.pic::before { opacity: 1; }
.stage.colour .tile.pic img { opacity: 0; }
.stage.colour .tile.pic { transform: scale(.42); transition: transform .45s cubic-bezier(.22, .7, .2, 1); transition-delay: calc(var(--dl, 0ms) * .5 + 80ms); }
.stage.leaving .tile.pic { opacity: 0; transition: opacity .6s ease; transition-delay: calc(var(--dl, 0ms) * .5 + 150ms); }
.board .tile.face { z-index: 2; will-change: transform; }
.board .tile.face.fly { transition: transform .9s cubic-bezier(.65, 0, .25, 1); transition-delay: var(--dl, 0ms); }
/* The list waits beneath; the portraits appear when the faces land, then the words and the rules */
main.grid-home { padding-top: 24px; min-height: 100vh; }
body.opening .row .ph { opacity: 0; }
.row .t, .row .w, .row .d { opacity: 0; transform: translateY(6px); }
.row a { border-bottom-color: transparent; }
.list.show .row a { border-bottom-color: var(--rule); transition: border-color .6s ease; transition-delay: calc(var(--i, 0) * 35ms + 80ms); }
.list.show .row .t, .list.show .row .w, .list.show .row .d { opacity: 1; transform: none; transition: opacity .45s ease, transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 35ms); }
@media (prefers-reduced-motion: reduce) { .intro, .intro .ch, .intro .tag, .board, .board.in, .board .tile, .board .tile img, .board .tile.pic, .board .tile.face.fly, .row .t, .row .w, .row .d, .cue i, .grain { transition: none !important; animation: none !important; } }
