:root {
  font-size: 14px;
  --container-max: 900px;
  --nav-offset: 6rem;
  --color-text: #151515;
  --color-bg: #fff;
  --color-link: #151515;
  --color-link-hover: #000000;
  --color-close: #a22d1d;
  --page-padding: 1.5rem;
  --c-gap: 0.5rem;
  --column: 80px;
  --column-count: 4;
  --aspect: 4/5;
  --font-size-l: 18px;
  --font-size-xl: clamp(2rem, 10vw, 6rem);
  --panel-gap: 1rem;
  --panel-img-size: calc((100vh - var(--page-padding) * 2) * 4 / 5 - var(--panel-gap));
}

html {
  box-sizing: border-box;
}

*,
*::after,
*::before {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, arial, sans-serif;
  line-height: 1.5;
  font-size:1em;
}

.wrapper {
  padding: 0 8% 50px;
  width: 100%;
}

article {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

ul {
  width:100%;
}

.timeline__nav ul:before {
  content:'chronological';
  position:absolute;
  left: -4.2em;
  font-size:1.8em;
  text-align:right;
  top:3em;
  color:#232323;
  font-weight:bold;
  font-family: 'Maven Pro', sans-serif;
  transform:rotate(-90deg);
}

.timeline__nav {
  position: fixed;
  z-index: 99;
  top: 0;
  left: calc((100% - var(--container-max)) / 2 - var(--nav-offset));
  -webkit-transition: top .3s ease-out;
  transition: top .3s ease-out;
}

.timeline__nav.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.timeline__nav {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.timeline__nav ul {
  list-style: none;
  list-style-position: inside;
  margin: 15px 0;
}
.timeline__nav ul li {
  margin: 15px 0;
  padding-left: 0;
  list-style-type: none;
  color: #bfc1c3;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.3);
  cursor: pointer;
  -webkit-transition: all .3s ease-out;
  transition: all .3s ease-out;
}
.timeline__nav ul li.active {
  font-weight: bold;
  color: #5f8faf;
  border-bottom: 1px dotted transparent;
  -webkit-transform: scale(1.2);
          transform: scale(1.2);
}
.timeline__nav ul li:hover {
  color: #000;
}

@media screen and (max-width: 42em) {
  .timeline__nav ul li {
    font-size: 10px;
    margin: 15px 0 0 -20px;
    border-bottom: none;
  }
  ul:before {
    left:-60%;
    font-size:12px;
    top:4em;
  }
}

h1 {
  font-size:2.6em;
  margin:0;
  text-align:center;
  font-family: 'Maven Pro', sans-serif;
}
h3 {
  margin:0 0 2em;
  text-align:center;
  font-weight:normal;
  font-family: georgia, times;
  font-style:italic;
  color:#777;
  font-size:1em;
}

p {
  text-align:left;
  font-size:1em;
}

h1 span {
  color: #e46c5a;
}

h1 span:last-child {
  color: #fa543b;
}

.hidden {
  position: absolute;
  overflow: hidden;
  width: 0;
  height: 0;
  pointer-events: none;
}

hr.dotted {
  background-color: #fff;
  border-top: 2px dotted #8c8b8b;
}

a {
  color: #256ea8;
  text-decoration: none;
}

@media (scripting: enabled) {
  .loading {
    &::before,
    &::after {
      content: '';
      position: fixed;
      z-index: 10000;
    }

    &::before {
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--color-bg);
    }

    &::after {
      top: 50%;
      left: 50%;
      width: 100px;
      height: 1px;
      margin: 0 0 0 -50px;
      background: var(--color-link);
      animation: loaderAnim 1.5s ease-in-out infinite alternate forwards;
    }
  }
}

@keyframes loaderAnim {
  0% {
    transform: scaleX(0);
    transform-origin: 0% 50%;
  }

  50% {
    transform: scaleX(1);
    transform-origin: 0% 50%;
  }

  50.1% {
    transform: scaleX(1);
    transform-origin: 100% 50%;
  }

  100% {
    transform: scaleX(0);
    transform-origin: 100% 50%;
  }
}

.line {
  display: inline-block;
  overflow: hidden;
  position: relative;
  vertical-align: top;

  &::before {
    background: currentColor;
    bottom: 0;
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    transition: transform 0.4s ease;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right center;
  }

  &:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

.frame {
  font-size: var(--font-size-l);
  font-weight: 500;
  display: grid;
  z-index: 1000;
  width: 100%;
  position: relative;
  grid-column-gap: var(--c-gap);
  grid-row-gap: 0.5rem;
  pointer-events: none;
  justify-items: start;
  grid-template-columns: auto;
  grid-template-areas:
    'title'
    'links'
    'tags'
    'sponsor';

  #cdawrap {
    justify-self: start;
    grid-area: sponsor;
  }

  a,
  button {
    pointer-events: auto;
    color: var(--color-text);
  }

  .frame__title {
    font-size: inherit;
    margin: 0;
    font-weight: inherit;
    grid-area: title;
  }

  .frame__tags,
  .frame__links {
    grid-area: tags;
    display: flex;
    gap: 0.5rem;
    align-items: start;
  }

  .frame__links {
    grid-area: links;
  }

  &.frame--footer {
    display: flex;
    min-height: 300px;
    align-items: end;
    justify-content: space-between;
  }

  @media screen and (min-width: 65em) {
    grid-template-columns: repeat(var(--column-count), minmax(var(--column), 1fr));
    grid-template-areas: 'title title links links tags tags ... sponsor';
  }
}

.heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 30px auto;
  color: var(--color-text);
  font-family: 'halyard-display', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.2;
  text-transform: lowercase;
}

.heading__title {
  font-family: 'owners-xnarrow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--font-size-xl);
  margin: 0;
  line-height: 0.77;
}

.heading__meta::after {
  content: '↜';
  font-family: serif;
  font-size: 1.5rem;
  line-height: 0.2;
  vertical-align: middle;
  margin-left: 0.5rem;
  display: inline-flex;
}

.grid {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: repeat(var(--column-count), minmax(var(--column), 1fr));
  grid-column-gap: var(--c-gap);
  grid-row-gap: 5rem;
}

.grid__item {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  will-change: transform, clip-path;
  overflow: hidden;
}

.grid__item:hover .grid__item-image {
  opacity: 0.7;
}

.grid__item-image {
  width: 100%;
  aspect-ratio: var(--aspect);
  background-size: 100%;
  background-position: 50% 50%;
  transition: opacity 0.15s cubic-bezier(0.2, 0, 0.2, 1);
}

.grid__item-caption h1 {
  color: var(--color-text);
  font-family: 'halyard-display', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.2;
  text-transform: lowercase;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  text-align: right;
}

.grid__item-caption h3,
.grid__item-caption p,
.grid__item-caption a {
  display: none;
}

.panel {
  position: fixed;
  margin: 0;
  width: 100%;
  height: 100vh;
  padding: var(--page-padding);
  top: 0;
  left: 0;
  display: grid;
  gap: var(--panel-gap);
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  will-change: transform, clip-path;
  justify-content: left;
  grid-template-rows: 1fr min-content;
  grid-template-columns: 100%;
  grid-template-areas: 'panel-image' 'panel-content';
  @media screen and (min-width: 40em) {
    grid-template-columns: var(--panel-img-size) 1fr;
    grid-template-areas: 'panel-image panel-content';
    grid-template-rows: 100%;
  }
}

.panel--right {
  @media screen and (min-width: 40em) {
    grid-template-columns: 1fr var(--panel-img-size);
    grid-template-areas: 'panel-content panel-image';
  }
}

.panel__img {
  grid-area: panel-image;
  background-size: cover;
  background-position: center;
  width: 100%;
  height: auto;
  aspect-ratio: var(--aspect);
  @media screen and (min-width: 40em) {
    height: 100%;
    width: auto;
    max-width: 100%;
  }
}

.panel__content {
  grid-area: panel-content;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: start;
  align-items: start;
  text-align: right;
}

@media screen and (min-width: 65em) {
  .panel--right .panel__content {
    align-items: start;
    text-align: left;
  }
}

.panel__content h1 {
  margin: 0;
  font-size: 4rem;
  font-weight: 500;
}

.panel__content h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.panel__content p {
  font-size: 1.25em;
  margin: 0;
  text-wrap: pretty;
}

.panel__content a {
  font-size: 1.25rem;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  color: #256ea8;
  padding: 1rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.panel__close {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  color: var(--color-close);
  &:hover,
  &:focus {
    outline: none;
    color: var(--color-link-hover);
  }
}

.mover {
  position: fixed;
  aspect-ratio: var(--aspect);
  background-size: cover;
  background-position: 50% 50%;
  will-change: transform, clip-path;
  pointer-events: none;
}