/* ==========================================================================
   Look — /{lang}/collection/{slug}/ (SITEMAP 2.3). Owner: strona-look.
   Surfaces, grid, frame, nameplate, look-card, chips and buttons come from base.css /
   components.css; this file only lays them out. Colours via surface tokens and --accent
   (.accent-<slug> on each section picks the lacquer or the paper palette).
   ========================================================================== */

/* ---------- 1. Hero (sala): framed photo + name tablet, nameplate, VIP price, CTA ---------- */
main > .look-hero:first-child {
  padding-top: calc(var(--header-h) + var(--banner-h, 0px) + clamp(1.75rem, 4.5vw, 3.75rem));
}
.look-hero {
  overflow-x: clip; /* the dye glow behind the photo never widens the page */
}
.look-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 27rem) minmax(0, 36rem);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    "photo ."
    "photo plate"
    "photo copy"
    "photo .";
  column-gap: clamp(3rem, 7vw, 7.5rem);
  justify-content: center;
}
.look-hero__plate {
  grid-area: plate;
}
.look-hero__figure {
  grid-area: photo;
  position: relative;
  margin: 0;
}
.look-hero__frame {
  aspect-ratio: 2 / 3;
}
/* dye glow: the look's own colour lights the lacquer behind the photo (never under text) */
.look-hero__figure::before {
  content: "";
  position: absolute;
  inset: -18% -30%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--accent) 30%, transparent) 58%,
    transparent
  );
}
.look-hero__grid {
  isolation: isolate;
}
.look-hero__copy {
  grid-area: copy;
  min-width: 0;
}

/* name tablet: the Chinese colour name hangs on the frame like a temple name board */
.look-tablet {
  position: absolute;
  z-index: 2;
  top: clamp(2.5rem, 11%, 4.5rem);
  right: -1.4rem;
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.05rem 0.55rem 0.8rem;
  border: 1px solid var(--gold-500);
  border-radius: var(--radius);
  outline: 1px solid var(--gold-400);
  outline-offset: -5px;
  background-color: var(--lacquer-950);
  box-shadow: var(--shadow-frame);
  pointer-events: none;
}
.look-tablet__glyphs {
  writing-mode: vertical-rl;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.28em;
  margin-bottom: -0.28em;
  color: var(--gold-300);
}
/* swatch of the look colour under the name (UI, ≥ 3:1 on lacquer) */
.look-tablet::after {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  background-color: var(--accent);
  -webkit-mask: var(--svg-dia) center / contain no-repeat;
  mask: var(--svg-dia) center / contain no-repeat;
}

/* pager: ‹ 02 / 12 › + link to the collection */
.look-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.1rem;
}
.look-pager__step {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  color: var(--gold-text);
  transition:
    color var(--d-fast) var(--ease-lacquer),
    background-color var(--d-fast) var(--ease-lacquer);
}
.look-pager__step:hover {
  background-color: var(--btn2-hover);
  color: var(--gold-text-hover);
}
.look-pager__count {
  min-width: 4.6em;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: center;
  color: var(--accent);
}
:lang(zh) .look-pager__count {
  font-size: 0.875rem; /* ZH: the digit 4 only as small print (DESIGN-SYSTEM §1.3) */
}
.look-pager__all {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 2.75rem;
  margin-left: 1rem;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--gold-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.look-pager__all:hover {
  color: var(--gold-text-hover);
}

.look-hero__desc {
  margin-top: 1.4rem;
  max-width: 34em;
}

/* the VIP dress price (hero = the "5 seconds" price check; one price, CHANGES-2026-10-25 §2.1) */
.look-vip {
  display: grid;
  justify-items: start;
  gap: 0.6rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.look-vip__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-2);
}
.look-vip__note {
  margin-top: 0.4rem;
  max-width: 40em;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-3);
}
.look-vip__note a {
  color: var(--text-2);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold-text);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.look-vip__note a:hover {
  color: var(--gold-text-hover);
}

.look-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
  margin-top: 1.75rem;
}

/* ---------- 2. The set + pairs well with (dziedziniec) ---------- */
.look-set__grid,
.look-fits {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.look-set__still {
  aspect-ratio: 1;
  width: 100%;
  max-width: 22rem;
  justify-self: end;
}
.look-set__lead {
  margin-top: 1.5rem;
  max-width: 34em;
  color: var(--text-2);
}
.look-set__chips {
  margin-top: 1.5rem;
}

.look-fits {
  align-items: start;
  margin-top: clamp(1rem, 3vw, 2.5rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.look-fits__head {
  justify-self: end;
  width: 100%;
  max-width: 22rem;
}
.look-fits__title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  color: var(--heading);
}
.look-fits__lead {
  margin-top: 0.85rem;
  color: var(--text-2);
}
.look-fits__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 13rem));
  gap: var(--col-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.look-fit__id {
  font-family: var(--ff-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text-3);
}
/* ---------- 3. Ask for a date + previous / next (sala) ---------- */
.look-end {
  text-align: center;
}
.look-end__cta {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 44rem;
  margin-inline: auto;
}
.look-end__title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: var(--fw-display);
  letter-spacing: var(--ls-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  color: var(--heading);
  text-wrap: balance;
}
.look-end__lead {
  max-width: 34em;
  color: var(--text-2);
}
.look-ctas--center {
  justify-content: center;
  margin-top: 0.75rem;
}
.look-end__note {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-3);
}

.look-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "prev all next";
  align-items: center;
  gap: 2rem clamp(1.5rem, 4vw, 4rem);
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  text-align: start;
}
.look-step {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: center;
  gap: 1.4rem;
}
.look-step--prev {
  grid-area: prev;
}
.look-step--next {
  grid-area: next;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  justify-self: end;
  text-align: end;
}
.look-step--next .look-card__frame {
  order: 2;
}
.look-step--next .nameplate {
  justify-content: flex-end;
}
.look-step .nameplate {
  margin-top: 0.35rem;
}
.look-step__dir {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-2);
}
.look-step--next .look-step__dir {
  flex-direction: row-reverse;
}
.look-step__dir .icon {
  width: 1.1em;
  height: 1.1em;
  color: var(--gold-text);
}
.look-more__all {
  grid-area: all;
}

/* ---------- prev / next: directional View Transition (types set by js/pages/look.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .look-hero__copy {
    view-transition-name: look-copy;
    view-transition-class: look-slide;
  }
  .look-hero__frame {
    view-transition-class: look-photo look-slide;
  }
  /* keep the copy moving as one block (no separate nameplate morph) when stepping between looks */
  html:active-view-transition-type(look-forward, look-back)
    .look-hero
    .nameplate--page
    > * {
    view-transition-name: none;
  }
  html:active-view-transition-type(look-forward)::view-transition-old(
      *.look-slide
    ) {
    animation: look-out-start var(--d-page) var(--ease-page) both;
  }
  html:active-view-transition-type(look-forward)::view-transition-new(
      *.look-slide
    ) {
    animation: look-in-end var(--d-page) var(--ease-page) both;
  }
  html:active-view-transition-type(look-back)::view-transition-old(
      *.look-slide
    ) {
    animation: look-out-end var(--d-page) var(--ease-page) both;
  }
  html:active-view-transition-type(look-back)::view-transition-new(
      *.look-slide
    ) {
    animation: look-in-start var(--d-page) var(--ease-page) both;
  }
}
@keyframes look-out-start {
  to {
    opacity: 0;
    transform: translateX(-2.5rem);
  }
}
@keyframes look-out-end {
  to {
    opacity: 0;
    transform: translateX(2.5rem);
  }
}
@keyframes look-in-end {
  from {
    opacity: 0;
    transform: translateX(2.5rem);
  }
}
@keyframes look-in-start {
  from {
    opacity: 0;
    transform: translateX(-2.5rem);
  }
}

/* ---------- ≤ 64rem: narrower photo ---------- */
@media (max-width: 64rem) {
  .look-hero__grid {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 3.5rem);
  }
  .look-fits__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- ≤ 48rem: one column (name → photo → copy), list-style cards ---------- */
@media (max-width: 48rem) {
  .look-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "plate"
      "photo"
      "copy";
  }
  .look-hero__plate {
    margin-bottom: 1.5rem;
  }
  .look-hero__figure {
    width: min(100%, 24rem);
  }
  .look-tablet {
    right: 0.7rem;
    top: 1.6rem;
    gap: 0.6rem;
    padding: 0.85rem 0.45rem 0.65rem;
  }
  .look-tablet__glyphs {
    font-size: 1.3rem;
  }
  .look-pager {
    margin-top: 1.25rem;
  }
  .look-ctas > .btn {
    flex: 1 1 14rem;
  }
  .look-pager__all {
    margin-left: auto;
  }

  .look-set__grid,
  .look-fits {
    grid-template-columns: minmax(0, 1fr);
  }
  .look-set__still {
    display: none;
  }
  .look-fits__head {
    justify-self: start;
    max-width: none;
    margin-bottom: 1.5rem;
  }
  .look-fits__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .look-fit {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: center;
    gap: 1.1rem;
  }
  .look-fit .nameplate {
    margin-top: 0;
  }

  .look-more {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "prev next"
      "all all";
    align-items: start;
    gap: 1.75rem 1rem;
  }
  .look-step,
  .look-step--next {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }
  .look-step--next .look-card__frame {
    order: 0;
    justify-self: end;
  }
  .look-step .look-card__frame {
    width: 6.5rem;
  }
  .look-more__all {
    justify-self: center;
  }
}

/* ---------- 36–48rem (large phones, small tablets): name across, photo beside the copy ---------- */
@media (min-width: 36.01rem) and (max-width: 48rem) {
  .look-hero__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    grid-template-areas:
      "plate plate"
      "photo copy";
    column-gap: 1.75rem;
    align-items: start;
  }
  .look-hero__figure {
    width: 100%;
  }
  .look-hero__copy .look-pager {
    margin-top: 0;
  }
}

/* ZH/TH: bez sierot (2 znaki / jedno słowo w ostatniej linii) przy zmianach tekstu lub metryk fontu */
:lang(zh) .look-hero__desc,
:lang(zh) .look-fits__lead,
:lang(zh) .look-set__lead,
:lang(th) .look-hero__desc,
:lang(th) .look-set__lead,
:lang(th) .look-fits__lead,
:lang(th) .look-end__lead {
  text-wrap: balance;
}
