/* Page-owned styles for How to Play */

.how-to-play-hero {
  padding-block: var(--space-3xl) var(--space-2xl);
}

.how-to-play-hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 8ch;
}

.how-to-play-hero__lead {
  max-width: 68ch;
  margin-block-end: 0;
}

.how-to-play-hero__note {
  max-width: 68ch;
  color: var(--color-graphite-soft);
  margin-block-end: 0;
}

.how-to-play-hero__conveyor {
  width: 100%;
  height: 1px;
  background-color: var(--color-conveyor-line);
  margin-block-start: var(--space-xl);
}

.how-to-play-section {
  padding-block: var(--space-3xl);
}

.how-to-play-section__heading {
  border-inline-start: 2px solid var(--color-electric-blue);
  padding-inline-start: var(--space-md);
  margin-block-end: var(--space-xl);
}

.how-to-play-section__intro {
  max-width: 68ch;
  margin-block-end: var(--space-md);
}

.how-to-play-section__note {
  max-width: 68ch;
  color: var(--color-graphite-soft);
  margin-block-end: var(--space-xl);
}

.how-to-play-subsection__heading {
  margin-block-end: var(--space-lg);
}

.how-to-play-panel {
  background-color: var(--color-surface);
  border: var(--border-panel);
  border-radius: var(--radius-panel);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.how-to-play-panel--verified {
  border-inline-start: 4px solid var(--color-lime);
}

.how-to-play-panel--lab {
  border-inline-start: 4px solid var(--color-coral);
}

.how-to-play-panel--tip {
  border-inline-start: 4px solid var(--color-lime);
}

.how-to-play-panel--strategy {
  border-inline-start: 4px solid var(--color-violet);
}

.how-to-play-panel--left {
  margin-inline-end: auto;
}

.how-to-play-panel--right {
  margin-inline-start: auto;
}

.how-to-play-panel__label {
  align-self: flex-start;
}

.how-to-play-panel__list {
  margin-block-end: 0;
}

.how-to-play-panel p {
  max-width: 65ch;
  margin-block-end: 0;
}

.how-to-play-panel li {
  max-width: 65ch;
}

.how-to-play-mechanics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.how-to-play-mechanics-grid .how-to-play-panel {
  min-width: 0;
}

.how-to-play-loop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  position: relative;
}

.how-to-play-loop-grid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-conveyor-line);
  z-index: 0;
}

.how-to-play-loop-card {
  background-color: var(--color-surface);
  border: var(--border-panel);
  border-radius: var(--radius-panel);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  position: relative;
  z-index: 1;
  transition: background-color var(--transition-fast);
}

.how-to-play-loop-card:hover {
  background-color: var(--color-yellow-hover-wash);
}

.how-to-play-loop-card__number {
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  font-weight: var(--text-h3-weight);
  color: var(--color-electric-blue);
  line-height: 1;
}

.how-to-play-loop-card__label {
  font-size: var(--text-label-size);
  font-weight: var(--text-label-weight);
  letter-spacing: var(--text-label-tracking);
  text-transform: uppercase;
  color: var(--color-graphite);
  text-align: center;
}

.how-to-play-cta {
  background-color: var(--color-surface);
  border: var(--border-panel);
  border-radius: var(--radius-panel);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.how-to-play-cta p {
  margin-block-end: 0;
}

.how-to-play-cta__button {
  width: auto;
}

.how-to-play-cta__caption {
  max-width: 50ch;
}

@media (min-width: 768px) {
  .how-to-play-hero {
    padding-block: var(--space-4xl) var(--space-3xl);
  }

  .how-to-play-section {
    padding-block: var(--space-4xl);
  }

  .how-to-play-panel {
    padding: var(--space-xl);
  }

  .how-to-play-panel--left {
    max-width: calc(7 / 12 * 100%);
  }

  .how-to-play-panel--right {
    max-width: calc(7 / 12 * 100%);
  }

  .how-to-play-cta {
    padding: var(--space-2xl);
  }
}

@media (max-width: 767px) {
  .how-to-play-hero__content {
    max-width: none;
  }

  .how-to-play-hero__lead,
  .how-to-play-hero__note {
    max-width: none;
  }

  .how-to-play-section__intro,
  .how-to-play-section__note {
    max-width: none;
  }

  .how-to-play-panel p,
  .how-to-play-panel li {
    max-width: none;
  }

  .how-to-play-mechanics-grid {
    grid-template-columns: 1fr;
  }

  .how-to-play-loop-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .how-to-play-loop-grid::before {
    display: none;
  }

  .how-to-play-loop-card {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .how-to-play-loop-card__number {
    font-size: var(--text-h4-size);
  }

  .how-to-play-cta {
    max-width: none;
    padding: var(--space-lg);
  }

  .how-to-play-cta__button {
    width: 100%;
  }

  .how-to-play-panel--left,
  .how-to-play-panel--right {
    margin-inline: 0;
    max-width: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .how-to-play-loop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-to-play-loop-card {
    transition: none;
  }
}
