/* World Rush (/world-rush/, /sr/world-rush/ and the rules): the game's own night map, gold and the red of war,
   set apart from the club's green. The header and footer are the site's (tools/site-chrome.py) in the night look
   of .page-club (shop.css). */

.page-wr {
  --wr-ink: #041022;
  --wr-ink-2: #071a33;
  --wr-panel: rgba(10, 24, 44, 0.82);
  --wr-line: rgba(160, 200, 255, 0.14);
  --wr-text: #e8eef8;
  --wr-muted: #9fb0c8;
  --wr-gold: #f2c45a;
  --wr-gold-hi: #ffe08a;
  --wr-red: #ff5a3c;
  --wr-cond: "Roboto Condensed", "Arial Narrow", Roboto, system-ui, sans-serif;
  color: var(--wr-text);
  background: var(--wr-ink);
}

.page-wr main {
  overflow: hidden;
}

/* the club's own Play as a guest bar under the header leads to the card game: here the hero's button is the way in */
.page-wr .guest-play-bar {
  display: none;
}

/* ---- the hero: the live map ------------------------------------------------------------------------------- */
.wr-hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  max-height: 920px;
  overflow: hidden;
  background: var(--wr-ink);
  isolation: isolate;
}

.wr-hero-still,
.wr-hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wr-hero-still {
  object-fit: cover;
  object-position: 50% 45%;
  transition: opacity 0.8s ease;
}

.wr-hero canvas {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.wr-hero.wr-live canvas {
  opacity: 1;
}

.wr-hero.wr-live .wr-hero-still {
  opacity: 0;
}

/* dark where the words stand, so they read over any colour of the map */
.wr-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 10, 22, 0.9) 0%, rgba(4, 10, 22, 0.62) 34%, rgba(4, 10, 22, 0) 62%),
    linear-gradient(0deg, rgba(4, 10, 22, 0.85) 0%, rgba(4, 10, 22, 0) 26%);
}

.wr-hero-copy {
  position: absolute;
  z-index: 2;
  left: clamp(1rem, 5vw, 4.5rem);
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, calc(100% - 2rem));
}

.wr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(242, 196, 90, 0.45);
  border-radius: 999px;
  background: rgba(242, 196, 90, 0.1);
  color: var(--wr-gold-hi);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wr-title {
  margin: 0;
  font-family: var(--wr-cond);
  font-weight: 900;
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--wr-gold);
  text-shadow: 0 0 34px rgba(242, 196, 90, 0.35), 0 2px 0 rgba(0, 0, 0, 0.4);
}

.wr-title span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.34em;
  letter-spacing: 0.08em;
  color: var(--wr-text);
  text-shadow: none;
}

.wr-lead {
  margin: 1.1rem 0 1.5rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: #d6e0ef;
}

.wr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.page-wr a.wr-play,
.page-wr a.wr-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 56px;
  padding: 0 1.6rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.12rem;
  text-decoration: none;
  overflow: hidden;
}

.page-wr a.wr-play {
  color: #10223a;
  background: linear-gradient(135deg, #ffe08a, #f2c45a 45%, #d99a1e);
  box-shadow: 0 10px 34px rgba(242, 196, 90, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.page-wr a.wr-play::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-18deg);
  animation: wr-sheen 3.6s ease-in-out infinite;
}

.page-wr a.wr-play:hover,
.page-wr a.wr-play:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.page-wr a.wr-ghost {
  color: var(--wr-text);
  border: 1px solid rgba(232, 238, 248, 0.35);
  background: rgba(4, 10, 22, 0.45);
}

.page-wr a.wr-ghost:hover,
.page-wr a.wr-ghost:focus-visible {
  border-color: var(--wr-gold);
  color: var(--wr-gold-hi);
}

@keyframes wr-sheen {
  0%, 55% { left: -60%; }
  85%, 100% { left: 130%; }
}

.wr-note {
  margin: 0.9rem 0 0;
  color: var(--wr-muted);
  font-size: 0.9rem;
}

/* minute, countries and wars of the game on the map, and its news */
.wr-live-box {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: clamp(1rem, 3vw, 2.5rem);
  width: min(340px, calc(100% - 2rem));
  display: grid;
  gap: 0.6rem;
  justify-items: end;
  pointer-events: none;
}

.wr-count {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--wr-line);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.72);
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.wr-count::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--wr-red);
  box-shadow: 0 0 0 0 rgba(255, 90, 60, 0.7);
  animation: wr-pulse 1.6s ease-out infinite;
}

@keyframes wr-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 60, 0.7); }
  100% { box-shadow: 0 0 0 12px rgba(255, 90, 60, 0); }
}

.wr-news {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-items: end;
}

.wr-news li {
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border-left: 3px solid var(--wr-gold);
  border-radius: 8px;
  background: rgba(4, 10, 22, 0.72);
  font-size: 0.88rem;
  line-height: 1.35;
  animation: wr-news-in 0.5s ease-out;
}

.wr-news li:nth-child(2) { opacity: 0.75; }
.wr-news li:nth-child(3) { opacity: 0.5; }
.wr-news .wr-news-nuked { border-left-color: var(--wr-red); }
.wr-news .wr-news-nuked::before { content: "☢ "; color: #ffb27a; }
.wr-news .wr-news-war::before { content: "⚔ "; color: var(--wr-gold-hi); }
.wr-news .wr-news-fell::before { content: "⚑ "; color: #9fb0c8; }

@keyframes wr-news-in {
  from { opacity: 0; transform: translateX(16px); }
  to { transform: none; }
}

.wr-caption {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 0.9rem;
  margin: 0;
  color: rgba(232, 238, 248, 0.6);
  font-size: 0.8rem;
}

/* ---- sections --------------------------------------------------------------------------------------------- */
.wr-section {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}

.wr-section:nth-of-type(even) {
  background: linear-gradient(180deg, var(--wr-ink-2), var(--wr-ink));
}

.wr-wrap {
  max-width: 1160px;
  margin: 0 auto;
}

.wr-h2 {
  margin: 0 0 0.6rem;
  font-family: var(--wr-cond);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fff;
}

.wr-h2 em {
  font-style: normal;
  color: var(--wr-gold);
}

.wr-sub {
  max-width: 720px;
  margin: 0 0 2rem;
  color: var(--wr-muted);
  font-size: 1.06rem;
}

/* real clips of the game */
.wr-clips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.wr-clip {
  margin: 0;
  border: 1px solid var(--wr-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--wr-panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.wr-clip video,
.wr-clip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #061325;
}

.wr-clip figcaption {
  padding: 1rem 1.15rem 1.2rem;
}

.wr-clip h3,
.wr-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--wr-cond);
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: 0.01em;
  color: var(--wr-gold-hi);
}

.wr-clip p,
.wr-card p {
  margin: 0;
  color: #c7d3e5;
}

/* thirty minutes, four acts */
.wr-phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 2.2rem 0 0;
  list-style: none;
  counter-reset: wr-phase;
}

.wr-phases::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #7bd88f, var(--wr-gold) 38%, var(--wr-red) 70%, #b04dff);
  box-shadow: 0 0 18px rgba(255, 90, 60, 0.35);
}

.wr-phases li {
  position: relative;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid var(--wr-line);
  border-radius: 14px;
  background: var(--wr-panel);
}

.wr-phases li::before {
  content: "";
  position: absolute;
  top: -2.05rem;
  left: 1rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--wr-ink);
  border: 3px solid var(--wr-gold);
}

.wr-phases b {
  display: block;
  color: var(--wr-gold);
  font-family: var(--wr-cond);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.wr-phases strong {
  display: block;
  margin: 0.2rem 0 0.35rem;
  font-size: 1.15rem;
  color: #fff;
}

.wr-phases p {
  margin: 0;
  color: #c7d3e5;
  font-size: 0.96rem;
}

/* cards: advantages, ways to play */
.wr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
}

.wr-card {
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--wr-line);
  border-radius: 16px;
  background: var(--wr-panel);
}

.wr-card .wr-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  background: rgba(242, 196, 90, 0.12);
  border: 1px solid rgba(242, 196, 90, 0.35);
  font-size: 1.45rem;
}

.wr-card small {
  display: block;
  margin-top: 0.5rem;
  color: var(--wr-muted);
}

.wr-stars {
  margin: 1.5rem 0 0;
  color: var(--wr-muted);
}

.wr-stars b {
  color: var(--wr-gold);
}

/* levels: twenty steps, the strongest countries last */
.wr-levels {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 4px;
  margin: 1.5rem 0 0.6rem;
}

.wr-levels span {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(242, 196, 90, 0.25), rgba(242, 196, 90, 0.08));
  border: 1px solid rgba(242, 196, 90, 0.3);
}

.wr-levels span:nth-last-child(-n+3) {
  background: linear-gradient(180deg, #ffe08a, #d99a1e);
  box-shadow: 0 0 12px rgba(242, 196, 90, 0.5);
}

.wr-levels-legend {
  display: flex;
  justify-content: space-between;
  color: var(--wr-muted);
  font-size: 0.9rem;
}

/* the last call and the questions */
.wr-cta {
  text-align: center;
}

.wr-cta .wr-actions {
  justify-content: center;
}

.wr-faq {
  display: grid;
  gap: 0.6rem;
  max-width: 820px;
  margin: 2.5rem auto 0;
  text-align: left;
}

.wr-faq details {
  border: 1px solid var(--wr-line);
  border-radius: 12px;
  background: var(--wr-panel);
  padding: 0.15rem 1rem;
}

.wr-faq summary {
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #fff;
}

.wr-faq details p {
  margin: 0 0 0.9rem;
  color: #c7d3e5;
}

.page-wr .site-footer {
  background: #020814;
}

/* ---- the rules ---------------------------------------------------------------------------------------------- */
.wr-doc {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.wr-doc h1 {
  margin: 0 0 0.6rem;
  font-family: var(--wr-cond);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.02;
  color: var(--wr-gold);
}

.wr-doc h2 {
  margin: 2.8rem 0 0.8rem;
  padding-top: 0.4rem;
  font-family: var(--wr-cond);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  color: #fff;
  border-top: 1px solid var(--wr-line);
}

.wr-doc h3 {
  margin: 1.6rem 0 0.4rem;
  font-size: 1.15rem;
  color: var(--wr-gold-hi);
}

.wr-doc p,
.wr-doc li {
  color: #d3ddeb;
  line-height: 1.65;
}

.wr-doc a {
  color: var(--wr-gold-hi);
}

.wr-doc .wr-lead {
  color: #e2e9f4;
}

.wr-toc {
  margin: 1.6rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--wr-line);
  border-radius: 14px;
  background: var(--wr-panel);
}

.wr-toc ol {
  columns: 2 240px;
  margin: 0.4rem 0 0;
  padding-left: 1.3rem;
}

.wr-toc li {
  line-height: 1.9;
}

.wr-box {
  margin: 1.2rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(242, 196, 90, 0.35);
  border-left: 4px solid var(--wr-gold);
  border-radius: 12px;
  background: rgba(242, 196, 90, 0.07);
}

.wr-box p {
  margin: 0.3rem 0;
}

.wr-box.wr-warn {
  border-color: rgba(255, 90, 60, 0.4);
  border-left-color: var(--wr-red);
  background: rgba(255, 90, 60, 0.07);
}

.wr-table-wrap {
  margin: 1rem 0 1.4rem;
  overflow-x: auto;
  border: 1px solid var(--wr-line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.wr-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.wr-table th,
.wr-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--wr-line);
  text-align: left;
  vertical-align: top;
  color: #d3ddeb;
}

.wr-table th {
  position: sticky;
  top: 0;
  background: #0b1d38;
  color: var(--wr-gold-hi);
  font-weight: 700;
  white-space: nowrap;
}

.wr-table tr:last-child td {
  border-bottom: 0;
}

.wr-table td.wr-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wr-tag {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.wr-tag.wr-city {
  background: rgba(123, 216, 143, 0.15);
  color: #9fe6ad;
  border: 1px solid rgba(123, 216, 143, 0.4);
}

.wr-tag.wr-country {
  background: rgba(120, 190, 255, 0.12);
  color: #a9d4ff;
  border: 1px solid rgba(120, 190, 255, 0.35);
}

.wr-figure {
  margin: 1.4rem 0;
  padding: 1rem;
  border: 1px solid var(--wr-line);
  border-radius: 16px;
  background: #061325;
}

.wr-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.wr-figure figcaption {
  margin-top: 0.6rem;
  color: var(--wr-muted);
  font-size: 0.92rem;
}

.wr-doc-cta {
  margin: 3rem 0 0;
  padding: 1.6rem;
  border: 1px solid rgba(242, 196, 90, 0.35);
  border-radius: 18px;
  background: radial-gradient(ellipse at 30% 0%, rgba(242, 196, 90, 0.14), transparent 60%), var(--wr-panel);
  text-align: center;
}

.wr-doc-cta p {
  margin: 0 0 1rem;
  color: #e2e9f4;
  font-size: 1.1rem;
}

/* ---- narrow screens -------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .wr-clips {
    grid-template-columns: minmax(0, 1fr);
  }

  .wr-phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
  }

  .wr-phases::before,
  .wr-phases li::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .wr-hero {
    min-height: 600px;
  }

  .wr-hero::after {
    background:
      linear-gradient(0deg, rgba(4, 10, 22, 0.94) 0%, rgba(4, 10, 22, 0.75) 42%, rgba(4, 10, 22, 0) 66%),
      linear-gradient(180deg, rgba(4, 10, 22, 0.55) 0%, rgba(4, 10, 22, 0) 22%);
  }

  .wr-hero-copy {
    top: auto;
    bottom: 1.25rem;
    transform: none;
  }

  .wr-lead {
    margin: 0.7rem 0 1.1rem;
    font-size: 1rem;
  }

  .wr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-wr a.wr-play,
  .page-wr a.wr-ghost {
    width: 100%;
  }

  .wr-note {
    text-align: center;
    font-size: 0.82rem;
  }

  .wr-live-box {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .wr-news li:nth-child(n+2) {
    display: none;
  }

  .wr-caption {
    display: none;
  }

  .wr-phases {
    grid-template-columns: minmax(0, 1fr);
  }

  .wr-levels {
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .wr-kicker {
    font-size: 0.72rem;
  }

  .wr-title {
    font-size: 3rem;
  }

  .wr-doc .wr-table {
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-wr a.wr-play::after,
  .wr-count::before,
  .wr-news li {
    animation: none;
  }
}
