/**
 * Theme Name: Basic
 * Version: 1.0.0
 * Theme URL: http://sequencejs.com/themes/basic/
 *
 * A simple, colorful side-to-side slider
 *
 * This theme is powered by Sequence.js - The
 * responsive CSS animation framework for creating unique sliders,
 * presentations, banners, and other step-based applications.
 *
 * Author: Ian Lunn
 * Author URL: http://ianlunn.co.uk/
 *
 * Theme License: http://sequencejs.com/licenses/#free-theme
 * Sequence.js Licenses: http://sequencejs.com/licenses/
 *
 * Copyright © 2015 Ian Lunn Design Limited unless otherwise stated.
 */

@import "partials/mixins";

body,
html,
.seq {
  /* Uncomment to make the theme full-screen */
  /* width: 100% !important; */
  /* max-width: 100% !important; */
  /* height: 100% !important; */
  /* max-height: 100% !important; */
}

/* Google Web Font */
@import url(http://fonts.googleapis.com/css?family=Roboto:900);

// Colors for each step
$color1: #279FE5;
$color2: #F96852;
$color3: #2BBF8E;

$sequenceMobileHeight: 420px;
$sequenceDesktopHeight: 585px;

.seq {
  position: relative;

  /* Dimensions */
  width: 100%;
  height: $sequenceMobileHeight;
  max-width: 100%;

  /* Center the Sequence container on the page */
  margin: 0 auto;
  padding: 0;

  /* Some basic styles */
  font-family: sans-serif;

  .seq-pagination,
  .seq-screen,
  .seq-canvas,
  .seq-canvas > * {
    /* Reset the canvas and steps for better browser consistency */
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .seq-preloader {
    background: $color1;
  }

  .seq-pagination {
    position: absolute;
    z-index: 10;
    bottom: 20px;
    width: 100%;
    border: none;
    text-align: center;

    a {
      display: block;
      width: 100%;
      height: 100%;
    }

    .seq-current {
      @include prefixed(border-radius, "100%");
    }

    > * {
      margin: 0 4px;
      padding: 0;
      display: inline-block;
      zoom: 1;
      width: 28px;
      height: 28px;
      cursor: pointer;
      background: none;
      border: white solid 2px;
      @include prefixed(transition-duration, ".1s");
      @include prefixed(transition-property, "background-color, border-radius");

      &:nth-child(1):focus,
      &:nth-child(1):hover {
        background-color: $color1;
      }

      &:nth-child(2):focus,
      &:nth-child(2):hover {
        background-color: $color2;
      }

      &:nth-child(3):focus,
      &:nth-child(3):hover {
        background-color: $color3;
      }

      /* Image replacement */
      font: 0/0 a;
      text-shadow: none;
      color: transparent;
    }
  }

  .seq-canvas {
    /* Make the canvas the same dimensions as the container and prevent lines
     * from wrapping so each step can sit side-by-side */
    position: absolute;
    height: 100%;
    width: 100%;
    white-space: nowrap;
    /* Reset the font-size to remove 4px from :before and .title */
    font-size: 0;

    > * {
      /* Make the steps the same size as the container and sit side-by-side */
      display: inline-block;
      zoom: 1;
      vertical-align: top;
      width: 100%;
      height: 100%;
      white-space: normal;
      text-align: center;
      color: white;
      @include prefixed(transform, "translateZ(0)");
    }

    > *:before {
      /* Vertically align .seq-content */
      content: "";
      display: inline-block;
      vertical-align: middle;
      height: 100%;
    }
  }

  .seq-content {
    /* Default styles for content */
    display: inline-block;
    vertical-align: middle;
    max-width: 720px;
    margin: 0 4%;
    /* Reset the font-size from 0 back to 16 */
    font-size: 16px;
  }

  .seq-button {
    display: inline-block;
    zoom: 1;
    margin-top: 2em;
    padding: .6em;
    color: white;
    border: white solid 2px;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;

    @include prefixed(animation-fill-mode, "forwards");
    @include prefixed(transition-duration, ".25s");
    @include prefixed(transition-property, "background-color, color");

    &:focus,
    &:hover {
      background-color: white;
    }
  }

  .seq-step1 {
    background-color: $color1;

    .seq-button:focus,
    .seq-button:hover {
      color: $color1;
    }
  }

  .seq-step2 {
    background-color: $color2;

    .seq-button:focus,
    .seq-button:hover {
      color: $color2;
    }
  }

  .seq-step3 {
    background-color: $color3;

    .seq-button:focus,
    .seq-button:hover {
      color: $color3;
    }
  }

  .seq-title,
  .seq-subtitle,
  .seq-button {
    -moz-osx-font-smoothing: grayscale;
    @include prefixed(transform, "translateZ(0)");
  }

  .seq-title,
  .seq-subtitle {
    margin: 0 0 .5em 0;
    display: block;
    line-height: 1.4;
    -moz-osx-font-smoothing: grayscale;
    @include prefixed(transform, "translateZ(0)");
  }

  .seq-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.8em;
  }

  &.seq-active {
    /* when JS is enabled */

    /* Hide anything that goes beyond the boundaries of the Sequence container */
    overflow: hidden;

    .seq-preloader,
    .seq-pagination {
      visibility: visible;
    }

    .seq-preloader.seq-preloaded {
      visibility: hidden;
    }

    .seq-preloader .seq-preload-circle {
      fill: white;
    }

    .seq-content {
      /* Pull the content up a bit to account for the pagination */
      margin-top: -26px;
    }

    .seq-button {
      @include prefixed(transform, "translateZ(0) scale(0)");
      @include key-frames(jelly) {
        0% {
          @include prefixed(transform, "translateZ(0) scale(0)");
        }
        40% {
          @include prefixed(transform, "translateZ(0) scale(1.15)");
        }
        60% {
          @include prefixed(transform, "translateZ(0) scale(1)");
        }
        80% {
          @include prefixed(transform, "translateZ(0) scale(1.05)");
        }
        100% {
          @include prefixed(transform, "translateZ(0) scale(1)");
        }
      }
    }

    .seq-title,
    .seq-subtitle {
      /* Starting positions */
      opacity: 0;
      @include prefixed(transition-duration, ".4s");
    }

    .seq-title {
      @include prefixed(transform, "translate3d(0, -20px, 0)");
    }

    h3 {
      @include prefixed(transform, "translate3d(0, 20px, 0)");
    }
  }

  .seq-in {
    /* Animate in positions for content */
    .seq-title,
    .seq-subtitle {
      opacity: 1;
      @include prefixed(transform, "translate3d(0, 0, 0)");
    }

    .seq-button {
      @include prefixed(animation-name, "jelly");
      @include prefixed(animation-duration, ".5s");
    }
  }

  .seq-out {
    /* Animate out positions for content */
    .seq-title,
    .seq-subtitle {
      opacity: 1;
      @include prefixed(transform, "translate3d(0, 0, 0)");
    }

    .seq-button {
      @include prefixed(transform, "scale(1) translateZ(0)");
    }
  }

  @media only screen and (min-width: 600px) {

    /* Make the container 16:9 but no bigger than 90% of the screen height */
    @include aspect-ratio(16, 9);
    height: 100%;
    max-height: 90vh;
    min-height: $sequenceMobileHeight;

    .seq-content {
      /* Pull the content up to account for the pagination */
      margin-top: -19px;
    }

    .seq-pagination > * {
      width: 20px;
      height: 20px;
    }
  }

  @media only screen and (min-width: 768px) {
    .seq-title,
    .seq-subtitle {
      font-size: 1.4em;
    }

    .seq-title {
      font-size: 2.6em;
    }
  }
}
