/* PoshEvolution: the page's own layer over the taste-skill kit (assets/kit/system.css).
   1. The palette and fonts (the kit reads these tokens).
   2. Page CSS for what the kit does not have: the catalog grid, filters, the product page,
      the sample label and the empty state.
   Colours: warm off-white ground, warm near-black ink, one oxblood accent used sparingly. */

:root {
  --p-bg: #f4f1ea; --p-surface: #e9e4da; --p-ink: #1b1916; --p-muted: #5d574f;
  --p-accent: #7a2e2a; --p-accent-ink: #ffffff;
  --p-action: #1b1916; --p-action-ink: #f4f1ea;
  --p-inv-bg: #1b1916; --p-inv-surface: #27241f; --p-inv-ink: #f4f1ea; --p-inv-muted: #b0a99e;
  --p-inv-accent: #e4b9ab; --p-inv-accent-ink: #1b1916; --p-inv-action: #f4f1ea; --p-inv-action-ink: #1b1916;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Figtree", "Segoe UI", system-ui, sans-serif;
  --display-weight: 400; --display-tracking: -0.02em;
}
body { background: var(--p-bg); color: var(--p-ink); }

/* inner pages (shop, product, policies): a section that grows with what it holds. A catalog's
   length is set by how many products there are, so it cannot be a fixed number of screens. */
main > section.flow { height: auto; min-height: calc(var(--h, 1) * 100svh); }
main > section.flow > .wrap { height: auto; }
.page-top { padding-top: calc(var(--nav) + var(--s-8)); }
@media (max-width: 639px) { .page-top { padding-top: calc(var(--nav) + var(--s-7)); } }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-5); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- catalog grid */
/* four across on desktop, two on a phone; one to three products stay on the grid's columns from the
   left edge, so a short category still lines up with the page instead of stretching or centring */
.catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
@media (max-width: 1023px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); } }
.catalog--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .catalog--three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.product-card { text-decoration: none; color: inherit; }
.product-card .tile__media { --tile-ratio: 4 / 5; }
.product-card .tile__media > img { object-position: var(--pos, 50% 30%); }
.product-card:hover .tile__media > img { transform: scale(1.025); }
.product-card .tile__head > h3 { font-size: var(--t-body); }
.product-card .tile__price { font-size: var(--t-small); color: var(--muted); }
.product-card .tile__facts { margin-top: calc(-1 * var(--s-3)); }

/* the sample label: shows only on products marked placeholder: true in products.js, so it
   disappears by itself once the real products replace them */
.sample-tag { position: absolute; top: var(--s-3); left: var(--s-3); z-index: 1; display: inline-flex; align-items: center;
  height: 24px; padding: 0 var(--s-3); border-radius: 999px; font-size: var(--t-label); font-weight: 500;
  background: var(--p-bg); color: var(--p-ink); border: 1px solid color-mix(in oklab, var(--p-ink) 18%, transparent); }
.new-tag { color: var(--p-accent); font-weight: 500; }

/* filters and sort */
.shop-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filters .tab { min-height: 44px; }
.filters .tab[aria-pressed="true"] { background: var(--action); color: var(--action-ink); border-color: var(--action); }
.sort { display: grid; gap: var(--s-1); font-size: var(--t-small); }
.sort select { height: 48px; padding: 0 var(--s-4); font: 16px/1.2 var(--font-text); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.count { color: var(--muted); font-size: var(--t-small); margin: 0 0 var(--s-5); }

/* the empty state: a category with nothing in it yet */
.empty { display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-8) 0; border-top: 1px solid var(--line); }
.empty h2 { font-size: var(--t-h3); }
.empty p { max-width: 48ch; }

/* ---------------------------------------------------------------- product page */
.pdp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.pdp__gallery { grid-column: 1 / span 7; display: grid; gap: var(--s-3); }
.pdp__info { grid-column: 9 / span 4; position: relative; display: grid; gap: var(--s-5); }
@media (max-width: 1023px) { .pdp__gallery, .pdp__info { grid-column: 1 / -1; } }
.pdp__main { position: relative; aspect-ratio: 4 / 5; overflow: clip; border-radius: var(--r-lg); background: var(--surface); }
.pdp__main img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); }
.pdp__thumbs { display: flex; gap: var(--s-3); }
.pdp__thumbs button { width: 80px; aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: clip; background: var(--surface); cursor: pointer; }
.pdp__thumbs button[aria-current="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pdp__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp__info h1 { font-size: var(--t-h2); line-height: 1.1; }
.pdp__price { font-size: var(--t-lead); }
.pdp__desc { max-width: 52ch; }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s-3); border: 0; padding: 0; margin: 0; }
.swatches legend, .field-legend { font-size: var(--t-small); font-weight: 500; margin-bottom: var(--s-3); padding: 0; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4) 0 var(--s-2);
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--t-small); }
.swatch span::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--c, #ccc); border: 1px solid color-mix(in oklab, var(--p-ink) 20%, transparent); }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }

.request { border-top: 1px solid var(--line); padding-top: var(--s-6); }
.request h2 { font-size: var(--t-h3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--gutter); }
.form-grid > .field--wide { grid-column: 1 / -1; }
@media (max-width: 639px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field textarea { min-height: 112px; }
.req-note { font-size: var(--t-small); color: var(--muted); }

/* ---------------------------------------------------------------- home */
.range-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); }
.edit-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 767px) { .edit-pair { grid-template-columns: minmax(0, 1fr); } }
.edit-tile { position: relative; display: block; overflow: clip; border-radius: var(--r-lg); color: inherit; text-decoration: none; }
.edit-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.edit-tile:hover img { transform: scale(1.025); }
.edit-tile__media { aspect-ratio: 4 / 3; height: min(56vh, 520px); width: 100%; overflow: clip; border-radius: var(--r-lg); background: var(--surface); }
@media (max-width: 767px) { .edit-tile__media { height: auto; } }
.edit-tile__label { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s-4); }
.edit-tile__label h3 { font: 400 var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }

.studio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; height: 100%; }
.studio__text { grid-column: 1 / span 5; display: grid; align-content: start; gap: var(--s-5); }
.studio__photo { grid-column: 7 / span 6; min-height: 0; overflow: clip; border-radius: var(--r-lg); }
.studio__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .studio__text, .studio__photo { grid-column: 1 / -1; } .studio__photo { aspect-ratio: 4 / 3; } }

/* policy pages: readable text column */
.prose { max-width: 68ch; display: grid; gap: var(--s-4); }
.prose h2 { font-size: var(--t-h3); margin-top: var(--s-6); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }

.credits-list { display: grid; gap: var(--s-3); padding: 0; list-style: none; font-size: var(--t-small); }
.credits-list a { color: inherit; }

.about-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.about-split__text { grid-column: 1 / span 6; display: grid; gap: var(--s-5); }
.about-split__photo { grid-column: 8 / span 5; aspect-ratio: 4 / 5; overflow: clip; border-radius: var(--r-lg); }
.about-split__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .about-split__text, .about-split__photo { grid-column: 1 / -1; } }

/* the inner pages' footer: the link columns only, as tall as they are (no close above them) */
footer.closing.closing--links { height: auto; min-height: 0; }
.range-head > .link { flex: none; white-space: nowrap; }
.range-head > h2 { max-width: 24ch; }
/* the kit's .form is a two-column grid; these forms lay out their own fields in .form-grid */
form[data-posh-form] > *, form[data-add-form] > *, form[data-checkout] > * { grid-column: 1 / -1; }
form[data-posh-form], form[data-add-form], form[data-checkout] { gap: var(--s-5); }
/* a phone: the bar holds the name and the menu only (the hero's own button is the main action there),
   so the bar never runs past the screen's right edge */
@media (max-width: 479px) { .nav:not(.is-open) .nav__actions { display: none; } .nav.nav--split:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; } }
/* stacked, the dark band's photograph takes its width from the column, never from the row's height */
@media (max-width: 1023px) {
  .studio { height: auto; grid-template-rows: auto; }
  .studio__photo { align-self: start; width: 100%; max-width: 100%; height: auto; }
  .studio__photo img { aspect-ratio: 4 / 3; height: auto; }
}
/* the hero box: never split "Womenswear" across two lines; a wider box where six columns are too narrow */
.hero--photo h1 { hyphens: manual; overflow-wrap: normal; }
@media (min-width: 1024px) and (max-width: 1279px) { .hero--photo .hero__text { width: calc(66.666% - var(--gutter) / 2); } }

/* ---------------------------------------------------------------- brand logo (assets/img/brand/logo.png, cleaned from the client's file) */
.nav__logo { display: inline-flex; align-items: center; }
.nav__logo img.brand-logo { display: block; height: 54px; width: auto; }
@media (max-width: 639px) { .nav__logo img.brand-logo { height: 44px; } }
.footer .nav__logo img.brand-logo { height: 96px; }

/* ---------------------------------------------------------------- bag link in the header */
.nav__actions { display: flex; align-items: center; gap: var(--s-3); }
.bag-link { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink); text-decoration: none; }
.bag-link:hover { background: color-mix(in oklab, var(--ink) 7%, transparent); }
.bag-link svg { width: 22px; height: 22px; }
.bag-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--p-ink); color: var(--p-bg); font: 600 11px/18px var(--font-text); text-align: center; }
/* a phone: the bar keeps the logo, the bag and the menu; only the "Shop new in" button steps out */
@media (max-width: 479px) {
  .nav:not(.is-open) .nav__actions { display: flex; margin-left: auto; }
  .nav:not(.is-open) .nav__actions .btn { display: none; }
  .nav.nav--split:not(.is-open) .nav__actions + .nav__toggle { margin-left: 0; }
}
.added a { color: inherit; font-weight: 500; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- bag page */
.bag { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; margin-top: var(--s-6); }
.bag__lines { grid-column: 1 / span 6; display: grid; gap: var(--s-5); }
.checkout { grid-column: 8 / span 5; border-top: 0; }
@media (max-width: 1023px) { .bag__lines, .checkout { grid-column: 1 / -1; } }
.checkout h2 { font-size: var(--t-h3); }
.bag-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.bag-line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.bag-line__img { display: block; aspect-ratio: 4 / 5; overflow: clip; border-radius: var(--r-sm); background: var(--surface); }
.bag-line__img img, .bag-line__img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bag-line__info { display: grid; gap: var(--s-1); align-content: start; }
.bag-line__name { font-weight: 500; color: inherit; text-decoration: none; }
.bag-line__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.bag-line__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-3); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; }
.qty button { width: 44px; height: 40px; border: 0; background: none; font: 500 18px/1 var(--font-text); color: var(--ink); cursor: pointer; border-radius: 999px; }
.qty button:disabled { color: var(--muted); opacity: .45; cursor: default; }
.qty span { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.link-btn { border: 0; background: none; padding: 0; min-height: 44px; font: inherit; font-size: var(--t-small); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.bag__total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin: 0; font-size: var(--t-small); }
/* the hidden field bots fill in; people never see it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done:focus { outline: none; }

/* ---------------------------------------------------------------- motion (assets/js/motion-posh.js)
   Image reveal: a curtain opening upward (clip-path, strong ease-in-out) while the photo settles from a slight
   zoom (transform, strong ease-out). Only before the first paint does html.js-reveal hide the photos. */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); }
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal:not(.rv-safe) :is(.product-card .tile__media, .pdp__main, .edit-tile__media, .about-split__photo, .studio__photo):not(.is-in) { clip-path: inset(100% 0 0 0); }
  html.js-reveal:not(.rv-safe) :is(.product-card .tile__media, .pdp__main, .edit-tile__media, .about-split__photo, .studio__photo):not(.is-in) img { transform: scale(1.08); }
  :is(.product-card .tile__media, .pdp__main, .edit-tile__media, .about-split__photo, .studio__photo).is-in:not(.is-done) {
    clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease-in-out) var(--rv-delay, 0ms); }
  :is(.product-card .tile__media, .pdp__main, .edit-tile__media, .about-split__photo, .studio__photo).is-in:not(.is-done) img {
    transform: scale(1); transition: transform 1200ms var(--ease-out) var(--rv-delay, 0ms); }
  /* the card's name and facts follow their photo in */
  html.js-reveal:not(.rv-safe) .product-card:has(.tile__media:not(.is-in)) :is(.tile__head, .tile__facts) { opacity: 0; transform: translateY(8px); }
  .product-card:has(.tile__media.is-in) :is(.tile__head, .tile__facts) { transition: opacity 500ms var(--ease-out) calc(var(--rv-delay, 0ms) + 350ms), transform 500ms var(--ease-out) calc(var(--rv-delay, 0ms) + 350ms); }
}
@media (prefers-reduced-motion: reduce) {
  /* fewer and gentler: the photos simply fade in, nothing moves */
  html.js-reveal :is(.product-card .tile__media, .pdp__main, .edit-tile__media, .about-split__photo, .studio__photo) img { animation: rv-fade 400ms linear both; }
}
@keyframes rv-fade { from { opacity: 0; } }

/* hover zoom only for a real pointer (a tap on a phone fires a false hover) */
.product-card:hover .tile__media > img, .edit-tile:hover img { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .product-card .tile__media.is-done > img, .edit-tile__media.is-done img { transition: transform 600ms var(--ease-out); }
  .product-card:hover .tile__media.is-done > img, .edit-tile:hover .edit-tile__media.is-done img { transform: scale(1.04); }
}

/* the piece flying into the bag */
.fly-ghost { position: fixed; left: 0; top: 0; z-index: 1000; object-fit: cover; pointer-events: none; transform-origin: 0 0; will-change: transform, opacity;
  box-shadow: 0 12px 32px rgb(27 25 22 / 0.18); }
/* buttons answer the press */
.btn:active, .qty button:active:not(:disabled) { transform: scale(0.97); transition: transform 120ms var(--ease-out); }

/* the bag stays in the bar on tablets and phones (the kit moves everything but the main button to the sheet) */
@media (max-width: 1023px) { .nav.nav:not(.is-open) .nav__actions > .bag-link { display: inline-grid; } }
@media (max-width: 639px) {
  :root:has(> body > nav.actionbar) .nav.nav:not(.is-open) .nav__actions { display: flex; margin-left: auto; }
  :root:has(> body > nav.actionbar) .nav.nav:not(.is-open) .nav__actions > .btn { display: none; }
  :root:has(> body > nav.actionbar) .nav.nav:not(.is-open) .nav__toggle { margin-left: 0; }
}

/* ---------------------------------------------------------------- looping clips (products.js "video") */
.tile__media > video, .pdp__main > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; background: var(--surface); }
.pdp__main > video[hidden] { display: none; }
.pdp__thumbs video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal:not(.rv-safe) :is(.product-card .tile__media, .pdp__main):not(.is-in) video { transform: scale(1.08); }
  :is(.product-card .tile__media, .pdp__main).is-in:not(.is-done) video { transform: scale(1); transition: transform 1200ms var(--ease-out) var(--rv-delay, 0ms); }
}
@media (hover: hover) and (pointer: fine) {
  .product-card .tile__media.is-done > video { transition: transform 600ms var(--ease-out); }
  .product-card:hover .tile__media.is-done > video { transform: scale(1.04); }
}

/* ---------------------------------------------------------------- saved pieces: the heart, top right of the photo */
.pc { position: relative; min-width: 0; }
.like { position: absolute; top: var(--s-3); right: var(--s-3); z-index: 2; display: inline-grid; place-items: center; width: 40px; height: 40px;
  padding: 0; border: 0; border-radius: 999px; background: color-mix(in oklab, var(--p-bg) 88%, transparent); color: var(--p-ink); cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color 160ms ease, transform 120ms var(--ease-out); }
.like svg { width: 20px; height: 20px; fill: transparent; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round;
  transition: fill 160ms ease, stroke 160ms ease; }
.like[aria-pressed="true"] svg { fill: var(--p-accent); stroke: var(--p-accent); }
.like:active { transform: scale(0.92); }
.like:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .like:hover { background: var(--p-bg); } }
.like--lg { width: 48px; height: 48px; top: var(--s-4); right: var(--s-4); }
.like--lg svg { width: 24px; height: 24px; }
/* the heart waits for its photo's curtain, then fades in */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal:not(.rv-safe) .pc:has(.tile__media:not(.is-in)) > .like, html.js-reveal:not(.rv-safe) .pdp__main:not(.is-in) > .like { opacity: 0; }
  .pc > .like, .pdp__main > .like { transition: opacity 400ms var(--ease-out) 500ms, background-color 160ms ease, transform 120ms var(--ease-out); }
}
.tab--saved { display: inline-flex; align-items: center; gap: 6px; }
.tab--saved svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tab--saved[aria-pressed="true"] svg { fill: currentColor; }
.swatch span.no-dot { padding-left: var(--s-4); }
.swatch span.no-dot::before { display: none; }
