/* ======================================================
Variables
====================================================== */

:root {
  --fg: #ed1c24;
  --bg: #111;
  --white: #fff;
  --ui-height: 30px;
  --font: 'PPFormula';
}

/* ======================================================
Animation
====================================================== */

@keyframes button-line-out {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(101%);
  }
}

@keyframes button-line-in {
  0% {
    transform: translateX(-101%);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes grain {
  0% {
    transform: translate(20%, -15%);
  }

  10% {
    transform: translate(-20%, -15%);
  }

  20% {
    transform: translate(20%, -5%);
  }

  30% {
    transform: translate(-20%, -5%);
  }

  40% {
    transform: translate(20%, 5%);
  }

  50% {
    transform: translate(-20%, 5%);
  }

  60% {
    transform: translate(20%, 15%);
  }

  70% {
    transform: translate(-20%, 15%);
  }

  80% {
    transform: translate(20%, 5%);
  }

  90% {
    transform: translate(-20%, 5%);
  }

  100% {
    transform: translate(20%, -5%);
  }
}

/* ======================================================
Font Face
====================================================== */

@font-face {
  font-family: 'PPFormula';
  src: url('PPFormula-CondensedRegular.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'PPFormula';
  src: url('PPFormula-CondensedBold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'PPFormula';
  src: url('PPFormula-ConsensedExtrabold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

/* ======================================================
Normalize.css
====================================================== */

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
  display: block;
}
audio,
canvas,
video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
[hidden] {
  display: none;
}
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}
html,
button,
input,
select,
textarea {
  font-family: sans-serif;
}
body {
  margin: 0;
}
a:focus {
  outline: thin dotted;
}
a:active,
a:hover {
  outline: 0;
}
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
h2 {
  font-size: 1.5em;
  margin: 0.83em 0;
}
h3 {
  font-size: 1.17em;
  margin: 1em 0;
}
h4 {
  font-size: 1em;
  margin: 1.33em 0;
}
h5 {
  font-size: 0.83em;
  margin: 1.67em 0;
}
h6 {
  font-size: 0.75em;
  margin: 2.33em 0;
}
abbr[title] {
  border-bottom: 1px dotted;
}
b,
strong {
  font-weight: bold;
}
blockquote {
  margin: 1em 40px;
}
dfn {
  font-style: italic;
}
mark {
  background: #ff0;
  color: #000;
}
p,
pre {
  margin: 1em 0;
}
code,
kbd,
pre,
samp {
  font-family: monospace, serif;
  _font-family: 'courier new', monospace;
  font-size: 1em;
}
pre {
  white-space: pre;
  white-space: pre-wrap;
  word-wrap: break-word;
}
q {
  quotes: none;
}
q:before,
q:after {
  content: '';
  content: none;
}
small {
  font-size: 75%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
dl,
menu,
ol,
ul {
  margin: 1em 0;
}
dd {
  margin: 0 0 0 40px;
}
menu,
ol,
ul {
  padding: 0 0 0 40px;
}
nav ul,
nav ol {
  list-style: none;
  list-style-image: none;
}
img {
  border: 0;
  -ms-interpolation-mode: bicubic;
}
svg:not(:root) {
  overflow: hidden;
}
figure {
  margin: 0;
}
form {
  margin: 0;
}
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
legend {
  border: 0;
  padding: 0;
  white-space: normal;
  *margin-left: -7px;
}
button,
input,
select,
textarea {
  font-size: 100%;
  margin: 0;
  vertical-align: baseline;
  *vertical-align: middle;
}
button,
input {
  line-height: normal;
}
button,
html input[type='button'],
input[type='reset'],
input[type='submit'] {
  -webkit-appearance: button;
  cursor: pointer;
  *overflow: visible;
}
button[disabled],
input[disabled] {
  cursor: default;
}
input[type='checkbox'],
input[type='radio'] {
  box-sizing: border-box;
  padding: 0;
  *height: 13px;
  *width: 13px;
}
input[type='search'] {
  -webkit-appearance: textfield;
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
}
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
textarea {
  overflow: auto;
  vertical-align: top;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

* {
  box-sizing: border-box;
}

/* ======================================================
Styles
====================================================== */

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font), Helvetica, sans-serif;
  font-size: 16px;
  overflow: hidden;
  min-height: 100vh;
  width: 100%;
}

body:after {
  pointer-events: none;
  background-image: url('grain.png');
  background-repeat: repeat;
  height: 300vh;
  left: -100vw;
  position: fixed;
  top: -100vh;
  width: 300vw;
  opacity: 0.03;
  will-change: transform;
  z-index: 3;
  content: '';
  display: block;
  animation: grain 6s steps(10) infinite;
  z-index: 1;
}

/* ================================================
Global Elements
================================================ */

.languageSelectButton,
.languageButton {
  /* Reset */
  border: none;
  outline: none;
  cursor: pointer;
  background-color: transparent;
  padding: 0;
  text-align: inherit;
  letter-spacing: inherit;
  font-size: inherit;
  text-transform: inherit;
  display: inline-block;
  margin: 0;
  text-decoration: none;
  appearance: none;
  color: var(--fg);
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 6px;
  width: min-content;

  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 85%;
  text-transform: uppercase;
}

.languageButton__space {
  display: inline-block;
  margin-left: -2px;
}

.languageButton {
  /* Styles */
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 10;
  white-space: nowrap;
  font-weight: 300;
}

#selectedLanguage {
  white-space: nowrap;
  font-weight: 700;
}

.logo {
  width: 24px;
  position: absolute;
  top: 40px;
  left: 40px;
}

/* ================================================
Language Select Container
================================================ */

#languageContainer {
  opacity: 0;
  pointer-events: none;
}

[data-screen='LANGUAGE'] #languageContainer {
  opacity: 1;
  pointer-events: all;
}

.languageSelectButton {
  white-space: nowrap;
  font-size: 32px;
}

.languageSelectButton:not(:last-child) {
  margin-bottom: 30px;
}

/* ================================================
Main Container
================================================ */

#authenticateContainer {
  opacity: 0;
  pointer-events: none;
}

[data-screen='AUTHENTICATION'] #authenticateContainer {
  opacity: 1;
  pointer-events: all;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  gap: 40px;
}

.button {
  /* Reset */
  border: none;
  outline: none;
  cursor: pointer;
  background-color: transparent;
  padding: 0;
  text-align: inherit;
  letter-spacing: inherit;
  font-size: inherit;
  text-transform: inherit;
  display: inline-block;
  margin: 0;
  text-decoration: none;
  appearance: none;
  color: var(--fg);
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 6px;
  width: min-content;

  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 32px;
  line-height: 85%;
  text-align: center;
  text-transform: uppercase;
  transition: transform 0.3s, opacity 0.3s;
}

.underline-button {
  white-space: nowrap;
}

.underline-button:after {
  content: '';
  position: absolute;
  display: block;
  width: 100%;
  height: 2px;
  top: calc(100% - 2px);
  transform: translateX(-102%);
  background-color: var(--fg);
}

.underline-button.interacted:not(.hover):after {
  animation: 0.2s button-line-out 1 forwards;
}

.underline-button.hover:after {
  transform: translateX(-100%);
  animation: 0.2s button-line-in 1 forwards;
}

body.loading .button,
body.loading .input {
  pointer-events: none;
}

.success {
  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 32px;
  line-height: 85%;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  position: absolute;
  top: 100%;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}

body.submit-success .success {
  transform: translateY(-110%);
  opacity: 1;
}

body.submit-success .button {
  transform: translateY(-110%);
  opacity: 0;
}

.input {
  appearance: none;
  border: none;
  border-bottom: 2px solid var(--fg);
  border-radius: 0;
  outline: none !important;
  background-color: transparent;
  color: var(--bg);
  box-sizing: border-box;
  width: 750px;
  line-height: 85px;
  color: var(--fg);
  height: 82px;

  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 800;
  font-size: 72px;
  line-height: 85%;
  text-align: center;
  text-transform: none;
}

[data-language='fr_fr'] .input,
[data-language='fr_ca'] .input,
[data-language='jp_jp'] .input {
  font-size: 45px;
  height: 60px;
}

input::placeholder {
  text-transform: uppercase;
  color: #772427;
}

.errorMessage {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  display: none;
  white-space: nowrap;

  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 85%;
  text-align: center;
  text-transform: uppercase;
}

body.error .errorMessage {
  display: block;
}

.too-small {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px 20px;
  gap: 20px;
  display: none;
  position: relative;
  z-index: 2;
}

.too-small__title {
  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 32px;
  line-height: 85%;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
}

.too-small__description {
  /* Font */
  font-family: var(--font);
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 85%;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
}

@media (max-width: 1024px) {
  .too-small {
    display: flex;
  }

  .container {
    display: none;
  }
}
