:root {
  --header-max: 1440px;
  --max: calc(var(--header-max) - 2 * var(--gutter));
  --page-width: min(var(--max), calc(100% - 2 * var(--gutter)));
}

.site-header .header-inner {
  max-width: var(--header-max);
}

.wrap,
main#main-content:is(.article, .detail, .listing, .simple-form-page),
.brief-page main,
.privacy-page main,
.gift-page main {
  width: var(--page-width);
  max-width: none;
  margin-inline: auto;
}

/* The privacy template's previous fixed measure was marked important. */
main#main-content.privacy-content {
  width: var(--page-width) !important;
  max-width: none;
}

#main-content :is(
  .case-story,
  .case-story .prose,
  .article-palette,
  .service-details,
  .about-details,
  .privacy-prose,
  .case-client-quote,
  .personal-style-note,
  .simple-form-panel,
  .brief-form,
  .review-submit,
  .review-form
),
#main-content:is(.article, .detail) > .prose {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-inline: 0;
}

#main-content :is(
  .page-intro > p:not(.eyebrow),
  .article > .lead,
  .detail > .lead,
  .about-position > div > p,
  .about-education p,
  .training p,
  .brief-hero p
),
main#main-content:is(.article, .detail) > .lead {
  max-width: none;
}

#main-content .case-story :is(.case-gallery, .article-product-gallery) {
  max-width: 100%;
  min-width: 0;
}

/* Keep product names at the full caption width on narrow carousel cards. */
.article-product-gallery .article-product-card figcaption {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.article-product-gallery .article-product-card :is(
  .article-product-card__brand,
  .article-product-card__name,
  .article-product-card__source
) {
  overflow-wrap: break-word;
  word-break: normal;
}

.detail .case-story .case-opening-quote {
  margin: 0 0 clamp(22px, 3vw, 36px);
  padding: clamp(10px, 1.5vw, 18px) 0 clamp(10px, 1.5vw, 18px) clamp(16px, 3vw, 38px);
  border-inline-start: 2px solid var(--rose);
  color: var(--plum);
}

.detail .case-story .case-opening-quote p {
  margin: 0;
  color: inherit;
  font: italic 500 clamp(28px, 4vw, 56px) / 1.12 var(--serif);
  letter-spacing: -.025em;
  text-wrap: pretty;
}

.article-product-gallery .article-product-gallery__viewport:has(.case-video-player, .case-carousel-photo) {
  grid-auto-columns: min(41%, 220px);
}

.article-product-gallery .article-product-card video {
  height: auto;
  object-fit: contain;
}

.case-video-player {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #242120;
}

.case-video-player video {
  display: block;
  width: 100%;
  height: 100%;
}

.case-video-toggle:not([hidden]) {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.case-video-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.case-video-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-inline-start: 3px;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: rgb(36 33 32 / 55%);
  color: #fff;
  font: 24px/1 system-ui, sans-serif;
}

.case-video-player.is-playing .case-video-icon {
  opacity: 0;
}


.article-product-gallery .article-product-card .case-carousel-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.article-product-gallery__header + .article-product-gallery__viewport {
  margin-block-start: 14px;
}

.stylist-look {
  display: grid;
  gap: clamp(16px, 3vw, 36px);
  align-items: center;
  padding-block-start: clamp(24px, 4vw, 48px);
  border-block-start: 1px solid var(--line);
}

.stylist-look__photo img {
  width: 100%;
  max-height: 580px;
  object-fit: contain;
  object-position: left center;
}

.stylist-look__copy h3 {
  margin-block: 0 12px;
}

.stylist-look + .article-product-gallery {
  margin-block: 20px clamp(30px, 5vw, 64px);
}

.stylist-look + .article-product-gallery .article-product-gallery__viewport {
  grid-auto-columns: min(57%, 200px);
}

@media (min-width: 760px) {
  .stylist-look {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
}

.footer-contact-actions,
.contact-messenger-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.footer-contact-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--plum);
  font-size: 13px;
  text-decoration: none;
}

.footer-contact-actions__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--rose);
  border-radius: 50%;
}

.footer-contact-actions__icon svg {
  width: 19px;
  height: 19px;
}

.footer-contact-actions a:hover .footer-contact-actions__icon,
.footer-contact-actions a:focus-visible .footer-contact-actions__icon {
  background: var(--blush);
  border-color: var(--plum);
}

/* Pair the full outfit with its flat lay in the Stefanel case. */
.stylist-look--flat-lay { align-items: start; }
.stylist-look--flat-lay .stylist-look__copy { grid-column: 1 / -1; }
.stylist-look__flat-lay img { display: block; width: 100%; height: auto; }
@media (min-width: 760px) {
  .stylist-look--flat-lay {
    grid-template-columns: minmax(0, var(--outfit-ratio, .75fr)) minmax(0, 1.5fr);
    align-items: start;
  }
  .stylist-look--flat-lay .stylist-look__photo img { max-height: none; }
}
