/**
 * Applied Cases page.
 * Structure and behavior live in the Synapser Site plugin.
 */

.front-page-content > .entry-content > .syn-cases-hero,
.front-page-content > .entry-content > .syn-case,
.entry-content > .syn-cases-hero,
.entry-content > .syn-case {
  width: 100%;
  max-width: none;
  margin: 0;
}

.entry-content > .syn-cases-hero + .syn-case,
.entry-content > .syn-case + .syn-case,
.entry-content > .syn-case + .syn-context-cta {
  margin-block-start: 0;
}

.syn-cases-hero,
.syn-case {
  background: var(--color-deep-graphite);
  color: var(--color-text-inverse);
}

.syn-cases-hero {
  position: relative;
  min-height: clamp(26.5rem, 28vw, 31rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 73% 28%, rgb(227 167 111 / 8%), transparent 31%),
    var(--color-surface-dark-raised);
  isolation: isolate;
}

.syn-cases-hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgb(55 50 60 / 76%) 0%, rgb(55 50 60 / 58%) 38%, rgb(55 50 60 / 16%) 70%, transparent 100%);
  content: "";
  pointer-events: none;
}

.syn-cases-hero__fluid {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  pointer-events: none;
}

.syn-cases-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--width-wide));
  min-height: inherit;
  grid-template-columns: minmax(0, 0.94fr) minmax(28rem, 1.06fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  margin-inline: auto;
  padding-block: clamp(2.75rem, 3.2vw, 4rem);
}

.syn-cases-hero__copy {
  position: relative;
  z-index: 2;
  max-width: 35rem;
}

.syn-cases__eyebrow,
.syn-case__eyebrow {
  margin: 0;
  color: var(--color-light-copper);
  font-family: var(--font-family-heading);
  font-size: clamp(0.86rem, 0.78rem + 0.22vw, 1.04rem);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.syn-cases-hero h1 {
  max-width: 34rem;
  margin: var(--space-md) 0 0;
  color: var(--color-bone);
  font-family: var(--font-family-heading);
  font-size: clamp(2.25rem, 3.15vw, 3.4rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.02;
  letter-spacing: var(--letter-spacing-tight);
}

.syn-cases-hero h1 strong {
  color: var(--color-orange);
  font-weight: inherit;
}

.syn-cases-hero__suffix {
  display: block;
}

.syn-cases-hero__intro {
  max-width: 34rem;
  margin: var(--space-xl) 0 0;
  color: var(--color-text-inverse-muted);
  font-size: var(--font-size-sm);
  line-height: 1.42;
}

.syn-cases-hero__chart {
  position: relative;
  z-index: 2;
  width: min(100%, 38rem);
  margin-inline: auto;
}

.syn-cases-hero__chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.syn-cases-hero__axes path {
  fill: none;
  stroke: rgb(200 127 74 / 72%);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.syn-cases-hero__area {
  fill: url("#syn-cases-fill");
  opacity: 0.78;
}

.syn-cases-hero__line {
  fill: none;
  stroke: url("#syn-cases-line");
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

.syn-cases-hero__glow {
  fill: var(--color-orange);
  filter: url("#syn-cases-glow");
  opacity: 0.5;
}

.syn-cases-hero__dot {
  fill: var(--color-orange);
  stroke: rgb(255 255 255 / 16%);
  stroke-width: 1;
}

.syn-case {
  position: relative;
  display: grid;
  min-height: clamp(24rem, 28vw, 30rem);
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.syn-case__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 5vw, 5rem);
}

.syn-case--image-right .syn-case__copy {
  grid-column: 1;
  padding-right: clamp(2rem, 5vw, 5rem);
  padding-left: max(var(--page-gutter), calc((100vw - var(--width-wide)) / 2));
}

.syn-case--image-left .syn-case__copy {
  grid-column: 2;
  padding-right: max(var(--page-gutter), calc((100vw - var(--width-wide)) / 2));
  padding-left: clamp(2rem, 5vw, 5rem);
}

.syn-case h2 {
  max-width: 31rem;
  margin: clamp(1.15rem, 1.7vw, 1.75rem) 0 0;
  color: var(--color-bone);
  font-family: var(--font-family-heading);
  font-size: clamp(2rem, 2.75vw, 3rem);
  font-weight: var(--font-weight-semibold);
  line-height: 1.08;
  letter-spacing: var(--letter-spacing-tight);
}

.syn-case__eyebrow {
  align-self: flex-start;
  padding: 0.48rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgb(251 249 246 / 5%);
  color: var(--color-orange);
  text-transform: none;
}

.syn-case__text {
  max-width: 32rem;
  margin-top: clamp(1.5rem, 2.5vw, 2.4rem);
  color: var(--color-text-inverse-muted);
  font-size: var(--font-size-sm);
  line-height: 1.52;
}

.syn-case__text > :first-child {
  margin-top: 0;
}

.syn-case__text > :last-child {
  margin-bottom: 0;
}

.syn-case__media {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  margin: 0;
  background:
    radial-gradient(circle at 50% 35%, rgb(227 167 111 / 13%), transparent 48%),
    var(--color-surface-dark-raised);
}

.syn-case--image-right .syn-case__media {
  grid-column: 2;
}

.syn-case--image-left .syn-case__media {
  grid-column: 1;
  grid-row: 1;
}

.syn-case__image {
  position: absolute;
  top: -18%;
  left: -3%;
  width: 106%;
  max-width: none;
  height: 136%;
  object-fit: cover;
  transform: translate3d(0, var(--cases-parallax, 0px), 0) scale(1.035);
  transform-origin: center;
  will-change: transform;
}

.syn-case__media.is-empty::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 42%, rgb(227 167 111 / 9%) 42% 43%, transparent 43% 57%, rgb(227 167 111 / 7%) 57% 58%, transparent 58%),
    radial-gradient(circle at 50% 50%, rgb(227 167 111 / 10%), transparent 45%);
  content: "";
}

.syn-cases-motion-ready .syn-cases-hero__copy,
.syn-cases-motion-ready .syn-case [data-cases-copy] {
  opacity: 0;
  transition:
    opacity 720ms var(--ease-emphasized),
    transform 780ms var(--ease-emphasized);
  transition-delay: 0ms;
  will-change: opacity, transform;
}

.syn-cases-motion-ready .syn-cases-hero__copy {
  transform: translate3d(-2.25rem, 0, 0);
}

.syn-cases-motion-ready .syn-case--image-right [data-cases-copy] {
  transform: translate3d(-3.5rem, 0, 0);
}

.syn-cases-motion-ready .syn-case--image-left [data-cases-copy] {
  transform: translate3d(3.5rem, 0, 0);
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__copy,
.syn-cases-motion-ready .syn-case [data-cases-copy].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.syn-cases-motion-ready .syn-case [data-cases-copy].is-visible {
  transition-delay: calc(var(--cases-index, 0) * 90ms);
}

.syn-cases-motion-ready .syn-cases-hero__axes,
.syn-cases-motion-ready .syn-cases-hero__area,
.syn-cases-motion-ready .syn-cases-hero__dot,
.syn-cases-motion-ready .syn-cases-hero__glow {
  opacity: 0;
}

.syn-cases-motion-ready .syn-cases-hero__line {
  stroke-dashoffset: 1;
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__axes {
  animation: syn-cases-axes-in 620ms var(--ease-emphasized) 260ms both;
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__area {
  animation: syn-cases-area-in 720ms var(--ease-emphasized) 1.42s both;
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__line {
  animation: syn-cases-draw 1.45s cubic-bezier(0.42, 0, 0.18, 1) 760ms both;
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__glow {
  animation:
    syn-cases-dot-in 300ms var(--ease-emphasized) 2.12s both,
    syn-cases-glow-pulse 5.2s ease-in-out 2.42s infinite;
}

.syn-cases-motion-ready .syn-cases-hero.is-visible .syn-cases-hero__dot {
  animation:
    syn-cases-dot-in 300ms var(--ease-emphasized) 2.12s both,
    syn-cases-dot-pulse 5.2s ease-in-out 2.42s infinite;
}

@keyframes syn-cases-axes-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes syn-cases-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes syn-cases-area-in {
  from { opacity: 0; }
  to { opacity: 0.78; }
}

@keyframes syn-cases-dot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes syn-cases-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

@keyframes syn-cases-glow-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.58; }
}

@media (max-width: 760px) {
  .syn-cases-hero {
    min-height: clamp(42rem, 172vw, 49rem);
  }

  .syn-cases-hero::after {
    background: linear-gradient(180deg, rgb(55 50 60 / 78%) 0%, rgb(55 50 60 / 52%) 47%, rgb(55 50 60 / 5%) 100%);
  }

  .syn-cases-hero__inner {
    display: block;
    width: 100%;
    padding: clamp(3rem, 12vw, 4.5rem) var(--page-gutter-mobile) 1rem;
  }

  .syn-cases-hero__copy {
    max-width: none;
  }

  .syn-cases__eyebrow {
    font-size: 0.94rem;
  }

  .syn-cases-hero h1 {
    max-width: 23rem;
    margin-top: 1rem;
    font-size: clamp(2.45rem, 11.1vw, 3.2rem);
    line-height: 1.03;
  }

  .syn-cases-hero h1 span:first-child,
  .syn-cases-hero h1 strong {
    display: inline;
  }

  .syn-cases-hero__suffix {
    display: block;
  }

  .syn-cases-hero__intro {
    max-width: 23rem;
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .syn-cases-hero__chart {
    position: absolute;
    right: -7%;
    bottom: 1rem;
    left: -7%;
    width: auto;
    margin: 0;
  }

  .syn-case {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .syn-case--image-right .syn-case__copy,
  .syn-case--image-left .syn-case__copy {
    order: 1;
    padding: clamp(2.75rem, 12vw, 4rem) var(--page-gutter);
  }

  .syn-case h2 {
    max-width: 23rem;
    margin-top: 1.8rem;
    font-size: clamp(2rem, 8.5vw, 2.55rem);
    line-height: 1.08;
  }

  .syn-case__eyebrow {
    font-size: 0.88rem;
  }

  .syn-case__text {
    max-width: 24rem;
    margin-top: 2rem;
    font-size: 1rem;
    line-height: 1.48;
  }

  .syn-case--image-right .syn-case__media,
  .syn-case--image-left .syn-case__media {
    order: 2;
    width: 100%;
    min-height: clamp(22rem, 94vw, 27rem);
  }

  .syn-case__image {
    top: -25%;
    left: -4%;
    width: 108%;
    height: 150%;
    transform: translate3d(0, var(--cases-parallax, 0px), 0) scale(1.045);
  }

  .syn-cases-motion-ready .syn-case--image-left [data-cases-copy],
  .syn-cases-motion-ready .syn-case--image-right [data-cases-copy] {
    transform: translate3d(-2.5rem, 0, 0);
  }

  .syn-cases-motion-ready .syn-case [data-cases-copy].is-visible {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .syn-cases-hero__line {
    stroke-dashoffset: 0 !important;
  }

  .syn-cases-hero__axes,
  .syn-cases-hero__area,
  .syn-cases-hero__dot,
  .syn-cases-hero__glow,
  .syn-cases-hero__copy,
  .syn-case [data-cases-copy] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .syn-case__image {
    transform: scale(1.035) !important;
  }
}

/* Keep the Gutenberg preview useful while animations are inactive there. */
.editor-styles-wrapper .syn-cases-hero,
.editor-styles-wrapper .syn-case {
  width: 100%;
  max-width: none;
}

.editor-styles-wrapper .syn-case {
  min-height: 28rem;
}
