/*
 * handshake.css - styles for the Collaborations handshake (see public/js/handshake.js).
 *
 * A plain stylesheet rather than Tailwind classes on purpose: classes that did not
 * exist when the site was last built simply do not exist in the compiled CSS, and
 * this component should work the moment it is deployed. Brand colours are read from
 * the site's own Tailwind theme variables, with fallbacks, so a rebrand carries over.
 */
.hs {
  --hs-ocean: var(--color-brand-ocean, #0b75c9);
  --hs-magenta: var(--color-brand-magenta, #d02a8f);
  --hs-navy: var(--color-brand-navy, #0a2a52);
  --hs-deep: var(--color-brand-deep, #0b4f93);
  --hs-ink: var(--color-brand-ink, #0f2a43);
  --hs-yellow: var(--color-brand-yellow, #f3d23c);
}

/* ---- stage --------------------------------------------------------------- */
.hs-stage {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 560;
  overflow: hidden;
  border-radius: 1.25rem;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(160deg, #eaf3fb 0%, #f6f9fd 55%, #fbeef6 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 42, 67, .07), 0 18px 40px -22px rgba(5, 32, 64, .35);
}
.hs--js .hs-stage { display: block; }
.hs--done .hs-stage { cursor: default; }
.hs-canvas, .hs-tiles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hs-canvas { pointer-events: none; }

/* ---- logo discs ---------------------------------------------------------- */
.hs-tile {
  position: absolute;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--hs-ink);
  overflow: hidden;
  cursor: default;
  text-decoration: none;
  will-change: transform;
  box-shadow: 0 0 0 3px var(--ring), 0 8px 16px -6px rgba(5, 32, 64, .45);
  transition: box-shadow .2s ease, opacity .25s ease, filter .25s ease;
}
.hs-tile--local { --ring: var(--hs-ocean); }
.hs-tile--intl { --ring: var(--hs-magenta); }
.hs-tile img { width: 78%; height: 78%; object-fit: contain; }
.hs-badge {
  display: block;
  padding: 0 9%;
  font: 800 var(--hs-fs, 11px)/1.08 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
  text-align: center;
  overflow-wrap: normal;
  word-break: keep-all;
}
.hs:not(.hs--ready) .hs-tile { pointer-events: none; }
.hs--ready .hs-tile { cursor: pointer; }
.hs--ready .hs-tile:hover,
.hs--ready .hs-tile:focus-visible {
  z-index: 3;
  outline: none;
  box-shadow: 0 0 0 4px var(--ring), 0 0 0 9px rgba(255, 255, 255, .95), 0 14px 26px -6px rgba(5, 32, 64, .55);
}
.hs-tile.is-dim { opacity: .16; filter: grayscale(1); }

/* ---- call to action ------------------------------------------------------ */
.hs-go {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.5rem;
  border: 0; border-radius: 999px;
  font: 800 .95rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, var(--hs-ocean), var(--hs-deep));
  box-shadow: 0 14px 30px -10px rgba(5, 32, 64, .6);
  cursor: pointer;
}
.hs-go:hover { filter: brightness(1.08); }
.hs-go:focus-visible, .hs-replay:focus-visible, .hs-chip:focus-visible { outline: 3px solid var(--hs-yellow); outline-offset: 3px; }
.hs-go::before {
  content: ""; position: absolute; inset: -6px; border-radius: 999px;
  border: 2px solid var(--hs-ocean); opacity: 0;
  animation: hs-pulse 2.2s ease-out infinite;
}
.hs-go[hidden], .hs-replay[hidden], .hs-tip[hidden], .hs-filters[hidden] { display: none; }
@keyframes hs-pulse { 0% { transform: scale(.92); opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }

/* ---- tooltip + captions -------------------------------------------------- */
.hs-tip {
  position: absolute; z-index: 6;
  transform: translate(-50%, -100%);
  max-width: 17rem; padding: .55rem .8rem;
  border-radius: .6rem;
  background: var(--hs-navy); color: #fff;
  box-shadow: 0 12px 26px -8px rgba(5, 32, 64, .6);
  pointer-events: none; text-align: center;
  font: 500 .75rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.hs-tip strong { display: block; font-weight: 800; font-size: .85rem; }
.hs-tip span { color: rgba(255, 255, 255, .72); }

.hs-cap {
  position: absolute; bottom: .9rem; z-index: 2;
  font: 800 .7rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; transition: opacity .6s ease .2s;
}
.hs-cap--l { left: 1.1rem; color: var(--hs-ocean); }
.hs-cap--r { right: 1.1rem; color: var(--hs-magenta); }
.hs--done .hs-cap { opacity: 1; }

.hs-replay {
  position: absolute; right: .8rem; top: .8rem; z-index: 4;
  padding: .45rem .9rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .75rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--hs-ink); background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px -4px rgba(5, 32, 64, .35);
}

/* ---- hint + filters ------------------------------------------------------ */
.hs-hint { margin: .9rem 0 0; font-size: .85rem; color: #475569; text-align: center; }
.hs-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }
.hs-chip {
  padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: #334155;
  font: 700 .78rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.hs-chip:hover { border-color: var(--hs-ocean); color: var(--hs-ocean); }
.hs-chip[aria-pressed="true"] { background: var(--hs-ocean); border-color: var(--hs-ocean); color: #fff; }
.hs:not(.hs--done) .hs-filters { visibility: hidden; }

/* ---- all-partners grid (also the no-JavaScript and phone view) ----------- */
.hs-group { margin-top: 3rem; }
.hs-group h2 {
  display: flex; align-items: center; gap: .75rem;
  margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--hs-ink);
}
.hs-group h2::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; background: var(--ring); }
.hs-group--local { --ring: var(--hs-ocean); }
.hs-group--intl { --ring: var(--hs-magenta); }
.hs-grid {
  display: grid; gap: .85rem; margin: 1.1rem 0 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
}
.hs-card {
  display: flex; align-items: center; gap: .8rem;
  padding: .75rem .9rem; border-radius: .9rem;
  border: 1px solid #e2e8f0; background: #fff; color: var(--hs-ink); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.hs-card:hover { transform: translateY(-2px); border-color: var(--ring); box-shadow: 0 12px 24px -14px rgba(5, 32, 64, .5); }
.hs-card__disc {
  flex: none; display: grid; place-items: center; width: 3.25rem; height: 3.25rem;
  border-radius: 50%; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 2.5px var(--ring);
}
.hs-card__disc img { width: 76%; height: 76%; object-fit: contain; }
.hs-card__disc span { padding: 0 .3rem; font: 800 .62rem/1.05 system-ui, sans-serif; text-align: center; overflow-wrap: anywhere; }
.hs-card__name { font-weight: 700; font-size: .88rem; line-height: 1.25; }
.hs-card__kind { display: block; margin-top: .15rem; font-size: .72rem; font-weight: 500; color: #64748b; }

/* Logos are too small to read inside the shape on a phone: use the grid instead. */
@media (max-width: 639px) {
  .hs--js .hs-stage, .hs-hint, .hs-filters { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-go::before { animation: none; }
  .hs-tile, .hs-cap, .hs-card, .hs-chip { transition: none; }
}
