/*! HTML5 Boilerplate v7.3.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
.cards {
    
    width: 100vw;
    height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden;
    background: #fff url(../img/click.png) top center no-repeat;
}
.card {
    width: 500px;
    height: 570px;
    position: relative;
    perspective: 2000px;
    cursor: pointer;
    float: left;
    margin: 10px;
    position: relative;
}
.card .front.open{
    transform: rotateY(-80deg);  
}
.card .back.open {
    transform: rotateY(20deg);  
}
.face {
    transition: all 0.3s ease-out;
}
.face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; 
    transition: all 0.5s ease-out;
    transform-origin: 0 0;
}
.face img{width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 5;}
.front {
    transform: rotateY(0deg);
    z-index: 2;
}
.back {
    background: #9dcc78; position: relative;
    transform: rotateY(0deg);
    z-index: 1;box-shadow: 0 30px 90px rgba(0,0,0,0.25), 0 7px 20px rgba(0,0,0,0.05);
    
}
.backtext{position: absolute; top: 0; left: 0; width: 100%; height: 100%;display: flex; justify-content: center; padding: 40px;box-sizing: border-box; flex-direction: column; text-align: center; font-family: 'Roboto', sans-serif;z-index: 5;}
.backp{font-size: 20px; font-weight: 400; color: #fff;}
.backh{font-size: 32px; font-weight: 900; color: #fff;}

.frontmessage{font-family: 'Orbitron', sans-serif; font-size: 24px; position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: space-between; flex-wrap: wrap; flex-direction: column; padding: 40px; z-index: 10; text-align: center;box-sizing: border-box; text-transform: uppercase;}
.yourbirthday{color: #FFEB00; font-size: 24px; font-weight: 900;}
.celebrate{color: #FFEB00; font-size: 20px; font-weight: 900;}

@keyframes move {
    100% {
        transform: translate3d(0, 0, 1px) rotate(360deg);
    }
}

.background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #1a1a1a;
    overflow: hidden;
    z-index: 1;
}


.background span {
    width: 1vmin;
    height: 1vmin;
    border-radius: 1vmin;
    backface-visibility: hidden;
    position: absolute;
    animation: move;
    animation-duration: 45;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}


.background span:nth-child(0) {
    color: #ffffff;
    top: 43%;
    left: 61%;
    animation-duration: 38s;
    animation-delay: -6s;
    transform-origin: -10vw -23vh;
    box-shadow: 2vmin 0 0.586043724915003vmin currentColor;
}
.background span:nth-child(1) {
    color: #ffffff;
    top: 90%;
    left: 45%;
    animation-duration: 53s;
    animation-delay: -39s;
    transform-origin: -10vw 25vh;
    box-shadow: 2vmin 0 0.8165529851361761vmin currentColor;
}
.background span:nth-child(2) {
    color: #ffffff;
    top: 8%;
    left: 47%;
    animation-duration: 41s;
    animation-delay: -7s;
    transform-origin: 9vw 0vh;
    box-shadow: -2vmin 0 0.2747410335519296vmin currentColor;
}
.background span:nth-child(3) {
    color: #ffffff;
    top: 40%;
    left: 35%;
    animation-duration: 26s;
    animation-delay: -33s;
    transform-origin: 1vw 2vh;
    box-shadow: -2vmin 0 0.3819476569305109vmin currentColor;
}
.background span:nth-child(4) {
    color: #ffffff;
    top: 17%;
    left: 13%;
    animation-duration: 19s;
    animation-delay: -37s;
    transform-origin: 14vw -12vh;
    box-shadow: 2vmin 0 0.8803330843398331vmin currentColor;
}
.background span:nth-child(5) {
    color: #ffffff;
    top: 73%;
    left: 68%;
    animation-duration: 12s;
    animation-delay: -12s;
    transform-origin: 10vw 0vh;
    box-shadow: -2vmin 0 0.47032570435742693vmin currentColor;
}
.background span:nth-child(6) {
    color: #ffffff;
    top: 22%;
    left: 2%;
    animation-duration: 12s;
    animation-delay: -4s;
    transform-origin: -20vw 25vh;
    box-shadow: -2vmin 0 0.9537873712562868vmin currentColor;
}
.background span:nth-child(7) {
    color: #ffffff;
    top: 29%;
    left: 99%;
    animation-duration: 11s;
    animation-delay: -42s;
    transform-origin: 0vw 15vh;
    box-shadow: -2vmin 0 0.7180992069867331vmin currentColor;
}
.background span:nth-child(8) {
    color: #ffffff;
    top: 35%;
    left: 25%;
    animation-duration: 21s;
    animation-delay: -30s;
    transform-origin: -24vw -18vh;
    box-shadow: -2vmin 0 1.1770863304617663vmin currentColor;
}
.background span:nth-child(9) {
    color: #ffffff;
    top: 3%;
    left: 7%;
    animation-duration: 13s;
    animation-delay: -14s;
    transform-origin: 2vw 5vh;
    box-shadow: -2vmin 0 0.7383846558295502vmin currentColor;
}
.background span:nth-child(10) {
    color: #ffffff;
    top: 45%;
    left: 43%;
    animation-duration: 36s;
    animation-delay: -41s;
    transform-origin: 1vw 16vh;
    box-shadow: -2vmin 0 0.2971035652338265vmin currentColor;
}
.background span:nth-child(11) {
    color: #ffffff;
    top: 47%;
    left: 25%;
    animation-duration: 13s;
    animation-delay: -41s;
    transform-origin: -21vw 8vh;
    box-shadow: 2vmin 0 0.792229203577933vmin currentColor;
}
.background span:nth-child(12) {
    color: #ffffff;
    top: 7%;
    left: 88%;
    animation-duration: 54s;
    animation-delay: -32s;
    transform-origin: 21vw -14vh;
    box-shadow: 2vmin 0 1.2461080704825973vmin currentColor;
}
.background span:nth-child(13) {
    color: #ffffff;
    top: 76%;
    left: 18%;
    animation-duration: 14s;
    animation-delay: -33s;
    transform-origin: -7vw -11vh;
    box-shadow: 2vmin 0 1.2448420436052048vmin currentColor;
}
.background span:nth-child(14) {
    color: #ffffff;
    top: 71%;
    left: 24%;
    animation-duration: 6s;
    animation-delay: -41s;
    transform-origin: -11vw -3vh;
    box-shadow: 2vmin 0 0.33170881611455294vmin currentColor;
}
.background span:nth-child(15) {
    color: #ffffff;
    top: 87%;
    left: 2%;
    animation-duration: 40s;
    animation-delay: -42s;
    transform-origin: 14vw 22vh;
    box-shadow: 2vmin 0 0.9275631319006559vmin currentColor;
}
.background span:nth-child(16) {
    color: #ffffff;
    top: 82%;
    left: 47%;
    animation-duration: 51s;
    animation-delay: -31s;
    transform-origin: 8vw -2vh;
    box-shadow: 2vmin 0 1.211789151035697vmin currentColor;
}
.background span:nth-child(17) {
    color: #ffffff;
    top: 98%;
    left: 42%;
    animation-duration: 36s;
    animation-delay: -20s;
    transform-origin: 18vw 22vh;
    box-shadow: 2vmin 0 0.9702734423480179vmin currentColor;
}
.background span:nth-child(18) {
    color: #ffffff;
    top: 1%;
    left: 62%;
    animation-duration: 32s;
    animation-delay: -26s;
    transform-origin: -20vw 7vh;
    box-shadow: 2vmin 0 1.192424593049692vmin currentColor;
}
.background span:nth-child(19) {
    color: #ffffff;
    top: 74%;
    left: 66%;
    animation-duration: 43s;
    animation-delay: -35s;
    transform-origin: 20vw 24vh;
    box-shadow: -2vmin 0 0.8576949300332251vmin currentColor;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (max-width: 500px) {
  .card {
    width: 250px;
    height: 285px;
    position: relative;
    perspective: 1000px;
    
    float: left;
    margin: 10px;
}
    .frontmessage{padding: 10px;}
    .yourbirthday{color: #FFEB00; font-size: 16px; font-weight: 900;}
.celebrate{color: #FFEB00; font-size: 14px; font-weight: 900;}
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}
/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */
}

.clearfix:after {
  clear: both;
}



/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  /*
     * Printing Tables:
     * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
     */
  thead {
    display: table-header-group;
  }
  tr,
  img {
    page-break-inside: avoid;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
}

