:root {
  --skills-badge-scale-factor: 1.4;
}

body {
  background-color: var(--paper);
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap; 
  width: 1px;
  color: var(--ink);
  background-color: var(--paper);
}

.hidden {
  overflow: hidden;
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.retracted {
  transform: translateX(-30%);
  opacity: 0;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 34px 0;
  /* mix-blend-mode: difference; */
}

header nav .breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
}

header nav .breadcrumbs .backlink.home {
  padding: 10px 11px 7px 11px;
  margin: 0 -11px;
  width: max-content;
  transition: 0.3s;
}

header nav .breadcrumbs .backlink.home img {
  width: 18px;
  transition: filter 0.3s;
}

header nav .breadcrumbs .backlink.home img.inverted {
  filter: invert(1);
}

header nav .breadcrumbs .caret {
  content: "";
  background-color: #6F49B0;
  -webkit-mask-image: url("../images/icon-caret.svg");
  mask-image: var(--caret-svg);
  display: inline-block;
  mask-repeat: no-repeat;
  mask-size: auto;
  width: 13px;
  height: 7px;
  transform: rotate(-90deg);
  transition: 0.15s;
}

header nav .breadcrumbs .case-study-logo {
  transition: 0.15s;
}

main {
  contain: paint;
  transition: 0.3s;
}

section {
  min-height: 80vh;
  padding-top: 8rem;
  padding-bottom: 8rem;
}

section.tan {
  background-color: var(--silcrow-000);
}

section.paper {
  background-color: var(--paper);
}

section.dagger {
  background-color: var(--dagger-100);
}

section.cta {
  background-color: var(--double-dagger-100);
}

.mode-switcher {
  display: grid;
  grid-template-columns: auto auto auto;
  
  position: fixed;
  bottom: 35px;
  left: 50%;
  
  transform: translateX(-50%);
  
  background-color: var(--paper);
  padding: 14px 10px 10px 10px;
  border-radius: 8px;
  box-shadow: 0px 11px 14px rgba(63, 49, 42, 0.09);
  z-index: 1000;
  transition: 0.3s;  
}

.mode-switcher.retracted {
  transform: translate(-50%, 50px);
  opacity: 0;
}
  
.mode-switcher .tab {
  padding: 10px;
}

.mode-switcher .tab .active-area {
  position: relative;
}

.mode-switcher .tab .active-area .active-indicator,
.mode-switcher .tab .active-area .progress-indicator {
  height: 2px;
}

.mode-switcher .tab .active-area .active-indicator {
  position: absolute;
  background-color: var(--silcrow-300);
  top: -6px;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s;
}

.mode-switcher .tab.selected {
  color: var(--silcrow-text);
}

.mode-switcher .tab.selected .active-area .active-indicator {
  opacity: 1;
}

.mode-switcher .tab .active-area .active-indicator .progress-indicator {
  background-color: var(--silcrow);
  width: 100%;
  transform-origin: top left;
}

.mode-switcher .divider {
  content:"/";
  color: var(--silcrow-text);
  opacity: 0.4;
  padding: 10px 0;
  cursor: default;
}

.banner {
  height: 110vh;
  min-height: 760px;
  contain: paint;
  padding-bottom: 450px;
  position: relative;
}

.banner.hidden {
  display: none;
}

.banner .scrollTarget {
  position: absolute;
  left: 50%;
  bottom: 270px;
}

.intro {
  position: relative;
  padding-top: 180px;
}

.intro .skills-badge {
  width: calc(108px * var(--skills-badge-scale-factor));
  height: calc(88px * var(--skills-badge-scale-factor));
  mask-repeat: no-repeat;
  background-repeat: no-repeat;
  position: absolute;
  transition: opacity 0.08s;
}

.intro h2 {
  margin-bottom: 0.3em;
}

.diagram {
  position: relative;
  height: 1080px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.diagram .info {
  position: absolute;
  top: 0;
  z-index: 10;
  height: 100%;  
  padding-top: 25vh;
  padding-bottom: 33vh;
}

.diagram .info-card {
  border-radius: 20px;
  box-shadow: 0px 11px 14px rgba(63, 49, 42, 0.09);
  padding: 24px;
  position: relative;
}

.diagram .info-card .dropcap, .diagram .info-card p::before {
  font-family: Dropcaps, Times New Roman Bold, serif;
  float: left;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 0.6;
  margin: 0.4em 0.1em 0.07em 0;
  padding: 0.1em 0.1em 0.1em 0;
}

.diagram .info-card p::before {
  text-shadow: -1px 1px 0 var(--silcrow-text), 1px 1px 0 var(--silcrow-text), 1px -1px 0 var(--silcrow-text), -1px -1px 0 var(--silcrow-text);
}

.diagram .info-card p:first-child {
  position: relative;
}

.diagram .info-card p:first-child::before {
  content: attr(data-dropcap);
  position: absolute;
  top: 0;
  left: 0;
  margin-top: 0.2em;
}

.dropcap:before,
.dropcap:after {
  content: "";
  display: block;
}

.dropcap:before {
  margin-top: -0.2em;
}

.dropcap:after {
  margin-bottom: -0.15em;
}

.tan .info-card p:first-child::before {
  color: var(--paper);  
}

.paper .info-card p:first-child::before {
  color: var(--silcrow-050);
}

.dropcap {
  color: var(--silcrow-text);
}

.tan .info-card {
  background-color: var(--paper);
}

.paper .info-card {
  background-color: var(--silcrow-050);
}

.diagram .illustration {
  position: sticky;  
  width: 100%;
  top: 25%;
  z-index: 0;
}

.testimonial figure blockquote .quotemark {
  content: "";
  background-color: var(--silcrow-500);
  -webkit-mask-image: url("../images/icon-testimonial-quotemark.svg");
  mask-image: var(--testimonial-quotemark-svg);
  position: absolute;
  mask-repeat: no-repeat;
  mask-size: 15px 11px;
  width: 15px;
  height: 11px;
}

.testimonial figure blockquote .quotemark.open { 
  transform: translate(-140%, 30%);
}

.testimonial figure blockquote .quotemark.close { 
  transform: translate(40%, 30%) rotate(180deg);
}

.testimonial.reversed figure .feature-text {
  color: var(--paper);
}

.testimonial figure figcaption {
  border-top: 1px solid var(--asterisk);
  padding-top: 20px;
}

.summary h2 {
  margin-bottom: 1.5rem;
}

.summary h3 {
  margin-top: 2em;
}

.summary .credits ul li {
  padding: 1em 0;
  border-top: 1px solid var(--ink-100);
  display: flex;
  justify-content: space-between;
}

.summary .credits ul li .role {
  padding: 3px;
}

.summary .credits ul li:last-child {
  border-bottom: 1px solid var(--ink-100);
}

.summary .credits ul li .name {
  font-style: italic;
}

.cta {
  min-height: unset;
  align-items: center;
  cursor: pointer;
}

.cta .cta-icon-container {
  background-image: url("../images/icon-gallery.svg");
  width: 166px;
  height: 70px;
  background-repeat: no-repeat;
  margin-top: 2rem;
}

.cta h3 {
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1;
}

.cta h3::after {
  content: "";
  background-color: var(--double-dagger);
  -webkit-mask-image: url("../images/icon-arrow-right.svg");
  mask-image: var(--arrow-svg);
  display: inline-block;
  mask-repeat: no-repeat;
  mask-size: auto;
  width: 28px;
  height: 16px;
  margin-left: 0.4em;
}

.cta.show-main h3 {
  position: relative;
}

.cta.show-main h3::after {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(180deg) translate(25%, 150%);
}

.gallery {
  transition: 0.3s;
}

.gallery .image-container {
  padding-top: 7rem;
  padding-bottom: 3rem;
}

.gallery .image-container picture img {
  border-radius: 20px;
  box-shadow:
    0px 5.3px 6.8px rgba(9, 24, 51, 0.024),
    0px 17.6px 22.1px rgba(9, 24, 51, 0.036),
    0px 79px 118px rgba(9, 24, 51, 0.06);
}

/* .gallery.hidden {
  transform: translateX(100%);
}

main.hidden {
  transform: translateX(-100%);
} */

footer {
  padding: 52px 0;
}

footer.tan {
  background-color: var(--silcrow-000);
}

footer .caret {
  content: "";
  background-color: var(--silcrow);
  -webkit-mask-image: url("../images/icon-caret.svg");
  mask-image: var(--caret-svg);
  display: inline-block;
  mask-repeat: no-repeat;
  mask-size: auto;
  width: 9px;
  height: 5px;
  margin-left: 6px;
  margin-bottom: 1px;
  transition: 0.3s ease-in-out;
  transform: rotate(-90deg);
}

footer nav {
  margin-bottom: 20px;
}

footer nav .backlink {
  padding: 8px;
  margin-right: 12px;
}

footer nav .backlink:first-child {
  padding-left: 0px;
}

footer nav .backlink:last-child {
  margin-right: 0px;
}

footer .details {
  border-top: 1px solid var(--ink-100);
  padding-top: 24px;
}

footer .details .contact {
  padding: 12px 0;
}

@media (min-width: 640px) {
  
  :root {
    --skills-badge-scale-factor: 1.6;
  }
  
  .diagram {
    padding-top: 250px;
    padding-bottom: 140px;
  }
  
  .diagram .info {
    padding-top: 80px; 
    padding-bottom: 80px;
  }
  
  .diagram .info-card {
    padding: 30px;
  }
  
  .cta.show-main h3::after {
    transform: scaleX(-100%) translate(100%, 0.2em);
    transform-origin: center left;
  }
  
  footer {
    padding: 80px 0 90px 0;
  }
  
  footer nav {
    margin-bottom: 20px;
  }
  
  footer .details {
    padding-top: 8px;
  }
    
  footer .details .contact {
    margin-bottom: 3px;
  }
  
}

@media (min-width: 800px) {
  
  .diagram {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  
  .summary h3 {
    margin-top: 4em;
    margin-bottom: 2em;
  }
  
  .cta .cta-icon-container {
    margin: 0;
  }
  
}

@media (min-width: 900px) {

  .mode-switcher {
    bottom: unset;
    top: 40%;
    left: 0;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: top left;
    border-radius: 0 0 8px 8px;
    padding: 18px 20px 14px 20px;
  }
  
  .mode-switcher.retracted {
    transform: rotate(-90deg) translate(-50%, -50px);
    opacity: 0;
  }
  
  .mode-switcher .tab.show-main {
    order: 3;
  }
  
  .mode-switcher .divider {
    order: 2;
  }
  
  .mode-switcher .tab.show-gallery {
    order: 1;
  }
  
  .mode-switcher .tab {
    cursor: pointer;
  }
  
  .mode-switcher .tab.selected {
    pointer-events: none;
  }
  
  .mode-switcher .tab .active-area .active-indicator .progress-indicator {
    transform-origin: top right;
  }
  
  header nav .breadcrumbs {
    margin-left: 16px;
  }
  
  section {
    min-height: 100vh;
  }
  
  .diagram {
    z-index: -1;
    padding-top: 20vw;
    padding-bottom: 80px;
  }
  
  .diagram .info {
    padding-top: 10vw;
  }
  
  .summary h2 {
    border-top: 1px solid var(--ink-100);
    padding-top: 20px;
  }
  
  .summary .credits ul li {
    padding: 1.35em 0;
  }
  
  .cta h3::after {
    width: 40px;
    height: 24px;
    margin-bottom: -0.1em;
  }
  
  footer {
    padding: 80px 0;
  }
  
  footer nav {
    margin-bottom: 0;
  }
  
  footer .details {
    border-top: none;
    padding: 0;
  }
  
}

@media (min-width: 1194px) {
  
  .intro {
    padding-top: 50px;
  }

  .intro .skills-badge.user-flow {
    top: 18px;
    left: -186px;
  }
  
  .diagram .info-card {
    padding: 40px;
  }
  
  .diagram .info {
    padding-bottom: 140px;
  }
  
  .cta .cta-icon-container {
    width: 133px;
  }
  
}

@media (min-width: 1920px) {
  
  :root {
    --skills-badge-scale-factor: 2;
  }
  
  header nav .breadcrumbs {
    margin-left: 20px;
    gap: 20px;
  }
  
  header nav .backlink.home {
    grid-column: 3 / span 1;
  }
  
  .mode-switcher {
    padding: 26px 28px 22px 28px;
  }
  
  .banner .scrollTarget {
    bottom: 320px;
  }
  
  .diagram {
    padding-top: 200px;
    padding-bottom: 200px;
  }
  
  .diagram .info {
    padding-top: 200px;
    padding-bottom: 390px;
  }
  
  .diagram .info-card {
    padding: 50px;
  }
  
  .testimonial figure blockquote .quotemark {
    mask-size: 31px 23px;
    width: 31px;
    height: 23px;
  }
  
  .summary {
    padding-top: 13rem;
  }
  
  .summary h3 {
    margin-top: 6em;
  }
  
  .cta .cta-icon-container {
    width: 166px;
  }

  footer {
    padding: 90px 0;
  }
  
}