/* Built With It. Scoped to this study. */

.bw {
  overflow-x: clip;
}

.bw .study-hero h1 {
  max-width: 12em;
  font-size: clamp(2.7rem, 6.6vw, 5.5rem);
  line-height: 0.96;
}

.bw .study-section h2 {
  max-width: 16em;
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
}

.bw .study-lede {
  max-width: 40rem;
  color: var(--ink);
}

.bw-hero__stakes {
  max-width: 40rem;
  margin: 1.15rem 0 0;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

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

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

.bw-pull {
  max-width: 22em;
  margin: 2rem 0 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.bw-label {
  margin: 2rem 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.bw-cap,
.bw-aside {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.45;
}

.bw-scribble {
  display: block;
  margin: 0 0 0.25rem;
  color: var(--pink-deep);
  font-size: 1.7rem;
  line-height: 1.1;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.bw-wash--blush {
  background:
    linear-gradient(180deg, rgba(248, 197, 194, 0.45), rgba(251, 247, 241, 0) 14rem),
    var(--cream);
}

.bw-wash--sage {
  background:
    linear-gradient(180deg, rgba(184, 201, 163, 0.38), rgba(251, 247, 241, 0) 16rem),
    var(--cream);
}

.bw-wash--teal {
  background:
    linear-gradient(180deg, rgba(95, 174, 168, 0.22), rgba(251, 247, 241, 0) 14rem),
    var(--cream);
}

.bw-wash--mustard {
  background:
    linear-gradient(180deg, rgba(227, 178, 60, 0.2), rgba(251, 247, 241, 0) 14rem),
    var(--cream);
}

.bw-previews {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.bw-previews--one {
  max-width: 28rem;
}

.bw-art {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.6rem, 4vw, 2.6rem) auto 0;
}

.bw-art .shot {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fffdf8;
}

.bw-art .shot img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.bw-art .bw-cap {
  width: min(40rem, 100%);
  margin-right: auto;
  margin-left: auto;
}

.bw-preview {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.7rem 0.7rem 1.05rem;
  border-radius: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.bw-preview:nth-child(1) { background: var(--blush-soft); border-color: transparent; }
.bw-preview:nth-child(2) { background: var(--sage-soft); border-color: transparent; }
.bw-preview:nth-child(3) { background: #f8f1dc; border-color: transparent; }
.bw-preview:nth-child(4) { background: var(--teal-soft); border-color: transparent; }

.bw-preview__shot {
  display: block;
  overflow: hidden;
  height: 8.5rem;
  border-radius: 0.75rem;
  background: var(--cream-deep);
}

.bw-preview__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.bw-preview__kicker {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--teal-ink);
}

.bw-preview__title {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.bw-preview__line {
  color: var(--ink-soft);
  line-height: 1.45;
}

.bw-preview:hover .bw-preview__title {
  color: var(--pink-deep);
}

.bw-assistant {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.bw-aspects {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.bw-aspects li {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.bw-aspects h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.bw-aspects p {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.bw-phone {
  margin: 0 auto;
  width: min(100%, 26rem);
}

.bw-phone__body {
  padding: 0.7rem;
  background: var(--ink);
  border-radius: 1.8rem;
  box-shadow: 0 18px 36px rgba(60, 50, 44, 0.14);
}

.bw-phone__screen {
  display: block;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #fff;
}

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

.bw-asks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bw-asks li {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.bw-flow,
.bw-prep {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bw-flow li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.03em;
}

.bw-flow li:not(:last-child)::after {
  content: "→";
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 0.9em;
}

.bw-prep li {
  padding: 1.05rem 1.1rem 1.15rem;
  border-radius: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.bw-prep li:nth-child(1) { background: var(--blush-soft); border-color: transparent; }
.bw-prep li:nth-child(2) { background: #f8f1dc; border-color: transparent; }
.bw-prep li:nth-child(3) { background: var(--teal-soft); border-color: transparent; }

.bw-prep h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.bw-prep p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.bw-browser {
  width: min(1120px, calc(100% - 2rem));
}

.bw-browser .shot img {
  max-height: none;
  object-fit: contain;
  object-position: top center;
}

.bw-zoom,
.bw-files,
.bw-brief,
.bw-note {
  width: min(920px, calc(100% - 2rem));
  margin: clamp(1.6rem, 4vw, 2.6rem) auto 0;
}

.bw-zoom .shot,
.bw-files .shot,
.bw-brief .shot,
.bw-note .shot {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}

.bw-zoom .shot img,
.bw-files .shot img,
.bw-brief .shot img,
.bw-note .shot img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.bw-files {
  width: min(820px, calc(100% - 2rem));
}

.bw-files .shot {
  background: #2c2928;
}

.bw-note {
  width: min(40rem, calc(100% - 2rem));
}

.bw-note .shot {
  background: #f4f1ec;
}

.bw-zoom figcaption,
.bw-files figcaption,
.bw-brief figcaption,
.bw-note figcaption,
.bw-browser > .bw-cap {
  width: min(40rem, 100%);
  margin: 0.75rem auto 0;
  padding: 0 0.2rem;
}

.bw-pair {
  display: grid;
  gap: 1.4rem;
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.6rem, 4vw, 2.4rem) auto 0;
}

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

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

.bw-pair .shot img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.bw-compare {
  display: grid;
  gap: 1rem;
  margin-top: 0.4rem;
}

.bw-compare > div {
  padding: clamp(1.2rem, 2.5vw, 1.6rem);
  border-radius: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.bw-compare .bw-label {
  margin-top: 0;
}

.bw-compare__ask {
  margin: 0;
  max-width: 16em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.bw-needs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bw-needs li {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.45;
}

.bw-needs li:first-child {
  border-top: 0;
  padding-top: 0;
}

.bw-needs span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

.bw-steps {
  margin-top: 1.6rem;
}

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

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

.bw-steps__nav {
  display: flex;
  gap: 0.45rem;
}

.bw-steps__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;
}

.bw-steps__nav button:hover {
  color: var(--pink-deep);
}

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

.bw-steps__rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(1rem, calc((100% - 72rem) / 2));
  padding: 0.2rem max(1rem, calc((100% - 72rem) / 2)) 1.2rem;
  cursor: grab;
  overscroll-behavior-x: contain;
}

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

.bw-step {
  flex: 0 0 min(18.5rem, 78vw);
  margin: 0;
  scroll-snap-align: start;
  padding: 1.15rem 1.15rem 1.3rem;
  border-radius: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.bw-step__n {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: var(--pink-deep);
}

.bw-step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.bw-step p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.bw-close {
  padding-top: clamp(5rem, 10vw, 8rem);
}

.bw .bw-close h2 {
  max-width: 14em;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 0.98;
}

.bw-close__line {
  max-width: 16em;
  margin: 1.3rem 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--pink-deep);
}

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

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

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

.bw a:focus-visible,
.bw .shot:focus-visible,
.bw-page .study-light__close:focus-visible,
.bw-steps__nav button:focus-visible,
.bw-steps__rail:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .bw-previews {
    grid-template-columns: 1fr 1fr;
  }

  .bw-flow {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    align-items: center;
  }

  .bw-prep {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bw-compare,
  .bw-pair {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 960px) {
  .bw-assistant {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem);
    gap: 2.5rem;
    align-items: start;
  }
}

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

  .bw-steps__head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bw-scribble {
    transform: none;
  }
}
