/* Global styles */

* {
    box-sizing: border-box;
}

:root {
	--white: 250, 243, 228;
	--punk: 242, 172, 181;
	--yella: 241, 183, 51;
	--rad: 235, 85, 51;
	--blu: 67, 141, 178;
	--black: 6, 6, 6;

	--rip-shadow: -1px 1px 1px 1px #fff, -1px 1px 2px 1px rgba(var(--black), 0.3);
}

html {
    margin: 0;
    height: 100%;
}

body {
    min-height: 100%;
    height: 100%;
}

/* Typography */

@font-face {
	font-family: 'Lehigh Personal';
	src: url('lehigh-personal-black.woff2') format('woff2'),
		 url('lehigh-personal-black.woff') format('woff');
	font-weight: 900;
}
@font-face {
	font-family: 'Lehigh Personal';
	src: url('lehigh-personal-bold.woff2') format('woff2'),
		 url('lehigh-personal-bold.woff') format('woff');
	font-weight: 700;
}

body {
    font-family: 'Barlow Condensed', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

h1 {
	font-family: 'Lehigh Personal', serif;
	font-weight: 900;
	text-align: center;

	line-height: 1;
	margin: 0;

	font-size: 4rem;
	font-size: min(4rem, 10vw);
}

h2 {
	font-family: 'Barlow Condensed', Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-style: italic;
	margin: 0;
	line-height: 1;
	text-align: center;
	font-size: 2rem;
}

button {
    font-size: 1.75rem;
    font-weight: 600;
}

/* Background */

body {
    position: relative;
    background: rgb(var(--white));
    color: rgb(var(--black));
}

/* Noise Texture */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    
    background: rgb(var(--white));
    filter: url(#noise);
    opacity: 0.25;
}

/* Main layout */

main#landing {
    position: absolute;

    min-height: 100%;
    width: 100%;
    padding: 2em;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header */

hgroup {
    margin-bottom: 2rem;
}

/* Table */

section {
    overflow-x: scroll;
    flex-shrink: 0; /* Prevents vertical scrolling */
    margin-bottom: 2rem;
}

table {
    margin: 0 auto;
}

thead th {
    transform: rotate(200deg) translate(-10px);
    writing-mode: vertical-lr;
    vertical-align: baseline; /* Firefox likes this */
    text-align: left; /* Chrome prefers this */
    font-size: 1rem;
}

tbody th {
    font-size: 1.5rem;
    text-align: right;
}

td {
    --size: 1.5rem;
}

td.box, td.bar {
    position: relative;
}

td.box::before, td.box::after, td.bar::before, td.bar::after {
    content: '';
    display: block;
    width: var(--size);
    height: var(--size);
}

td.box::before {
    position: absolute;
    z-index: 1;

    filter: url(#scribble);
    border: 1px solid rgba(var(--black), 0.5);
}

td.box.tick::after {
    z-index: 0;
    
    background-color: rgb(var(--rad));
}

/* Variety */
td.box:nth-child(3n)::after {filter: url(#scribble)}
td.box:nth-child(3n+1)::after {filter: url(#scribbless)}
td.box:nth-child(3n+2)::after {filter: url(#evenscribbless)}
td.box:nth-child(4n)::after {transform: rotate(90deg) translateY(-5px)}
td.box:nth-child(4n+1)::after {transform: rotate(180deg) translate(-5px, -5px)}
td.box:nth-child(4n+2)::after {transform: rotate(270deg) translate(-5px, 1px)}

td.bar {
    padding: 0 1rem;
}

td.bar::after {
    width: calc(var(--progress) * .1rem);

    background-color: rgb(var(--rad));
    filter: url(#scribble);
    transform: translate(2px, 2px);
}

td.bar::before {
    position: absolute;
    z-index: 1;

    width: 10rem;

    filter: url(#scribbless);
    border: 1px solid rgba(var(--black), 0.5);
}

/* Input forms */

#checkinform {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

button {
    will-change: transform;
    display: inline-block;
    position: relative;

    padding: 15px 30px;
    border: 0;

    cursor: pointer;
    background: transparent;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 2.0);
}

button:hover {
    transform: scale(107.5%);
}

button span {
    position: relative; /* Bump text on top of bg */
    z-index: 1;
}

button::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;

    background: rgb(var(--punk));
    background: linear-gradient(90deg, rgba(var(--punk), 1) 49.99%, rgba(var(--yella), 1) 50.01%);
    filter: url(#scribbless);
    border-radius: 1000px;
    box-shadow: var(--rip-shadow);
}