/* ---------------------------------------------------------------
   Sourcing Catalogue — brand framework
   Clean editorial layout, light theme. Brand names are the only text,
   and each name is overlaid directly on its own image.
   --------------------------------------------------------------- */

:root {
  --bg: #e2d9c9;
  --ink: #191918;
  --line: #dcdad3;
  --pad: clamp(24px, 5.2vw, 88px);
  --sans: "Helvetica Neue", "Segoe UI", "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; }

::selection { background: var(--ink); color: var(--bg); }

.collections {
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(48px, 6vw, 96px) var(--pad);
}

.brand { padding: 0 0 clamp(32px, 4vw, 64px); }
.brand:last-child { padding-bottom: 0; }

/* Entries that open a sub-collection are links: same look, no underline. */
.brand--link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Small chevron marking a card that leads somewhere. */
.brand-go {
  position: absolute;
  right: clamp(12px, 1.4vw, 18px);
  bottom: clamp(12px, 1.4vw, 18px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, .86);
  border: 1px solid rgba(25, 25, 24, .08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, color .3s ease;
}

.brand-go svg { width: 15px; height: 15px; margin-left: 1px; }

.brand--link:hover .brand-go,
.brand--link:focus-visible .brand-go {
  transform: translateX(3px);
  background: var(--ink);
  color: #fffdf8;
}

/* Image slot: full width, height cropped to 2/3 of the source.
   3:2 means a square photo shows its middle two thirds — nothing
   is trimmed on the left or right. */

.brand-figure {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  aspect-ratio: 3 / 2;
  background: var(--tone, #efede7);
  border: 1px solid rgba(25, 25, 24, .055);
  border-radius: clamp(10px, 1.3vw, 20px);
  box-shadow: 0 24px 70px -38px rgba(25, 25, 24, .45);
  overflow: hidden;
}

/* Optional scrim for dark photos: set data-ink="light" on the figure. */
.brand-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(18, 18, 18, .42), rgba(18, 18, 18, 0) 55%);
  opacity: 0;
  transition: opacity .4s ease;
}

.brand-figure[data-ink="light"]::after { opacity: 1; }

.ph-frame {
  position: absolute;
  inset: 18px;
  z-index: 1;
  border: 1px solid rgba(25, 25, 24, .085);
  pointer-events: none;
}

.brand-figure.has-image .ph-frame { display: none; }

.brand-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--img-pos, center);
  filter: blur(1.1px) saturate(1.03);
  transition: transform 1s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.brand:hover .brand-img { transform: scale(1.028); }

.brand-name {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin: 0;
  font-size: var(--name-size, clamp(3rem, 7.5vw, 7.5rem));
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  color: var(--ink);
  text-shadow:
    0 0 2px rgba(255, 252, 246, .55),
    0 4px 26px rgba(255, 252, 246, .42),
    0 12px 52px rgba(40, 26, 12, .16);
  pointer-events: none;
}

.brand-figure[data-ink="light"] .brand-name { color: #f6f5f1; }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s ease, transform .85s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- product grid (inside a category page) ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 2.8vw, 48px) clamp(14px, 2vw, 32px);
  /* clear the floating contact dock, otherwise the last row's bottom-right
     corner can never be scrolled out from under it */
  padding-bottom: clamp(116px, 11vw, 148px);
}

.product { margin: 0; }

.product-figure {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 clamp(10px, 1.1vw, 16px);
  aspect-ratio: 1 / 1;
  background: var(--tone, #efede7);
  border: 1px solid rgba(25, 25, 24, .055);
  border-radius: clamp(10px, 1.3vw, 20px);
  box-shadow: 0 20px 56px -34px rgba(25, 25, 24, .42);
  overflow: hidden;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}

.product-figure:focus-visible {
  outline: 2px solid rgba(25, 25, 24, .5);
  outline-offset: 4px;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.product:hover .product-img { transform: scale(1.028); }

.product-info { padding: 0 clamp(2px, .35vw, 6px); }

.product-name {
  margin: 0;
  font-size: clamp(.95rem, 1.15vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--ink);
}

.product-meta {
  margin: 5px 0 0;
  font-size: clamp(.78rem, .88vw, .9rem);
  font-weight: 400;
  letter-spacing: .015em;
  color: rgba(25, 25, 24, .55);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(24, 21, 18, .84);
  -webkit-backdrop-filter: blur(16px) saturate(.9);
  backdrop-filter: blur(16px) saturate(.9);
  opacity: 0;
  transition: opacity .28s ease;
}

.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; cursor: zoom-out; }

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  transform: scale(.96);
  transition: transform .34s cubic-bezier(.2, .7, .2, 1);
}

.lightbox.is-open .lightbox-inner { transform: none; }

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 170px);
  /* iOS Safari: 100vh overflows behind the browser chrome */
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  border-radius: clamp(8px, 1vw, 16px);
  background: #fff;
  box-shadow: 0 46px 110px -40px rgba(0, 0, 0, .75);
}

.lightbox-cap {
  font-size: clamp(.85rem, 1vw, .98rem);
  letter-spacing: .015em;
  color: rgba(255, 253, 248, .74);
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: calc(clamp(14px, 2.6vw, 30px) + env(safe-area-inset-top, 0px));
  right: clamp(14px, 2.6vw, 30px);
  z-index: 121;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, .92);
  border: 1px solid rgba(25, 25, 24, .09);
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .6);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .3s ease, color .3s ease, transform .3s ease;
}

.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--ink);
  color: #fffdf8;
  transform: rotate(90deg);
}

/* ---------- back to the main list ---------- */

.back {
  position: fixed;
  left: clamp(14px, 2.6vw, 30px);
  top: calc(clamp(14px, 2.6vw, 30px) + env(safe-area-inset-top, 0px));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, .9);
  border: 1px solid rgba(25, 25, 24, .09);
  box-shadow: 0 16px 34px -16px rgba(25, 25, 24, .5);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, color .3s ease;
}

.back svg { width: 20px; height: 20px; margin-right: 1px; }

.back:hover,
.back:focus-visible {
  background: var(--ink);
  color: #fffdf8;
  transform: translateX(-2px);
}

.back[hidden] { display: none; }

/* ---------- floating contact dock ---------- */

.dock {
  position: fixed;
  right: clamp(14px, 2.6vw, 30px);
  bottom: calc(clamp(14px, 2.6vw, 30px) + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dock-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, .9);
  border: 1px solid rgba(25, 25, 24, .09);
  box-shadow: 0 16px 34px -16px rgba(25, 25, 24, .5);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1),
              background-color .3s ease, border-color .3s ease,
              color .3s ease, box-shadow .3s ease;
}

.dock-btn svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.dock-btn:hover,
.dock-btn:focus-visible {
  transform: translateY(-3px);
  color: #fffdf8;
  box-shadow: 0 22px 42px -16px rgba(25, 25, 24, .52);
}

.dock-btn--wa:hover,
.dock-btn--wa:focus-visible {
  background: #25d366;
  border-color: #25d366;
}

.dock-btn--mail:hover,
.dock-btn--mail:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
}

.dock-btn:focus-visible {
  outline: 2px solid rgba(25, 25, 24, .45);
  outline-offset: 3px;
}

.dock-btn:active { transform: translateY(-1px) scale(.97); }

/* keep the last photo clear of the dock */

.brand:last-child { padding-bottom: clamp(112px, 10vw, 128px); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .collections { max-width: none; }
  .brand-name { font-size: calc(var(--name-size, 10vw) * .82); }
}

@media (max-width: 560px) {
  .ph-frame { inset: 12px; }
  .brand-name { font-size: calc(var(--name-size, 10vw) * .62); }
  .dock { gap: 8px; }
  .dock-btn { width: 46px; height: 46px; }
  .dock-btn svg { width: 21px; height: 21px; }
  .back { width: 42px; height: 42px; }
  .back svg { width: 18px; height: 18px; }
  .brand-go { width: 30px; height: 30px; }
  .brand-go svg { width: 13px; height: 13px; }
  .products { gap: 22px 10px; }
  .product-name { font-size: .92rem; }
  .product-meta { font-size: .76rem; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand-img { transition: none; }
}
