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

File#: _1_pre-header
Title: Pre-header
Descr: Pre-header (top) banner
Usage: codyhouse.co/license

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

  /* spacing */
  --pj6-space-xs: 0.5rem;
  --pj6-space-md: 1.25rem;
  --pj6-space-lg: 2rem;
  --pj6-space-sm: 0.75rem;

  /* typography */
  --pj6-text-sm: 0.833rem;
  --pj6-text-sm: 0.833rem;
}

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

    /* typography */
    --pj6-text-sm: 1rem;
    --pj6-text-sm: 1rem;
  }
}

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

/* component */
.pre-header {
  display: block;
  background-color: hsl(var(--pj6-color-contrast-higher-hsl));
  color: hsl(var(--pj6-color-bg-hsl));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pre-header--is-hidden {
  display: none;
}

.pre-header__close-btn {
  position: absolute;
  right: 0;
  top: calc(50% - 0.5em);
  will-change: transform;
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pre-header__close-btn:hover {
  -webkit-transform: scale(1.1);
          transform: scale(1.1);
}
.pre-header__close-btn .pre-header__icon {
  display: block;
}

a.pre-header {
  text-decoration: none;
  transition: background-color 0.2s;
}
a.pre-header:hover {
  text-decoration: underline;
  background-color: hsl(var(--pj6-color-contrast-high-hsl));
}

/* utility classes */
.pj6-text-sm {
  font-size: var(--pj6-text-sm);
}

.pj6-text-center {
  text-align: center;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.pj6-max-width-lg {
  max-width: 80rem;
}

.pj6-container {
  width: calc(100% - 2*var(--pj6-space-md));
  margin-left: auto;
  margin-right: auto;
}

.pj6-padding-y-xs {
  padding-top: var(--pj6-space-xs);
  padding-bottom: var(--pj6-space-xs);
}

.pj6-color-inherit {
  color: inherit;
}

.pj6-padding-x-lg {
  padding-left: var(--pj6-space-lg);
  padding-right: var(--pj6-space-lg);
}

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

.pj6-text-underline {
  text-decoration: underline;
}

.pj6-padding-right-lg {
  padding-right: var(--pj6-space-lg);
}
