/* Page-specific tweaks that don't belong in the shared component library */

/* About: portrait crop ratio */
.about-portrait img {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* About: collaboration section for brands & organizations.
   Labels and numbers use the mono register from the homepage's
   closing block, so the two pages read as one system. */
.collab__grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 860px) {
  .collab__grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-9);
    align-items: start;
  }
}

/* One step down from the default h2: the intro column is the narrower
   of the two, and the full size broke the title onto four lines. */
.collab__intro .section__title {
  font-size: var(--fs-xl);
}

.collab__intro > p:not(.eyebrow):not(.collab__label) {
  margin-top: var(--space-5);
  max-width: 46ch;
}

.collab__label,
.collab__n {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.collab__label {
  margin-bottom: var(--space-3);
}

.collab__fit {
  margin-top: var(--space-7);
}

.collab__fit-list {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--color-text);
}

.collab__fit-list li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--color-border);
}

.collab__fit-list li:last-child {
  border-bottom: 1px solid var(--color-border);
}

.collab__list {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.collab__list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.collab__list .collab__n {
  color: var(--color-accent);
  padding-top: 0.35em;
}

.collab__list h3,
.collab__steps h3 {
  font-size: var(--fs-md);
}

.collab__list p,
.collab__steps p {
  margin-top: var(--space-2);
}

/* Previous collaborations: a quiet logo strip between the offer and
   the process. Every logo is flattened to a white silhouette so
   brands with different colours sit together as one row. Needs
   transparent-background files. */
.collab__clients {
  margin-top: var(--space-8);
}

/* Logos flow in centred lines and wrap when they run out of room, so
   adding or removing one never resizes the others: a logo's size comes
   from its own shape, not from the box it lands in. */
.collab__logos {
  /* Side of the square each logo's area matches. Raise or lower this
     to scale every logo together. */
  --logo-size: clamp(3.75rem, 3.3rem + 1.4vw, 4.5rem);

  list-style: none;
  margin: 0;
  padding: var(--space-6) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-6) var(--space-7);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.collab__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

/* Equal visual weight. js/main.js measures each logo:
     --ar   width ÷ height. Width = size × √ar gives every logo the same
            area, so a long wordmark comes out wide and short and a
            stacked emblem narrow and tall.
     --ink  share of that area that's filled. A logo that's mostly thin
            lines (Loggerhead, ~16%) looks smaller than a solid wordmark
            (Insta360, ~50%) at the same area, so the ¼ power gives
            sparse logos a measured boost without overdoing it.
   The fixed 9rem is the fallback for old browsers without sqrt()/pow()
   and for the moment before a lazy image loads. */
.collab__logo img {
  display: block;
  width: 9rem;
  width: calc(
    var(--logo-size) * sqrt(var(--ar, 3)) * pow(calc(0.5 / var(--ink, 0.5)), 0.25) *
      var(--logo-scale, 1)
  );
  max-width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

/* Optional nudge for very bold wordmarks that still read heavier than
   their neighbours at equal area. */
.collab__logo--compact {
  --logo-scale: 0.9;
}

.collab__logo--placeholder {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.collab__process {
  margin-top: var(--space-8);
}

.collab__steps {
  margin: 0;
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 720px) {
  .collab__steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.collab__steps li {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-strong);
}

.collab__steps h3 {
  margin-top: var(--space-3);
}

/* Shop: coming-soon overlay on product art */
.product-card__media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__media::after {
  content: "Coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0.55);
  color: var(--color-text);
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Contact: stack info above form on small screens, side-by-side above */
.contact-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-9);
  }
}

@media print {
  .site-header, .nav-mobile, .lightbox, .site-footer {
    display: none !important;
  }
}
