/* Prevent scrolling this single-page app */
html,
body {
  overflow: hidden;
}

.sfestival {
  display: none;
}

/* Show Sydney festival specific content */
#sydneyfestival .hfestival
{
  display: none;
}
#sydneyfestival .sfestival
{
  display: block;
}

.controller__time {
  font-weight: bold;
}
/*
.fullscreen * * [data-action=enter-fullscreen],
* * [data-action=exit-fullscreen]
{
	display: none;
	visibility: hidden;
}

.fullscreen [data-action=exit-fullscreen]
{
  display: block;
  outline: 0;
  visibility: visible;
}*/

.about-menu {
	position: absolute;
	bottom: 15px;
	left: 15px;
  line-height: 1.2;
  font-size: 24px;
  text-transform: uppercase;
}

.about-menu a,
.overlay-menu a {
  color: inherit;
}
a {
  text-decoration: none;
}

.settings__item > span > img,
.settings__sub-item > span > img {
  -webkit-transform: scale(1.5);
	transform: scale(1.5);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.settings__item > span {
	border-width: 2px;
}


/* VIDEO CROP */
#wrapper {
  position: relative;
  width: 1280px;
  height: 640px;
}

/**
 * Animate between switching layers
 */
#clipper > * {
  transition-duration: .5s;
  transition-duration: .4s; /* faster than the controls */
  transition-timing-function: easeOutQuint;
  transition-property: -webkit-transform, transform;
  transition-property: transform;
}

/* I imagine `reduce-motion` would be a nice accessibility feature */
.reduce-motion #clipper > * {
  transition: none;
}

/* The initial clipping should not be animated */
/* Ideally a #clipper.resizing would be available */
.loading #clipper > * {
  transition: none;
}


.blocking-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  /*background: rgba(255, 0, 0, .1);*/
}

audio {
  display: none;
}

#wrapper,
.wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.wrapper, #wrapper {
  /* DEBUGGING */
  /*display: none;*/
}
#splash {
  font-size: 30px;
  font-size: 1.5vw;
}

.page-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /*display: none;*/
  background: rgba(0, 0, 0, .85);
}
.page-overlay#splash {
  /* Specifically disable the background color for the splash screen, because the video will cause the black background */
  background: none;
}

.showing-page .page-overlay#pages {
  -webkit-animation-name: fadeIn;
  -webkit-animation-duration: .6s;
  animation-name: fadeIn;
  animation-duration: .6s;
  overflow: auto;
}

.not-showing-page .page-overlay#pages{
  -webkit-animation-name: fadeOut;
  -webkit-animation-duration: .6s;
  animation-name: fadeOut;
  animation-duration: .6s;
  visibility: hidden;
}

#splash-content.overlay-content {
  -webkit-transform: translateY(-53.5%);
  transform: translateY(-53.5%);
}
#splash .ios-message {
  position: absolute;
  top: 50%;
  left: 75%;
  z-index: 20;
  display: none;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}
.ios.browser-unsupported .ios-message {
  display: block !important;
}
.overlay-content {
  position: absolute;
  /*background: rgba(0, 255, 0, .2);*/
  /* This position is based on a 2:1 video ratio */
  width: 100vw;
  height: 50vw;
  top: 12.5vw;
  left: 0;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}
.text-page {
  font-size: 18px;
  line-height: 1.45;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 3em auto;
  max-width: 40em;
}
.text-page p,
.text-page table {
  margin-top: 1em;
  margin-bottom: 1em;
}
.text-page a {
  color: inherit;
  border-bottom: 1px solid transparent;
}
.text-page a:hover,
.text-page a:focus {
  border-bottom: 1px solid #DC0F46;
}
.text-page th,
.text-page td {
  text-align: left;
  vertical-align: top;
  font-weight: normal;
  padding-right: 1.5em;
}
.text-page h3 {
  font-size: 1em;
}
.text-page ul {
  margin: 0;
  padding : 0 20px;
}

#help.text-page .first-section h2 {
  margin: 12px 0;
}

#help.text-page h2 {
  margin-bottom: 12px;
}

.text-page .no-margin-bottom {
  margin-bottom: 0 !important;
}
/* Anti-aliasing makes the small-caps look to thin. Don't use this */
/*
.text-page abbr {
  font-variant: small-caps;
  text-transform: lowercase;
}
*/
.overlay-menu {
  text-transform: uppercase;
  font-size: 24px;
  /*
  position: absolute;
  top: -2em;
  width: 100%;
  left: 0;
  */
  text-align: center;
}

.overlay-menu a {
  color: #DC0F46;
  border-bottom: 2px solid transparent;
}
.overlay-menu a u,
.overlay-menu a.active {
  border-bottom-color: #DC0F46;
  text-decoration: none;
}

.overlay-menu div  {
  display: inline-block;
}
.overlay-menu a {
  display: inline-block;
  padding: 0.5em 0.5em 0.1em;
}

li[data-action=open-about] {
  display: none !important;
}

/** No mute/unmute button in the interface, to reduce clutter */
li[data-action=mute],
li[data-action=unmute] {
  display: none !important;
}


#h-mobilesplash,
#s-mobilesplash {
  display: none;
}



/* =================================================================================
  ----------- iPAD -----------
  ==================================================================================*/

/* iPad 1 and 2 Landscape, iPad mini Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 1) {

.idle .js-settings
  {
    opacity: 0;

    /*
    When the player controls are hidden, they should not handle pointer events.
    Ideally this happens in JavaScript, but this works too.
    */
    pointer-events: none;
  }


  #tutorial {
    display: none;
  }

  #mobile-tutorial {
    display: block !important;
  }

  .showing-page .page-overlay#pages {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #splash video {
    display: none;
  }

  #splash h1 {

    position: absolute;
    width: 100vw;
    height: 50vw;
    background-color: rgba(0,0,0,.77);
    background-image: url("../img/logo/book-of-sand.svg");
    background-repeat: no-repeat;
    background-size: auto 40%;
    background-position: center;
    left: 0;
    top: 53.5%;
    bottom: 0;
    margin: 0 !important; 
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
  }

  .settings ul .settings__item span,
  .settings__sub-item span {
    width: 55px;
    height: 55px;
  }
  .settings ul .settings__item span:hover, 
  .settings__sub-item span:hover {
      background: none; 
  }
}

/* iPad 3 and 4 Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 2) {
  
  .idle .js-settings
  {
    opacity: 0;

    /*
    When the player controls are hidden, they should not handle pointer events.
    Ideally this happens in JavaScript, but this works too.
    */
    pointer-events: none;
  }

  #tutorial {
    display: none;
  }

  #mobile-tutorial {
    display: block !important;
  }

  .showing-page .page-overlay#pages {
    overflow: hidden;
  }

  #splash video {
    display: none;
  }

  #splash h1 {

    position: absolute;
    width: 100vw;
    height: 50vw;
    background-color: rgba(0,0,0,.77);
    background-image: url("../img/logo/book-of-sand.svg");
    background-repeat: no-repeat;
    background-size: auto 40%;
    background-position: center;
    left: 0;
    top: 53.5%;
    bottom: 0;
    margin: 0 !important; 
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
  }

  .settings ul .settings__item span,
  .settings__sub-item span {
    width: 55px;
    height: 55px;
  }
  
  .settings ul .settings__item span:hover, 
  .settings__sub-item span:hover {
      background: none; 
  }
}

@media (max-width: 736px) {
  
  #splash,
  #splash .overlay-content {
    display: none;
    transition: none;
    -webkit-transition: none;
  }

  #s-mobilesplash,
  #sydneyfestival #h-mobilesplash {
    display: none;
  }

  #h-mobilesplash,
  #sydneyfestival #s-mobilesplash
  {
    display: block;
  }


  .overlay-menu {
    position: absolute;
    right: 0;
    top: 0.8em;
    left: auto;
    width: 20%;
    text-align: center;
  }
  .overlay-menu a {
    display: block;
  }
  .text-page {
    font-size: 15px;
    padding: 10px 0 20px;
    width: 72.5%;
    height: 100%;
    position: absolute;
    margin: 1em 2em 0 2em;
  }
  .about-menu {
    display: none;
  }
  li[data-action=open-about] {
    display: inline-block !important;

  }

  li[data-action=mute],
  li[data-action=unmute] {
    display: none;
  }

  .settings {
    bottom: auto;
    top: 50%;
    right: 0;
    -webkit-transform: translateZ(0) translateX(-50%) translateY(-50%);
    transform: translateZ(0) translateX(-50%) translateY(-50%);
  }

  .settings ul {
    width: 4em;
  }

  .settings ul .settings__item span,
  .settings__sub-item span {
    width: 55px;
    height: 55px;
  }

  .settings__sub-item {
    top: 0;
    -webkit-transform: none;
    transform: none;
  }

  .settings__item--2 li,
  .settings__item--3 li {
    top: 0;
  }

  .settings__item--3.is-open {
    top: 0;
    right: 0;
  }

  .settings__item--2 li:nth-child(1),
  .settings__item--3 li:nth-child(1) {
    left: 0;
  }

  .settings__item--2 li:nth-child(2),
  .settings__item--3 li:nth-child(2) {
    left: -100%;
    top: 0;
  }

  .settings__item--3 li:nth-child(3) {
    left: -200%;
    top: 0;
  }

  li[data-action=toggle-html-hd][aria-checked=false] {
    display: none !important;
  }
  .idle .js-settings
  {
    opacity: 0;

    /*
    When the player controls are hidden, they should not handle pointer events.
    Ideally this happens in JavaScript, but this works too.
    */
    pointer-events: none;
  }

  #tutorial {
    display: none;
  }

  #mobile-tutorial {
    display: block !important;
  }

  .showing-page .page-overlay#pages {
    overflow: hidden;
  }
  .settings ul .settings__item span:hover, 
  .settings__sub-item span:hover {
      background: none; 
  }
}

.m-splashwrapper {
    overflow: hidden;
}

.m-splashcontainer {
    height: 100%;
}

.started .m-splashcontainer {
    -webkit-animation: move-splash 8.5s step-end 1 1s;
    -moz-animation: move-splash 8.5s step-end 1 1s;
    animation: move-splash 8.5s step-end 1 1s;
}

.m-splashscreens {
    width: 400vw;
    height: inherit;
    position: absolute;
}

.m-splash {
    height: inherit;
    width: 25%;
    float: left;
    color: #DC0F46;
    text-transform: uppercase;
    text-align: center;
    display: table;
}

.m-splashcontent {
   display: table-cell;
    vertical-align: middle;
}

.m-splash h2.msplash-name {
  font-weight: normal;
  font-size: 3em;
}

.m-splash p {
  margin: 8px 0;
  font-size: 1em;
}

.msplash-name {
  font-size: 2.5em;
}

.m-splash1,
.m-splash5 {
  background-image: url("../img/logo/book-of-sand.svg");
  background-repeat: no-repeat;
  background-size: auto 90%;
  background-position: center;
}

.m-splash4 .msplash-name {
  font-size: 1.6em;
}

.m-splash5 {
  opacity: .77;
}

@-webkit-keyframes move-splash {
    0 { left: 0 }
    20% { margin-left: -100% }
    40% { margin-left: -200% }
    60% { margin-left: -300% }
    80% { margin-left: -400% }
    100% { margin-left: -500% }
}

@-moz-keyframes move-splash{
    0 { left: 0 }
    20% { margin-left: -100% }
    40% { margin-left: -200% }
    60% { margin-left: -300% }
    80% { margin-left: -400% }
    100% { margin-left: -500% }
}

@-ms-keyframes move-splash{
    0 { left: 0 }
    20% { margin-left: -100% }
    40% { margin-left: -200% }
    60% { margin-left: -300% }
    80% { margin-left: -400% }
    100% { margin-left: -500% }
}

@keyframes move-splash{
    0 { left: 0 }
    20% { margin-left: -100% }
    40% { margin-left: -200% }
    60% { margin-left: -300% }
    80% { margin-left: -400% }
    100% { margin-left: -500% }
}

@-webkit-keyframes fadeIn {
  from { 
    opacity: 0;
    -webkit-transform: scale(1.2); 
  }
  to { 
    opacity: 1; 
    -webkit-transform: scale(1);
  }
}

@keyframes fadeIn {
  0% { 
    opacity: 0;
    transform: scale(1.2); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1);
  }
}

@-webkit-keyframes fadeOut {
  from { 
    opacity: 1;
    -webkit-transform: scale(1); 
    visibility: visible;
  }
  to { 
    opacity: 0; 
    -webkit-transform: scale(1.2);
    visibility: hidden;
  }
}

@keyframes fadeOut {
  0% { 
    opacity: 1;
    transform: scale(1); 
    visibility: visible;
  }
  100% { 
    opacity: 0; 
    transform: scale(1.2);
    visibility: hidden;
  }
}

@-webkit-keyframes moveArrow {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

@keyframes moveArrow {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

@-webkit-keyframes bounceDown {
  0%, 
  100%  {
    -webkit-transform: translateY(0); 
  }
  20% {
    -webkit-transform: translateY(4vw);
  }
}

@-webkit-keyframes bounceUp {
  0%,
  100% { 
    -webkit-transform: translateY(0) ; 
  }
  20% {
    -webkit-transform: translateY(-4vw);
  }
}

@keyframes bounceDown {
  0%,
  100% {
    transform: translateY(0); 
  }
  20% {
    transform: translateY(4vw);
  }
}

@keyframes bounceUp {
  0%,
  100% { 
    transform: translateY(0) ;
  }
  20% {
    transform: translateY(-4vw);
  }
}

#splash .composer {px
  font-size: 36px;
  font-size: 2vw;
  /* Hack to position over the logo video */
  position: relative;
}
#splash .performer {
  font-size: 36px;
  font-size: 2vw;
  /* Hack to position over the logo video */
  position: relative;
}
#splash .choir {
  font-size: 1.525vw;
}
#splash .composer {
  top: 2vw;
}
#splash.page-overlay {
  /* The black background of the <video> logo will cause the background color */
  /*background: white;*/
}

.credit-name.performer.bottom {
  line-height: 33px
}

#splash p,
#splash h1 {
  margin: 1em;
}
#splash .logo {
  /*height: 400px;*/
  height: 25vw;
}
#splash h1 > video,
#splash h1 > img {
  opacity: 0.77;
  position: absolute;
  background: black;
  top: 57%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 133vw;
}

.controller__handle {
  transition: 0.1s ease;
  transition-property: -webkit-transform, transform;
}
.scrobbling .controller__handle {
  transition: none;
}

#splash {
  color: #DC0F46;
  text-align: center;
}
#splash a {
  color: #DC0F46;
  text-decoration: none;
}
#splash .credit-name {
  text-transform: uppercase;
}
#splash .side {
  bottom: 2vw;
  left: 4vw;
  width: auto;
  height: auto;
  /*height: 20em;*/
  text-align: left;
  font-size: 1.525vw;
}
#splash .bottom {
  bottom: 2.1vw;
  left: 0;
  width: 100%;
  height: auto;
  /*height: 20em;*/
  text-align: center;
}
#splash p {
  margin-bottom: 0;
}
#splash .bottom,
#splash .side
{
  position: absolute;
  background: none;
  margin-left: 0;
  margin-right: 0;
  /*padding: 1em;*/
}
#splash,
#h-mobilesplash,
#s-mobilesplash {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
  -webkit-transition: 600ms cubic-bezier(0.23, 1, 0.32, 1);
  transition:         600ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-transition-property: opacity, transform;
  transition-property: opacity, transform;
}
#splash.poof,
#h-mobilesplash.poof,
#s-mobilesplash.poof {
  opacity: 0;
  /*-webkit-transform: scale(2);*/
  /*transform: scale(2);*/
  pointer-events: none;
}
#progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1em;

  text-align: right;

  /* Use 1% as minimum, or else the progress bar would be invisible */
  min-width: 1%;
  max-width: 100%;
  background-color: #DC0F46;
  transition: 1s ease;
  transition-property: width, height;
}

/* Hide the progress bar when it will never work anyway */
.browser-unsupported #progress-bar {
  display: none;
}

#progress-bar.loaded {
  height: 0;
}

.subtitles-overlay p {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-size: 2.5vw;
}
.subtitles-overlay p {
  font-size: 2.5vw;
}
.subtitles-overlay span {
  display: block;
  padding: 0.4em;
  white-space: pre;
  /*background-color: rgba(0, 0, 0, .8);*/
  /*
  One very sharp line to make the text intelligeble,
  One blurry shadow to make it look cool,
  One shadow to bring them all and in the darkness bind them.
  */
  text-shadow: 1px 1px 2px rgba(  0,   0,   0, 1.00),
               0   0   5px rgba(  0,   0,   0, 0.42);
}

.hidden-when-disabled[aria-disabled] {
  display: none !important;
}

.fullscreen .settings__item {
  display: none;
}

.fullscreen .hidden-when-fullscreen {
  display: none !important;
}


.js-controller,
.js-settings,
.subtitles-overlay {
  opacity: 1;
  transition-duration: .4s;
  transition-timing-function: easeInOutSine;
  transition-property: opacity;
}

.loading .hidden-when-loading,
.idle .hidden-when-idle
{
  opacity: 0;

  /*
  When the player controls are hidden, they should not handle pointer events.
  Ideally this happens in JavaScript, but this works too.
  */
  pointer-events: none;
}
.idle .blocking-overlay,
.idle .player-controls {
  /*
  Hide the mouse cursor when the controls are hidden, so that the cursor doesn't obstruct
  view of the video.
  Ideally the cursor is only hidden right above the video.
  */
  cursor: none;
}

cite {
  font-style: normal;
}


[role=application],
[aria-role=application]
{
    /* In applications selectable content has to be declared explicitly */
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    cursor: default;
}
[role=document],
[aria-role=document]
{
    -webkit-user-select: text;
       -moz-user-select: text;
        -ms-user-select: text;
            user-select: text;
}


html, body, div {
    margin: 0;
    padding: 0;
}

@-webkit-keyframes move-splash {
    0 { left: 0 }
    25% { margin-left: -100% }
    50% { margin-left: -200% }
    75% { margin-left: -300% }
    100% { margin-left: -400% }
}

@-moz-keyframes move-splash{
    0 { left: 0 }
    25% { margin-left: -100% }
    50% { margin-left: -200% }
    75% { margin-left: -300% }
    100% { margin-left: -400% }
}

@-ms-keyframes move-splash{
    0 { left: 0 }
    25% { margin-left: -100% }
    50% { margin-left: -200% }
    75% { margin-left: -300% }
    100% { margin-left: -400% }
}

@keyframes move-splash{
    0 { left: 0 }
    25% { margin-left: -100% }
    50% { margin-left: -200% }
    75% { margin-left: -300% }
    100% { margin-left: -400% }
}

.splash {
  background: rgba(0, 0, 0, .85);
  color: #DC0F46;
  position: relative;
}
.splash > * {
    text-align: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    font-size: 5vw;
    margin: 0;
}

/**
Because the page overlay is translucent, we'll hide
the controls in the background to improve legibility of the text.
**/
.showing-page .player-controls,
.showing-page .subtitles-overlay {
  opacity: 0;
}


#tutorial {
  position: absolute;
  top: 50%;
  right: 15%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  font-size: 1.5vw;
  padding: 1em;
  width: 27vw;
  border: 2px solid white;
  height: auto;
  background: rgba(0, 0, 0, .85);
  /*box-shadow: 5px 5px 10px rgba(0, 0, 0, .42);*/

  transition-duration: .4s; /* faster than the controls */
  transition-timing-function: ease;
  transition-property: right;
  transition-delay: 0.6s;
}

.loading #tutorial,
.after-tutorial #tutorial {
  right: -100vw;
}

@media (max-width: 736px) {
  .subtitles-overlay p {
    font-size: 3.75vw;
  }
}
#mobile-tutorial {
  text-align: center;
  color: #FFF;
  text-transform: uppercase;
  font-size: 2em;
  display: none;
  position: absolute;
  top: 50%;
  -webkit-transform: translateZ(0) translateX(0) translateY(-50%);
          transform: translateZ(0) translateX(0) translateY(-50%);
  /* height: 30vh; */
  width: 27vw;
  /* position: absolute; */
  left: 8%;
  /* margin: auto 0; */
}

#mobile-tutorial .swipe-arrow {
  height: 10vh;
  background-size: auto 100%;
  background-repeat: no-repeat;
  background-position: center;
  -webkit-animation: moveArrow 2s infinite alternate ease;
  animation: moveArrow 2s infinite alternate ease;
}

#mobile-tutorial #arrow-north {
  background-image: url("../img/icon/arrow-north.svg");
}

#mobile-tutorial #arrow-south {
  background-image: url("../img/icon/arrow-south.svg");
}

.loading #mobile-tutorial,
.after-tutorial #mobile-tutorial {
  visibility: hidden;
}

#loader.buffering {
  display: block;
  height: 98px;
  width: 98px;
  border-radius: 50% 50%;
  background-image: url("../img/gif/loader-blackwhite.gif");
  background-repeat: no-repeat;
  background-size: 100%;
  background-position: 0 -2px;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translateZ(0) translateX(-50%) translateY(-50%);
          transform: translateZ(0) translateX(-50%) translateY(-50%);
  text-align: center;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none; 
/*  box-shadow: 0 0 3px #FFF inset;
*/  border: 2px solid white;
}

.cordova #loader,
.loading #loader {
  display: none;
}

/* Animate when the user tries to move in wrong direction (end of videos up or down) */
#clipper.moveUp-NP {
  animation: bounceDown .5s 1 alternate ease-out;
  -webkit-animation: bounceDown .5s 1 alternate ease;
}

#clipper.moveDown-NP {
  animation: bounceUp .5s 1 alternate ease-out;
  -webkit-animation: bounceUp .5s 1 alternate ease;
}