/* ASSEMBLED project page image treatment. */
.assembled-case .ac-refined-image-window {
  background-color: #fff;
}

.assembled-case .ac-refined-image-window > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

/* Responsive screenshots stay inside the existing device frames. */
.assembled-case .ac-device--desktop .ac-placeholder > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The mobile screenshots are 1179 × 2556, so the phone frames follow their natural height. */
.assembled-case .ac-device--phone {
  aspect-ratio: auto !important;
}

.assembled-case .ac-device--phone .ac-placeholder {
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}

.assembled-case .ac-device--phone .ac-placeholder > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Keep the responsive frames tight to the screenshots and clip their rounded corners. */
.assembled-case .ac-device .ac-placeholder {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.assembled-case .ac-device .ac-placeholder > img {
  border-radius: inherit;
}

/* Brand windows use the full image area and a slightly roomier frame. */
.assembled-case .ac-refined-image-window {
  min-height: 24rem;
  padding: 0;
}

.assembled-case .ac-refined-image-window > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

@media (max-width: 768px) {
  .assembled-case .ac-refined-image-window {
    min-height: 0;
    aspect-ratio: 4 / 5;
    padding: 0;
  }
}

.assembled-case .ac-refined-image-window > img {
  border-radius: inherit;
}

/* Hero balance: preview and its services share the right column. */
@media (min-width: 769px) {
  .assembled-case .container-wide.ac-hero-copy {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: auto auto 1fr !important;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: stretch;
    padding: 56px 0 !important;
  }

  .assembled-case .ac-hero-copy > h1 {
    font-size: clamp(2rem, 3vw, 3.25rem);
  }

  .assembled-case .ac-hero-copy > p {
    max-width: 32rem;
  }

  .assembled-case .ac-case-study-preview {
    display: flex;
    grid-column: 2;
    grid-row: 1 / span 3;
    max-width: none;
    margin-top: 0;
    flex-direction: column;
    justify-content: space-between;
  }

  .assembled-case .ac-case-study-preview .ac-case-study-browser {
    flex: 1 1 auto;
    min-height: 0;
  }

  .assembled-case .ac-case-study-preview .ac-service-line {
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .assembled-case .ac-case-study-preview .ac-service-line {
    margin-top: 1rem;
  }
}

/* The construction detail gets a little more visual weight inside its frame. */
.assembled-case .ac-refined-image-window--detail > img {
  transform: scale(1.05);
}

/* A profile card and five independent questions form the client conversation. */
.assembled-case .ac-conversation-header {
  max-width: 58rem;
  margin-bottom: 2.5rem;
}

.assembled-case .ac-conversation-header .cs-h2 {
  margin: 0 0 1.25rem;
}

.assembled-case .ac-conversation-intro {
  max-width: 52rem;
  margin: 0;
}

.assembled-case .ac-conversation-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.75fr) minmax(0, 1.6fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.assembled-case .ac-conversation-profile {
  position: sticky;
  top: 7rem;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--narrow-border);
  border-radius: 20px;
  background: rgba(38, 35, 34, 0.025);
}

.assembled-case .ac-conversation-profile > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1903 / 2560;
  object-fit: contain;
}

.assembled-case .ac-conversation-profile figcaption {
  padding: 1.25rem 1.5rem;
}

.assembled-case .ac-conversation-profile strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--narrow-text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.assembled-case .ac-conversation-profile figcaption span {
  color: var(--narrow-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.assembled-case .ac-conversation-questions {
  display: grid;
  min-width: 0;
  gap: 0.875rem;
}

.assembled-case .ac-conversation-question {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--narrow-border);
  border-radius: 16px;
  background: transparent;
}

.assembled-case .ac-conversation-question[open] {
  border-color: var(--narrow-accent);
  background: rgba(255, 120, 79, 0.12);
}

.assembled-case .ac-conversation-question summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: start;
  gap: 1.25rem;
  padding: 1.5rem;
  list-style: none;
  cursor: pointer;
}

.assembled-case .ac-conversation-question summary::-webkit-details-marker {
  display: none;
}

.assembled-case .ac-conversation-question summary::marker {
  content: "";
}

.assembled-case .ac-conversation-question summary:focus-visible {
  outline: 2px solid var(--narrow-accent);
  outline-offset: 4px;
  border-radius: 16px;
}

.assembled-case .ac-conversation-question h3 {
  margin: 0;
  color: var(--narrow-text-primary);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.5;
}

.assembled-case .ac-conversation-question[open] h3,
.assembled-case .ac-conversation-question summary:hover h3 {
  color: var(--narrow-accent);
}

.assembled-case .ac-conversation-icon {
  position: relative;
  display: block;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--narrow-accent);
  border-radius: 50%;
  background: transparent;
}

.assembled-case .ac-conversation-icon::before,
.assembled-case .ac-conversation-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.75rem;
  height: 2px;
  background: var(--narrow-accent);
  content: "";
  transform: translate(-50%, -50%);
}

.assembled-case .ac-conversation-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.assembled-case .ac-conversation-question[open] .ac-conversation-icon::after {
  display: none;
}

.assembled-case .ac-conversation-answer {
  padding: 0 1.5rem 1.5rem;
}

.assembled-case .ac-conversation-answer p {
  max-width: 65ch;
  margin: 0;
  color: var(--narrow-text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}

@media (max-width: 768px) {
  .assembled-case .ac-conversation-header {
    margin-bottom: 1.5rem;
  }

  .assembled-case .ac-conversation-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .assembled-case .ac-conversation-profile {
    position: static;
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: center;
  }

  .assembled-case .ac-conversation-profile figcaption {
    padding: 1rem;
  }

  .assembled-case .ac-conversation-question summary {
    gap: 0.75rem;
    padding: 1.25rem;
  }

  .assembled-case .ac-conversation-answer {
    padding: 0 1.25rem 1.25rem;
  }

  .assembled-case .ac-conversation-answer p {
    font-size: 0.9375rem;
    line-height: 1.8;
  }
}

@media (max-width: 380px) {
  .assembled-case .ac-conversation-profile {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .assembled-case .ac-conversation-profile strong {
    font-size: 1.125rem;
  }
}

/* ASSEMBLED hero loop: the teaser is 1920 x 736 (2.61:1). The media box now hugs the
   video instead of the old placeholder ratios (min(46rem, 66vw) on desktop, 9:16 on
   mobile), so the whole frame is visible and nothing is cropped. */
.assembled-case .ac-hero-media.ac-placeholder--hero {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
}

.assembled-case .ac-hero-media.ac-placeholder--hero > video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  /* Reserve the teaser box before the metadata arrives, so nothing below it jumps. */
  aspect-ratio: 1920 / 736;
  object-fit: contain;
}

/* Hero loop playback UI: the toggle glyph only shows on click and stays while paused. */
.assembled-case .ac-hero-media.ac-placeholder--hero {
  position: relative;
  cursor: pointer;
}

.assembled-case .ac-hero-media.ac-placeholder--hero:focus-visible {
  outline: 2px solid var(--narrow-accent);
  outline-offset: -2px;
}

.assembled-case .ac-hero-media.ac-placeholder--hero > .ac-hero-video-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--narrow-accent);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.assembled-case .ac-hero-media.ac-placeholder--hero.is-icon-visible > .ac-hero-video-toggle {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.assembled-case .ac-hero-video-glyph {
  display: none;
  width: 3.5rem;
  height: 4rem;
  background-color: currentColor;
  filter: drop-shadow(0 0.25rem 1.5rem rgba(0, 0, 0, 0.55));
}

.assembled-case .ac-hero-video-glyph--play {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(10%);
}

.assembled-case .ac-hero-video-glyph--pause {
  background: linear-gradient(to right, currentColor 0 34%, transparent 34% 66%, currentColor 66% 100%);
}

.assembled-case .ac-hero-media[data-video-state="playing"] .ac-hero-video-glyph--pause,
.assembled-case .ac-hero-media[data-video-state="paused"] .ac-hero-video-glyph--play {
  display: block;
}

@media (max-width: 768px) {
  .assembled-case .ac-hero-video-glyph {
    width: 2.75rem;
    height: 3rem;
  }
}

/* Mobile: keep the taller teaser frame and centre its crop horizontally. */
@media (max-width: 768px) {
  .assembled-case .ac-hero-media.ac-placeholder--hero {
    aspect-ratio: 16 / 9 !important;
  }
  .assembled-case .ac-hero-media.ac-placeholder--hero > video {
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
  }
}


/* The result feature uses white typography at every viewport size. */
.assembled-case .ac-result-feature > span,
.assembled-case .ac-result-feature h3,
.assembled-case .ac-result-feature a {
  color: #fff;
}

.assembled-case .ac-result-feature a {
  border-bottom-color: #fff;
  text-decoration-color: #fff;
}

/* ASSEMBLED mobile: compact facts, heading accents and a clean result board. */
@media (max-width: 768px) {
  .assembled-case .cs-brand-v2-facts strong {
    font-size: clamp(0.5625rem, 2.5vw, 0.6875rem);
    letter-spacing: 0;
    white-space: nowrap;
  }

  .assembled-case .ac-decision-map > article {
    padding-right: 1.125rem !important;
  }

  .assembled-case .ac-decision-map > article::after {
    display: none !important;
    content: none !important;
  }

  .assembled-case .ac-decision-map > article > h3 {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
  }

  .assembled-case .ac-decision-map > article > h3::before {
    position: static;
    display: block !important;
    flex: 0 0 auto;
    margin: 0;
    color: var(--narrow-accent);
    content: "/" !important;
    font-size: 1em;
    line-height: inherit;
    letter-spacing: 0;
  }


  .assembled-case .ac-result-deliverables .ac-result-icon {
    display: none !important;
  }

  .assembled-case .ac-result-deliverables > article > div {
    display: block !important;
  }

  .assembled-case .ac-result-deliverables h3,
  .assembled-case .ac-result-deliverables p {
    grid-column: auto;
  }
}
