/* /developers.html, the developers of the revival (7.47.0). A line-up: the two developers stand big under "Meet the
   developers", black and white at rest; the one you point at comes into colour and the title says their name in their
   class colour (Tolga the Paladin's red, Tahsin the Mage's cyan). Each has a tag in the game's pieces (gold plate,
   stone nameplate, coloured label) and, below, a window of their own: who they are, what they made, their TikTok.
   developers.js swaps the title's words; everything else is CSS. */

.devs { --tolga: var(--paladin); --tahsin: var(--mage); padding-top: 28px; }
.pin-tolga, .dev-tolga { --c: var(--tolga); }
.pin-tahsin, .dev-tahsin { --c: var(--tahsin); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font: 800 14px/1.3 var(--body); color: var(--muted); }
.crumbs a { color: var(--label); text-decoration: none; text-shadow: var(--outline-sm); }
.crumbs a:hover { color: var(--rim-hi); }
.crumbs [aria-current] { color: var(--cream-dim); }
.page.devs > .crumbs + * { margin-top: 18px; }

/* ------------------------------------------------------------------ the line-up */
.lineup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "title title"
    "lede  .";
  align-items: start;
}
.lineup-title { grid-area: title; position: relative; z-index: 3; font-size: clamp(46px, 7.4vw, 104px); line-height: .98; }
.swap { display: inline-block; color: var(--swap, var(--rim)); transition: color .35s ease; }
.swap.is-out { animation: swap-out .18s ease forwards; }
.swap.is-in { animation: swap-in .5s var(--ease-out) both; }
@keyframes swap-out { to { opacity: 0; filter: blur(10px); transform: translateY(-.16em) scale(.97); } }
@keyframes swap-in { from { opacity: 0; filter: blur(12px); transform: translateY(.2em) scale(1.03); } }
.lineup-of { display: block; margin-top: .3em; font-size: .36em; line-height: 1.1; color: var(--cream); }
.lineup-lede { grid-area: lede; position: relative; z-index: 3; margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); }
.lineup-lede a { color: var(--cream); text-decoration-color: var(--rim); }
.lineup-lede a:hover { color: var(--rim-hi); }

/* the two of them stand in one row across the window: Tahsin rises beside the lede, Tolga stands lower under it */
.lineup-row {
  grid-column: 1 / -1;
  grid-row: 2 / span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  margin: 0 calc(-1 * min(4vw, 40px));
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.pin { position: relative; min-width: 0; pointer-events: auto; }
.pin-tolga { z-index: 1; margin-top: clamp(84px, 8vw, 116px); margin-right: -7%; }
.pin-tahsin { z-index: 2; margin-top: 0; margin-left: -7%; }
.pin-link { position: relative; display: block; color: inherit; text-decoration: none; border-radius: 4px; }
.pin-link:focus-visible { outline: none; }

/* the portrait: black and white at rest, every edge dissolving into the wall and its inner edge into the other one */
.pin-photo {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 54%, transparent 96%), linear-gradient(to var(--fade-to), transparent 0, #000 16%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 54%, transparent 96%), linear-gradient(to var(--fade-to), transparent 0, #000 16%, #000 80%, transparent);
          mask-composite: intersect;
}
.pin-tolga .pin-photo { --fade-to: right; }
.pin-tahsin .pin-photo { --fade-to: left; }
.pin-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(.74);
  transform: scale(1.001);
  transition: filter .7s var(--ease-out), transform 1.1s var(--ease-out);
}
.pin.is-active .pin-photo img { filter: grayscale(0) contrast(1) brightness(1); transform: scale(1.025); }
.lineup.has-active .pin:not(.is-active) .pin-photo img { filter: grayscale(1) contrast(1.06) brightness(.5); }
/* phones and tablets cannot point: both stand in colour */
@media (hover: none) {
  .pin-photo img { filter: none; }
  .lineup.has-active .pin:not(.is-active) .pin-photo img { filter: none; }
}

/* the tag at the portrait's outer top corner: the game's gold plate, the name on a stone plate, the role in colour */
.pin-tag {
  position: absolute;
  top: clamp(14px, 2.2vw, 30px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pin-tolga .pin-tag { left: clamp(16px, 4.4vw, 56px); }
.pin-tahsin .pin-tag { right: clamp(16px, 4.4vw, 56px); flex-direction: row-reverse; text-align: right; }
.pin-ring {
  position: relative;
  flex: none;
  width: clamp(54px, 5vw, 68px);
  aspect-ratio: 1;
  background: url("/images/game/ui/plate-gold.webp") center / contain no-repeat;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .6));
  transition: transform .45s var(--ease-out);
}
.pin-ring img { position: absolute; inset: 11%; width: 78%; height: 78%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--keyline); }
.pin-words { display: grid; justify-items: start; gap: 6px; }
.pin-tahsin .pin-words { justify-items: end; }
.pin-name {
  padding: 2px 13px 5px;
  font: 700 clamp(19px, 1.8vw, 24px)/1.12 var(--display);
  color: var(--cream);
  text-shadow: var(--outline);
  white-space: nowrap;
  background: linear-gradient(180deg, #5e6072, var(--stone) 55%, var(--stone-lo));
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--keyline), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 5px 6px -2px rgba(0, 0, 0, .55);
  transition: box-shadow .25s ease;
}
.pin-role { font: 900 14px/1.2 var(--body); color: var(--c); text-shadow: var(--outline-sm); }
.pin.is-active .pin-ring { transform: translateY(-3px) rotate(-6deg); }
.pin-tahsin.is-active .pin-ring { transform: translateY(-3px) rotate(6deg); }
.pin.is-active .pin-name { box-shadow: 0 0 0 2px var(--keyline), 0 0 0 5px var(--c), inset 0 1px 0 rgba(255, 255, 255, .25), 0 5px 6px -2px rgba(0, 0, 0, .55); }
.pin-link:focus-visible .pin-name { box-shadow: 0 0 0 2px var(--keyline), 0 0 0 5px var(--select), inset 0 1px 0 rgba(255, 255, 255, .25); }

/* arrival: each portrait rises out of the wall once, its tag a beat later */
@media (prefers-reduced-motion: no-preference) {
  .pin-photo { animation: pin-rise 1s var(--ease-out) both; }
  .pin-tag { animation: pin-tag .6s var(--ease-out) both; }
  .pin-tolga .pin-photo { animation-delay: .05s; }
  .pin-tahsin .pin-photo { animation-delay: .2s; }
  .pin-tolga .pin-tag { animation-delay: .45s; }
  .pin-tahsin .pin-tag { animation-delay: .6s; }
}
@keyframes pin-rise { from { opacity: 0; transform: translateY(46px); } }
@keyframes pin-tag { from { opacity: 0; transform: translateY(12px) scale(.9); } }

/* ------------------------------------------------------------------ a developer's own window */
/* the first window rises over the line-up's faded feet */
.page.devs > .lineup + .dev { position: relative; z-index: 4; margin-top: clamp(-150px, -11vw, -60px); }
.dev {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
  scroll-margin-top: 110px;
  padding: clamp(22px, 3.4vw, 42px);
}
.dev-id { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.dev-ring {
  position: relative;
  width: clamp(116px, 11vw, 148px);
  aspect-ratio: 1;
  margin-bottom: 4px;
  background: url("/images/game/ui/plate-gold.webp") center / contain no-repeat;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .6));
}
.dev-ring img { position: absolute; inset: 10%; width: 80%; height: 80%; border-radius: 50%; object-fit: cover; }
.dev-ring::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--keyline), inset 0 -12px 16px -8px rgba(0, 0, 0, .55), inset 0 6px 8px -6px rgba(255, 255, 255, .25);
  pointer-events: none;
}
.dev-name { font-size: clamp(32px, 3.4vw, 44px); overflow-wrap: anywhere; }
.dev:target .dev-name { color: var(--c); }
.dev-role { font: 900 16px/1.25 var(--body); color: var(--c); text-shadow: var(--outline-sm); }

/* the facts: rows sunk into the window, the game's blue labels on the left */
.dev-facts {
  display: grid;
  width: 100%;
  margin: 12px 0 0;
  background: var(--inset-2);
  border: 1px solid var(--keyline);
  border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .05);
}
.dev-facts > div { display: grid; gap: 2px; padding: 11px 16px 12px; }
.dev-facts > div + div { border-top: 1px solid var(--line-soft); }
.dev-facts dt { font: 900 13px/1.2 var(--body); color: var(--label); text-shadow: var(--outline-sm); }
.dev-facts dd { margin: 0; font: 800 16px/1.35 var(--body); color: var(--cream); }

.dev-story { display: grid; gap: 18px; align-content: start; min-width: 0; padding-top: clamp(0px, 1.2vw, 14px); }
.dev-line { max-width: 60ch; font: 700 clamp(18px, 1.55vw, 21px)/1.6 var(--body); color: var(--cream-dim); text-shadow: 0 1px 2px rgba(0, 0, 0, .65); text-wrap: pretty; }
.dev-line:first-child { color: var(--cream); }

/* the game's name inside a sentence: a small gold-rim pill with the dragon */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 1px 12px 2px 6px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--cream);
  text-decoration: none;
  text-shadow: var(--outline-sm);
  vertical-align: 1px;
  background: linear-gradient(180deg, #555665, #33343e 70%, #2b2c35);
  border: 2px solid var(--rim);
  border-radius: 999px;
  box-shadow: 0 0 0 1.5px var(--keyline), inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 3px rgba(0, 0, 0, .45);
  white-space: nowrap;
  transition: border-color .16s ease, transform .16s var(--ease-out);
}
.chip img { width: 26px; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
/* the pill keeps the colon after it on its line */
.nb { white-space: nowrap; }
.chip:hover { color: var(--cream); border-color: var(--rim-hi); transform: translateY(-1px); }

.dev-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.btn-tiktok svg { width: 21px; height: 21px; }
.dev-handle { font: 900 15px/1.2 var(--body); color: var(--muted); }

/* ------------------------------------------------------------------ the close */
.devs-close > p { max-width: 66ch; margin: 0 0 22px; color: var(--cream-dim); }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 980px) {
  .dev { grid-template-columns: minmax(0, 1fr); }
  .dev-id { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 20px; }
  .dev-ring { grid-row: 1 / span 2; }
  .dev-name { align-self: end; }
  .dev-role { align-self: start; }
  .dev-facts { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dev-facts > div + div { border-top: 0; border-left: 1px solid var(--line-soft); }
}
/* phones: no line-up, the two stand one above the other at full width, each in colour */
@media (max-width: 760px) {
  .lineup { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "lede"; }
  .lineup-row { grid-row: auto; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 26px -12px 0; }
  .pin-tolga, .pin-tahsin { margin: 0; }
  .pin + .pin { margin-top: -18%; }
  .pin-photo {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 64%, transparent 98%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 64%, transparent 98%);
  }
  .pin-tag, .pin-tolga .pin-tag, .pin-tahsin .pin-tag { top: auto; bottom: 22%; left: 16px; right: auto; flex-direction: row; text-align: left; }
  .pin-tahsin .pin-words { justify-items: start; }
  .pin-tahsin .pin-tag { bottom: 11%; }
  .page.devs > .lineup + .dev { margin-top: -4%; }
  .dev-facts { grid-template-columns: minmax(0, 1fr); }
  .dev-facts > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 420px) {
  .dev { padding: 20px 14px 22px; }
  .dev-id { grid-template-columns: minmax(0, 1fr); }
  .dev-ring { grid-row: auto; }
  .btn-tiktok { width: 100%; justify-content: center; padding-inline: 12px; font-size: 16px; }
}
