:root {
  --color-background: #FAF7F2;
  --color-text: #3E2A1E;
  --color-primary: #3D5941;
  --color-secondary: #5A7D5F;
  --color-accent: #D97642;
  --font-header: 'Chaparral Pro', serif;
  color: var(--color-text);
  background-color: var(--color-background);
  --padding-teeny-tiny: 10px;
  --padding-tiny: 25px;
  --padding-small: 50px;
  --padding-medium: 100px;
  --padding-medium-neg: -100px;
  --padding-large: 150px;
}

@font-face {
  font-family: 'Chaparral Pro';
  src: url('../fonts/ChaparralProBold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@keyframes fadeSlideInFromRight {
  from {
    opacity: 0;
    transform: translateX(-70px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeSlideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(70px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  background-color: var(--color-background) !important;
  font-size: 1.25rem;
}

header {
  max-height: 80vh;
  overflow: clip;
  &.hero {
    position: relative;
    img {
      width: 100%
    }
    h1 {
      position: absolute;
      bottom: 2rem;
      left: 2rem;
      margin: 0;
      display: block;
      font-family: var(--font-header);
      font-size: 3rem;
      max-width: 700px;
    }
  }
}

p.byline {
  font-size: 1.2rem;
  font-style: italic;
  font-weight: bold;
}

.pull-quote {
  width: 50%; /* half width of center column of text */
  padding: var(--padding-tiny);
  background: var(--color-secondary);
  color: var(--color-background);
  font-size: 1.5rem;
  font-style: italic;
  display: hidden;

  &.animate-in {
    animation-timeline: view();
    animation-range: entry 0% cover 50%;
  }
  
  &.pull-right {
    float: right;
    margin-right: var(--padding-medium-neg); /* push off to the right */
    margin-left: var(--padding-tiny);
    border-left: 4px solid var(--color-accent);
    &.animate-in {
      animation: fadeSlideInFromLeft 1.5s ease-out both;
    }
  }

  &.pull-left {
    float: left;
    margin-left: var(--padding-medium-neg); /* push off to the left */
    margin-right: var(--padding-tiny);
    border-right: 4px solid var(--color-accent);
    &.animate-in {
      animation: fadeSlideInFromRight 1.5s ease-out both;
    }
  }

  small, figcaption {
    color: var(--color-background);
    margin-bottom: 0rem;
  }
}

figure {
  &.gallery img {
    margin-bottom: var(--padding-teeny-tiny);
  }
  &.pull-quote {
    img {
      width: 100%;
    }
  }
  small, figcaption {
    display: block;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-style: normal;
  }
}

main {
  padding: 2rem 0;
}

h1 {
  background-color: var(--color-secondary);
  color: var(--color-background);
  padding: var(--padding-tiny);
  font-family: var(--font-header);
  font-size: 4rem;
}

h2 {
  font-family: var(--font-header);
  font-size: 2.5rem;

  &.animate-in {
    animation: fadeUp 0.6s ease-out both;
  }
}

.story-preview {
  border: 1px solid var(--color-secondary);
  border-radius: 5px;
  padding: var(--padding-teeny-tiny);
  margin-top: var(--padding-tiny);

  img {
    margin-bottom: 0.5rem;
  }
  h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: bold;
    font-family: var(--font-header);
  }
  p {
    margin: 0.5rem 0;
  }
  small {
    text-transform: uppercase;
    text-transform: bold;
    font-size: 0.8rem;
    font-weight: bold;
  }
}

figure {
  margin: var(--padding-teeny-tiny) 0;
  &.full-width {
    width: 100%;
    margin: var(--padding-small) 0;
  }
  &.video {
    margin: var(--padding-tiny) 0;
  }
  &.gallery {
    margin: var(--padding-tiny) 0 0 0;
  }
}

.carousel-wrapper {
  margin: var(--padding-small) 0;
  .carousel {
  }
  .carousel-cell {
    width: 66%;
    margin-right: 10px;
    background: #8C8;
    border-radius: 5px;
  }
  figcaption {
    margin-top: 50px;
    padding: 0px;
    text-align: center;
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }
}

section {
  padding-top: var(--padding-small);
}
section.smallprint {
  font-size: 0.8rem;
  padding: var(--padding-small) 0;
  font-style: italic;

  &.animate-in {
    animation: fadeUp 0.6s ease-out both;
  }
}

@media only screen and (max-width: 800px) and (orientation: portrait) {
  header{
    &.hero {
      max-height: inherit;
      h1 {
        position: relative;
        display: block;
        bottom: auto;
        left: auto;
        padding: 2rem 1rem;
        font-size: 2rem;
      }
    }
  }
  .pull-quote {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    &.pull-left,&.pull-right {
      border: none;
    }
  }
}

/* main body, scrollytelling part styles */
section.scroller {
  div.scroller-content {
    position: relative;
    padding: 0;
    max-width: 50rem; /** on a wide screen don't make text boxes full-width **/
    margin: 0 auto;
  }

  figure {
    position: sticky; /** don't move this within the bounds of the #scrolly wrapper **/
    left: 0;
    width: 100%; /** make image fill the whole screen **/
    height: 100%;
    margin: 0;
    overflow: clip; /** don't let the image be scrolled horizontally **/
  }

  figure div.wrapper {
    /** center the image in the box **/
    display: flex;
    justify-content: center;
  }

  figure img {
    height: 100%; /** make the image fill the box **/
  }

  figcaption {
    position: relative;
    top: -2.5rem;
    color: var(--color-bg);
    background-color: var(--color-background);
    display: inline-block;
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }

  .step {
    filter: drop-shadow(0px 0px 8px var(--color-text));
  }

  .step:last-child {
    margin-bottom: 0;
  }

  .step p {
    border-radius: 0.5rem;
    text-align: center;
    padding: 1rem;
    font-size: 1.5rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    margin: 0 3rem;
  }
}

footer {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: #000;
    color: #fff;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    font-size: 1rem;
    line-height: 1.5rem;
    opacity: 0.9;

    .copyright {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(250, 247, 242, 0.3);
        font-size: 0.9rem;
        opacity: 0.8;
    }

    a {
        color: var(--color-accent);
        text-decoration: underline;
    }

}

nav {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
  padding: 10px;
  font-size: 0.9rem;

  a {
    color: var(--color-background);
    text-decoration: none;
  }
}
