/* The switch between Iron on Iron and Sisters of Iron, and the hammer-strike effect when changing sides. */
.side-switch {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,.08);
  touch-action: pan-y;
}
.side-switch .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-switch__track { display: flex; align-items: stretch; }
.side-switch__cell { display: flex; align-items: center; }
.side-switch__rule { width: 1px; height: 14px; background: rgba(255,255,255,.22); margin: 0 6px; }
.side-switch__opt {
  position: relative;
  display: block;
  padding: 11px 14px 10px;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.side-switch__opt--ioi { font-family: 'Montserrat', sans-serif; }
.side-switch__opt--soi { font-family: 'Aboreto', serif; letter-spacing: .16em; }
.side-switch__opt:hover { color: #fff; }
.side-switch__opt:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.side-switch__opt::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transition: transform .35s ease, background-color .35s ease;
}
.side-switch[data-active="ioi"] .side-switch__opt--ioi,
.side-switch[data-active="soi"] .side-switch__opt--soi { color: #fff; cursor: default; }
.side-switch[data-active="ioi"] .side-switch__opt--ioi::after { transform: scaleX(1); background: #b3262a; }
.side-switch[data-active="soi"] .side-switch__opt--soi::after { transform: scaleX(1); background: #F5A1A0; }
@media (max-width: 400px) {
  .side-switch__opt { padding-inline: 10px; font-size: 11px; letter-spacing: .12em; }
  .side-switch__opt--soi { letter-spacing: .08em; }
  .side-switch__opt::after { left: 10px; right: 10px; }
}

/* The strike: a white flash where the hammer lands, sparks thrown off the iron, and the other ministry
   bursting out from that point. */
.forge { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; overflow: hidden; }
/* A burst of the new ministry's color races out from the strike, then fades away to the new site beneath.
   Only transform and opacity animate, so the graphics card does the work and it stays smooth on phones. */
.forge__fill {
  /* Drawn at screen size and scaled up 3x by the graphics card: a third of the size to paint, which keeps it smooth. */
  position: absolute; left: var(--x); top: var(--y); width: 100vmax; height: 100vmax; margin: -50vmax 0 0 -50vmax;
  border-radius: 50%; transform: scale(0); opacity: .94; will-change: transform, opacity; contain: strict;
  animation: forge-burst .5s cubic-bezier(.3,0,.2,1) forwards, forge-fade .6s ease-out .35s forwards;
}
.forge--to-ioi .forge__fill { background: radial-gradient(circle, #fff3d6 0%, #ff9a3c 2%, #8a1414 8%, #2a0606 20%, #000 34%); }
.forge--to-soi .forge__fill { background: radial-gradient(circle, #fff3e8 0%, #ffb08a 2%, #e08f8e 8%, #5a3534 20%, #1c1c1c 34%); }
@keyframes forge-burst { to { transform: scale(3); } }
@keyframes forge-fade { to { opacity: 0; } }
.forge__flash {
  position: absolute; left: var(--x); top: var(--y); width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #fff6d0 18%, rgba(255,190,90,.7) 38%, rgba(255,110,30,.22) 60%, transparent 72%);
  transform: scale(.1); opacity: 0; will-change: transform, opacity;
  animation: forge-flash .5s ease-out forwards;
}
@keyframes forge-flash { 0% { transform: scale(.1); opacity: 1; } 22% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
/* A spark: white-hot head, cooling to orange and red along its tail. */
.forge__spark {
  position: absolute; left: var(--x); top: var(--y); width: 16px; height: 3px; margin: -1.5px 0 0 -8px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(226,64,28,0) 0%, #e2401c 30%, #ffb347 65%, #fffbe6 100%);
  will-change: transform, opacity;
}
/* Leaving for the other domain: the burst stays until the next page takes over. Arriving: it fades out. */
.forge--leave .forge__fill { animation: forge-burst .4s cubic-bezier(.3,0,.2,1) forwards; opacity: .97; }
/* Arriving: the cover stays until the page is ready (fonts in), then fades. A slower fade on its own is the backstop. */
.forge--arrive { pointer-events: none; animation: forge-fade .7s ease-out 1.4s forwards; }
.forge--arrive.forge--go { animation: forge-reveal .4s ease-out forwards; }
@keyframes forge-reveal { from { opacity: 1; } to { opacity: 0; } }
/* Arriving: a plain full-screen cover in the new side's darkest color (nothing large to paint). */
.forge--arrive .forge__fill { left: 0; top: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; transform: none; opacity: 1; animation: none; contain: strict; }
.forge--arrive.forge--to-ioi .forge__fill { background: radial-gradient(60% 50% at 50% 45%, #3a0d0d 0%, #120404 70%, #000 100%); }
.forge--arrive.forge--to-soi .forge__fill { background: radial-gradient(60% 50% at 50% 45%, #5a3534 0%, #2a1a1a 70%, #1c1c1c 100%); }
@media (prefers-reduced-motion: reduce) { .forge--arrive, .forge--arrive.forge--go { animation-duration: .3s; animation-delay: 0s; } }
.forge--calm .forge__fill { left: 50%; top: 50%; transform: none; animation: forge-fade .4s ease-out forwards; background: #111; opacity: .6; }
.forge--calm .forge__flash { display: none; }

/* Give page: amount choices. */
.give-form fieldset { border: 0; padding: 0; margin: 18px 0 8px; }
.give-amounts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.give-amounts label { cursor: pointer; }
.give-amounts input { position: absolute; opacity: 0; pointer-events: none; }
.give-amounts span { display: inline-block; min-width: 76px; padding: 10px 16px; border: 2px solid #d4d4d4; border-radius: 10px; text-align: center; font-weight: 700; }
.give-amounts input:checked + span { border-color: currentColor; background: rgba(0,0,0,.05); }
.give-amounts input:focus-visible + span { outline: 2px solid #111; outline-offset: 2px; }
.give-other { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; max-width: 220px; }
.give-other input { padding: 10px 12px; border: 2px solid #d4d4d4; border-radius: 10px; font-size: 16px; }
.give-form .site-button { margin-top: 14px; border: 0; cursor: pointer; }
.give-fine { margin-top: 10px; opacity: .7; }
.give-notice { margin-top: 12px; }

