/* ------------------------------------------------------------------------
   links.css — Bert Kreischer links hub (bertbertbert.com/links/)
   v6, 2026-10-05

   Light theme, hard corners, two row sizes.

   THREE SIZES, all redefined in v5
     small   row,      1:1 thumb in a --bl-media-w column, text to the right
     medium  row,      1:1 image at 50% of the card, text in the other half
                       (this was "large" in v4)
     large   stacked,  16:9 image at full width, text in a box underneath

   The v4 medium (4:5 poster in the shared column) is GONE. Nothing renders it
   any more; a sheet still carrying those rows needs them reassigned by hand.

   ALIGNMENT: the shared-left-edge rule now applies within the small rows only,
   which is what --bl-media-w governs. Medium and large each set their own
   media width on purpose, so their text starts somewhere else. That is the
   hierarchy doing its job, not drift. Keep medium and large rare or the page
   loses the rhythm that makes them read as featured.

   Namespaced under .bl so the site's compiled css.css cannot reach in and
   this cannot leak out into the header or footer it sits between. Loaded
   after css.css, so the few intentional overrides win.
   ------------------------------------------------------------------------ */

.bl-body {
  --bl-bg: #ffffff;
  --bl-fg: #111111;
  --bl-muted: #5a5a5a;

  /* Primary gold. Sampled from the Permission to Party artwork; swap this one
     line for the official style guide value when you have it. */
  --bl-gold: #C9A23F;

  --bl-row-bg: #ffffff;
  --bl-row-bg-hover: #111111;   /* hover inverts: dark fill, white text */
  --bl-fg-hover: #ffffff;
  --bl-muted-hover: rgba(255, 255, 255, 0.72);
  --bl-media-bg: #f0f0f0;
  --bl-media-bg-hover: #2a2a2a;
  --bl-section-bg: #ededed;
  --bl-border: #111111;   /* share button only; cards have no border as of v6 */

  --bl-media-w: 130px;          /* small:  the thumb column, 96px on phones */
  --bl-media-ratio: 1 / 1;      /* small:  square thumb */
  --bl-media-w-md: 50%;         /* medium: half the card */
  --bl-media-ratio-md: 1 / 1;   /* medium: square, card grows to match */
  --bl-media-w-lg: 100%;        /* large:  full bleed across the card */
  --bl-media-ratio-lg: 16 / 9;  /* large:  cinematic, text sits underneath */

  --bl-gap: 14px;            /* media to text */
  --bl-row-gap: 10px;        /* row to row */

  background: var(--bl-bg);
  color: var(--bl-fg);
}

/* ---------------------------------------------------------------- layout */
.bl {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.bl__h1 {
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--bl-muted);
  margin: 0 0 20px;
}

.bl-cat {
  margin: 0 0 32px;
  background: var(--bl-section-bg);
  padding: 20px;
}

.bl-cat__heading {
  /* doubled from 0.78rem in v5. The margin went up with it, or a heading this
     size sits right on top of the first card. */
  font-size: 1.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bl-muted);
  margin: 0 0 16px;
}

.bl-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--bl-row-gap);
}

/* ------------------------------------------------------------------ share */
.bl__bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 6px;
}

.bl-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  color: var(--bl-fg);
  border: 1px solid var(--bl-border);
  border-radius: 0;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.bl-share:hover,
.bl-share:focus-visible {
  background: var(--bl-fg);
  color: var(--bl-fg-hover);
}

.bl-share:hover i,
.bl-share:focus-visible i { color: var(--bl-gold); }

.bl-share:focus-visible {
  outline: 2px solid var(--bl-gold);
  outline-offset: 2px;
}

/* Desktop fallback feedback. Hidden from view until the script adds .is-on,
   but it stays in the accessibility tree as a live region so the copy is
   announced rather than only seen. */
.bl-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 2147483000;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  background: var(--bl-fg);
  color: var(--bl-fg-hover);
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.bl-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .bl-toast { transition: opacity 0.18s ease; transform: translate(-50%, 0); }
}

/* ---------------------------------------------------------------- socials */
/* Icon row under the name. Dark by default, gold on hover, matching the
   chevron so the accent reads as one system rather than two. */
/* One row, always. Seven icons have to fit a 320px phone, so the box and the
   gap both scale with the viewport rather than wrapping. nowrap is the rule;
   the clamps are what make the rule survivable. */
.bl-social {
  list-style: none;
  margin: -8px 0 30px;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(2px, 2.2vw, 16px);
}

.bl-social__item { margin: 0; }

.bl-social__a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 11vw, 46px);
  height: clamp(34px, 11vw, 46px);
  font-size: clamp(1.05rem, 4.4vw, 1.45rem);
  color: var(--bl-fg);
  text-decoration: none;
  transition: color 0.18s ease;
}

.bl-social__a:hover,
.bl-social__a:focus-visible {
  color: var(--bl-gold);
  text-decoration: none;
}

.bl-social__a:focus-visible {
  outline: 2px solid var(--bl-gold);
  outline-offset: 2px;
}

/* Icons carry aria-hidden, so each link needs real text for a screen reader.
   This keeps it out of sight without hiding it from assistive tech. */
.bl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ rows */
.bl-link { margin: 0; }

.bl-link__a {
  display: flex;
  align-items: center;
  gap: var(--bl-gap);
  padding: 0 16px 0 0;        /* media flush left; gutter on the right keeps the
                                 chevron off the border */
  background: var(--bl-row-bg);
  /* No border on any card as of v6. The cards read as cards because the
     section sits on --bl-section-bg and the cards are white on top of it, so
     a border would only add noise. --bl-border is still used by the share
     button, which has no such backdrop. */
  border: 0;
  border-radius: 0;           /* hard corners */
  color: var(--bl-fg);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

/* Hover and keyboard focus invert the row: dark fill, white text, gold chevron.
   Declared together so a keyboard user gets the same affordance as a mouse user. */
.bl-link__a:hover,
.bl-link__a:focus-visible {
  background: var(--bl-row-bg-hover);
  color: var(--bl-fg-hover);
  text-decoration: none;
}

.bl-link__a:hover .bl-link__title,
.bl-link__a:focus-visible .bl-link__title { color: var(--bl-fg-hover); }

.bl-link__a:hover .bl-link__desc,
.bl-link__a:focus-visible .bl-link__desc { color: var(--bl-muted-hover); }

/* Icon-only rows need the media box to come along, or it stays a pale square
   floating in a dark row. Rows with artwork keep the image untouched. */
.bl-link__a:hover .bl-link__media,
.bl-link__a:focus-visible .bl-link__media { background: var(--bl-media-bg-hover); }

.bl-link__a:hover .bl-link__media i,
.bl-link__a:focus-visible .bl-link__media i { color: var(--bl-gold); }

.bl-link__a:hover .bl-link__chev,
.bl-link__a:focus-visible .bl-link__chev { transform: translateX(3px); }

.bl-link__a:focus-visible {
  outline: 2px solid var(--bl-gold);
  outline-offset: 2px;
}

/* media: fixed width on BOTH sizes so the text column always starts
   at the same x. Only the aspect ratio changes. */
.bl-link__media {
  flex: 0 0 var(--bl-media-w);
  width: var(--bl-media-w);
  aspect-ratio: var(--bl-media-ratio);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bl-media-bg);
  font-size: 1.6rem;
  color: var(--bl-fg);
  align-self: stretch;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.bl-link__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* A row with neither image nor icon still reserves the column, so one
   missing asset cannot knock that row's title out of alignment. */
.bl-link__media--empty { background: var(--bl-media-bg); }

.bl-link__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 12px 0;
}

.bl-link__title {
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.02rem;
  color: var(--bl-fg);
}

.bl-link__desc {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--bl-muted);
}

/* --------------------------------------------------------------- chevron */
.bl-link__chev {
  flex: 0 0 auto;
  padding-left: 12px;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--bl-gold);
  transition: transform 0.18s ease;
}

/* ---------------------------------------------------------------- medium */
/* Medium runs INVERTED: dark card with light text at rest, flipping to light
   on hover. That is the opposite of small and large, so every rule below has
   to out-specify the shared hover block in the rows section. Adding
   .bl-link--medium does that, and these rules come later in the file, which is
   the belt to that braces. Reorder at your peril.

   Half image, half text, square artwork. flex-basis 50% with min-width 0 on the
   text is what actually holds the split; without the min-width a long title
   would push the image narrower than half. */

.bl-link--medium .bl-link__media {
  flex: 0 0 var(--bl-media-w-md);
  width: var(--bl-media-w-md);
  aspect-ratio: var(--bl-media-ratio-md);
  font-size: 2.4rem;
}

.bl-link--medium .bl-link__text {
  min-width: 0;
  padding: 16px 16px 16px 0;
  justify-content: center;
}

/* --- medium: resting state is the inverted one --- */
.bl-link--medium .bl-link__a {
  background: var(--bl-fg);
  color: var(--bl-fg-hover);
}

.bl-link--medium .bl-link__title { color: var(--bl-fg-hover); }
.bl-link--medium .bl-link__desc  { color: var(--bl-muted-hover); }
.bl-link--medium .bl-link__media { background: var(--bl-media-bg-hover); }
.bl-link--medium .bl-link__media i { color: var(--bl-gold); }

/* --- medium: hover swaps BACK to light --- */
.bl-link--medium .bl-link__a:hover,
.bl-link--medium .bl-link__a:focus-visible {
  background: var(--bl-row-bg);
  color: var(--bl-fg);
}

.bl-link--medium .bl-link__a:hover .bl-link__title,
.bl-link--medium .bl-link__a:focus-visible .bl-link__title { color: var(--bl-fg); }

.bl-link--medium .bl-link__a:hover .bl-link__desc,
.bl-link--medium .bl-link__a:focus-visible .bl-link__desc { color: var(--bl-muted); }

.bl-link--medium .bl-link__a:hover .bl-link__media,
.bl-link--medium .bl-link__a:focus-visible .bl-link__media { background: var(--bl-media-bg); }

.bl-link--medium .bl-link__a:hover .bl-link__media i,
.bl-link--medium .bl-link__a:focus-visible .bl-link__media i { color: var(--bl-gold); }

.bl-link--medium .bl-link__title { font-size: 1.5rem; line-height: 1.15; }
.bl-link--medium .bl-link__desc  { font-size: 0.95rem; }
.bl-link--medium .bl-link__chev  { font-size: 1.15rem; }

/* ----------------------------------------------------------------- large */
/* Stacked: a 16:9 image across the full width, then the text in a box below.
   No markup change is needed for this. The anchor wraps, the media takes a
   full-width first line, and the text and chevron share the second line, so
   the chevron stays bottom-right where it is on every other card. */
.bl-link--large .bl-link__a {
  flex-wrap: wrap;
  align-items: center;
  /* No padding on the anchor. The row sizes carry a right gutter here to keep
     the chevron off the border, but the media is its own full-width line in
     this layout, so that padding would inset the image from the right edge.
     The gutter moves to the chevron, which is the thing that needed it. */
  padding: 0;
}

.bl-link--large .bl-link__media {
  flex: 0 0 var(--bl-media-w-lg);
  width: var(--bl-media-w-lg);
  aspect-ratio: var(--bl-media-ratio-lg);
  font-size: 2.6rem;
}

/* Left padding here, unlike the row sizes: there is no media beside the text
   to supply the gutter. */
.bl-link--large .bl-link__text {
  min-width: 0;
  padding: 16px 0 16px 16px;
}

.bl-link--large .bl-link__title { font-size: 1.6rem; line-height: 1.15; }
.bl-link--large .bl-link__desc  { font-size: 0.95rem; }
.bl-link--large .bl-link__chev  { font-size: 1.15rem; padding-right: 16px; }

/* ------------------------------------------------------- small viewports */
@media (max-width: 575.98px) {
  .bl-body { --bl-media-w: 96px; --bl-gap: 12px; }
  .bl { padding: 20px 12px 48px; }
  .bl-cat { padding: 14px; }
  .bl-cat__heading { font-size: 1.25rem; }
  .bl-link__title { font-size: 0.96rem; }
  .bl-link--medium .bl-link__title { font-size: 1.15rem; }
  .bl-link--medium .bl-link__text { padding: 12px 12px 12px 0; }
  .bl-link--large .bl-link__title { font-size: 1.25rem; }
  .bl-link--large .bl-link__text { padding: 12px 0 12px 12px; }
  .bl-link--large .bl-link__chev { padding-right: 12px; }
  .bl-link__desc { font-size: 0.8rem; }
}

/* The site header is fixed, so the content needs clearance. Tuned against
   the header_4 render; revisit if the header height changes. */
.bl-body .bl { padding-top: 96px; }

@media (min-width: 992px) {
  .bl-body .bl { padding-top: 110px; }
}

/* Reduced motion keeps the colour inversion (it carries the meaning) and drops
   the movement. */
@media (prefers-reduced-motion: reduce) {
  .bl-link__a,
  .bl-link__media,
  .bl-link__chev { transition: none; }
  .bl-link__a:hover .bl-link__chev,
  .bl-link__a:focus-visible .bl-link__chev { transform: none; }
}
