/* MapleTronics case study. Scoped to this page. */

.mt {
  overflow-x: clip;
}

.mt .study-hero h1 {
  max-width: 11em;
  font-size: clamp(2.7rem, 6.4vw, 5.35rem);
  line-height: 0.96;
}

.mt .study-section h2 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.mt-intro {
  margin-top: 2rem;
}

.mt-challenge {
  background:
    linear-gradient(180deg, var(--teal-soft) 0%, rgba(228, 243, 241, 0) 18rem),
    var(--cream);
}

.mt-practice {
  background:
    linear-gradient(180deg, rgba(184, 201, 163, 0.32), rgba(251, 247, 241, 0) 18rem),
    var(--cream);
}

.mt-learned {
  background:
    linear-gradient(180deg, rgba(248, 197, 194, 0.4), rgba(251, 247, 241, 0) 16rem),
    var(--cream);
}

.mt .split ul.mt-needs {
  color: var(--ink);
}

.mt .split__card--then ul {
  color: rgba(251, 247, 241, 0.78);
}

.mt-needs li {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mt .problem h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
}

.mt-label {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.mt-cap,
.mt-quiet {
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Browser frames, built on .browser from work.css. */

.mt-browser {
  box-shadow: 0 14px 30px rgba(60, 50, 44, 0.07);
}

.mt-browser .shot {
  background: #fff;
}

.mt-browser--hero {
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
}

.mt-browser--hero .shot img {
  max-height: none;
}

/* Laptop. */

.mt-laptop {
  width: min(50rem, 92%);
  margin: clamp(2.4rem, 5vw, 3.6rem) auto 0;
}

.mt-laptop__screen {
  padding: clamp(0.4rem, 1.1vw, 0.7rem);
  background: var(--ink);
  border-radius: 1rem 1rem 0.3rem 0.3rem;
}

.mt-laptop__screen .shot {
  border-radius: 0.3rem;
  overflow: hidden;
  background: #fff;
}

.mt-laptop__base {
  position: relative;
  width: 108%;
  height: clamp(0.65rem, 1.5vw, 0.95rem);
  margin-left: -4%;
  background: linear-gradient(180deg, #ebe3d8 0%, #d9cfc2 100%);
  border-radius: 0 0 0.9rem 0.9rem;
  box-shadow: 0 12px 24px rgba(60, 50, 44, 0.08);
}

.mt-laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16%;
  height: 40%;
  transform: translateX(-50%);
  background: #cdc2b4;
  border-radius: 0 0 0.5rem 0.5rem;
}

.mt-laptop .mt-cap {
  margin-top: 1.1rem;
  text-align: center;
}

/* Rail of website pages. Uses the [data-wt-gallery] slider in work.js. */

.mt-gallery {
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
}

.mt-gallery__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.mt-gallery__head .mt-label {
  margin: 0;
}

.mt-gallery__nav {
  display: flex;
  gap: 0.45rem;
}

.mt-gallery__nav button {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.mt-gallery__nav button:hover {
  color: var(--pink-deep);
}

.mt-gallery__nav button:disabled {
  opacity: 0.4;
  cursor: default;
  color: var(--ink);
}

.mt-rail {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8vw;
  padding: 0.4rem 8vw 1.6rem;
  cursor: grab;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.mt-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.mt-slide {
  flex: 0 0 min(38rem, 84vw);
  margin: 0;
  scroll-snap-align: center;
}

.mt-slide .mt-browser {
  width: 100%;
  margin: 0;
}

.mt-slide .shot img {
  max-height: 22rem;
  object-fit: cover;
  object-position: top center;
}

.mt-slide figcaption {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  text-align: center;
  color: var(--ink-soft);
}

/* Phones. */

.mt-group {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.mt-phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  margin-top: 0.4rem;
}

.mt-phone {
  width: 100%;
  max-width: 18.5rem;
  margin: 0;
  justify-self: center;
}

.mt-phone__body {
  position: relative;
  padding: 1.15rem 0.5rem 0.5rem;
  background: var(--ink);
  border-radius: 2rem;
  box-shadow: 0 16px 30px rgba(60, 50, 44, 0.12);
}

.mt-phone__body::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 22%;
  height: 0.3rem;
  transform: translateX(-50%);
  background: rgba(251, 247, 241, 0.22);
  border-radius: 999px;
}

.mt-phone__screen.shot {
  display: flex;
  align-items: center;
  aspect-ratio: 9 / 17;
  overflow: hidden;
  background: #eef0f2;
  border-radius: 1.5rem;
}

.mt-phone__screen img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mt-phone figcaption {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  text-align: center;
  color: var(--ink-soft);
}

/* Review tile. */

.mt-proof {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
}

.mt-tile {
  margin: 0;
}

.mt-tile .shot {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
}

.mt-proof__line {
  max-width: 16ch;
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* Impact. */

.mt-impact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 2rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
}

.mt-impact li {
  padding-top: 0.9rem;
  border-top: 2px solid var(--blush);
}

.mt-impact strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.mt-impact span {
  display: block;
  color: var(--ink-soft);
  line-height: 1.5;
}

.mt-impact__close {
  margin-top: 2.4rem;
}

.mt-back {
  margin: 2.4rem 0 0;
}

.mt-back a {
  color: var(--ink-soft);
  font-size: 0.98rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(60, 50, 44, 0.28);
}

.mt-back a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

@media (max-width: 880px) {
  .mt-impact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mt-phones {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(50% - 50vw);
    padding: 0.4rem 1.5rem 1rem;
  }

  .mt-phone {
    flex: 0 0 min(16rem, 68vw);
    scroll-snap-align: center;
  }

  .mt-proof {
    grid-template-columns: 1fr;
  }

  .mt-tile {
    max-width: 26rem;
  }
}

@media (max-width: 719px) {
  .mt .study-hero h1,
  .mt .study-section h2 {
    max-width: none;
  }

  .mt-impact {
    grid-template-columns: 1fr;
  }

  .mt-gallery__nav {
    display: none;
  }

  .mt-slide .shot img {
    max-height: 60vh;
  }

  .mt-laptop {
    width: 94%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mt .shot img {
    transition: none;
  }
}
