/* The landing page: a bold intro, the sign-in card and three short features.
   Colours, buttons, cards and forms come from /shared/ui.css. */

/* ui.css sets display on .button and .card, which would otherwise override hidden. */
[hidden] { display: none !important; }

/* The two sides of a match, faintly, behind the intro: red on the left, blue on the right. */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 640px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(104deg,
    color-mix(in srgb, var(--red) 14%, transparent) 0 44%,
    transparent 44% 56%,
    color-mix(in srgb, var(--blue) 16%, transparent) 56% 100%);
  /* Fade out rather than stopping at a hard edge partway down the page. */
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.landing {
  display: grid;
  gap: 36px;
  grid-template-areas: 'intro' 'auth' 'features';
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}
.intro { grid-area: intro; }
.auth { grid-area: auth; align-self: start; }
.features { grid-area: features; }

@media (min-width: 900px) {
  .landing {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: 'intro auth' 'features features';
    column-gap: 56px;
    align-items: start;
    padding-top: 72px;
  }
}

.intro h1 {
  font-size: clamp(34px, 8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin: 0 0 18px;
}
.lead {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}
.cta { gap: 12px; }
.button.big { padding: 13px 20px; font-size: 16px; }
.games { margin: 28px 0 0; line-height: 2.2; }

.auth h2 { margin-bottom: 0; }
.auth .hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.block { width: 100%; }

/* The sign in / create account switch: two halves of one control. */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--panel-2);
}
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 9px 8px; }
.segmented button[aria-pressed='true'] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }

.features { display: grid; gap: 16px; }
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.features .feature { margin-top: 0; border-top: 3px solid var(--line); }
.feature:nth-child(1) { border-top-color: var(--red); }
.feature:nth-child(2) { border-top-color: var(--blue); }
.feature h2 { font-size: 18px; }
.feature p { margin: 0; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 640px) {
  .landing { padding-top: 24px; }
}
