/* Styles embedded in the Webflow New project template. */

/** 
******************************************************
NEW TEMPLATE
******************************************************
**/

/* list  */
[data-block='rich-main-new'] > ul > li a {
  color: #556B2F;
  background-image: url(../../images/webflow/icon-arrow-blue-link.svg);
  background-position: 100%;
  background-repeat: no-repeat;
  background-size: 1.5rem;
  padding-right: 1.5rem;
  display: inline-block;
}
[data-block='rich-main-new'] > ul > li:last-child {
  margin-bottom: 0rem;
  padding-bottom: 0rem;
  border: 0rem;
}

/* Results lists use spacing between items instead of dividers inside the CMS content. */
.project-new__rich-main h2 + ul {
  gap: 1rem;
}

.project-new__rich-main h2 + ul li {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

/* Separate a Results list from a full-width image placed immediately after it. */
[data-block='rich-main-new'] > ul:has(+ figure) {
  margin-bottom: 6rem;
}

/* Hold the author-photo slot until the case receives its actual portrait. */
.project-new__review-avatar-placeholder {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #3b3e43;
}

.project-new__rich-review img.project-new__review-avatar {
  border-radius: 50%;
  object-fit: cover;
}

[data-block='rich-main-new'] > p + p {
  margin-top: 2rem;
}

  /* gaps */
[data-block='rich-main-new'] [data-dropdown-group] + figure,
[data-block='rich-main-new'] [data-dropdown-group] + .w-embed,
[data-block='rich-main-new'] > [data-dropdown-group] + p + :is(figure, .w-embed),
[data-block='rich-main-new'] > p + .w-embed,
[data-block='rich-main-new'] > p + [fs-richtext-component='review'] {
  margin-top: 6rem;
}

/* A closing paragraph after a group of steps (Bella), before the group's picture. On desktop the
   paragraph sits inside .project-new__sticky-section (rule below). */
[data-block='rich-main-new'] > [data-dropdown-group] + p {
  margin-top: 3rem;
}

/* An embed that holds only a <style> is invisible; when it closes the main content it must
   not add the 6rem above, or the gap before Other Cases grows by that much (RedPath). */
[data-block='rich-main-new'] > .w-embed:last-child:not(:has(> :not(style))) {
  margin-top: 0;
}

[data-block='rich-main-new'] .w-embed.w-iframe,
[data-block='rich-main-new'] .w-embed.w-video,
[data-block='rich-main-new'] .w-embed {
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  pointer-events: none;
}

/* A portrait About video in the left slot, beside the right About image (Upstrima, Playful Pineapple).
   Its proportion is the video's own: --about-video-ratio, height / width, 120% when not set. */
[data-block='rich-main-new'] > .project-new__about-video .project-new-video {
  padding-bottom: var(--about-video-ratio, 120%);
}

/* The Vimeo player letterboxes a portrait video by a pixel when the box is a fraction off its
   proportion; a 1% overscale keeps those dark lines out of the rounded frame. */
[data-block='rich-main-new'] > .project-new__about-video iframe {
  transform: scale(1.01);
}

@media screen and (min-width: 992px) {
  [data-block='rich-main-new'] > .project-new__about-video {
    flex: 0 0 24.5rem;
    width: 24.5rem;
    margin-right: 2rem;
    align-self: flex-start;
  }

  [data-block='rich-main-new'] > .project-new__about-video + figure {
    flex: 1;
    width: auto;
    min-width: 0;
    margin-right: 0;
  }

  [data-block='rich-main-new'] > .project-new__about-video + figure img {
    width: 100%;
  }
}

@media screen and (max-width: 991px) {
  [data-block='rich-main-new'] > .project-new__about-video + figure {
    margin-top: 0.5rem;
  }
}

[data-block='rich-main-new'] [fs-richtext-component='review'] figcaption strong br {
  display: none;
}

[data-block='rich-main-new'] figure > div {
  display: block !important;
}
[data-block='rich-main-new'] > figure + figure,
[data-block='rich-main-new'] > figure.w-richtext-align-fullwidth {
  margin-right: 0rem;
}

/* Full-width figures must span the container, as they do on the live Webflow page.
   Webflow renders their inline max-width with a doubled unit (`max-width:1312pxpx`),
   so the cap is invalid there and never applies. The CMS export carries the valid
   value, which would otherwise shrink the figure and — with margin-right pinned to
   0rem above and margin-left staying auto — push it to the right of the container. */
[data-block='rich-main-new'] figure.w-richtext-align-fullwidth,
[fs-richtext-component] figure.w-richtext-align-fullwidth {
  max-width: 100% !important;
}

[fs-richtext-component] .dropdown:first-child .dropdown-toggle {
  border: unset;
}

[fs-richtext-component^='dropdowns-'] figure + figure {
  margin-top: 0.5rem;
}
[data-block='rich-main-new'] > .project-new__numbers.is--component:first-child {
  margin-top: 0rem;
}
.w-richtext figure.w-richtext-align-floatleft {
  margin-bottom: 1rem !important;
  margin-right: 2rem !important;
}
[data-block='rich-main-new'] p:has(+ h2) {
  margin-bottom: 0;
}

.section.overflow-clip {
  z-index: 1;
  position: relative;
  overflow: clip;
}

/* New-project About section: the case metadata occupies its own right column on desktop. */
.project-new__industry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Industry comes first in the column and Services second; the 1.5rem between the groups now
   sits above the Services label instead of above Industry. */
.project-new__industry:first-child {
  margin-top: 0;
}

.project-new__industry + .opacity-40 {
  margin-top: 1.5rem;
}

/* The lead paragraph of About (its <strong>) sets at 1.4. Phones keep it at body size and
   line height (the max-width: 767px block below). The <p> needs it too, or its own 1.6 line
   box keeps the lines apart where the two sizes are equal. */
@media screen and (min-width: 768px) {
  .project-new__rich-about p:has(> strong),
  .project-new__rich-about strong {
    line-height: 1.4;
  }
}

.section.mod--project-new-about .collection__list.mod--project-new-about {
  flex-flow: column;
  align-items: flex-start;
}

.section.mod--project-new-about .collection__item.mod--project-new-about [data-button-text] {
  white-space: nowrap;
}

/* Match the FAQ circle dimensions without changing case colors or icon artwork. */
[data-dropdowns-input='dropdown'] .dropdown__icon-wrap {
  width: 2rem;
  height: 2rem;
}

/* New-project dropdowns: keep Deliverables and final media consistent across CMS image and video embeds. */
.project-new__rich-dropdown {
  font-size: 1.25rem;
  line-height: 1.6;
}

.project-new__rich-dropdown li {
  border: none;
}

.project-new__deliverables {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.project-new__deliverables h4 {
  flex: none;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.375;
}

.project-new__deliverables ul {
  flex: 1;
}

.project-new__deliverables li {
  height: 2.625rem;
}

.project-new__rich-dropdown > .project-new__dropdown-media {
  width: 100%;
  margin-top: 2rem;
}

.project-new__review {
  border-radius: .5rem;
}

@media screen and (min-width: 992px) {
  /* Project hero: preserve the existing desktop title gap and style only CMS annotation. */
  .columns__col.mod--project-new-hero.is--1 {
    gap: 1.5rem;
  }

  .branding-hero__aside {
    width: 17.68rem;
  }

  .branding-hero__lead {
    width: 100%;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #a9afc5;
  }

  .section.mod--project-new-about > .container:first-child {
    display: grid;
    grid-template-columns: 24.5rem minmax(0, 1fr) 16rem;
    gap: 3rem 2rem;
    align-items: start;
  }

  .section.mod--project-new-about .project-new__rich-about {
    display: contents;
  }

  .section.mod--project-new-about .project-new__rich-about h2 {
    grid-area: 1 / 1 / span 2;
    width: auto;
    margin: 0;
  }

  .section.mod--project-new-about .project-new__rich-about p {
    grid-column: 2;
    min-width: 0;
    max-width: none;
    margin: 0;
    font-size: 1.25rem;
  }

  .section.mod--project-new-about .project-new__services {
    grid-area: 1 / 3 / span 2;
    width: auto;
    max-width: none;
    margin: 0;
  }

  .section.mod--project-new-about .collection__list.mod--project-new-about {
    row-gap: .5rem;
  }

  .section.mod--project-new-about .collection__item.mod--project-new-about {
    height: 2.5rem;
  }

  /* New-project Other Cases: align the existing CMS card grid with the approved desktop layout. */
  .section.mod--project-new-relative {
    padding-top: 3rem;
  }

  .section.mod--project-new-relative .h2.is--secondary {
    margin-bottom: 4rem;
    text-align: center;
  }

  .section.mod--project-new-relative .ai-collection__list {
    gap: 2rem;
  }

  .section.mod--project-new-relative .post-card__title {
    font-size: 1.875rem;
    line-height: 1.3;
  }
}

@media screen and (max-width: 767px) {
  .dropdown-toggle.mod--project-new {
    min-height: 1.625rem;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1rem;
    line-height: 1.625;
  }

  .project-new__rich-dropdown {
    padding-top: .5rem;
    font-size: 1rem;
    line-height: 1.625;
  }

  .project-new__deliverables {
    flex-direction: row;
    align-items: flex-start;
    gap: .5rem;
  }

  .project-new__deliverables h4 {
    font-size: .875rem;
    line-height: 2rem;
  }

  .project-new__deliverables ul {
    flex-flow: column;
    gap: .25rem;
  }

  .project-new__deliverables li {
    height: 2rem;
    padding-left: 2rem !important;
    padding-right: 1rem !important;
    font-size: .75rem !important;
  }

  .project-new__rich-dropdown ul {
    align-items: flex-start;
  }

  .project-new__rich-dropdown li {
    justify-content: flex-start;
  }

  .project-new__rich-dropdown > .project-new__dropdown-media {
    margin-top: 1.5rem;
  }

  .project-new-hero__logo-wrap {
    gap: 1rem;
  }

  .columns.mod--project-new-hero {
    gap: 1.5rem;
  }

  .branding-hero__aside,
  .branding-hero__lead {
    width: 100%;
  }

  .branding-hero__lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, .6);
  }

  .section.mod--project-new-about {
    padding-top: 3rem;
  }

  .project-new__rich-about,
  .project-new__rich-about strong {
    font-size: 1rem;
    line-height: 1.6;
  }

  .project-new__rich-about h2 {
    line-height: 1.2;
  }

  .section.mod--project-new-about .project-new__services .opacity-40,
  .section.mod--project-new-about .collection__item.mod--project-new-about {
    font-size: .875rem;
    line-height: 1.6;
  }

  .project-new__rich-main h2 {
    line-height: 1.2;
  }

  .project-new__rich-main h2 + ul li {
    font-size: 1rem;
    background-position: 0 .25rem;
  }

  .project-new__rich-main h2 + ul {
    gap: .75rem;
  }

  /* New-project Other Cases: preserve the current card content and adjust only the approved mobile spacing. */
  .section.mod--project-new-relative {
    padding-top: 1.5rem;
    padding-bottom: 3.125rem;
  }

  .section.mod--project-new-relative .h2.is--secondary {
    margin-bottom: 2.5rem;
    text-align: center;
  }

  .section.mod--project-new-relative .ai-collection__list {
    row-gap: 2.625rem;
  }

  .section.mod--project-new-relative .ai-card__img-link {
    height: 10.688rem;
    margin-bottom: 1rem;
  }

  .section.mod--project-new-relative .ai-card__tags-wrap {
    font-size: .625rem;
  }

  .section.mod--project-new-relative .post-card__title {
    font-size: 1rem;
    line-height: 1.3;
  }
}

/* project-new__rich-numbers css  */
.project-new__rich-numbers ul {
  grid-column-gap: 2rem !important;
  grid-row-gap: 2rem !important;
  flex-flow: initial !important;
  width: auto !important;
  max-width: none !important;
  margin-left: 0rem !important;
  margin-right: 0rem !important;
}
.project-new__rich-numbers ul li {
  background-image: none !important;
  margin-bottom: 0;
  padding-left: 2rem;
  font-size: inherit !important;
}

/*  project-new__rich-dropdown */
.project-new__rich-dropdown ul,
.project-new__rich-approach ul {
  width: auto !important;
  max-width: none !important;
  margin-left: 0rem !important;
  margin-right: 0rem !important;
}
.project-new__rich-approach ul li {
  background-image: none !important;
}

.project-new__rich-main .project-new__rich-approach li {
  border-bottom: 0;
}

/* numbers cards with icons */
[data-rich-icon-numbers] figure {
  display: none !important;
}
.data-numbers__wrap strong {
  padding: 0rem !important;
  border: none !important;
  margin: 0 !important;
}
/** 
******************************************************
Responsive
******************************************************
**/
@media screen and (min-width: 992px) {
  .project-new__sticky-section {
    grid-template-columns: 24.5rem minmax(0, 1fr);
    column-gap: 2rem;
    flex: 0 0 100%;
    width: 100%;
    margin-top: 6rem;
    display: grid;
  }

  .project-new__sticky-section > h3 {
    grid-column: 1;
    grid-row: 1 / span var(--project-new-sticky-row-span);
    align-self: start;
    height: auto;
    margin: 0;
    padding-right: 0;
    position: sticky;
    top: 5rem;
  }

  .project-new__sticky-section > p,
  .project-new__sticky-section > .project-new__drops {
    grid-column: 2;
  }

  .project-new__sticky-section > p {
    max-width: 48.5rem;
    margin: 0 7rem 0 0;
  }

  .project-new__sticky-section > .project-new__drops {
    max-width: 55.5rem;
    margin: 3rem 0 -1rem;
  }

  .project-new__sticky-section > .project-new__drops ~ p {
    margin-top: 3rem;
  }

  .project-new__sticky-section + figure,
  .project-new__sticky-section + .w-embed {
    margin-top: 6rem;
  }

  [data-block='rich-main-new'] > figure:not(.w-richtext-align-fullwidth) + figure,
  [data-block='rich-main-new'] > figure:not(.w-richtext-align-fullwidth) + .w-iframe {
    width: auto;
    flex: 1;
  }
  [data-block='rich-main-new']:first-of-type > p:first-of-type + figure {
    margin-top: 3rem;
  }
  [data-block='rich-main-new'] > .project-new__numbers.is--component:first-child {
    margin-top: 1rem;
    margin-bottom: 6rem;
  }

  .collection__item.mod--project-new-about:has(a:hover) [data-button-text] {
    color: #ffffff;
  }
  .collection__item.mod--project-new-about:has(a:hover)  {
    background-color: #10140a;
  }
}

@media screen and (max-width: 991px) {
  [data-block='rich-main-new'] > ul:has(+ figure) {
    margin-bottom: 3rem;
  }

  .dropdown-toggle.mod--project-new {
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  [data-block='rich-main-new'] > p + p {
    margin-top: 1.5rem;
  }

  [data-block='rich-main-new'] [data-dropdown-group] + figure,
  [data-block='rich-main-new'] [data-dropdown-group] + .w-embed,
  [data-block='rich-main-new'] > [data-dropdown-group] + p + :is(figure, .w-embed),
  [data-block='rich-main-new'] > p + .w-embed,
  [data-block='rich-main-new'] > p + [fs-richtext-component='review'] {
    margin-top: 3rem;
  }

  [data-block='rich-main-new'] > [data-dropdown-group] + p {
    margin-top: 1.5rem;
  }

  [data-block='rich-main-new'] > figure + figure,
  [data-block='rich-main-new'] > figure + .w-iframe {
    margin-top: 0.5rem;
  }

  .project-new__rich-numbers ul {
    grid-column-gap: 1rem !important;
    grid-row-gap: 1rem !important;
  }

  .project-new__rich-numbers ul li {
    min-height: 14rem !important;
    padding: 1.5rem !important;
  }

  .project-new__rich-dropdown ul {
    grid-column-gap: 0.25rem;
    grid-row-gap: 0.25rem;
  }
  .project-new__rich-approach ul {
    grid-column-gap: 0.5rem;
    grid-row-gap: 0.5rem;
  }

  .project-new__rich-dropdown ul li {
    padding-left: 2.5rem !important;
    font-size: 1rem !important;
  }
  .project-new__rich-approach ul li {
    padding-left: 0.75rem !important;
    font-size: 1rem !important;
  }
}

@media screen and (max-width: 479px) {
  .project-new__review-avatar-placeholder {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }

  [data-block='rich-main-new'] > ul > li a {
  background-size: 1.25rem;
  padding-right: 1.25rem;
}
  
  .project-new__rich-numbers ul {
    grid-column-gap: 0.5rem !important;
    grid-row-gap: 0.5rem !important;
  }

  .project-new__rich-numbers ul li {
    min-height: 10.5rem !important;
  }

  .project-new__rich-dropdown ul li {
    padding-left: 1.8rem !important;
    padding-right: 1rem !important;
    font-size: 0.75rem !important;
  }
  .project-new__rich-approach ul li {
    padding-left: 0.4rem !important;
    font-size: 0.75rem !important;
  }
}

/* Video loader spinner, embedded in the hero media block. */

[data-spinner-circle='true'] {
    transform-origin: 50% 50%;
    stroke-linecap: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    stroke-width: 2px;

    animation:
      spinner-rotate 2s linear 0.25s infinite,
      spinner-dash 1.5s ease-in-out 0.25s infinite;
  }

  /* Paused once the hero media has loaded and covers it, and while the block is off screen
     (js/global/main.js): its stroke-dasharray animation repaints every frame. BACKLOG #78. */
  .video-loader.is--paused [data-spinner-circle='true'] {
    animation-play-state: paused;
  }

  [data-spinner-trace='true'] {
    stroke-opacity: 0.2;
    stroke-width: 2px;
  }

  @keyframes spinner-rotate {
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes spinner-dash {
    0% {
      stroke-dasharray: 1, 200;
      stroke-dashoffset: 0;
    }

    50% {
      stroke-dasharray: 89, 200;
      stroke-dashoffset: -35px;
    }

    100% {
      stroke-dasharray: 89, 200;
      stroke-dashoffset: -135px;
    }
  }
