/* larwri.email: the hand-drawn lettering and pen borders, used all over the page (start screen included).
   Every letter is drawn by core/js/hand.js in a random hand-drawn font, with its own tilt, size and bounce.

   Fonts (all free licences, see core/font/LICENSES.txt), each cut down to the characters the site uses. */
@font-face { font-family: 'Gochi Hand'; font-display: block; src: url(../font/gochi-hand.woff2) format('woff2'); }
@font-face { font-family: 'gf0'; font-display: block; src: url(../font/kalam.woff2) format('woff2'); }
@font-face { font-family: 'gf1'; font-display: block; src: url(../font/gaegu.woff2) format('woff2'); }
@font-face { font-family: 'gf2'; font-display: block; src: url(../font/covered-by-your-grace.woff2) format('woff2'); }
@font-face { font-family: 'gf3'; font-display: block; src: url(../font/gloria-hallelujah.woff2) format('woff2'); }
@font-face { font-family: 'gf4'; font-display: block; src: url(../font/caveat.woff2) format('woff2'); }
@font-face { font-family: 'gf5'; font-display: block; src: url(../font/schoolbell.woff2) format('woff2'); }
@font-face { font-family: 'gf6'; font-display: block; src: url(../font/patrick-hand.woff2) format('woff2'); }
@font-face { font-family: 'gf7'; font-display: block; src: url(../font/rock-salt.woff2) format('woff2'); }
/* Japanese: Yomogi for all of it; five more hands only for どこ？, which is drawn differently every time */
@font-face { font-family: 'Yomogi'; font-display: block; src: url(../font/yomogi.woff2) format('woff2'); }
@font-face { font-family: 'jzk'; font-display: block; src: url(../font/zen-kurenaido.woff2) format('woff2'); }
@font-face { font-family: 'jko'; font-display: block; src: url(../font/klee-one.woff2) format('woff2'); }
@font-face { font-family: 'jym'; font-display: block; src: url(../font/yusei-magic.woff2) format('woff2'); }
@font-face { font-family: 'jhm'; font-display: block; src: url(../font/hachi-maru-pop.woff2) format('woff2'); }
@font-face { font-family: 'jdd'; font-display: block; src: url(../font/darumadrop-one.woff2) format('woff2'); }

/* one drawn letter (.hl), and its face (.g), which can turn over by itself */
.hl { display: inline-block; line-height: 1; white-space: pre; }
.hw { display: inline-block; white-space: nowrap; }
.hl .g { display: inline-block; transition: transform .35s ease; }
.hl .g.up { transform: rotate(180deg) translateY(-.08em); }
/* the plain text behind drawn words, for screen readers */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the pencil "boil": the wobble changes a few times a second, like a hand-drawn cartoon
   (its own copy of the start screen's, which is removed after the click) */
.sboil { filter: url(#swob0); animation: sboil .45s steps(1) infinite; }
@keyframes sboil { 0% { filter: url(#swob0); } 33% { filter: url(#swob1); } 66% { filter: url(#swob2); } }

/* a loose, two-pass pen border, drawn by script around its box */
svg.border { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.bpen { fill: none; stroke: #ff0; stroke-linecap: round; stroke-linejoin: round; }
.bpen.one { stroke-width: 3; }
.bpen.two { stroke-width: 1.9; opacity: .8; }

/* ---- the floating words' tricks (core/js/words.js) ---- */
.fx { position: relative; display: inline-block; white-space: nowrap; }
.wghost { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; }
.blink { display: inline-block; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sl { display: inline-block; width: 0; opacity: 0; vertical-align: baseline; transition: width .8s ease, opacity .8s ease; }
.nul { display: inline-grid; align-items: center; justify-items: center; vertical-align: baseline; }
.nul > * { grid-area: 1 / 1; transition: opacity .5s ease; }
.nul > .z { opacity: 0; width: .95em; height: .95em; }
.nul.on > .t { opacity: 0; }
.nul.on > .z { opacity: 1; }
.nul svg path { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.btnw { padding: .22em .55em .3em; }
.btnw > svg.border { opacity: 0; }
