/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.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: #007396;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #fffcea;
  text-shadow: none;
}

::selection {
  background: #fffcea;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #f6c475;
  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;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

.svg-container-jdk-intro,
.svg-container-jep-intro,
.svg-container-jep-count,
.svg-container-jdk-jep-swarm,
.svg-container-project-jep-swarm,
.svg-container-overall-circle,
.svg-container-relations,
.svg-container-impact {
  margin-right: auto;
  margin-left: auto;
  width: 100%;
  max-width: 1280px;
  overflow: hidden;
}

/* experimental start */

figure div.chart img {
  opacity: 1;
  transition: all 800ms ease-in-out;
}

figure div.chart img.hidden {
  opacity: 0;
  transition: all 800ms ease-in-out;
}

/* Labels */
.jdk-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.0;
  text-align: center;
  /* color: #02354a; */
  color: #fffcea;
}

/* Buttons */
.project-button {
  min-width: 13%;

  text-align: center;
  color: #f3f3f3;

  margin: 50px 5px 20px 5px;
  padding: 6px;

  background-color: #02354a;
  border-radius: 5px;
  border: 1px solid #f3f3f3;

  font-size: 0.8rem;
}

.project-button:hover {
  color: #ED8B00;
}

.project-div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

#sky-reset.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- */

/* Tooltip Info */

#info-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

#instructions {
  padding: 15px 20px;
  border: 1px solid #014a63;
  border-radius: 5px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 200ms ease;
}

#info-jep, #info-jdk {
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 200ms ease;
}

#info-jep.hidden,
#info-jdk.hidden,
#instructions.hidden {
  max-height: 0;
  opacity: 0;
}

#instructions.hidden {
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
}

.info-name {
  margin-bottom: 6px;
  /* font-size: 1.2rem; */
  font-weight: 700;
  border-bottom: 1px solid #014a63;
}

#info-jep .label,
#info-jdk .label {
  font-weight: 500;
}

/* experimental end */

/*
 * Scrollama styles
 */

@media only screen and (min-width: 992px) {
  /* from direct sticky side */
  #scrolly {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    background-color: #02354a;
    padding: 1rem;
  }

  #scrolly > * {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }

  article {
    position: relative;
    padding: 0 1rem;
    max-width: 18rem;
  }

  figure .tooltip {
    padding: 1rem;
    position: absolute;
    top: 65%;
    left: 80%;
    font-size: 0.8rem;
  }

  figure {
    position: -webkit-sticky;
    position: sticky;
    width: 100%;
    margin: 0;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    z-index: 1;
  }

  figure div.chart {
    padding: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    -moz-transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
  }

  figure img {
    width: 80%;
    max-width: 1024px;
  }

  figure img.small {
    width: 50%;
    max-width: 1024px;
  }

  .step {
    margin: 0 auto 2rem auto;
    background-color: rgba(1, 74, 99, 0.6);
    color: #f3f3f3;
    border-radius: 10px;
  }

  .step:last-child {
    margin-bottom: 0;
  }

  .step.is-active {
    background-color: rgba(243, 243, 243, 0.9);
    color: #02354a;
    transition: background-color 600ms ease-in-out, color 600ms ease-in-out;
  }

  .step p {
    text-align: center;
    padding: 0.9rem;
    font-size: 1.1rem;
  }
}

.note-footer {
  max-width: 96%;

  text-align: center;
  color: #aaaaaa;

  margin: 50px auto 10px;
  padding: 10px;

  background-color: #02354a;
  border-radius: 5px;
  border: 1px solid #aaaaaa;

  font-size: 0.8rem;
}

.note-footer a {
  color: #FBE5C1;
  text-decoration: none;
}

.note-footer a:hover {
  text-decoration: underline;
}

/* from scrollama stylesheet */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
  Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
  font-family: "Quattrocento Sans", Roboto, sans-serif;
  min-height: 1280px;
  background-color: #02354a;
  color: #f3f3f3;
  font-size: 24px;
}

p,
h1,
h2,
h3,
h4,
a {
  margin: 0;
  font-weight: 400;
}

a,
a:visited,
a:hover {
  color: #007396;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

#intro {
  max-width: 40rem;
  margin: 1rem auto;
  text-align: center;
}

.intro__hed {
  font-size: 2em;
  margin: 2rem auto 0.5rem auto;
}

.intro__dek {
  color: #aaaaaa;
}

#intro {
  margin-bottom: 240px;
}

#outro {
  margin-top: 12rem;
  margin-left: 2rem;
  margin-right: 2rem;
  height: 260px;
}

.outro__monologue {
  margin-top: 6rem;
  font-size: 1em;
  text-align: center;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

/* NOTE: if this allowed, transitioning not working.. */
/* .hidden,
[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
 */

.visually-hidden {
  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 .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.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
 *
 * 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: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (max-width: 991px) {
  /* Style adjustments for viewports that meet the condition */
  /* scroll in the middle */
  #scrolly {
    position: relative;
    padding: 1rem;
    z-index: 0;
  }

  article {
    position: relative;
    padding: 0;
    max-width: 16rem;
    margin: 0 auto;
    pointer-events: none;
    z-index: 3;
  }

  figure {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    margin: 0;
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    z-index: 1;
  }

  figure .tooltip {
    padding: 1rem;
    position: absolute;
    top: 50%;
    left: 70%;
    font-size: 0.6rem;
  }

  figure div.chart {
    text-align: center;
    padding: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    -moz-transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 900;
  }

  figure img {
    width: 80%;
    max-width: 300px;
  }

  figure img.small {
    width: 40%;
    max-width: 300px;
  }

  .step {
    margin: 0 auto 20rem auto;
    color: #f3f3f3;
    background-color: rgba(1, 74, 99, 0.1);
  }

  .step:last-child {
    margin-bottom: 0;
  }

  .step.is-active {
    transition: background-color 600ms ease-in-out, color 600ms ease-in-out;
  }

  .step p {
    text-align: center;
    padding: 0.9rem;
    font-size: 0.9rem;
  }

  .intro__hed {
    font-size: 1.2em;
  }

  .outro__monologue {
    font-size: 0.7em;
  }
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !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;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
