/* -------------------------------- 

File#: _1_article-preview-v3
Title: Article Preview v3
Descr: Blog post excerpt, containing a link to the article page and a preview image animated on hover
Usage: codyhouse.co/license

-------------------------------- */

/* variables */
:root {
  /* colors */
  --au5-color-primary-hsl: 250, 84%, 54%;
  --au5-color-bg-hsl: 0, 0%, 100%;
  --au5-color-contrast-high-hsl: 230, 7%, 23%;
  --au5-color-contrast-higher-hsl: 230, 13%, 9%;
  --au5-color-contrast-lower-hsl: 240, 4%, 85%;
  --au5-color-accent-hsl: 342, 89%, 48%;

  /* spacing */
  --au5-space-md: 1.25rem;
  --au5-space-sm: 0.75rem;
  --au5-space-xs: 0.5rem;

  /* typography */
  --au5-text-xl: 1.728rem;
  --au5-text-sm: 0.833rem;
  --au5-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --au5-space-md: 2rem;
    --au5-space-sm: 1.125rem;
    --au5-space-xs: 0.75rem;

    /* typography */
    --au5-text-xl: 2.44rem;
    --au5-text-sm: 1rem;
    --au5-text-sm: 1rem;
  }
}

/* icons */
.au5-icon {
  height: var(--au5-size, 1em);
  width: var(--au5-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

/* component */
:root {
  --story-v3-image-width: 30%;
}

.story-v3 {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid hsl(var(--au5-color-contrast-lower-hsl));
  box-shadow: 0 1px 0 hsl(var(--au5-color-contrast-lower-hsl));
  transition: 0.3s;
}
.story-v3:hover .story-v3__title {
  text-decoration: underline;
}
.story-v3:hover .story-v3__icon line:nth-child(1) {
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}
.story-v3:hover .story-v3__icon line:nth-child(2) {
  -webkit-transform: rotate(-180deg);
          transform: rotate(-180deg);
}
.story-v3:hover .story-v3__icon line:nth-child(3) {
  stroke-dashoffset: 14;
}

.story-v3__icon {
  font-size: 48px;
}
.story-v3__icon line:nth-child(1),
.story-v3__icon line:nth-child(2) {
  transition: -webkit-transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.story-v3__icon line:nth-child(1) {
  -webkit-transform-origin: 42px 19px;
          transform-origin: 42px 19px;
}
.story-v3__icon line:nth-child(2) {
  -webkit-transform-origin: 42px 29px;
          transform-origin: 42px 29px;
}
.story-v3__icon line:nth-child(3) {
  stroke-dasharray: 48;
  transition: stroke-dashoffset 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.story-v3__preview-img {
  position: absolute;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  top: 50%;
  -webkit-transform: translateY(-50%) scale(0.9);
          transform: translateY(-50%) scale(0.9);
  transition: opacity 0.2s, visibility 0.2s, -webkit-transform 0.2s;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s, -webkit-transform 0.2s;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: transform;
}

.story-v3__preview-img--is-visible {
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
  opacity: 1;
  visibility: visible;
}

/* utility classes */
.au5-z-index-2 {
  z-index: 2;
}

.au5-position-relative {
  position: relative;
}

.au5-justify-end {
  justify-content: flex-end;
}

@media not all and (min-width: 64rem) {
  .au5-display\@md {
    display:none !important;
  }
}

.au5-opacity-50\% {
  opacity: 0.5;
}

.au5-color-contrast-higher {
  --au5-color-o: 1;
  color: hsla(var(--au5-color-contrast-higher-hsl), var(--au5-color-o, 1));
}

.au5-text-sm {
  font-size: var(--au5-text-sm);
}

.au5-text-xl {
  font-size: var(--au5-text-xl);
}

.au5-text-component :where(h1, h2, h3, h4) {
  line-height: var(--au5-heading-line-height, 1.2);
  margin-top: calc(var(--au5-space-md) * var(--au5-space-multiplier, 1));
  margin-bottom: calc(var(--au5-space-sm) * var(--au5-space-multiplier, 1));
}

.au5-text-component :where(p, blockquote, ul li, ol li) {
  line-height: var(--au5-body-line-height, 1.4);
}

.au5-text-component :where(ul, ol, p, blockquote, .au5-text-component__block) {
  margin-bottom: calc(var(--au5-space-sm) * var(--au5-space-multiplier, 1));
}

.au5-text-component :where(ul, ol) {
  padding-left: 1.25em;
}

.au5-text-component ul :where(ul, ol), .au5-text-component ol :where(ul, ol) {
  padding-left: 1em;
  margin-bottom: 0;
}

.au5-text-component ul {
  list-style-type: disc;
}

.au5-text-component ol {
  list-style-type: decimal;
}

.au5-text-component img {
  display: block;
  margin: 0 auto;
}

.au5-text-component figcaption {
  margin-top: calc(var(--au5-space-xs) * var(--au5-space-multiplier, 1));
  font-size: var(--au5-text-sm);
  text-align: center;}

.au5-text-component em {
  font-style: italic;
}

.au5-text-component strong {
  font-weight: bold;
}

.au5-text-component s {
  text-decoration: line-through;
}

.au5-text-component u {
  text-decoration: underline;
}

.au5-text-component mark {
  background-color: hsla(var(--au5-color-accent-hsl), 0.2);
  color: inherit;
}

.au5-text-component blockquote {
  padding-left: 1em;
  border-left: 4px solid hsl(var(--au5-color-contrast-lower-hsl));
  font-style: italic;
}

.au5-text-component hr {
  margin: calc(var(--au5-space-md) * var(--au5-space-multiplier, 1)) auto;
  background: hsl(var(--au5-color-contrast-lower-hsl));
  height: 1px;
}

.au5-text-component > *:first-child {
  margin-top: 0;
}

.au5-text-component > *:last-child {
  margin-bottom: 0;
}

.au5-text-component.au5-line-height-xs {
  --au5-heading-line-height: 1;
  --au5-body-line-height: 1.1;
}

.au5-text-component.au5-line-height-sm {
  --au5-heading-line-height: 1.1;
  --au5-body-line-height: 1.2;
}

.au5-text-component.au5-line-height-md {
  --au5-heading-line-height: 1.15;
  --au5-body-line-height: 1.4;
}

.au5-text-component.au5-line-height-lg {
  --au5-heading-line-height: 1.22;
  --au5-body-line-height: 1.58;
}

.au5-text-component.au5-line-height-xl {
  --au5-heading-line-height: 1.3;
  --au5-body-line-height: 1.72;
}

.au5-gap-md {
  gap: var(--au5-space-md);
}

.au5-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.au5-grid > * {
  min-width: 0;
  grid-column-end: span 12;
}

@media not all and (min-width: 80rem) {
  .au5-display\@lg {
    display:none !important;
  }
}

.au5-padding-y-md {
  padding-top: var(--au5-space-md);
  padding-bottom: var(--au5-space-md);
}

@media(min-width: 64rem){
  .au5-flex\@md {
    display: flex;
  }

  .au5-col-3\@md {
    grid-column-end: span 3;
  }

  .au5-col-6\@md {
    grid-column-end: span 6;
  }
}

@media(min-width: 80rem){
  .au5-col-2\@lg {
    grid-column-end: span 2;
  }

  .au5-col-4\@lg {
    grid-column-end: span 4;
  }
}