/* Layout and motion, modelled on hole.money (1280×832 canvas). Values live in tokens.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--wbg); color: var(--wtext); transition: background-color .6s, color .6s; }
body { font: var(--t-p); letter-spacing: var(--track); word-break: keep-all; -webkit-font-smoothing: antialiased; overscroll-behavior: none; touch-action: none; }
a { color: inherit; text-decoration: none; }
#app { position: fixed; inset: 0; overflow: hidden; }
#cv { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#fr { position: absolute; top: 0; height: 100%; }
#grid { position: absolute; inset: 0; pointer-events: none; }
#grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--wtext); opacity: .025; }

/* phone */
#pw { position: absolute; left: 0; top: 0; width: 432px; height: 917px; z-index: 5; transform-origin: 0 0; transition: transform 1.5s var(--travel), filter .5s, opacity .5s; }
#pw.seeking { opacity: 0; transition: opacity .12s linear; }
#pw.off { opacity: 0; filter: blur(14px); pointer-events: none; transition: transform 1.5s var(--travel), filter .7s, opacity .7s; }
.stage, .device { position: absolute; inset: 0; }
.stage { transition: transform .7s var(--ease); }
#pw.hov .stage { transform: scale(1.03); }
.dframe { position: absolute; left: 3px; top: 0; width: 426px; height: 917px; border-radius: 62px; border: 1px solid var(--ti-line); background: var(--ti); box-shadow: 0 40px 90px var(--phone-sh), inset 0 0 0 1px #ffffffb3, inset 0 0 2px #00000040; }
.dbtn { position: absolute; width: 5px; border-radius: 2px 0 0 2px; background: linear-gradient(90deg, var(--ti-btn)); box-shadow: inset 0 1px 0 #ffffffb3, inset 0 -1px 0 #00000059; }
.dbtn.r { border-radius: 0 2px 2px 0; background: linear-gradient(270deg, var(--ti-btn)); }
.dscreen { position: absolute; left: 7px; top: 4px; width: 418px; height: 909px; border-radius: 60px; background: #000; }
.phone { position: absolute; left: 15px; top: 12px; width: 402px; height: 893px; border-radius: 54px; overflow: hidden; background: #000; isolation: isolate; user-select: none; }
.phone::before { content: ""; position: absolute; inset: 1px; border-radius: 53px; background: var(--screen); }
.phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s linear; }
.phone video.on { opacity: 1; }
#sb { position: absolute; inset: 0 0 auto; height: 54px; z-index: 90; color: #fff; transition: color .3s; }
#sb.dark { color: #000; }
#sb { background: var(--sb, none); }
#sb b { position: absolute; left: 0; top: 19px; width: 142px; text-align: center; font: 600 17px/22px -apple-system, "SF Pro Text", var(--sans); }
#sb svg { position: absolute; left: 283px; top: 24px; }
#sb i { position: absolute; left: 138px; top: 14px; width: 125px; height: 37px; border-radius: 20px; background: #000; }
#touch { position: absolute; left: 0; top: 0; z-index: 100; opacity: 0; transition: opacity .22s; pointer-events: none; }
#touch i { position: absolute; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: #ffffff47; border: 1.5px solid #ffffffd9; box-shadow: 0 2px 12px #0000004d; transition: transform .14s var(--ios), background .14s; }
#touch.down i { transform: scale(.74); background: #ffffff80; }
#touch.show { opacity: 1; }

/* slides */
.sl { position: absolute; inset: 0; visibility: hidden; z-index: 3; pointer-events: none; }
.sl.show { visibility: visible; }
.sl.show.in :is(a, button, .trk) { pointer-events: auto; }
.cl, .c1 { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--gap); }
.cl { left: 60px; width: var(--col); height: 100%; }
.c1 { left: 0; width: 1280px; height: calc(100% - 173px); translate: calc(var(--pl) * -1px) calc(var(--pt) * -1px); transition: transform 1.1s var(--ease), opacity .9s var(--ease), filter .9s var(--ease); }
.cr { position: absolute; left: 844px; top: 0; width: var(--col); height: 100%; display: flex; flex-direction: column; justify-content: center; gap: var(--gap-it); }
.it { display: flex; flex-direction: column; gap: 8px; }
.it h3 { font: var(--t-h3); letter-spacing: var(--track-ko); }
.it p { font: var(--t-p); }
.logo { display: block; flex: none; border-radius: 26%; }
.hl { font: var(--t-h2); letter-spacing: var(--track-ko); width: 100%; }
.hl, .dsc, .it p, .src { text-wrap: balance; }
.it p { text-wrap: pretty; }
.hl.big { font: var(--t-hero); white-space: nowrap; width: auto; letter-spacing: -.045em; }
.dsc { font: var(--t-dsc); width: var(--col); padding-bottom: 12px; }
.sub { font: var(--t-sub); white-space: nowrap; padding-bottom: 16px; }
.free { position: relative; font-weight: 600; white-space: nowrap; }
.free svg { position: absolute; left: 0; bottom: -7px; width: 100%; height: 7px; overflow: visible; color: var(--wacc); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0; }
.tag { background: var(--wtag); border-radius: var(--r-pill); padding: 6px 12px; font: var(--t-tag); white-space: nowrap; transition: background-color .6s; }
.bw { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge { display: flex; align-items: center; gap: 8px; width: 150px; height: 50px; padding: 0 12px; border-radius: var(--r-badge); background: #000; color: #fff; border: 1px solid #a6a6a6; text-align: left; transition: transform .5s var(--ease); }
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 24px; height: 28px; flex: none; }
.badge span { font: 500 10px/12px var(--sans); white-space: nowrap; }
.badge b { display: block; font: 600 17px/20px var(--sans); letter-spacing: -.4px; }
.src { font: var(--t-cap); color: var(--wdim); }

/* word reveal */
.w { display: inline-block; white-space: pre; vertical-align: top; }
.wi { display: inline-block; vertical-align: top; opacity: 0; transform: translateY(.55em); filter: blur(10px); }
.logo, .tags, [data-fx] { opacity: 0; transform: translateY(16px); filter: blur(8px); }
.in .wi { opacity: 1; transform: none; filter: none; transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i) * 38ms + var(--d, 0ms)); }
.in :is(.logo, .tags, [data-fx]) { opacity: 1; transform: none; filter: none; transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); transition-delay: var(--d, 0ms); }
.out .wi { opacity: 0; transform: translateY(-.45em); transition: opacity .35s ease, transform .45s ease; transition-delay: calc(var(--i) * 10ms); }
.out :is(.logo, .tags, [data-fx]) { opacity: 0; transform: translateY(-12px); filter: blur(8px); transition: opacity .4s ease, transform .5s ease, filter .4s ease; }
.sl[data-n="1"].out .c1 { transform: translateY(-40px) scale(.92); opacity: 0; filter: blur(6px); }

/* wide slides: no phone, same left column */
.wide .grid2 { position: absolute; left: 504px; width: 716px; top: 0; height: 100%; display: grid; align-content: center; gap: 28px 40px; grid-template-columns: 1fr 1fr; }
.grid2 h3 { font: var(--t-h3); letter-spacing: var(--track-ko); margin-bottom: 8px; }
.grid2 ul { list-style: none; display: grid; gap: 14px; }
.grid2 li { border-top: 1px solid var(--wline); padding-top: 12px; }
.grid2 li b { display: block; font: 600 16px/24px var(--sans); }
.grid2 li span { font: 400 14px/22px var(--sans); color: var(--wdim); }
.tiles { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile b { display: block; font: 700 38px/46px var(--serif); letter-spacing: -.02em; }
.tile span { font: 400 13px/18px var(--sans); color: var(--wdim); }
.chart { grid-column: 1 / -1; position: relative; border-top: 1px solid var(--wline); padding-top: 18px; }
.chart .cap { font: 400 14px/20px var(--sans); color: var(--wdim); }
.chart h3 { margin-bottom: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text { font: 400 11px var(--sans); fill: var(--wdim); }
.chart svg text.v { fill: var(--wtext); font-weight: 600; }
.chart .bar { fill: var(--bar); transition: fill .2s; }
.chart .bar.hi, .chart .bar.hover { fill: var(--wacc); }
.chart .hit { fill: transparent; }
.chart .grid line { stroke: var(--wline); }
.tip { position: absolute; pointer-events: none; background: var(--wtext); color: var(--wbg); border-radius: 6px; padding: 4px 8px; font: 500 12px/16px var(--sans); white-space: nowrap; opacity: 0; transform: translate(-50%, -110%); transition: opacity .12s; z-index: 5; }
.tip.on { opacity: 1; }
.tablev { position: absolute; display: block; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* closing */
#veil { position: absolute; inset: -3000px; background: var(--dark); opacity: 0; pointer-events: none; transition: opacity 1.4s var(--ease); z-index: 2; }
:root[data-last="1"] #veil { opacity: 1; }
:root[data-last="1"] :is(#hd, #ticks, #keys), .fin1 { color: var(--on-dark); }
.fin1 { position: absolute; left: 140px; width: 1000px; top: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.fin1 .hl.big { font-size: 220px; line-height: 250px; }
.fin1 .links { display: flex; gap: 28px; font: 600 16px/24px var(--sans); }
.fin1 .links a { border-bottom: 1px solid currentColor; }
.fin1 .links a:hover { opacity: .6; }
.fin1 .src { color: #8a8a8a; max-width: 640px; }

/* chrome */
.pbl { position: fixed; left: 0; right: 0; height: min(110px, 6vh); pointer-events: none; z-index: 40; }
.pbl.t { top: 0; } .pbl.b { bottom: 0; }
.pbl i { position: absolute; inset: 0; }
#hd { position: absolute; display: flex; align-items: center; justify-content: space-between; z-index: 60; font: var(--t-ui); transition: color .8s var(--ease); }
#hd :is(a, button) { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: inherit; font: inherit; letter-spacing: var(--track); cursor: pointer; }
#hd :is(a, button):hover { opacity: .6; }
#hd .rt { display: flex; gap: 20px; align-items: center; }
#hd img { border-radius: 5px; }
#ticks { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; transition: color .8s var(--ease); }
#ticks button { all: unset; position: relative; display: block; width: 16px; height: 17px; cursor: pointer; }
#ticks button:last-child { height: 2px; }
#ticks button::before { content: ""; position: absolute; inset: -8px -6px; }
#ticks i { position: absolute; left: 0; top: 0; width: 8px; height: 1px; background: currentColor; transition: width .5s var(--ease), height .5s var(--ease), background-color .5s; }
#ticks button:is(:first-child, :last-child) i { width: 12px; height: 2px; }
#ticks button.on i { width: 12px; height: 2px; background: var(--wacc); }
#ticks button:hover i { width: 12px; }
#ticks button:focus-visible { outline: 2px solid var(--wacc); outline-offset: 4px; }
#keys { position: absolute; left: 20px; bottom: 20px; width: 20px; height: 13px; z-index: 60; transition: color .8s var(--ease); }
#keys .k { all: unset; position: absolute; width: 6px; height: 6px; background: currentColor; cursor: pointer; transition: background-color .25s, transform .25s var(--ease); }
#keys .u { left: 7px; top: 0; } #keys .l { left: 0; top: 7px; } #keys .d { left: 7px; top: 7px; } #keys .r { left: 14px; top: 7px; }
#keys .k.on { background: var(--wacc); } #keys .k.hit { transform: scale(1.35); }
#tl { position: absolute; inset: 0 0 auto; height: 3px; z-index: 70; pointer-events: none; opacity: 0; transition: opacity .5s; }
#tl.on { opacity: 1; }
#tl i { display: block; height: 100%; background: var(--wacc); transform-origin: 0 50%; transform: scaleX(0); }
#rst { all: unset; box-sizing: border-box; position: absolute; left: 0; top: 0; z-index: 50; width: calc(150px * var(--s)); height: calc(150px * var(--s)); margin: calc(-75px * var(--s)) 0 0 calc(-75px * var(--s)); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(6px * var(--s)); cursor: pointer; color: var(--on-ludinf); background: var(--ludinf); font: 500 calc(16px * var(--s))/calc(20px * var(--s)) var(--sans); opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .35s var(--ease), transform .5s var(--ease), background-color .6s, color .6s; }
#rst svg { width: calc(22px * var(--s)); height: calc(22px * var(--s)); }
#rst.on { opacity: 1; transform: none; pointer-events: auto; }
#rst:hover { transform: scale(1.04); }
#noise { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; mix-blend-mode: overlay; opacity: .18; }
.pg { display: none; }
:root:not([data-m="1"]) .trk { display: contents; }

/* compact (< 940px): phone left, text right */
:root[data-c="1"] .c1 { width: 100%; }
:root[data-c="1"] .sl:not(.wide) > .wrap { position: absolute; left: calc(50% + 10px); right: 20px; top: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: calc(28px * var(--k)); }
:root[data-c="1"] .wrap :is(.cl, .cr) { position: static; width: auto; height: auto; }
:root[data-c="1"] .wrap .cl { align-items: flex-start; text-align: left; }
:root[data-c="1"] .hl { font-size: calc(46px * var(--k)); line-height: calc(58px * var(--k)); }
:root[data-c="1"] .hl.big { font-size: calc(100px * var(--k)); line-height: calc(116px * var(--k)); }
:root[data-c="1"] .dsc { width: auto; font-size: calc(19px * var(--k)); line-height: calc(29px * var(--k)); padding: 0; }
:root[data-c="1"] .cr { gap: calc(22px * var(--k)); }
:root[data-c="1"] .it h3 { font-size: calc(21px * var(--k)); line-height: calc(28px * var(--k)); }
:root[data-c="1"] .it p { font-size: calc(16px * var(--k)); line-height: calc(25px * var(--k)); }
:root[data-c="1"] .wide .wrap { position: absolute; inset: 60px 20px 30px 44px; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 28px; pointer-events: auto; touch-action: pan-y; }
:root[data-c="1"] .wide .grid2 { position: static; width: auto; height: auto; flex: none; }
:root[data-c="1"] .wide .cl { flex: none; }
:root[data-c="1"] .fin1 { left: 20px; right: 20px; width: auto; }
:root[data-c="1"] .fin1 .hl.big { font-size: 22vw; line-height: 1.2; }

/* mobile (< 600px): headline on top, phone below, text slider after the clip */
:root[data-m="1"] #keys, :root[data-m="1"] .sl:not([data-n="1"]) .logo { display: none; }
:root[data-m="1"] #ticks { left: 0; }
:root[data-m="1"] #ticks i { width: 6px; }
:root[data-m="1"] .pbl { height: 28px; }
:root[data-m="1"] .c1 { top: 47px; height: 398px; padding: 0 20px; }
:root[data-m="1"] .hl.big { font-size: min(14vw, 60px); line-height: 1.16; }
:root[data-m="1"] .sub { font-size: 16px; line-height: 25px; white-space: normal; width: 300px; padding-bottom: 8px; }
:root[data-m="1"] .sl:not(.wide) > .wrap { position: static; display: block; }
:root[data-m="1"] .sl:not(.wide) > .wrap .cl { position: absolute; inset: 47px 0 auto; padding: 14px 30px 0; gap: 8px; align-items: center; text-align: center; }
:root[data-m="1"] .wrap .hl { font: 600 27px/36px var(--serif); }
:root[data-m="1"] .wrap .hl br { display: none; }
:root[data-m="1"] .wrap .dsc { font-size: 15px; line-height: 23px; }
:root[data-m="1"] .wrap .bw { display: none; }
:root[data-m="1"] .sl:not(.wide) .cr { position: absolute; inset: auto 0 30px; display: block; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }
:root[data-m="1"] .sl.fin .cr { opacity: 1; visibility: visible; transition: opacity .8s var(--ease) .2s, visibility 0s; }
:root[data-m="1"] .trk { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; }
:root[data-m="1"] .trk .it { flex: 0 0 100%; padding: 0 30px; text-align: center; scroll-snap-align: start; gap: 4px; }
:root[data-m="1"] .trk .it h3 { font-size: 17px; line-height: 26px; }
:root[data-m="1"] .trk .it p { font-size: 14px; line-height: 21px; }
:root[data-m="1"] .trk .tags { justify-content: center; }
:root[data-m="1"] .pg { display: flex; justify-content: center; gap: 6px; padding-top: 12px; }
:root[data-m="1"] .pg button { all: unset; width: 28px; height: 9px; position: relative; pointer-events: auto; }
:root[data-m="1"] .pg button::after { content: ""; position: absolute; inset: 4px 0 auto; height: 1px; background: currentColor; }
:root[data-m="1"] .pg button.on::after { height: 3px; top: 3px; background: var(--wacc); }
:root[data-m="1"] .wide .wrap { inset: 60px 24px 24px; }
:root[data-m="1"] .wide .cl { align-items: center; text-align: center; }
:root[data-m="1"] .wide .grid2 { grid-template-columns: 1fr; }
:root[data-m="1"] .tiles { grid-template-columns: 1fr 1fr; }
:root[data-m="1"] .fin1 .links { flex-wrap: wrap; justify-content: center; gap: 12px 22px; }
:root[data-m="1"] #hd .opt { display: none; }
@media (prefers-reduced-motion: reduce) { .wi, .logo, [data-fx], #pw { transition-duration: .01s !important; transition-delay: 0s !important; } }

/* era label: marks where the 2018 app starts and ends */
.era { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; font: 600 13px/20px var(--sans); color: #fff; background: #8d5bff; }
.era.now { color: inherit; background: none; box-shadow: inset 0 0 0 1px currentColor; }
.wide .grid2.g3 { grid-template-columns: repeat(3, 1fr); gap: 28px 28px; }
:root[data-m="1"] .wide .grid2.g3 { grid-template-columns: 1fr; }
