/* ==========================================================================
   Rituranga Kokapet — partner / sponsor logo blocks
   Kept out of site.css on purpose. Editing site.css changes its version hash
   and would force a re-upload of every page on the site. Link this file only
   on the pages that actually show partner logos.

   Tile widths ARE the tier ladder. A Silver sponsor should be able to see
   what Gold bought — that is what makes anyone upgrade next year.
   ========================================================================== */

:root{
  --pt-title:  clamp(240px, 26vw, 320px);
  --pt-gold:   clamp(200px, 22vw, 260px);
  --pt-silver: clamp(175px, 19vw, 220px);
  --pt-bronze: clamp(155px, 17vw, 195px);
  --pt-ads:    clamp(145px, 15vw, 180px);

  --pt-c-title:  #E8A020;
  --pt-c-gold:   #D9A441;
  --pt-c-silver: #C9C6C0;
  --pt-c-bronze: #B87333;
  --pt-c-ads:    rgba(123,99,87,.45);
  --pt-c-stall:  #4F7A5A;
}

/* ── a tier group ─────────────────────────────────────────────────────── */
.pt-tier{ margin-top:clamp(26px,3.2vw,42px); }
.pt-tier:first-child{ margin-top:0; }

.pt-tier-head{
  display:flex; align-items:baseline; gap:.9rem; flex-wrap:wrap;
  margin-bottom:.9rem; padding-bottom:.5rem;
  border-bottom:1px solid var(--rule);
}
.on-alta .pt-tier-head, .on-deep .pt-tier-head{ border-bottom-color:var(--rule-light); }

.pt-rank{
  font-size:.7rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase;
  color:var(--marigold-dp);
}
.on-alta .pt-rank, .on-deep .pt-rank{ color:var(--marigold); }

.pt-slots{ font-size:.78rem; color:var(--ash); }
.on-alta .pt-slots, .on-deep .pt-slots{ color:rgba(251,246,236,.7); }

/* ── the row of tiles ─────────────────────────────────────────────────── */
.pt-row{
  display:grid; gap:clamp(12px,1.4vw,20px);
  grid-template-columns:repeat(auto-fill, minmax(var(--tile), var(--tile)));
  justify-content:start;
}
.pt-row.is-centred{ justify-content:center; }

.pt-row-title  { --tile:var(--pt-title);  }
.pt-row-gold   { --tile:var(--pt-gold);   }
.pt-row-silver { --tile:var(--pt-silver); }
.pt-row-bronze { --tile:var(--pt-bronze); }
.pt-row-ads    { --tile:var(--pt-ads);    }
.pt-row-stall  { --tile:var(--pt-bronze); }

/* ── a single logo tile ───────────────────────────────────────────────── */
.pt-tile{
  display:flex; align-items:center; justify-content:center;
  aspect-ratio:8/5; padding:clamp(7px,.9vw,13px);
  background:var(--shola); border:1px solid var(--rule);
  border-top:3px solid var(--rule);
  border-radius:12px; overflow:hidden;
  text-decoration:none; color:var(--ink);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.pt-tile:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(90,7,22,.18);
}
/* Optical sizing. Sized by bounding box, a square emblem looks half the size
   of a wide wordmark sitting in the same tile. These four cases equalise the
   visual weight instead. partners.js applies the right one automatically from
   the image's own dimensions; you can also set it by hand on the <img>.
   Filled generously on purpose — a partner logo that needs squinting at
   defeats the point of putting it on the page at all. */
.pt-tile img{
  width:auto; height:auto; object-fit:contain; display:block;
  max-width:92%; max-height:84%;                 /* sane default */
}
.pt-tile img.pt-logo-wide  { max-width:98%; max-height:66%; }  /* wider than 2.5:1 */
.pt-tile img.pt-logo-std   { max-width:92%; max-height:84%; }  /* 1.2:1 – 2.5:1   */
.pt-tile img.pt-logo-square{ max-width:78%; max-height:96%; }  /* roughly square   */
.pt-tile img.pt-logo-tall  { max-width:64%; max-height:98%; }  /* taller than wide */

/* Logo not supplied yet — never show a broken image to a paying partner. */
.pt-name{
  font-family:var(--display); font-size:clamp(.86rem,1.5vw,1.06rem);
  line-height:1.25; text-align:center; color:var(--alta-deep);
}

.pt-tile-title  { border-top-color:var(--pt-c-title);
                   box-shadow:0 4px 18px rgba(232,160,32,.22); }
.pt-tile-gold   { border-top-color:var(--pt-c-gold);   }
.pt-tile-silver { border-top-color:var(--pt-c-silver); }
.pt-tile-bronze { border-top-color:var(--pt-c-bronze); }
.pt-tile-ads    { border-top-color:var(--pt-c-ads);    }
.pt-tile-stall  { border-top-color:var(--pt-c-stall);  }


/* ── an unsold slot. Doubles as an advertisement for the tier. ────────── */
.pt-open{
  display:flex; align-items:center; justify-content:center; text-align:center;
  aspect-ratio:8/5; padding:.6rem; border-radius:12px;
  border:1px dashed var(--rule); background:transparent;
  font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ash); text-decoration:none;
  transition:border-color .18s ease, color .18s ease;
}
.on-alta .pt-open, .on-deep .pt-open{
  border-color:var(--rule-light); color:rgba(251,246,236,.55);
}
a.pt-open:hover{ border-color:var(--marigold); color:var(--marigold); }

/* ── caption under a tile (business one-liner, partners page only) ────── */
.pt-cell{ display:flex; flex-direction:column; gap:.45rem; }
.pt-cap{ font-size:.76rem; line-height:1.4; color:var(--ash); text-align:center; }
.on-alta .pt-cap, .on-deep .pt-cap{ color:rgba(251,246,236,.72); }

/* ── the one-line lockup used on the homepage and under the schedule ──── */
.pt-strip{
  display:flex; align-items:center; justify-content:center;
  gap:clamp(14px,2.4vw,30px); flex-wrap:wrap; text-align:center;
}
.pt-strip-lbl{
  font-size:.72rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase;
  color:var(--marigold-dp);
}
.on-alta .pt-strip-lbl, .on-deep .pt-strip-lbl{ color:var(--marigold); }
.pt-strip .pt-tile{ width:var(--pt-title); flex:none; }

/* ── governance note ──────────────────────────────────────────────────── */
.pt-note{
  margin-top:clamp(26px,3vw,40px); padding-top:1rem;
  border-top:1px solid var(--rule); max-width:74ch;
}
.on-alta .pt-note, .on-deep .pt-note{ border-top-color:var(--rule-light); }

@media (max-width:520px){
  .pt-row{ justify-content:center; }
  .pt-strip{ flex-direction:column; }
}

/* ══════════════════════════════════════════════════════════════════════
   "VISIT" AFFORDANCE — every .pt-tile is a live outbound link, but a flat
   logo on a flat card doesn't read as clickable. This adds a small badge
   so it's obvious on both mouse (hover) and touch (always-on, quieter).
   Applies to every .pt-tile everywhere — grid rows AND the ticker below.
   ══════════════════════════════════════════════════════════════════════ */
a.pt-tile{ position:relative; }
.pt-visit{
  position:absolute; left:50%; bottom:8px; transform:translate(-50%,4px);
  display:inline-flex; align-items:center; gap:.3em;
  font-family:var(--body); font-size:.64rem; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; white-space:nowrap;
  color:var(--shola); background:var(--alta-deep);
  padding:.32em .62em; border-radius:999px;
  opacity:0; pointer-events:none;
  transition:opacity .16s ease, transform .16s ease;
}
.pt-visit svg{ width:9px; height:9px; flex:none; }
/* Mouse/trackpad: reveal on hover or keyboard focus. */
a.pt-tile:hover .pt-visit, a.pt-tile:focus-visible .pt-visit{
  opacity:1; transform:translate(-50%,0);
}
/* Touch: no hover state exists, so show a quieter version permanently —
   otherwise a phone visitor never learns the logo is tappable at all. */
@media (hover:none){
  .pt-visit{
    opacity:.88; transform:translate(-50%,0);
    bottom:6px; padding:.26em .56em; font-size:.6rem;
    background:rgba(58,7,18,.82);
  }
}
@media (prefers-reduced-motion:reduce){ .pt-visit{ transition:none; } }

/* ══════════════════════════════════════════════════════════════════════
   PARTNER TICKER — one continuously-moving strip of every sold logo,
   independent of tier. Meant for a high-visibility, low-scroll spot (e.g.
   just under the hero/schedule). Tier is still shown, via the same
   top-border colour used everywhere else plus a small text tag, but every
   logo in the ticker sits in an identically-sized tile — mixing a huge
   Title tile with a tiny Bronze one mid-scroll reads as broken, not as
   a hierarchy.

   MARKUP: duplicate the full set of .pt-ticker-item's ONCE inside a second
   .pt-ticker-group with aria-hidden="true" — that's what makes the loop
   seamless (animation runs 0 to -50%, so the duplicate takes over exactly
   where the original ends). Only real, sold logos belong in the ticker —
   never a .pt-open slot; an empty dashed box drifting past looks like a
   layout bug, not an invitation.
   ══════════════════════════════════════════════════════════════════════ */
:root{ --pt-tick: clamp(150px, 18vw, 210px); }

.pt-ticker{
  position:relative; overflow:hidden;
  -webkit-mask-image:linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image:linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.pt-ticker-track{
  display:flex; align-items:stretch; gap:clamp(12px,1.6vw,20px); width:max-content;
  animation:pt-scroll 34s linear infinite;
}
.pt-ticker:hover .pt-ticker-track,
.pt-ticker:focus-within .pt-ticker-track{ animation-play-state:paused; }
.pt-ticker-group{ display:flex; align-items:stretch; gap:clamp(12px,1.6vw,20px); flex:none; }

@keyframes pt-scroll{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

.pt-ticker-item{
  width:var(--pt-tick); flex:none; aspect-ratio:8/5;
}
.pt-ticker-tag{
  position:absolute; top:8px; left:10px;
  font-family:var(--body); font-size:.6rem; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase; color:var(--ash);
}
.pt-tile-title  .pt-ticker-tag{ color:var(--pt-c-title); }
.pt-tile-gold   .pt-ticker-tag{ color:var(--marigold-dp); }
.pt-tile-silver .pt-ticker-tag{ color:#8C8880; }
.pt-tile-bronze .pt-ticker-tag{ color:var(--pt-c-bronze); }
.pt-tile-ads    .pt-ticker-tag{ color:var(--ash); }
.pt-tile-stall  .pt-ticker-tag{ color:var(--pt-c-stall); }

/* No motion preferred (and no way to hover on touch to pause) — drop the
   animation and let it wrap as a plain, still row instead of scrolling. */
@media (prefers-reduced-motion:reduce){
  .pt-ticker{ -webkit-mask-image:none; mask-image:none; overflow:visible; }
  .pt-ticker-track{ animation:none; flex-wrap:wrap; width:auto; justify-content:center; }
  .pt-ticker-group:last-child{ display:none; }
}
@media (hover:none) and (pointer:coarse){
  /* Touch devices can't hover-to-pause, and a moving target is hard to tap
     accurately — keep the motion (it still reads fine at a glance) but
     slow it down so a deliberate tap has a real chance of landing. */
  .pt-ticker-track{ animation-duration:52s; }
}

/* Sold but the partner has asked to stay anonymous for now. */
.pt-veiled{ border-style:dashed; border-top-style:solid; background:transparent; }
.pt-veiled .pt-name{ font-style:italic; }
.pt-veiled .pt-name small{
  display:block; margin-bottom:.3rem; font-family:var(--body); font-style:normal;
  font-size:.6rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--pt-c-bronze);
}
.on-alta .pt-veiled .pt-name, .on-deep .pt-veiled .pt-name{ color:var(--shola); }
.on-alta .pt-veiled .pt-name small, .on-deep .pt-veiled .pt-name small{ color:var(--marigold); }
.pt-tile-title.pt-veiled .pt-name small{ color:var(--marigold-dp); }
.on-alta .pt-tile-title.pt-veiled .pt-name small, .on-deep .pt-tile-title.pt-veiled .pt-name small{ color:var(--marigold); }
/* Title package card on contribute.html once the slot is committed. */
.tier-taken{
  display:inline-block; width:fit-content; align-self:flex-start; margin:.2rem 0 .4rem; padding:.25rem .7rem; border-radius:999px;
  border:1px solid currentColor; font-size:.62rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
}
