/*
 * East Coast MX NL (ECMX): the Sponsors page (Studio's Sponsors library, cms/templates/sponsors-list.html).
 * Colours and fonts come from css/theme.css, the poster, callout and buttons from css/ecmx.css.
 * This file is linked only from that template, with a version (?v=...): change the version there whenever this
 * file changes, so a browser that still holds an older copy never shows the page half styled.
 *
 * One card per sponsor. Logos sit in fixed boxes on white (they are made for white, in both modes), so every
 * logo gets the same space whatever its shape; the brand logos (the sponsor's "Brand logos" field) share a strip
 * under it. The words follow one order: tier, name, tagline (Short description), then the More text, where a list
 * is a table of facts (a bold label, then the value) and a quote is the highlighted note. A sponsor whose Tier
 * contains "Platinum" takes the whole row, with the logo beside the words on wide screens.
 */
.sponsor-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.sponsor-list > .note { grid-column: 1 / -1; }
.sponsor { min-width: 0; display: flex; flex-direction: column; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--poster-stock); }

/* logos */
.sponsor__logos { display: flex; flex-direction: column; background: #fff; color: #112e43; border-bottom: 3px solid var(--ink); }
.sponsor__logo { flex: 1; display: flex; align-items: center; justify-content: center; padding: 26px 30px; }
.sponsor__logo img { display: block; width: 100%; max-width: 420px; height: 130px; object-fit: contain; }
.sponsor__brands:empty { display: none; }
.sponsor__brands p { margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 2px solid #112e43; }
.sponsor__brands p > a { display: flex; align-items: center; justify-content: center; height: 92px; padding: 0 18px; }
.sponsor__brands p > * + * { border-left: 1px solid #cdbfa6; }
.sponsor__brands img { display: block; width: 100%; max-width: 160px; height: 54px; object-fit: contain; }
.sponsor__brands p > img { justify-self: center; align-self: center; margin: 19px 18px; }
:is(.sponsor__logo, .sponsor__brands a):hover { background: #fffaf0; }

/* words */
.sponsor__body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px 26px 26px; }
.sponsor__tier { align-self: flex-start; margin: 0; padding: 5px 10px 4px; background: var(--ink); color: var(--paper); font: 700 12px/1.2 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; }
.sponsor__body h2 { margin: 0; font-size: clamp(28px, 2.6vw, 34px); letter-spacing: -.055em; }
.sponsor__summary { margin: -4px 0 0; font-size: 19px; line-height: 1.4; }
.sponsor__body .copy { max-width: none; display: flex; flex-direction: column; gap: 14px; }
.sponsor__body .copy > * { margin: 0; }
.sponsor__body .copy p { font-size: 16px; }
/* a list in the More text: the facts, one per row, the bold start of a row as its label */
.sponsor__body .copy ul { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.sponsor__body .copy ul > li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 2px 14px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: 16px; }
.sponsor__body .copy ul > li > strong:first-child { font: 500 12px/2 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
/* a quote in the More text: the highlighted note */
.sponsor__body .copy blockquote { margin: 0; padding: 14px 18px; border: 2px solid var(--ink); background: var(--caption-blue); color: #112e43; }
.sponsor__body .copy blockquote p { font-weight: 700; }
.sponsor__body .copy blockquote a:hover { color: #112e43; text-decoration-thickness: 3px; }
.sponsor__body .actions { margin-top: auto; padding-top: 4px; }
@media (max-width: 479px) {
  .sponsor__logo { padding: 20px; }
  .sponsor__logo img { height: 110px; }
  .sponsor__brands p > a { height: 80px; padding: 0 12px; }
  .sponsor__brands img { height: 46px; }
  .sponsor__body { padding: 20px 18px 22px; }
  .sponsor__body .copy ul > li { grid-template-columns: minmax(0, 1fr); }
}

/* the Platinum tier */
.sponsor[data-section*="platinum" i] { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .sponsor[data-section*="platinum" i] { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .sponsor[data-section*="platinum" i] .sponsor__logos { border-bottom: 0; border-right: 3px solid var(--ink); }
  .sponsor[data-section*="platinum" i] .sponsor__logo { padding: 40px 48px; }
  .sponsor[data-section*="platinum" i] .sponsor__logo img { max-width: 520px; height: 230px; }
  .sponsor[data-section*="platinum" i] .sponsor__brands p > a { height: 116px; }
  .sponsor[data-section*="platinum" i] .sponsor__brands img { max-width: 190px; height: 70px; }
  .sponsor[data-section*="platinum" i] .sponsor__body { padding: 32px 34px 34px; gap: 16px; }
  .sponsor[data-section*="platinum" i] .sponsor__body h2 { font-size: clamp(36px, 3.4vw, 48px); }
}
