/* Prototype switcher, shared by both sites. It wears the colours of the site you are on:
   gold on stone for Marble and Gold, tally red on studio white for On Air. On a switch the pill
   slides and the colours cross over before the other site opens. */

@view-transition { navigation: auto; }

.pswitch {
  --pswitch-ease: cubic-bezier(0.77, 0, 0.175, 1);
  position: fixed;
  top: var(--pswitch-top, 80px);
  left: 50%;
  z-index: var(--pswitch-z, 48);
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--ps-border);
  background: var(--ps-track);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -12px var(--ps-shadow);
  transform: translateX(-50%);
  font-family: inherit;
  view-transition-name: pswitch;
  transition: background-color 420ms ease, border-color 420ms ease, box-shadow 420ms ease;
}

.pswitch[data-side="a"] {
  --ps-track: rgba(13, 14, 14, 0.62);
  --ps-border: rgba(236, 237, 235, 0.2);
  --ps-text: #a3a8aa;
  --ps-text-hover: #ecedeb;
  --ps-on: #16120c;
  --ps-shadow: rgba(0, 0, 0, 0.7);
}
.pswitch[data-side="b"] {
  --ps-track: rgba(237, 239, 238, 0.88);
  --ps-border: #0f1112;
  --ps-text: #454c50;
  --ps-text-hover: #0f1112;
  --ps-on: #ffffff;
  --ps-shadow: rgba(15, 17, 18, 0.35);
}

.pswitch a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ps-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 320ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.pswitch a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .pswitch a:not([aria-current="page"]):hover { color: var(--ps-text-hover); }
}
.pswitch a[aria-current="page"] { color: var(--ps-on); }
.pswitch a:focus-visible { outline: 2px solid var(--ps-text-hover); outline-offset: 2px; }

/* The pill carries both looks and crossfades between them, since gradients cannot transition. */
.pswitch__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--ps-w, 0px);
  border-radius: 999px;
  transform: translateX(var(--ps-x, 0px));
  transition: transform 420ms var(--pswitch-ease), width 420ms var(--pswitch-ease);
}
.pswitch__pill::before,
.pswitch__pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: opacity 420ms ease;
}
.pswitch__pill::before {
  background: linear-gradient(180deg, #ecc07f 0%, #e0a65a 55%, #c48e45 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.pswitch__pill::after {
  background: #d4241c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  opacity: 0;
}
.pswitch[data-side="b"] .pswitch__pill::before { opacity: 0; }
.pswitch[data-side="b"] .pswitch__pill::after { opacity: 1; }

@media (max-width: 420px) {
  .pswitch a { padding: 0 14px; font-size: 12px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .pswitch, .pswitch a, .pswitch__pill, .pswitch__pill::before, .pswitch__pill::after { transition: none; }
}
