.ap-layout-studio {
  /* The 2061 × 763 artwork divides into three equal 687 × 763 scenes. */
  --studio-scene-aspect: 687 / 763;
  display: grid;
  grid-template-areas: "stage copy";
  grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr);
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #b7d7ee;
  border-radius: 24px;
  /* The pale blue panel and diagonal highlight match the Services closing section. */
  background-color: #e2f1ff;
  background-image:
    linear-gradient(137deg, transparent 49%, rgb(255 255 255 / 45%) 49%, rgb(255 255 255 / 10%) 72%, transparent 72%),
    radial-gradient(ellipse at 40% 46%, #f2f9ff, #e2f1ff 29%, transparent 58%),
    linear-gradient(155deg, #e2f1ff 40%, #b8daff 100%);
  background-position: right top;
  background-size: 43% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 12px 28px #03162f14;
}

.ap-studio-copy {
  position: relative;
  grid-area: copy;
  align-self: center;
  min-width: 0;
  padding: 26px clamp(14px, 2vw, 30px);
  text-align: center;
}

.ap-studio-copy h3 {
  margin: 0 0 10px;
  color: var(--ink, #060d2b);
  font-size: clamp(27px, 2.7vw, 38px);
  font-weight: var(--bgb-display-weight, 850);
  letter-spacing: var(--bgb-display-tracking, -.05em);
  line-height: 1.14;
  text-wrap: balance;
}

.ap-studio-copy h3 .accent { display: block; }

.ap-studio-copy > p:not(.ap-studio-announcement) {
  max-width: 35ch;
  margin-inline: auto;
  color: #4c6380;
  text-wrap: pretty;
}

.ap-studio-switch {
  display: inline-flex;
  gap: 3px;
  max-width: 100%;
  margin-top: 14px;
  padding: 3px;
  border: 1px solid #bfd9f6;
  border-radius: 13px;
  background: #e6f3ff;
}

.ap-studio-switch button {
  min-width: 0;
  min-height: 44px;
  padding: 8px clamp(8px, 1.3vw, 18px);
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #173b64;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.ap-studio-switch button:hover { background: #d4ebff; }

.ap-studio-switch button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #0757ff;
  outline-offset: 3px;
}

.ap-studio-switch button[aria-pressed="true"] {
  border-color: #00bfff;
  background: linear-gradient(135deg, #087aff, #0757ff 60%, #003bbf);
  color: #fff;
  box-shadow: 0 3px 8px #0757ff38, inset 0 1px 0 #8bd2ff99;
}

.ap-studio-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ap-studio-stage {
  grid-area: stage;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: clamp(8px, .85vw, 12px);
  padding: clamp(12px, 1.3vw, 20px);
  padding-right: clamp(26px, 2.5vw, 36px);
  border-right: 1.5px solid #00bfff;
  border-bottom-right-radius: 80px;
  background:
    radial-gradient(ellipse at 50% 0%, #0757ff32, transparent 60%),
    #03162f;
}

.ap-studio-variant {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #366c91;
  border-radius: 16px;
  background: #03162f;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.ap-layout-studio[data-active-layout="editorial"] [data-preview-layout="editorial"],
.ap-layout-studio[data-active-layout="browse"] [data-preview-layout="browse"],
.ap-layout-studio[data-active-layout="compact"] [data-preview-layout="compact"] {
  border-color: #00bfff;
  box-shadow: 0 0 16px #00bfff33, 0 0 2px #00bfff88;
}

.ap-studio-scene {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 67%, #0757ff32, transparent 68%);
}

.ap-studio-art {
  width: min(100%, calc(clamp(320px, 27vw, 390px) * var(--studio-scene-aspect)));
  aspect-ratio: var(--studio-scene-aspect);
  background: url("/bgb-design-20261110/services/app-development/app-premium-20261130/assets/app-layout-cinematic.webp") var(--studio-scene-position) center / 300% 100% no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 7% 93%, transparent);
  transition: transform .52s cubic-bezier(.22, .61, .36, 1), filter .38s ease;
}

[data-preview-layout="editorial"] { --studio-scene-position: 0%; }
[data-preview-layout="browse"] { --studio-scene-position: 50%; }
[data-preview-layout="compact"] { --studio-scene-position: 100%; }

/* Blend the edges of a tile into the stage without obscuring the phone UI. */
.ap-studio-scene::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #03162f 0%, transparent 12% 88%, #03162f 100%),
    linear-gradient(0deg, #03162f 0%, transparent 14%);
  content: "";
  pointer-events: none;
}

.ap-layout-studio[data-active-layout="editorial"] [data-preview-layout="editorial"] .ap-studio-art,
.ap-layout-studio[data-active-layout="browse"] [data-preview-layout="browse"] .ap-studio-art,
.ap-layout-studio[data-active-layout="compact"] [data-preview-layout="compact"] .ap-studio-art {
  filter: brightness(1.09) saturate(1.08);
  transform: scale(1.035);
}

.ap-studio-variant figcaption {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 11px 10px 13px;
  border-top: 1px solid #366c91;
  background: linear-gradient(145deg, #0b2746, #03162f 80%);
  color: #fff;
  text-align: center;
  line-height: 1.35;
}

.ap-studio-variant figcaption strong { font-size: 16px; }

.ap-studio-variant figcaption span {
  color: #c5e3ff;
  font-size: 13px;
}

@media (min-width: 1000px) and (max-width: 1199px) {
  .ap-studio-switch button { padding-inline: 7px; }
}

@media (max-width: 999px) {
  .ap-layout-studio {
    grid-template-areas: "copy" "stage";
    grid-template-columns: minmax(0, 1fr);
    background-size: 100% 100%;
  }

  .ap-studio-copy h3 .accent { display: inline; }

  .ap-studio-stage {
    padding: clamp(10px, 1.6vw, 16px);
    border-top: 1px solid #00bfff;
    border-right: 0;
    border-radius: 0;
  }
}

@media (max-width: 749px) {
  .ap-studio-copy { padding-inline: 12px; }
  .ap-studio-switch button { padding-inline: clamp(7px, 2.2vw, 14px); }
  .ap-studio-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .ap-studio-variant { display: none; }

  .ap-layout-studio[data-active-layout="editorial"] [data-preview-layout="editorial"],
  .ap-layout-studio[data-active-layout="browse"] [data-preview-layout="browse"],
  .ap-layout-studio[data-active-layout="compact"] [data-preview-layout="compact"] {
    display: block;
  }

  .ap-studio-art { width: min(100%, calc(430px * var(--studio-scene-aspect))); }

  .ap-studio-stage[data-layout-interacted] .ap-studio-art {
    animation: ap-studio-reveal .38s cubic-bezier(.22, .61, .36, 1) both;
  }

  @keyframes ap-studio-reveal {
    from { opacity: .48; transform: translateY(3px) scale(1); }
    to { opacity: 1; transform: translateY(0) scale(1.035); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-studio-variant,
  .ap-studio-art { transition: none; }

  .ap-studio-stage[data-layout-interacted] .ap-studio-art { animation: none; }
}
