:root { --primary: #c5ff27; --black: #231F20; --white: white; --gutter-sm: .5rem; --gutter-md: 1rem; --gutter-lg: 3rem; --font-size-base: 1rem; } @font-face { font-family: "WonderType"; src: local("WonderType"), url("WonderType-Regular.otf") format("opentype"), url("trickster-outline.woff") format("woff"); } html, body { width: 100%; height: 100%; margin: 0 0; padding: 0 0; overflow: hidden; } .state { display: none; } body[state="idle"] .state--idle { display: block; } body[state="waiting--bottom"] .multi__bottom .state--waiting, body[state="waiting--bottom"] .multi__top .state--idle { display: block; } body[state="waiting--top"] .multi__top .state--waiting, body[state="waiting--top"] .multi__bottom .state--idle { display: block; } body[state="recording"] .state--recording { display: block; color: white; } body[state="finished"] .state--finished { display: block; } canvas { position: fixed; width: 100%; height: 100%; max-height: 120px; pointer-events: none; z-index: -1; top: 50%; left: 0; transform: translate3d(0, -50%, 0); } * { box-sizing: border-box; } body { background-color: var(--primary); font-family: "WonderType"; } .container { max-width: 900px; margin: 0 auto; padding: var(--gutter-md); text-align: center; display: flex; flex-direction: column; height: 100%; justify-content: space-between; align-items: center; } audio { display: none; } a { color: var(--black); } button, .button, input::file-selector-button, input[type="submit"] { width: 100%; display: inline-flex; align-items: center; justify-content: center; text-transform: uppercase; background-color: var(--black); border: none; padding: var(--gutter-sm) var(--gutter-md); color: var(--white); font-weight: bolder; font-size: var(--font-size-base); transition: .2s all ease-in-out; font-family: "WonderType"; cursor: pointer; } input::file-selector-button { width: auto; } input[type="submit"] { margin-top: var(--gutter-lg); } .button--record { border-radius: 100%; border: none; max-width: 150px; max-height: 150px; aspect-ratio: 1 / 1; position: relative; background-color: transparent; font-family: sans-serif; overflow: hidden; font-weight: 400; } .button--record:after { content: "record"; } @keyframes recording { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .button--record:before { content: ''; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background-color: var(--black); z-index: -1; transform: translate3d(0, 0%, 0); transition: transform .1s linear; } .button--record[state="recording"]:before, .button--record[state="uploading"]:before { transform: translate3d(0, 100%, 0); } .button--record[state="recording"], .button--record[state="uploading"] { color: var(--black); animation-delay: 1s; background-color: transparent; animation: 8s linear recording infinite; border: .3rem dashed var(--black); } .multi__bottom .button--record { animation-delay: 1s; } .button--record[state="recording"] { /* border-style: dashed; */ animation-duration: 4s; } .button--record[state="recording"]:after, .button--record[state="finished"]:after, .button--record[state="uploading"]:after { animation: 2s linear recording infinite; content: "...recording.."; animation-direction: reverse; } .button--record[state="uploading"]:after { animation-duration: 8s; content: "...uploading.."; } .button--record[state="waiting"]:after { animation-duration: 8s; content: "...waiting.."; } .button--record[state="finished"]:after { animation-duration: 8s; content: "Upload complete"; } .button--icon { background: transparent; } dialog { width: auto; max-width: min(90vw, 400px); flex-direction: column; } dialog::backdrop { background: black; opacity: 0.5; } .dialog__close { align-self: flex-end; position: relative; } .dialog__close button { position: absolute; z-index: 99; top: 0; right: 0; display: block; width: auto; padding: 0 0; } dialog h3 { margin: 0 0; } label { margin: var(--gutter-sm) 0; display: block; } dialog[open] { display: flex; } .multi { display: flex; width: 100%; height: 100%; padding: var(--gutter-md); flex-direction: column; justify-content: space-between; align-items: center; } .multi__top, .multi__bottom { height: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; } .multi h1 { margin-top: -.5rem; } .multi button { margin-top: auto; } .multi__top { transform: rotate(180deg); } .button--multi { aspect-ratio: 1/1; border-radius: 100%; max-width: 230px; max-height: 230px; transition: none; } .button--multi:first-of-type { transform: rotate(180deg); }