/* Home page. Shared tokens and fonts live in styles.css. */

.wrap.wide {
  max-width: 1120px;
}

.brand {
  font-size: 30px;
}

/* Hero: copy on the left, the chalk scoreboard on the right */
.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 32px 0 96px;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
    padding-top: 56px;
  }
}

.hero h1 {
  font-size: clamp(72px, 11vw, 132px);
  line-height: 0.88;
  max-width: 7ch;
}

.lede {
  max-width: 34em;
  margin: 28px 0 32px;
  font-size: 20px;
  color: #ddd3c0;
}

.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 0;
}

.store-badge {
  padding: 12px 20px;
  border: 1.5px solid var(--ivory);
  border-radius: 12px;
  font-weight: 600;
}

.store-note {
  color: var(--muted);
  font-size: 16px;
}

/* The slate: a pub chalkboard that chalks up a nine-dart leg once on load */
.slate {
  position: relative;
  margin: 0;
  padding: 28px 32px 32px;
  border: 10px solid #3a2a1c;
  border-radius: 6px;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.05), transparent 60%), var(--slate);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.55),
    0 30px 60px -20px rgba(0, 0, 0, 0.7);
  font-family: "Gochi Hand", "Bebas Neue", cursive;
  color: var(--chalk);
}

.slate-head {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(242, 232, 213, 0.45);
  font-size: 30px;
}

.slate-game {
  color: var(--brass);
}

.chalk {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: baseline;
  padding: 6px 0;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.1;
}

.scored {
  color: var(--green);
}

.left {
  position: relative;
  justify-self: end;
}

/* Every remaining score except the last gets crossed out, like a real chalker would */
.row:not(.r3) .left::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: 55%;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(-4deg) scaleX(0);
  transform-origin: left;
  animation: strike 0.35s ease-out forwards;
}

.left.out {
  font-size: 0.55em;
  color: var(--ivory);
}

.game-shot {
  margin-top: 18px;
  font-size: clamp(24px, 6.5vw, 34px);
  color: var(--brass);
}

/* Load sequence: rows chalk in one by one, then the previous score is struck through */
.row,
.game-shot {
  opacity: 0;
  animation: chalk-in 0.45s ease-out forwards;
}

.r0 {
  animation-delay: 0.2s;
}
.r1 {
  animation-delay: 0.9s;
}
.r2 {
  animation-delay: 1.7s;
}
.r3 {
  animation-delay: 2.5s;
}
.game-shot {
  animation-delay: 3.2s;
}
.r0 .left::after {
  animation-delay: 1.1s;
}
.r1 .left::after {
  animation-delay: 1.9s;
}
.r2 .left::after {
  animation-delay: 2.7s;
}

@keyframes chalk-in {
  from {
    opacity: 0;
    filter: blur(2px);
  }
  to {
    opacity: 1;
    filter: none;
  }
}

@keyframes strike {
  to {
    transform: rotate(-4deg) scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .row,
  .game-shot,
  .row:not(.r3) .left::after {
    animation: none;
    opacity: 1;
  }
  .row:not(.r3) .left::after {
    transform: rotate(-4deg);
  }
}

/* Sections */
section h2 {
  font-size: clamp(48px, 7vw, 72px);
  line-height: 0.95;
}

.screens,
.modes,
.details {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-lede {
  max-width: 34em;
  margin: 12px 0 40px;
  color: #ddd3c0;
}

.phones {
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .phones {
    grid-template-columns: repeat(3, 1fr);
  }
}

.phones figure {
  margin: 0;
}

.phones img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 8px solid #26262e;
  border-radius: 38px;
}

.phones figcaption {
  max-width: 300px;
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
}

/* Two modes side by side, separated like the two halves of a scoreboard */
.mode-split {
  display: grid;
  margin-top: 36px;
}

@media (min-width: 720px) {
  .mode-split {
    grid-template-columns: 1fr 1fr;
  }
  .mode + .mode {
    padding-left: 48px;
    border-left: 2px solid var(--red);
  }
  .mode:first-child {
    padding-right: 48px;
  }
}

.mode {
  padding: 8px 0 24px;
}

.mode-name {
  margin: 0 0 8px;
  font-size: 56px;
  line-height: 1;
}

.mode:first-child .mode-name {
  color: var(--red);
}

.mode + .mode .mode-name {
  color: var(--green);
}

.mode p:not(.mode-name) {
  max-width: 30em;
  margin: 0;
  color: #ddd3c0;
}

.detail-list {
  display: grid;
  gap: 18px 48px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .detail-list {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-list li {
  max-width: 32em;
  color: #ddd3c0;
}

.detail-list strong {
  color: var(--ivory);
  font-weight: 600;
}
