@charset "utf-8";

/*
* Underware Webfont License 10185, Friday 4th of November 2016 09:03:33 AM
*
* The fonts listed in this notice are subject to the Underware Webfont
* License Agreement entered into by the website owner. All other parties
* are explicitly restricted from using the Licensed Webfonts(s).
*
* You may obtain a valid license at http://www.underware.nl/webfonts
*
* Webfont: DollyPro-Regular by Underware
* URL: http://www.underware.nl
* Copyright: Underware copyright (c) 2004. All rights reserved. www.underware.nl
*
*
* License: http://www.underware.nl/viewlicense?id=10185
*
* © Underware, Den Haag, the Netherlands
*/

@import url("https://use.typekit.net/who0ekt.css");

@font-face {
  font-family: 'DollyPro';
  src: url('../fonts/DollyPro-Regular.eot?#iefix') format('embedded-opentype'),
       url('../fonts/DollyPro-Regular.woff2') format('woff2'),
       url('../fonts/DollyPro-Regular.woff') format('woff'),
       url('../fonts/DollyPro-Regular.ttf') format('truetype'),
       url('../fonts/DollyPro-Regular.svg#DollyPro-Regular') format('svg');
}

:root {
  --primary-red: #f55d44;
  --primary-red-rgb: 245, 93, 68;
  --primary-blue: #8cc2e6;
  --light-blue: #8cc2e6;
  --light-blue-rgb: 140, 194, 230;
  --success-green: #33aa56;
  --white: #ffffff;
  --dark-text: #222222;
  --light-gray: #f5f5f5;
  --border-gray: #eeeeee;
  --shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.2);
  --border-radius: 20px;
  --transition-smooth: 0.3s ease;
  --font-primary: 'dolly-new', DollyPro, 'Times New Roman', Times, serif;
  --font-secondary: 'Helvetica Neue', sans-serif;
}

html {
  box-sizing: border-box;
  text-size-adjust: 100%;
  min-height: 100%;
  background: var(--white);
}

*, ::before, ::after {
  box-sizing: inherit;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  color: var(--dark-text);
  font-size: 100%;
  line-height: 1.4;
  font-family: var(--font-primary);
  background: var(--white);
  font-smooth: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

h1 {
  font-size: 1.75rem;
  font-family: var(--font-secondary);
  margin: 0;
}

a {
  color: inherit;
  background-color: transparent;
  text-decoration-skip-ink: auto;
  transition: color var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  image-rendering: auto;
}

/* Intro Modal */
.intro-modal {
  position: fixed;
  opacity: 1;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  display: flex;
  background: rgba(var(--light-blue-rgb), 0.8);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.5s ease;
}

.intro-modal.fade {
  opacity: 0;
}

.intro-modal .modal-content {
  margin: auto;
  padding: 20px;
  max-width: 32rem;
  background: var(--white);
  border-top: 20px solid var(--primary-red);
}

.intro-modal h1 {
  margin: 0;
  line-height: 1;
  color: var(--primary-blue);
  font-size: 1.25rem;
}

.intro-modal h1 span {
  display: inline-block;
  transform: translateY(0.05em);
}

.intro-modal h1 img {
  display: inline-block;
  height: 1.5em;
  width: auto;
  vertical-align: middle;
  transform: translateX(-0.125em);
}

.intro-modal p {
  font-size: 1.375rem;
  color: var(--primary-red);
  text-decoration: underline;
}

.intro-modal h1 + p {
  margin-top: 0;
}

.intro-modal p:last-child {
  margin-top: 3rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--primary-blue);
  font-weight: bold;
  font-family: var(--font-secondary);
  text-decoration: none;
}

/* Main Container */
.app-container {
  min-height: 100vh;
  flex-grow: 1;
  background-color: var(--primary-blue);
  transition: background-color 0.8s ease-in-out;
  box-shadow: 0 -40px 0 var(--primary-blue);
}

.intro-modal + .app-container header img {
  opacity: 0.2;
}

.right .app-container {
  background-color: var(--success-green);
}

/* Header */
header {
  position: relative;
  width: 100%;
  text-align: center;
  background-color: white;
}

header h1 {
  margin: 0;
  font-size: 1rem;
}

header a {
  display: block;
  padding: 1rem 40px;
  color: var(--dark-text);
  background: var(--white);
  font-weight: bold;
  text-decoration: none;
}

header img {
  vertical-align: top;
  transition: opacity 0.8s ease-in-out;
}

header::after {
  content: '';
  position: absolute;
  z-index: 9;
  bottom: -20px;
  left: 50%;
  margin-left: -10px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: var(--white);
}

/* Legal Links */
.legal-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.75rem;
  font-family: var(--font-secondary);



}

.legal-links a {
  color: var(--primary-red);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--transition-smooth);
  white-space: nowrap;
  background: none;
  padding: 0;
}

.legal-links a:hover,
.legal-links a:focus {
  color: var(--primary-blue);
}

/* Game Canvas */
.canvas {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  flex-grow: 1;
  padding: 20px;
}

.score {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
  color: var(--white);
  font-weight: bold;
  font-family: var(--font-secondary);
}

.timer {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Deck */
.deck {
  max-width: 52rem;
  margin: 1rem -16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.deck li {
  position: relative;
  width: calc(50% - 1rem);
  width: calc(25% - 4px);
  max-width: 12rem;
  margin: 2px;
  list-style: none;
}

.card {
  cursor: pointer;
  perspective: 600px;
}

.match,
.open {
  cursor: default;
}

.card::before {
  content: '';
  display: block;
  margin-left: -2px;
  width: 1px;
  padding-bottom: 100%;
}

#deck:target .card::after {
  content: attr(data-pair);
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  padding: 2px 0.5rem 6px;
  line-height: 1;
  background: var(--white);
  text-align: center;
}

.card div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  transition: all 0.4s ease-in-out;
  transform-style: preserve-3d;
  transform-origin: 50%;
}

.front {
  z-index: 2;
  background-image: url(../assets/back.png);
  transform: rotateY(0deg);
}

.back {
  z-index: 1;
  transform: rotateY(-180deg);
}

.open .front {
  transform: rotateY(180deg);
}

.open .back {
  z-index: 3;
  transform: rotateY(0deg);
}

.unmatched {
  z-index: 10;
}

.disabled {
  pointer-events: none;
}

.collected {
  outline: rgba(255, 255, 255, 0.1) solid 1px;
}

.collected > * {
  opacity: 0;
}

/* Batch */
#batch {
  margin: 0;
  padding: 0;
  display: none;
  list-style: none;
}

#batch li {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
}

#batch li:nth-child(2n+1) {
  transform: translate3d(-50%, -50%, 0) rotateZ(-10deg);
}

#batch li:nth-child(3n+1) {
  transform: translate3d(-60%, -40%, 0) rotateZ(10deg);
}

#batch li:nth-child(4n+4) {
  transform: translate3d(-55%, -45%, 0) rotateZ(-5deg);
}

/* Finish Modal */
.fin-modal {
  position: fixed;
  z-index: 8;
  visibility: hidden;
  top: calc(56px + 2rem);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-red);
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--white);
  opacity: 0;
}

.fin-modal.show,
.fin-modal:target {
  visibility: visible;
  opacity: 1;
}

.fin-modal h2 {
  margin: 0;
  font-size: 3rem;
  font-weight: 400;
}

.fin-modal p {
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
  font-family: var(--font-secondary);
  font-weight: bold;
  text-align: center;
}

.fin-modal h2 + p {
  margin-top: 0;
}

.results {
  margin: auto;
}

.fin-modal a {
  color: var(--white);
  border-bottom: 1px solid var(--white);
  text-decoration: none;
}

.contact-info {
  color: var(--white);
}

.show {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Media Queries */
@media (min-width: 25em) {
  .deck {
    margin-left: -8px;
    margin-right: -8px;
  }

  .deck li {
    width: calc(25% - 8px);
    margin: 4px;
  }
}

@media (min-width: 36em) {
  .intro-modal .modal-content {
    padding: 30px 90px 30px 30px;
  }

  .intro-modal h1 {
    font-size: 1.75rem;
  }

  .intro-modal p:last-child {
    margin-top: 4.5rem;
  }

  .legal-links {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.625rem;
  }
}

@media (min-width: 46em) {
  .deck {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .deck li {
    width: calc(25% - 1rem);
    margin: 0.5rem;
  }
}

@media (min-width: 48em) {
  body {
    font-size: 1.125rem;
  }

  h1 {
    margin: 1.5rem 0;
    font-size: 2rem;
  }
}

@media (min-width: 56em) {
  .app-container {
    display: flex;
    flex-direction: row-reverse;
  }

  .canvas {
    position: relative;
    padding-right: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .canvas::after {
    content: '';
    position: fixed;
    z-index: 9;
    top: 0;
    left: auto;
    right: 10vw;
    bottom: 0;
    width: 20px;
    height: 100%;
    background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='97' height='97'%3E%3Cpattern id='lines' x='0' y='0' width='6' height='6' patternUnits='userSpaceOnUse' patternTransform='rotate(48)'%3E %3Crect x='0' y='0' width='1' height='6' style='stroke:none; fill:%23fff;' /%3E%3C/pattern%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='url(%23lines)'/%3E%3C/svg%3E");
  }

  #batch {
    display: block;
    position: fixed;
    z-index: 3;
    right: 0;
    top: calc(50% - 10vw);
    width: 20vw;
    height: 20vw;
  }

  header {
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    display: flex;
    width: 10vw;
    background-color: white;
  }

  header::after {
    position: fixed;
    top: 50vh;
    left: auto;
    right: 10vw;
    bottom: auto;
    margin-left: 0;
    border-top-color: transparent;
    border-right-color: var(--white);
  }

  header a {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 20px;
  }

  header img {
    display: block;
    max-width: none;
    position: fixed;
    top: calc(50vh - 28px);
    right: calc(5vw - 140px);
    margin: 0;
    transform: rotate(-90deg) scale(1);
    transform-origin: 50%;
  }

  .legal-links {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
    font-size: 0.625rem;
  }

  .deck {
    margin: 0 -0.75rem;
  }

  .deck li {
    width: calc(25% - 1.5rem);
    margin: 0.75rem;
  }

  .fin-modal {
    top: 0;
    right: 10vw;
  }
}

@media (min-width: 80em) {
  body {
    font-size: 1.25rem;
  }
}
