/* =============================================================
   /partners — the DRXP partner showcase (views/partners.php)

   Same language as the rest of the site: near-black, Anton headings,
   Permanent Marker kickers, orange --acc and yellow --ylw. The backdrop is
   layered here rather than being an image: two drifting glows, a halftone
   dot field, diagonal caution stripes and a huge outline DRXP wordmark.

   Cards are sticker panels — tilted, thick-bordered, offset in accent —
   that straighten and light up on hover. Their merch slides in from the
   bottom edge.

   The drift follows the pointer (partners.js). Reduced motion and .perf-lite
   keep the backdrop still; nothing moves that has to move.
   ============================================================= */

.pw {
  --pw-ease: cubic-bezier(.22, 1, .36, 1);
  position: relative;
  padding: 148px 0 96px;
  isolation: isolate;
}

/* ---------------- backdrop ---------------- */
.pw-bg {
  --x: calc(var(--ax, 0) * 1px);
  --y: calc(var(--ay, 0) * 1px);
  position: fixed; inset: 0; z-index: -1; pointer-events: none; contain: strict;
  background: var(--bg);
}
.pw-bg > * { position: absolute; }
.pw-glow { width: 90vmax; height: 90vmax; border-radius: 50%; filter: blur(60px); opacity: .5; }
.pw-glow-a { top: -34vmax; left: calc(-18vmax + var(--x)); background: radial-gradient(closest-side, rgba(255, 107, 53, .5), transparent 70%); }
.pw-glow-b { bottom: -40vmax; right: calc(-22vmax - var(--x)); background: radial-gradient(closest-side, rgba(248, 206, 0, .28), transparent 70%); }
/* Halftone: the print-shop texture behind everything. */
.pw-dots {
  inset: 0;
  background-image: radial-gradient(rgba(240, 236, 224, .16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 72%);
  opacity: .5;
}
/* Caution stripes across the top, the way a drop banner reads. */
.pw-stripes {
  top: 0; left: -10%; right: -10%; height: 340px;
  background: repeating-linear-gradient(115deg, rgba(255, 107, 53, .16) 0 14px, transparent 14px 44px);
  mask-image: linear-gradient(180deg, #000, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  transform: translate3d(calc(var(--x) * -.4), 0, 0);
}
.pw-word {
  right: -2vw; top: 34vh;
  font-family: var(--head); font-size: clamp(120px, 24vw, 420px); line-height: .8;
  letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 2px rgba(240, 236, 224, .045);
  transform: rotate(90deg) translate3d(calc(var(--y) * .3), 0, 0); transform-origin: 100% 0;
}

/* ---------------- hero ---------------- */
.pw-hero { margin-bottom: 64px; }
.pw-kick { margin-bottom: 10px; }
.pw-title { font-size: clamp(3.4rem, 11vw, 8.5rem); line-height: .86; letter-spacing: -.01em; }
.pw-title em {
  font-style: normal; color: var(--bg); background: var(--acc);
  padding: 0 .12em; margin-left: -.04em; display: inline-block;
  transform: rotate(-1.4deg); box-shadow: 8px 8px 0 rgba(0, 0, 0, .45);
}
.pw-lede { max-width: 62ch; margin-top: 26px; color: var(--tx2); font-size: 1.05rem; line-height: 1.75; }
.pw-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pw-fact {
  padding: 9px 16px; border: 2px solid var(--line2); background: rgba(22, 22, 21, .7);
  font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2);
}
.pw-fact b { font-family: var(--head); font-size: 1.15rem; font-weight: 400; letter-spacing: .02em; color: var(--ylw); margin-right: 4px; }
.pw-empty { padding: 60px 0; color: var(--tx2); text-align: center; }

/* ---------------- the wall ---------------- */
.pw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 30px;
}
.pw-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 2px solid var(--line2);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .55);
  transform: rotate(-1.1deg);
  transition: transform .5s var(--pw-ease), box-shadow .5s var(--pw-ease), border-color .4s;
  color: var(--tx);
}
.pw-card:nth-child(even) { transform: rotate(1deg); }
.pw-card:nth-child(3n) { transform: rotate(-.4deg); }
.pw-card:hover, .pw-card:focus-visible {
  transform: rotate(0) translateY(-6px);
  border-color: var(--acc);
  box-shadow: 14px 14px 0 var(--acc);
  color: var(--tx);
}
.pw-card:focus-visible { outline: 3px solid var(--ylw); outline-offset: 4px; }

/* The lead partner gets a wide panel: image left, words right. */
.pw-card--lead { grid-column: span 2; flex-direction: row; transform: rotate(-.6deg); }
.pw-card--lead .pw-face { flex: 1 1 52%; aspect-ratio: auto; min-height: 420px; }
.pw-card--lead .pw-body { flex: 1 1 48%; justify-content: center; padding: 34px 32px; }
.pw-card--lead .pw-name { font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
.pw-card--lead .pw-bio { display: block; }

.pw-face { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel2); }
.pw-face img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%;
  filter: grayscale(.55) contrast(1.05);
  transition: filter .6s var(--pw-ease), transform .9s var(--pw-ease);
}
.pw-card:hover .pw-face img { filter: none; transform: scale(1.06); }
.pw-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .1) 30%, rgba(10, 10, 10, .85)); }
.pw-initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--head); font-size: clamp(3rem, 9vw, 6rem); color: rgba(240, 236, 224, .16);
  background: repeating-linear-gradient(135deg, rgba(255, 107, 53, .12) 0 18px, transparent 18px 48px), var(--panel2);
}
.pw-flag {
  position: absolute; top: 14px; right: -30px; width: 130px; padding: 5px 0;
  background: var(--acc); color: #0A0A0A; text-align: center;
  font-size: .62rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(32deg);
}

.pw-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; }
.pw-name { font-family: var(--head); font-size: 2rem; line-height: .95; text-transform: uppercase; }
.pw-tag { font-family: var(--mark); font-size: 1.15rem; line-height: 1.15; color: var(--acc); }
.pw-bio { display: none; color: var(--tx2); font-size: .92rem; line-height: 1.65; }
.pw-go {
  margin-top: 6px; font-size: .7rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--tx2);
  transition: color .3s;
}
.pw-go i { display: inline-block; font-style: normal; transition: transform .4s var(--pw-ease); }
.pw-card:hover .pw-go { color: var(--ylw); }
.pw-card:hover .pw-go i { transform: translateX(6px); }

/* Their merch, riding in over the bottom of the card on hover. */
.pw-pieces {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px; padding: 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 10, .92) 40%);
  transform: translateY(101%);
  transition: transform .45s var(--pw-ease);
}
.pw-card:hover .pw-pieces, .pw-card:focus-visible .pw-pieces { transform: translateY(0); }
.pw-piece { width: 54px; height: 54px; border: 2px solid var(--line2); background: var(--panel2); overflow: hidden; }
.pw-piece img { width: 100%; height: 100%; object-fit: cover; }
.pw-card--lead .pw-pieces { left: auto; width: 52%; }

/* The invitation tile. */
.pw-card--join {
  justify-content: center; min-height: 340px;
  background:
    repeating-linear-gradient(135deg, rgba(248, 206, 0, .07) 0 16px, transparent 16px 46px),
    linear-gradient(160deg, #1d1d1b, #111110);
  border-style: dashed; border-color: var(--acc);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .5);
}
.pw-card--join .pw-bio { display: block; }
.pw-card--join .pw-name { color: var(--ylw); }
.pw-join-kick {
  align-self: flex-start; padding: 4px 12px; margin-bottom: 4px;
  background: var(--acc); color: #0A0A0A;
  font-size: .64rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
}

/* Reveal: site.js adds .vis, staggered here so the wall builds itself. */
.pw-card.reveal { opacity: 0; transform: translateY(26px) rotate(-1.1deg); transition: opacity .7s var(--pw-ease), transform .7s var(--pw-ease); }
.pw-card.reveal.vis { opacity: 1; transition-delay: calc(var(--i, 0) * 60ms); }
.pw-card.reveal.vis { transform: rotate(-1.1deg); }
.pw-card.reveal.vis:nth-child(even) { transform: rotate(1deg); }
.pw-card.reveal.vis:nth-child(3n) { transform: rotate(-.4deg); }
.pw-card--lead.reveal.vis { transform: rotate(-.6deg); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .pw-grid { grid-template-columns: repeat(2, 1fr); }
  .pw-card--lead { grid-column: span 2; }
}
@media (max-width: 820px) {
  .pw { padding-top: 124px; }
  .pw-card--lead { flex-direction: column; }
  .pw-card--lead .pw-face { min-height: 0; aspect-ratio: 16 / 10; }
  .pw-card--lead .pw-body { padding: 22px 20px 24px; }
  .pw-card--lead .pw-pieces { width: auto; left: 0; }
}
@media (max-width: 620px) {
  .pw-grid { grid-template-columns: 1fr; gap: 26px; }
  .pw-card, .pw-card:nth-child(even), .pw-card:nth-child(3n),
  .pw-card.reveal, .pw-card.reveal.vis, .pw-card.reveal.vis:nth-child(even),
  .pw-card.reveal.vis:nth-child(3n), .pw-card--lead, .pw-card--lead.reveal.vis { transform: none; }
  .pw-card.reveal { opacity: 0; transform: translateY(20px); }
  .pw-card.reveal.vis { opacity: 1; transform: none; }
  .pw-card:hover { transform: translateY(-4px); }
  .pw-card--lead { grid-column: span 1; }
  .pw-bio { display: block; }
  .pw-word { display: none; }
  /* Touch has no hover: the merch strip just sits there. */
  .pw-pieces { position: static; transform: none; background: none; padding: 0 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-card, .pw-face img, .pw-pieces, .pw-go i { transition: none !important; }
  .pw-card.reveal { opacity: 1 !important; transform: none !important; }
}
.perf-lite .pw-glow { filter: blur(30px); opacity: .35; }
.perf-lite .pw-card { box-shadow: 8px 8px 0 rgba(0, 0, 0, .55); }

/* A partner card is a card with a link stretched over it (so a second link,
   Hire for art, can sit on top for partners who take commissions). */
div.pw-card { position: relative; cursor: pointer; }
.pw-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.pw-link:focus-visible { outline: 3px solid var(--ylw); outline-offset: 4px; }
.pw-card:focus-within { transform: translateY(-4px); }
.pw-flag--hire { top: auto; right: auto; bottom: 12px; left: 12px; z-index: 2; width: auto; padding: 5px 11px; border-radius: 99px; background: rgba(10, 10, 10, .8); color: #A3E635; box-shadow: inset 0 0 0 1px rgba(163, 230, 53, .5); transform: none; letter-spacing: .1em; }
.pw-hire { position: relative; z-index: 2; align-self: flex-start; margin-top: 10px; padding: 8px 14px; border: 1px solid rgba(232, 193, 90, .5); border-radius: 99px; color: #E8C15A; font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background-color .2s, color .2s; }
.pw-hire:hover, .pw-hire:focus-visible { background: #E8C15A; color: #1a1204; }
