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

/* AAI COLORS
 *
 * orange #ff6105
 *
 * green  #005454
 * yellow #fff200
 * purple #b8c4f0
 * peach  #ffd1b5
 * mint   #bbe2da
 * maroon #8d191c
 */

body {
  padding: 0;
  margin: 0;
  background: #ffd1b5;
  color: #005454;
  overflow: hidden;
  font-size: 24px;
}

* {
  box-sizing: border-box;
  font-family: 'acumin-pro-wide';
  font-weight: bold;
  user-select: none !important;
  outline: none !important;
  cursor: crosshair !important;
}

@media only screen and (width: 1920px) and (height: 1080px) {
  /* Hide cursor when on the touch kiosk */
  * {
    cursor: none !important;
  }
}

*::-webkit-scrollbar {
  display: none;
}

#toc {
  width: 100vw;
  height: 100vh;
  padding: 60px 0;
  overflow-y: scroll;
  overflow-x: visible;
}

#toc .era {
  width: 100%;
  overflow-x: scroll; /* this make` overflow-y: visible; effectively mute—gotta figure out workaround */
  overflow-y: visible;
}

#toc .era a {
  flex-shrink: 0;
  display: inline-block;
  padding: 30px;
  border: 3px solid currentColor;
  height: 324px;
  width: 576px;
  display: flex;
  flex-direction: row;
  position: relative;
}

#toc .era a::after {
  position: absolute;
  /* defaults */
  width: 120px;
  bottom: 20px;
  right: 20px;
  z-index: -1;
}

#toc .era:nth-of-type(3n - 2) a:nth-of-type(3n)::after {
  content: url('./assets/shapes/blob-red.svg');
  left: 7em;
  top: 22px;
}

#toc .era:nth-of-type(2n) a:nth-of-type(3n+2)::after {
  content: url('./assets/shapes/moretriangles-yellow.svg');
  width: 180px;
  left: 4em;
  top: 22px;
}

#toc .era:nth-of-type(3n) a:nth-of-type(3n)::after {
  content: url('./assets/shapes/star-green.svg');
  width: 180px;
  right: 30px;
}

#toc .era + .era {
  margin-top: 40px;
}

#toc .era a + a {
  margin-left: 40px;
}

#toc .era > :first-child {
  margin-left: 60px; /* match article padding */
}

#toc .era > :last-child {
  margin-right: 60px; /* this doesn't work; I think related to https://stackoverflow.com/questions/11695354/css-right-margin-does-not-work-inside-a-div-with-overflow-scroll */
}

#toc h1 {
  padding-top: 40px; /* vertically center */
  font-size: 96px;
  text-indent: -.75em;
  padding-left: .75em;
  flex-basis: 40%;
}

#toc h2 {
  padding-top: 62px;
  font-size: 24px;
  line-height: 1.2em;
}

.era {
  display: inline-flex;
  flex-direction: row;
}

.era article {
  height: 100vh;
  width: 100vw;
  padding: 80px;
  display: flex;
  flex-direction: column;
}

/* LAYOUT / IMAGES */

article .content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  position: relative; /* so abosolute items inside can go to border minus margin */
}

.content > * {
  flex: 1;
  min-width: 0; /* force equal widths */
}

.content p {
  margin-bottom: 0;
  padding-right: 1em;
  overflow-y: scroll;
}

article .text {
  z-index: 1; /* over image */
}

article figure,
article .text {
  display: flex;
  flex-direction: column;
}

article figure img,
article .text p {
  flex: 1;
  width: 100%;
  object-fit: contain; /* change to `cover` for better filling in of space */
  object-position: left bottom;
  overflow-y: scroll;
}

article .impact {
  margin: 0;
  position: absolute;
  right: 0;
  text-align: right;
  font-size: 0.8em;
  text-transform: uppercase;
  font-weight: normal;
  background: #ffd1b5ee;
  padding: 0 0.5em 0.5em;
  margin-top: -0.4em;
}

.impact .label {
  display: inline-block;
  border-bottom: 2px solid currentColor;
}

figcaption {
  font-size: 0.8rem;
}

figcaption.attribution {
  color: #aaa;
}

nav {
  z-index: 1000;
  display: block;
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: 1s opacity;
}

nav.hidden {
  opacity: 0;
}

nav.hidden * {
  pointer-events: none !important;
}

nav button {
  pointer-events: all;
  position: absolute;
  border: 6px solid #ff6105;
  background: transparent;
  color: #ff6105;
  font-size: 24px;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  margin: 20px;
}

nav .next {
  right: 0;
  top: 50%;
  transform: translateY(calc(-50% - 10px)); /* account for margin */
}

nav .prev {
  left: 0;
  top: 50%;
  transform: translateY(calc(-50% - 10px)); /* account for margin */
}

nav .next-era {
  bottom: 0;
  left: 50%;
  transform: translateX(calc(-50% - 10px)); /* account for margin */
}

nav .prev-era {
  top: 0;
  left: 50%;
  transform: translateX(calc(-50% - 10px)); /* account for margin */
  outline: none !important;
}

nav button.home {
  margin: 0; /* SVG includes brand-recommended margins */
  border: none;
  width: 120px;
  height: auto;
  padding: 0;
}

nav button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

figure {
  margin: 0;
  padding: 0;
}

/* TYPOGRAPHY */

h1 {
  color: #B8C4F0;
  font-weight: 900;
  margin: 0;
  padding: 0;
  line-height: 0.8em;
  font-size: 216px;
}

h2 {
  margin: 0;
  margin-left: 1em;
  margin-top: -0.35em;
  padding: 0;
  line-height: 0.8em;
  font-size: 72px;
  font-weight: bold;
}