@font-face {
  font-family: "Gibson";
  src:
    url("../fonts/GibsonVF-Regular.woff") format("woff"),
    url("../fonts/GibsonVF-Regular.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
}

@font-face {
  font-family: "Gibson";
  src:
    url("../fonts/GibsonVF-Italic.woff") format("woff"),
    url("../fonts/GibsonVF-Italic.woff2") format("woff2");
    font-weight: 300;
    font-style: italic;
}

@font-face {
  font-family: "Hoefler";
  src:
    url("../fonts/HOEFLERTXT-ROMAN.OTF") format("opentype");
    font-weight: 300;
    font-style: normal;
}

:root {
  --gw-white: #ffffff;
  --gw-light: #eeeeee;
  --gw-dark-grey: #444444;
  --gw-dark-blue: #033c5a;
  --gw-light-blue: #0073aa;
  --gw-hover: #A75523;
  --gw-buff: #aa9868;
  --gw-hover-buff: #d9d0bb;

}

html,
body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: "Gibson";
  font-style: normal;
  background-color: var(--gw-white);
  color: var(--gw-dark-grey);
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: row;
}

a {
  color: var(--gw-light-blue);

  &:hover {
    color: var(--gw-hover);
  }
}

h1,
h2,
h3 {
  color: var(--gw-dark-blue);
  font-weight: 200;
}

h1.title-home {
  font-size: 3rem;
  border-bottom: 2px solid var(--gw-buff);
  padding-bottom: 0.5rem;
}

/* helper class to hide labels unless user is using screen reader */
.screenreader {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  clip: rect(1px, 1px, 1px, 1px);
}

/* helper class for button styles */
.btn {
  display: flex;
  align-items: center;
  width: fit-content;
  padding: 1rem;
  background-color: var(--gw-dark-blue);
  color: var(--gw-white);
  text-decoration: none;
  transition: background-color 0.6s ease-in-out;
  -webkit-transition: background-color 0.6s ease-in-out;
  -moz-transition: background-color 0.6s ease-in-out;

  &:hover {
    background-color: var(--gw-light-blue);
    color: var(--gw-white);
  }
}

body.preload .btn {
  transition: none !important;
  -webkit-transition: none !important;
  -moz-transition: none !important;
}

.left {
  width: max(33%, 23.6rem);
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  padding-inline: 2rem;
  padding-block: 1rem;
  position: relative;

  header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  #site-name {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 1.3125rem;
    line-height: 1.3;

    a {
      margin-left: 1.5rem;
      color: var(--gw-dark-blue);
      text-decoration: none;
    }
  }

  main {
    margin-top: 4rem;

    p {
      line-height: 1.35em;
    }
  }

  .metadata {
    span {
      margin: 0;
      width: fit-content;
      font-size: 1.2rem;
      font-weight: 200;
      color: var(--gw-dark-blue);
    }
  }
}

.right {
  flex: 1;
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
  background-color: var(--gw-dark-blue);
  scrollbar-gutter: stable;

  section.grid {
    display: grid;
    padding: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;

    .card {
      display: flex;
      flex-direction: column;
      margin-bottom: 0.4rem;
      min-height: 19.6rem;
      background-color: var(--gw-dark-blue);
      /* background-color: rgba(255, 255, 255, 0.05); */
      box-shadow: rgba(0,0,0,0.1) 0px 20px 25px -5px,rgba(0,0,0,0.04) 0px 10px 10px -5px;
      transition: all 0.2s ease-in;
      border: 3px double var(--gw-white);

      a.card-link {
        text-decoration: none;
      }

      .title {
        display: flex;
        flex-direction: column;
        justify-content: end;
        height: 9rem;
        position: relative;
        /* overflow: clip; */

        img#equity {
          display: none;
          box-sizing: border-box;
          width: 100%;
          height: auto;
          position: absolute;
          left: 0;
          bottom: 0;
          opacity: 0.4;
        }

        h2 {
          display: flex;
          flex-direction: column;
          justify-content: end;
          width: 100%;
          margin: 0;
          padding: 0.5rem 1rem;
          box-sizing: border-box;
          position: relative;
          z-index: 2;
          font-size: var(--font-size);
          line-height: 0.8;
          text-align: right;
          /* text-shadow: #fff -0.04rem -0.04rem 0,#fff 0.04rem -0.04rem 0,#fff -0.04rem 0.04rem 0,#fff 0.04rem 0.04rem 0; */
          display: inline-block;
          color: var(--gw-white);
          text-decoration: none;
          box-sizing: border-box;
        }

      }

      .info {
        padding: 1rem;
        color: var(--gw-white);

        span {
          color: var(--gw-buff);
          font-size: 1.2rem;
        }

        .desc {
          margin-top: 0.3rem;
          display: -webkit-box;
          font-size: 0.9rem;
          -webkit-line-clamp: 6;
          -webkit-box-orient: vertical;  
          overflow: hidden;
        }
      }

      &:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-0.7rem);
        /* box-shadow: 0 20px 30px -6px rgba(6,14,58,0.26); */
      }
    }
  }

  > .wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;
    border-left: 1px solid var(--gw-white);
    margin-left: 3px;
  }

  nav {
    height: 3.5rem;

    a {
      position: absolute;
      margin-left: -1px;
      border-bottom: 1px solid var(--gw-white);
      border-right: 1px solid var(--gw-white);
      font-size: 1.2rem;
      z-index: 4;
  
      &::before {
        padding: 0 0.3rem 0.3rem 0;
        font-size: 1rem;
        content: "⟵";
      }
    }  
  }
  .embed-replay {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    width: 100%;
    
    > replay-web-page {
      outline: 3px double var(--gw-white);
      background-color: var(--gw-white);
    }
  }
}

@media (max-width: 66.6rem) {
  .right table h3,
  .right table h3 a {
    font-size: 1.2rem;
  }
}

@media (max-width: 55.1rem) {
  html {
    overflow: auto;
  }

  body {
    flex-direction: column;
    height: unset;
    overflow: auto;

    .left {
      width: 100%;
      height: fit-content;
    }

    .right {
      max-height: 100vh;
      min-height: 100vh;

      > .wrapper {
        height: 100vh;
      }
    }
  }
}