.home-page {
  background: var(--color-canvas);
}

.home-page .section {
  scroll-margin-top: var(--space-20);
}

.home-page .button:focus-visible,
.home-page a:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.28);
  outline-offset: 2px;
}

.home-hero {
  padding-block: var(--space-16) var(--space-20);
}

.home-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--space-12);
}

.home-hero__layout > * {
  min-width: 0;
  width: 100%;
}

.home-hero__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 35rem;
}

.home-hero__content h1,
.home-hero__content p {
  margin: 0;
}

.home-hero__content h1 span {
  color: var(--color-emerald);
}

.home-hero__content h1 em {
  color: var(--color-pink);
  font-style: normal;
}

.home-hero__content p {
  color: var(--color-muted-ink);
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}

.home-hero__actions {
  width: 100%;
  margin-top: var(--space-2);
}

.home-hero__actions > .button {
  flex: 0 1 auto;
}

.home-hero__media {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 31.25rem;
}

.home-topics__intro,
.home-mechanics__intro,
.home-characters__intro,
.home-teams__intro,
.home-scenarios__intro,
.home-review__intro {
  max-width: 38.75rem;
}

.home-topics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.home-topics__grid > *,
.home-mechanics__grid > *,
.home-characters__grid > *,
.home-scenarios__grid > * {
  min-width: 0;
  width: 100%;
}

.home-topic-card,
.home-character-card,
.home-scenario-card,
.home-mechanic-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.home-topic-card > *,
.home-character-card > *,
.home-scenario-card > *,
.home-mechanic-card > * {
  margin: 0;
}

.home-topic-card h3,
.home-character-card h3,
.home-scenario-card h3,
.home-mechanic-card h3 {
  font-size: var(--text-xl);
}

.home-topic-card p,
.home-character-card p,
.home-scenario-card p,
.home-mechanic-card p {
  color: var(--color-muted-ink);
}

.home-topic-card h3 a {
  color: var(--color-ink);
  text-decoration: none;
}

.home-topic-card h3 a:hover,
.home-topic-card h3 a:focus-visible {
  color: var(--color-emerald-deep);
  text-decoration: underline;
}

.home-text-link {
  margin-top: auto;
  font-weight: 700;
}

.home-mechanics {
  background: var(--color-emerald-wash);
}

.home-mechanics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.home-mechanic-card--accent {
  background: #e6f8ec;
}

.home-mechanic-steps {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  color: var(--color-muted-ink);
  counter-reset: mechanic;
}

.home-mechanic-steps li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--space-2);
  min-width: 0;
  counter-increment: mechanic;
}

.home-mechanic-steps li::before {
  color: var(--color-emerald-deep);
  font-weight: 800;
  content: counter(mechanic) ".";
}

.home-characters__grid,
.home-scenarios__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.home-inline-links {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  font-weight: 700;
}

.home-inline-links > a {
  min-width: 0;
}

.home-teams__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.home-teams__segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

.home-team-segment {
  min-width: 0;
  width: 100%;
  padding-inline: var(--space-6);
}

.home-team-segment:first-child {
  padding-inline-start: 0;
}

.home-team-segment + .home-team-segment {
  border-inline-start: 1px solid var(--color-line);
}

.home-team-segment__number {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-emerald-wash);
  color: var(--color-emerald-deep);
  font-weight: 800;
}

.home-team-segment h3 {
  margin-top: var(--space-3);
  font-size: var(--text-xl);
}

.home-team-segment p {
  margin-bottom: 0;
  color: var(--color-muted-ink);
}

.home-teams__cta {
  flex: 0 0 auto;
}

.home-story__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-12);
}

.home-story__layout > * {
  min-width: 0;
  width: 100%;
}

.home-story__content {
  max-width: 32.5rem;
}

.home-story__content p {
  color: var(--color-muted-ink);
}

.home-story__media {
  aspect-ratio: 4 / 3;
}

@media (hover: hover) and (pointer: fine) {
  .home-story__media img {
    transition: transform var(--transition-fast);
  }

  .home-story__media:hover img {
    transform: scale(1.02);
  }
}

.home-review {
  background: var(--color-emerald-wash);
}

.home-review__card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-8);
}

.home-review-item {
  display: grid;
  grid-template-columns: minmax(0, 22%) minmax(0, 78%);
  gap: var(--space-6);
  min-width: 0;
  width: 100%;
  padding-block: var(--space-6);
}

.home-review-item:first-child {
  padding-top: 0;
}

.home-review-item:last-child {
  padding-bottom: 0;
}

.home-review-item + .home-review-item {
  border-top: 1px solid var(--color-line);
}

.home-review-item > * {
  min-width: 0;
  width: 100%;
}

.home-review-item h3,
.home-review-item p {
  margin: 0;
}

.home-review-item h3 {
  margin-top: var(--space-2);
  font-size: var(--text-xl);
}

.home-review-item p {
  max-width: 42.5rem;
  color: var(--color-muted-ink);
}

.home-review-item__action {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.home-download {
  background: var(--color-emerald-wash);
}

.home-download__card {
  display: flex;
  width: min(100%, 45rem);
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-inline: auto;
  padding: var(--space-12);
  text-align: center;
}

.home-download__card > * {
  margin: 0;
}

.home-download__card > p:not(.eyebrow):not(.home-download__id) {
  max-width: 32.5rem;
  color: var(--color-muted-ink);
}

.home-download__id {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--color-muted-ink);
  font-size: var(--text-sm);
}

.home-download__button {
  min-height: 3rem;
  margin-top: var(--space-2);
}

.home-download__card small {
  color: var(--color-muted-ink);
}

.home-next__content {
  max-width: 47.5rem;
}

.home-next__steps {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-6);
  margin: var(--space-8) 0 0;
  padding: 0;
}

.home-next__steps li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--space-4);
  min-width: 0;
  width: 100%;
}

.home-next__steps li > * {
  min-width: 0;
}

.home-next__steps > li > span {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--color-emerald-wash);
  color: var(--color-emerald-deep);
  font-weight: 800;
}

.home-next__steps h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
}

.home-next__steps p {
  margin-bottom: 0;
  max-width: 42.5rem;
  color: var(--color-muted-ink);
}

@media (max-width: 60rem) {
  .home-mechanics__grid {
    grid-template-columns: 1fr;
  }

  .home-characters__grid,
  .home-scenarios__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 56.25rem) {
  .home-hero__layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .home-hero__content {
    max-width: 34rem;
  }

  .home-hero__media {
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .home-topics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-teams__segments {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .home-team-segment,
  .home-team-segment:first-child {
    padding-inline: 0;
  }

  .home-team-segment + .home-team-segment {
    border-top: 1px solid var(--color-line);
    border-inline-start: 0;
    padding-top: var(--space-6);
  }

  .home-story__layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .home-story__content {
    max-width: 34rem;
  }

  .home-story__media {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 47.5rem) {
  .home-review-item {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

@media (max-width: 38.75rem) {
  .home-topics__grid {
    grid-template-columns: 1fr;
  }

  .home-download__card {
    padding: var(--space-5, 1.25rem);
  }
}

@media (max-width: 35rem) {
  .home-hero__actions {
    flex-direction: column;
  }

  .home-hero__actions > .button,
  .home-teams__cta,
  .home-review-item__action .button,
  .home-download__button {
    width: 100%;
  }
}

@media (max-width: 26.25rem) {
  .home-next__steps li {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .card:hover {
    transform: none;
  }

  .home-story__media:hover img {
    transform: none;
  }
}
