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

.cy {
  overflow-x: clip;
}

.cy .study-hero h1 {
  max-width: 11em;
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  line-height: 0.96;
}

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

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

.cy .study-copy a {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--blush);
}

.cy .study-copy a:hover {
  color: var(--pink-deep);
  border-bottom-color: var(--pink);
}

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

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

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

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

.cy-cap {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

/* The model. The largest figure on the page. */

.cy-model__figure {
  width: min(52rem, 100%);
  margin: clamp(2rem, 4vw, 3rem) auto 0;
}

.cy-model__figure .shot {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

.cy-model__figure .shot img {
  width: 100%;
  height: auto;
  max-height: none;
}

/* Blog, in the shared browser frame, kept a little smaller than the model. */

.cy-browser {
  width: min(46rem, calc(100% - 2rem));
  margin-top: clamp(2.2rem, 5vw, 3.2rem);
}

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

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

.cy-browser .cy-cap {
  margin: 0.9rem 0 1.1rem;
}

/* Social posts on a laptop. Same slideshow pattern as the brand study, modest. */

.cy-feed {
  width: min(34rem, calc(100% - 2rem));
  margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
}

.cy-laptop__lid {
  position: relative;
  padding: 0.95rem 0.48rem 0.48rem;
  background: var(--ink);
  border-radius: 0.85rem 0.85rem 0.2rem 0.2rem;
}

.cy-laptop__lid::before {
  content: "";
  position: absolute;
  top: 0.36rem;
  left: 50%;
  width: 0.28rem;
  height: 0.28rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(251, 247, 241, 0.34);
}

.cy-feed .ail-show__rail {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 0.28rem;
  background: #efeae4;
  cursor: grab;
}

.cy-feed .ail-show__rail::-webkit-scrollbar {
  display: none;
}

.cy-feed .ail-show__rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.cy-feed .ail-show__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cy-feed .shot,
.cy-feed .shot:hover img,
.cy-feed .shot img {
  transform: none;
  background: transparent;
}

.cy-feed .shot {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cy-feed .shot img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  -webkit-user-drag: none;
}

.cy-laptop__base {
  position: relative;
  height: 0.72rem;
  background: var(--ink);
  border-radius: 0 0 0.7rem 0.7rem;
}

.cy-laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 22%;
  height: 0.22rem;
  transform: translateX(-50%);
  border-radius: 0 0 0.3rem 0.3rem;
  background: rgba(251, 247, 241, 0.16);
}

.cy-feed .ail-show__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "dots dots dots"
    "prev count next";
  align-items: center;
  gap: 0.15rem 0.75rem;
  margin-top: 0.7rem;
}

.cy-feed .ail-show__dots {
  grid-area: dots;
  display: flex;
  justify-content: center;
  justify-self: center;
  gap: 0.1rem;
}

.cy-feed .ail-show__prev { grid-area: prev; justify-self: end; }
.cy-feed .ail-show__count { grid-area: count; }
.cy-feed .ail-show__next { grid-area: next; justify-self: start; }

.cy-feed .ail-show__prev,
.cy-feed .ail-show__next {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cy-feed .ail-show__prev:hover,
.cy-feed .ail-show__next:hover {
  color: var(--pink-deep);
}

.cy-feed .ail-show__prev:disabled,
.cy-feed .ail-show__next:disabled {
  opacity: 0.38;
  cursor: default;
  color: var(--ink);
}

.cy-feed .ail-show__dots button {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.cy-feed .ail-show__dots button::after {
  content: "";
  position: absolute;
  inset: 0.46rem;
  border-radius: 50%;
  background: var(--blush);
}

.cy-feed .ail-show__dots button[aria-current="true"]::after {
  inset: 0.34rem;
  background: var(--pink-deep);
}

.cy-feed .ail-show__count {
  margin: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.cy-feed .cy-cap {
  margin-top: 0.95rem;
}

/* Short videos, same campaign. Frame matches the Quantum study. */

.cy-videos {
  width: min(52rem, calc(100% - 2rem));
  margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
}

.cy-aside {
  max-width: 36rem;
  margin: 0 auto 1.15rem;
  color: var(--pink-deep);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
}

.cy-video-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: start;
}

.cy-video-pair figure {
  margin: 0;
  min-width: 0;
}

.cy-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #241f1c;
}

.cy-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Services graphic and handouts. */

.cy-services,
.cy-anatomy {
  width: min(46rem, calc(100% - 2rem));
  margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
}

.cy-anatomy {
  width: min(28rem, calc(100% - 2rem));
}

.cy-services .shot,
.cy-anatomy .shot,
.cy-docs .shot {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

.cy-services .shot img,
.cy-anatomy .shot img,
.cy-docs .shot img {
  width: 100%;
  height: auto;
  max-height: none;
}

.cy-docs {
  width: min(52rem, calc(100% - 2rem));
  margin: clamp(2.2rem, 4vw, 3rem) auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: start;
}

.cy-docs figure,
.cy-services,
.cy-anatomy,
.cy-model__figure,
.cy-feed {
  margin-left: auto;
  margin-right: auto;
}

.cy-docs figure {
  margin: 0;
}

/* Mark beside the offer. */

.cy-mark {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
}

.cy-mark figure {
  margin: 0;
}

.cy-mark .shot {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

.cy-mark .shot img {
  width: 100%;
  height: auto;
  max-height: none;
}

.cy-back {
  margin: 2.2rem 0 0;
}

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

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

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

  .cy-docs,
  .cy-mark,
  .cy-video-pair {
    grid-template-columns: 1fr;
  }

  .cy-mark figure {
    max-width: 16rem;
  }

  .cy-feed {
    width: min(34rem, calc(100% - 1.5rem));
  }
}

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