.journey-lookbook {
  --lookbook-header: 112px;
  --lookbook-pane: calc(100svh - var(--lookbook-header));
}

.lookbook-opening {
  min-block-size: max(0px, var(--lookbook-pane));
  padding-block: clamp(.55rem, 2dvh, 1.65rem);
  display: grid;
  align-items: center;
  align-content: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "intro portrait" "actions portrait";
  gap: clamp(.45rem, 2.5dvh, 1.5rem) clamp(1rem, 5vw, 4rem);
}

.lookbook-opening-title {
  grid-area: intro;
  align-self: end;
}

.lookbook-opening h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--journey-ink);
  font-size: clamp(1.85rem, min(6vw, 9.2dvh), 5.6rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 800;
  text-wrap: balance;
}

.lookbook-opening .eyebrow { margin: 0 0 .3rem; }
.lookbook-opening-actions {
  position: relative;
  grid-area: actions;
  align-self: start;
  min-width: 0;
}

.lookbook-opening {
  --fit-fabric: #649ca5;
  --fit-trim: #b48191;
}

.lookbook-opening[data-selected-look="weekend-ramble"] {
  --fit-fabric: #78506f;
  --fit-trim: #80644b;
}

.lookbook-opening[data-selected-look="studio-premiere"] {
  --fit-fabric: #689baa;
  --fit-trim: #594566;
}

.lookbook-portrait {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-area: portrait;
  width: min(100%, 36rem, max(7rem, calc(var(--lookbook-pane) - 2rem)));
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 1.6rem;
}

.lookbook-pattern {
  position: absolute;
  z-index: 1;
  inset: 15% auto 15% 7%;
  width: 25%;
  color: var(--fit-fabric);
  pointer-events: none;
}

.lookbook-pattern span {
  position: absolute;
  display: block;
  width: 83%;
  height: 45%;
  background: repeating-linear-gradient(91deg, #fff3 0 1px, transparent 1px 5px), currentColor;
  box-shadow: inset 0 0 0 1px #f4f0e659;
}

.lookbook-pattern span:first-child {
  inset: 0 auto auto 2%;
  clip-path: polygon(20% 0, 39% 5%, 47% 20%, 60% 19%, 69% 5%, 87% 0, 100% 30%, 81% 32%, 74% 98%, 29% 98%, 21% 33%, 0 30%);
  rotate: -14deg;
}

.lookbook-pattern span + span {
  inset: auto 0 0 auto;
  color: var(--fit-trim);
  clip-path: polygon(22% 4%, 78% 4%, 98% 93%, 80% 100%, 54% 89%, 29% 100%, 0 89%);
  rotate: 12deg;
}

.lookbook-layers {
  position: absolute;
  z-index: 2;
  inset: 1% 0 1% 7%;
}

.lookbook-layers::before {
  position: absolute;
  inset: 7% 7% 8% 13%;
  border: clamp(3px, .7vw, 7px) solid var(--journey-rim);
  border-radius: 46% 46% 4% 4% / 39% 39% 4% 4%;
  background: color-mix(in srgb, var(--journey-paper) 65%, var(--sage));
  box-shadow: 0 .6rem 1.55rem #201b1733;
  content: "";
}

.lookbook-layers img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  margin: 0;
}

.lookbook-layers [data-lookbook-skin] { inset: 14% auto auto 10%; width: 80%; }

@media (prefers-reduced-motion: no-preference) {
  .lookbook-opening[data-scroll-active] .lookbook-pattern {
    translate: calc(8% - 34% * var(--fabric-progress, 0)) calc(8% - 18% * var(--fabric-progress, 0));
    opacity: calc(1 - .3 * var(--fabric-progress, 0));
  }

  .lookbook-opening[data-scroll-active] .lookbook-layers::before {
    translate: 0 calc(5% - 5% * var(--fabric-progress, 0));
    scale: calc(.86 + .14 * var(--fabric-progress, 0)) 1;
  }

  .lookbook-opening[data-scroll-active] .lookbook-layers {
    translate: calc(9% - 9% * var(--fabric-progress, 0)) calc(7% - 7% * var(--fabric-progress, 0));
    scale: calc(.79 + .21 * var(--fabric-progress, 0));
  }
}

.lookbook-choice {
  display: flex;
  align-items: center;
  gap: clamp(.45rem, 2vw, .85rem);
  min-width: 0;
}

.lookbook-choice button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--journey-ink) 55%, var(--journey-canvas));
  border-radius: 50%;
  color: var(--journey-ink);
  background: var(--journey-paper);
  font: 800 1.12rem/1 Nunito, sans-serif;
  cursor: pointer;
}

.lookbook-choice button:is(:hover, :focus-visible) {
  color: var(--journey-paper);
  background: var(--journey-ink);
}
.lookbook-choice button[hidden], .journey-lookbook [hidden] { display: none !important; }

.lookbook-caption {
  flex: 0 1 14.5rem;
  min-width: 0;
  min-block-size: 3.45em;
  color: var(--journey-ink);
  line-height: 1.22;
}

.lookbook-caption strong {
  display: block;
  min-block-size: 2.44em;
  font-size: clamp(1.05rem, 2.55vw, 1.7rem);
  font-weight: 850;
}
.lookbook-swatch {
  display: block;
  width: 2.4rem;
  height: .54rem;
  margin-block-start: .32rem;
  border-radius: .4rem;
  box-shadow: inset 0 0 0 1px #293c3840;
  background: linear-gradient(90deg, var(--fit-fabric) 68%, var(--fit-trim) 68%);
}

.lookbook-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .8rem;
  margin-block-start: clamp(.45rem, 1.8dvh, .9rem);
}
.lookbook-links :is(.button, .text-link) { min-height: 44px; }
.lookbook-links .button { padding: .45rem .92rem; }
.lookbook-links .text-link { display: inline-flex; align-items: center; }
.lookbook-opening :focus-visible, main [data-return-focus], .lookbook-library-title :focus-visible {
  outline: 3px solid var(--journey-ink);
  outline-offset: 4px;
}
.lookbook-feedback {
  display: block;
  font-size: .875rem;
  line-height: 1.35;
}
.lookbook-feedback:not(:empty) { margin-block-start: .4rem; }
.lookbook-library-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .35rem 1rem;
  border-top: 1px solid var(--journey-rule);
  padding-block-start: clamp(1.3rem, 4vw, 3.3rem);
}
.lookbook-library-title .gallery-heading { margin-block: 0; }

@media (max-width: 760px) {
  .journey-lookbook { --lookbook-header: 85px; }
}
@media (max-width: 539px) {
  .lookbook-opening {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "portrait" "actions";
    padding-block: .42rem;
    gap: .32rem;
  }
  .lookbook-opening h1 { max-width: none; font-size: clamp(1.75rem, 8.6vw, 2.45rem); }
  .lookbook-opening .eyebrow { font-size: .72rem; margin-block-end: .18rem; }
  .lookbook-portrait { width: min(100%, 22rem, max(12rem, calc(100svh - 16.25rem))); }
  .lookbook-caption { flex: 1 1 auto; }
  .lookbook-links { margin-block-start: .35rem; }
}

.lookbook-featured-chooser {
  margin-block: .65rem 1rem;
  border-top: 1px solid var(--journey-rule);
  color: var(--journey-ink);
}

.lookbook-featured-chooser summary {
  align-content: center;
  min-block-size: 44px;
  inline-size: fit-content;
  cursor: pointer;
  font-weight: 800;
}

.lookbook-thumbnail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-inline-size: 27rem;
  gap: .45rem;
  margin: .3rem 0 0;
  padding: 0;
  list-style: none;
}

.lookbook-thumbnail {
  display: grid;
  min-block-size: 44px;
  height: 100%;
  align-content: start;
  justify-items: center;
  gap: .2rem;
  padding: .35rem;
  border: 1px solid var(--journey-rule);
  border-radius: .65rem;
  background: var(--journey-paper);
  color: var(--journey-ink);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
}

.lookbook-thumbnail:is(:hover, [aria-current="true"]) {
  box-shadow: inset 0 0 0 1px var(--journey-ink);
  text-decoration: underline;
}

.lookbook-featured-chooser :focus-visible {
  outline: 3px solid var(--journey-ink);
  outline-offset: 3px;
}

.lookbook-thumbnail-art {
  position: relative;
  inline-size: min(100%, 5.5rem);
  aspect-ratio: 1;
}

.lookbook-thumbnail-art img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: auto;
  margin: 0;
}

.lookbook-thumbnail-art [data-lookbook-thumbnail-skin] {
  inset: 14% auto auto 10%;
  inline-size: 80%;
}
