/*
 * Orbite website, home page: the four sections between the hero and the call to come (landing.css), each with its
 * own layout for tablets and phones. The three moves drawn as the game draws them, the rings and what they pay, the
 * seasons and the leaderboards, and the rest of the game in a bento.
 */
/* ----------------------------------------------------------------------------------------------- Steps */
.how .section-title,
.more .section-title {
  text-align: center;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin: clamp(100px, 11vw, 124px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
/* The aiming guide that links the three planets, green: the way to go. */
.steps::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 17%;
  right: 17%;
  height: 8px;
  background: radial-gradient(circle, var(--mint) 3px, transparent 3.5px) 0 0 / 22px 8px repeat-x;
}

.step {
  --accent: var(--lavender);
  padding: 0 clamp(18px, 2vw, 26px) 26px;
  text-align: center;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  font: 400 1rem/1 var(--f-display);
}
.step--release {
  --accent: var(--mint);
}
.step--catch {
  --accent: var(--gold);
}

.step-title {
  margin: 4px 0 8px;
  color: var(--accent);
  font: 400 1.75rem/1.1 var(--f-display);
  -webkit-text-stroke: 0.15em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--ink);
}
.step p {
  margin: 0;
  color: var(--body);
}

/* Each step drawn as the game draws it: a planet, its dashed ring, the moon. */
.step-art {
  position: relative;
  width: 150px;
  height: 150px;
  margin: -84px auto 6px;
}
.step-art .ring {
  position: absolute;
  inset: 4px;
  border: 3px dashed rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    transparent 44%,
    color-mix(in srgb, var(--accent) 24%, transparent) 46%,
    color-mix(in srgb, var(--accent) 6%, transparent) 100%
  );
}
.step-art .planet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  translate: -50% -50%;
}
.step-art .moon {
  position: absolute;
  width: 30px;
  height: 30px;
}

.step--hold .orbit {
  position: absolute;
  inset: 17px;
  animation: spin 3.4s linear infinite;
}
.step--hold .moon {
  top: -15px;
  left: calc(50% - 15px);
  animation: spin 3.4s linear infinite reverse;
}

.step--release .moon--away {
  top: -16px;
  right: -26px;
}
.step--release .guide {
  position: absolute;
  top: 9px;
  left: 50%;
  display: flex;
  gap: 7px;
  rotate: -13deg;
  transform-origin: left center;
}
.step--release .guide i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 2px var(--ink);
  animation: guide 1.6s ease-in-out infinite;
}
.step--release .guide i:nth-child(2) {
  animation-delay: 0.12s;
}
.step--release .guide i:nth-child(3) {
  animation-delay: 0.24s;
}
.step--release .guide i:nth-child(4) {
  animation-delay: 0.36s;
}
.step--release .guide i:nth-child(5) {
  animation-delay: 0.48s;
}

.step--catch .band {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    transparent 52%,
    rgba(255, 210, 63, 0.7) 53%,
    rgba(255, 210, 63, 0.28) 66%,
    transparent 67%
  );
}
.step--catch .moon--caught {
  top: 28px;
  left: 28px;
}
.step--catch .pop {
  position: absolute;
  top: -22px;
  left: 50%;
  translate: -50% 0;
  color: var(--gold);
  font: 400 1.05rem/1 var(--f-display);
  white-space: nowrap;
  -webkit-text-stroke: 0.24em var(--ink);
  paint-order: stroke fill;
  animation: pop 2.6s var(--ease-spring) infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes guide {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  12% {
    opacity: 1;
    transform: scale(1.18);
  }
  22%,
  78% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ------------------------------------------------------------------------------------------------ Tiers */
.tiers {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}
.tiers-art svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}
.tiers-art .band {
  fill: none;
}
.tiers-art .band--perfect {
  stroke: var(--gold);
  stroke-opacity: 0.6;
  stroke-width: 31.5;
}
.tiers-art .band--great {
  stroke: var(--cyan);
  stroke-opacity: 0.32;
  stroke-width: 31.5;
}
.tiers-art .band--good {
  stroke: var(--lavender);
  stroke-opacity: 0.16;
  stroke-width: 42;
}
.tiers-art .edge {
  fill: none;
  stroke: #fff;
  stroke-opacity: 0.75;
  stroke-width: 3.5;
  stroke-dasharray: 11 9;
  transform-origin: 220px 220px;
  animation: spin 40s linear infinite;
}
.tiers-art .target-orbit {
  transform-origin: 220px 220px;
  animation: spin 5s linear infinite;
}
.tiers-art .label {
  stroke: var(--ink);
  stroke-width: 2.5;
}
.tiers-art .label--perfect {
  fill: var(--gold);
}
.tiers-art .label--great {
  fill: var(--cyan);
}
.tiers-art .label--good {
  fill: var(--lavender);
}
.tiers-art text {
  fill: var(--ink);
  font: 400 17px var(--f-display);
  text-anchor: middle;
}

.tier-list {
  display: grid;
  gap: 10px;
  margin: 0;
}
.tier {
  --tier: var(--gold);
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(42, 27, 92, 0.6);
  border: 2px solid var(--ink);
  border-radius: 16px;
}
.tier dt {
  padding: 7px 10px;
  background: var(--tier);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  font: 400 0.95rem/1.15 var(--f-display);
  text-align: center;
  white-space: nowrap;
}
.tier dd {
  margin: 0;
  color: var(--body);
  line-height: 1.45;
}
.tier--great {
  --tier: var(--cyan);
}
.tier--good {
  --tier: var(--lavender);
}
.tier--chain {
  --tier: var(--orange);
}
.tier--graze {
  --tier: var(--pink);
}

/* ---------------------------------------------------------------------------------------------- Seasons */
.seasons {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "copy art"
    "boards art";
  gap: 28px clamp(32px, 6vw, 88px);
  align-items: start;
}
.seasons-copy {
  grid-area: copy;
}
.boards {
  grid-area: boards;
}
.seasons-art {
  grid-area: art;
  position: relative;
  align-self: center;
  height: clamp(460px, 46vw, 620px);
}
.seasons-art .phone {
  position: absolute;
  width: clamp(200px, 21vw, 280px);
}
.seasons-art .phone--back {
  top: 0;
  left: 2%;
  rotate: -7deg;
}
.seasons-art .phone--front {
  bottom: 0;
  right: 2%;
  rotate: 5deg;
}

.season-live {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 18px;
  padding: 10px 18px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 228, 94, 0.3);
  color: var(--sun);
  font: 400 0.92rem/1.2 var(--f-display);
  letter-spacing: 0.05em;
}
.season-live[hidden] {
  display: none;
}
.live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mint);
  animation: live 1.8s ease-out infinite;
}
.season-sep {
  color: var(--mute);
}

@keyframes live {
  from {
    opacity: 0.6;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2.8);
  }
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mode {
  --tint: var(--mint);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  column-gap: 12px;
  row-gap: 1px;
  padding: 12px 14px;
  background: rgba(42, 27, 92, 0.62);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow:
    0 5px 0 var(--ink),
    inset 4px 0 0 var(--tint);
}
.mode--medium {
  --tint: var(--orange);
}
.mode--hard {
  --tint: var(--danger);
}
.mode--eternal {
  --tint: #a993ff;
}
.mode-icon {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--ink);
  border-radius: 12px;
}
svg.mode-icon {
  padding: 9px;
  fill: none;
  stroke: var(--tint);
  stroke-width: 13;
  stroke-linecap: round;
}
.mode--easy .pips i:nth-child(-n + 1),
.mode--medium .pips i:nth-child(-n + 2),
.mode--hard .pips i:nth-child(-n + 3) {
  background: var(--tint);
}
.mode strong {
  color: var(--tint);
  font: 400 1.2rem/1.1 var(--f-display);
  letter-spacing: 0.04em;
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
}
.mode > span[lang] {
  grid-column: 2;
  color: var(--body);
  font-size: 0.93rem;
  line-height: 1.4;
}

.boards {
  padding: 20px 24px 24px;
}
.boards-title {
  margin: 0 0 12px;
  color: var(--gold);
  font: 400 1.5rem/1.15 var(--f-display);
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
}
.boards ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.boards li {
  position: relative;
  padding-left: 28px;
  color: var(--body);
}
.boards li::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 2px;
  width: 13px;
  height: 13px;
  background: var(--gold);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
}

/* ------------------------------------------------------------------------------------------------ Bento */
/* Two big tiles, a screen of the game beside its words, over three small ones. */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.tile {
  grid-column: span 2;
  padding: 20px 22px 22px;
}
.tile--ghost,
.tile--retry {
  grid-column: span 3;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "shot title"
    "shot text";
  column-gap: clamp(16px, 2vw, 26px);
  padding: 22px clamp(18px, 2vw, 26px);
}
.tile--ghost h3,
.tile--retry h3 {
  grid-area: title;
  align-self: end;
}
.tile--ghost p,
.tile--retry p {
  grid-area: text;
  align-self: start;
}
.tile--replay {
  --accent: var(--cyan);
}
.tile--offline {
  --accent: var(--mint);
}
.tile--everyone {
  --accent: var(--pink);
}
.tile-shot {
  grid-area: shot;
  align-self: center;
  width: 100%;
  max-width: 230px;
  rotate: -2deg;
}
.tile--retry .tile-shot {
  rotate: 2deg;
}
.tile h3 {
  margin: 0 0 6px;
  color: var(--text);
  font: 400 1.35rem/1.15 var(--f-display);
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
}
.tile p {
  margin: 0;
  color: var(--body);
  font-size: 0.98rem;
}
.tile-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------------------------- Tablets */
@media (max-width: 1000px) {
  .tile--ghost,
  .tile--retry {
    grid-column: span 6;
    grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  }
  .seasons {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "art"
      "boards";
  }
  .seasons-art {
    width: min(100%, 560px);
    height: clamp(420px, 70vw, 560px);
    justify-self: center;
  }
}

/* -------------------------------------------------------------------------------------------- Phones */
@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 104px;
    max-width: 440px;
    margin-inline: auto;
  }
  .steps::before {
    display: none;
  }
  .tiers {
    grid-template-columns: minmax(0, 1fr);
  }
  .tiers-art svg {
    max-width: 380px;
  }
}

@media (max-width: 760px) {
  .tile {
    grid-column: span 3;
  }
  .tile--everyone {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  .season-live {
    border-radius: 18px;
  }
  .season-sep {
    display: none;
  }
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile,
  .tile--ghost,
  .tile--retry {
    grid-column: span 6;
  }
  .tile--ghost,
  .tile--retry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "shot"
      "title"
      "text";
    row-gap: 6px;
  }
  .tile-shot {
    width: min(64%, 220px);
    margin: 4px auto 14px;
  }
  .tier {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .tier dt {
    justify-self: start;
  }
}
