/* =========================================================
   CUSTOMER STORIES
========================================================= */


main {
  overflow: clip;
}


section {
  scroll-margin-top: calc(var(--header-h) + 20px);
}


h1,
h3,
p {
  text-wrap: pretty;
}


/* =========================================================
   BUTTON
========================================================= */


.button {
  min-height: 44px;

  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: var(--radius);

  font-size: 12px;
  line-height: 1;
  font-weight: 600;

  cursor: pointer;

  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}


.button:active {
  transform: translateY(1px);
}


.button--terracotta {
  background: var(--redovar-terracotta);
  color: #FFFFFF;
}


.button--terracotta:hover,
.button--terracotta:focus-visible {
  background: #A83D0D;
}


/* =========================================================
   HERO
========================================================= */


.stories-hero {
  position: relative;

  width: 100%;

  min-height: 100vh;
  min-height: 100svh;

  padding-top: var(--header-h);

  overflow: hidden;

  background: #111111;
  color: #FFFFFF;

  isolation: isolate;
}


/* =========================================================
   HERO IMAGE
========================================================= */


.stories-hero-image,
.stories-hero-shade {
  position: absolute;
  inset: 0;

  pointer-events: none;
}


.stories-hero-image {
  z-index: -3;

  background-image:
    url("../../assets/images/hero.PNG");

  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;

  transform: scale(1.012);

  transition:
    transform 1400ms
    cubic-bezier(.22, 1, .36, 1);
}


body.is-stories-ready
.stories-hero-image {
  transform: scale(1);
}


/* =========================================================
   HERO SHADE
========================================================= */


.stories-hero-shade {
  z-index: -2;

  background:
    linear-gradient(
      90deg,
      rgba(7, 7, 7, .58) 0%,
      rgba(7, 7, 7, .38) 42%,
      rgba(7, 7, 7, .15) 72%,
      rgba(7, 7, 7, .12) 100%
    );
}


/* =========================================================
   HERO SHELL
========================================================= */


.stories-hero-shell {
  min-height:
    calc(100svh - var(--header-h));

  padding-top:
    clamp(72px, 7vw, 108px);

  padding-bottom:
    clamp(120px, 13vw, 190px);

  display: flex;

  align-items: center;
}


/* =========================================================
   HERO COPY
========================================================= */


.stories-hero-copy {
  width: min(100%, 760px);

  margin-inline: auto;

  margin-top: -5vh;

  text-align: center;
}


.stories-hero-copy h1 {
  margin: 0;

  max-width: 720px;

  color: #FFFFFF;

  font-size:
    clamp(40px, 4vw, 60px);

  line-height: .96;

  letter-spacing: -.052em;

  font-weight: 500;
}


.stories-hero-copy > p {
  max-width: 500px;

  margin: 22px auto 0;

  color:
    rgba(245, 245, 243, .72);

  font-size:
    clamp(15px, 1.25vw, 18px);

  line-height: 1.65;
}


/* =========================================================
   HERO ACTION
========================================================= */


.stories-hero-actions {
  margin-top: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}


/* Match the hand-lettered gradient treatment used for “disconnected”. */
.stories-hero-highlight {
  display: inline-block;

  padding: 0 .05em .06em;

  font-family: "Allura", cursive;
  font-size: 1.13em;
  line-height: .82;
  font-weight: 400;
  letter-spacing: -.02em;

  color: var(--redovar-terracotta);
  background: linear-gradient(100deg, #A83D0D 0%, var(--redovar-terracotta) 25%, #874963 47%, #4568C9 66%, var(--redovar-blue) 84%, #A83D0D 100%);
  background-size: 240% 100%;
  background-position: var(--gradient-position, 0%) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


.stories-hero-mobile-break {
  display: none;
}


/* =========================================================
   HERO ENTRANCE
========================================================= */


.stories-hero-copy > * {
  opacity: 0;

  transform:
    translateY(12px);

  transition:
    opacity 560ms ease,
    transform 720ms
    cubic-bezier(.22, 1, .36, 1);
}


body.is-stories-ready
.stories-hero-copy > * {
  opacity: 1;
  transform: none;
}


body.is-stories-ready
.stories-hero-copy > *:nth-child(1) {
  transition-delay: 60ms;
}


body.is-stories-ready
.stories-hero-copy > *:nth-child(2) {
  transition-delay: 140ms;
}


body.is-stories-ready
.stories-hero-copy > *:nth-child(3) {
  transition-delay: 220ms;
}


/* =========================================================
   STORY INDEX

   Hidden until real story cards exist.
========================================================= */


.stories-index {
  padding:
    clamp(110px, 11vw, 170px)
    0
    clamp(120px, 12vw, 190px);

  background: #FFFFFF;
  color: var(--light-text);
}


.stories-index[hidden] {
  display: none !important;
}


/* =========================================================
   STORY INDEX HEAD
========================================================= */


.stories-index-head {
  width: min(100%, 760px);

  margin-bottom:
    clamp(56px, 7vw, 100px);
}


.stories-index-label {
  margin: 0 0 18px;

  color: var(--light-soft);

  font-size: 11px;
  line-height: 1;

  font-weight: 550;

  letter-spacing: .02em;
}


.stories-index-head h2 {
  margin: 0;

  color: var(--light-text);

  font-size:
    clamp(38px, 5vw, 70px);

  line-height: .98;

  letter-spacing: -.052em;

  font-weight: 500;
}


/* =========================================================
   STORY GRID
========================================================= */


.stories-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  column-gap:
    clamp(28px, 4vw, 60px);

  row-gap:
    clamp(70px, 8vw, 120px);
}


/* =========================================================
   STORY CARD
========================================================= */


.story-card {
  min-width: 0;
}


.story-card:first-child {
  grid-column: 1 / -1;
}


.story-card-link {
  display: block;

  color: inherit;

  text-decoration: none;
}


/* =========================================================
   STORY IMAGE
========================================================= */


.story-card-media {
  position: relative;

  width: 100%;
  aspect-ratio: 4 / 3;

  overflow: hidden;

  background: #F1F1EE;
}


.story-card:first-child
.story-card-media {
  aspect-ratio: 16 / 8.4;
}


.story-card-media img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transform: scale(1);

  transition:
    transform 700ms
    cubic-bezier(.22, 1, .36, 1);
}


.story-card-link:hover
.story-card-media img,
.story-card-link:focus-visible
.story-card-media img {
  transform: scale(1.018);
}


/* =========================================================
   STORY COPY
========================================================= */


.story-card-copy {
  padding-top: 24px;
}


.story-card:first-child
.story-card-copy {
  width: min(100%, 760px);

  padding-top: 30px;
}


.story-card-name {
  margin: 0 0 12px;

  color: var(--light-soft);

  font-size: 10px;
  line-height: 1.3;

  font-weight: 550;
}


.story-card h3 {
  margin: 0;

  max-width: 680px;

  color: var(--light-text);

  font-size:
    clamp(24px, 2.8vw, 40px);

  line-height: 1.08;

  letter-spacing: -.038em;

  font-weight: 520;
}


.story-card:not(:first-child) h3 {
  font-size:
    clamp(22px, 2.1vw, 30px);
}


.story-card-summary {
  max-width: 540px;

  margin: 16px 0 0;

  color: var(--light-secondary);

  font-size: 14px;
  line-height: 1.65;
}


/* =========================================================
   READ STORY
========================================================= */


.story-card-read {
  position: relative;

  width: max-content;

  margin-top: 22px;
  padding-bottom: 6px;

  display: inline-block;

  color: var(--light-text);

  font-size: 11px;
  line-height: 1;

  font-weight: 550;
}


.story-card-read::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 100%;
  height: 1px;

  background:
    var(--redovar-terracotta);

  transform:
    scaleX(.3);

  transform-origin:
    left center;

  transition:
    transform 220ms
    cubic-bezier(.22, 1, .36, 1);
}


.story-card-link:hover
.story-card-read::after,
.story-card-link:focus-visible
.story-card-read::after {
  transform: scaleX(1);
}


/* =========================================================
   QUIET REVEAL
========================================================= */


.story-motion-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 450ms ease,
    transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.story-motion-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   RESPONSIVE
========================================================= */


@media (max-width: 900px) {

  .stories-hero-shell {
    padding-top: 82px;
    padding-bottom: 120px;

    align-items: center;
  }


  .stories-hero-copy {
    margin-top: -3vh;
  }


  .stories-hero-shade {
    background:
      linear-gradient(
        90deg,
        rgba(7, 7, 7, .58) 0%,
        rgba(7, 7, 7, .36) 64%,
        rgba(7, 7, 7, .22) 100%
      );
  }


  .stories-grid {
    grid-template-columns: 1fr;
  }


  .story-card:first-child {
    grid-column: auto;
  }


  .story-card:first-child
  .story-card-media {
    aspect-ratio: 4 / 3;
  }

}


@media (max-width: 700px) {

  .stories-hero {
    min-height: 100svh;
  }


  .stories-hero-shell {
    min-height:
      calc(100svh - var(--header-h));

    padding-top: 70px;
    padding-bottom: 100px;

    align-items: center;
  }


  .stories-hero-copy {
    width: min(100%, 560px);

    margin-top: -2vh;
  }


  .stories-hero-copy h1 {
    font-size:
      clamp(40px, 11vw, 54px);
  }


  .stories-hero-copy > p {
    max-width: 430px;

    margin-top: 18px;
  }


  .stories-hero-mobile-break {
    display: inline;
  }


  .stories-hero-actions {
    margin-top: 28px;
  }


  .stories-hero-image {
    background-position: 56% center;
  }


  .stories-hero-shade {
    background:
      linear-gradient(
        180deg,
        rgba(7, 7, 7, .16) 0%,
        rgba(7, 7, 7, .26) 34%,
        rgba(7, 7, 7, .68) 100%
      );
  }

}


@media (max-width: 500px) {

  .stories-hero-shell {
    padding-top: 60px;
    padding-bottom: 84px;
  }


  .stories-hero-copy {
    margin-top: -1vh;
  }


  .stories-hero-actions {
    align-items: center;
  }


  .stories-hero-actions .button {
    width: max-content;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */


@media (prefers-reduced-motion: reduce) {

  .stories-hero-image {
    transform: none;
    transition: none;
  }


  .stories-hero-copy > *,
  .story-motion-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }


  .story-card-media img {
    transition: none;
  }

}
