/* The early-access page (/early-access/): the form that asks for a place, in frames like the careers pages'.
   Loaded after landing.css, on this page only, and built on its tokens (DESIGN.md, "Early Access").

   The form is the first thing on the page: beside the title on a wide window, right under it on a phone. The
   words, a festive mode's offer and the steps stand around it.

   This file is the page as the ordinary site serves it. What a festive mode adds to the page (landing/festive.py)
   is styled by that mode's own stylesheet, which may lay the grid out anew to make room for what it offers and
   set this page's custom properties: the frames' shadow is one, so a season can tint it. */

.access {
  --access-frame-border: rgba(148, 163, 184, 0.34);
  --access-frame-shadow: rgba(59, 130, 246, 0.32);
  --access-pixel: "Pixelify Sans", "Space Mono", ui-monospace, monospace;
}

/* ---------- The layout ---------- */
/* Two columns: the form at the right from the top of the page down, and at its left the title, the lede and the
   three steps, one under the other. The left column's last row takes whatever height the form has more than
   the words, so they stay together at the top. */
.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  grid-template-areas:
    "title form"
    "intro form"
    "steps form";
  grid-template-rows: auto auto 1fr;
  gap: 0 56px;
  align-items: start;
  padding: 56px 0 80px;
}

.access-title {
  grid-area: title;
}

/* The landing's display, a size smaller than on the about page: here it shares the page's first screen with
   the form, and it starts at the left like the words under it. */
.access-title .landing-display {
  max-width: 13ch;
  margin: 22px 0 18px;
  font-size: clamp(2.5rem, 4.6vw, 4.25rem);
}

.access-intro {
  grid-area: intro;
  max-width: 50ch;
  margin: 0 0 32px;
}

.access-form-side {
  grid-area: form;
}

.access-how {
  grid-area: steps;
  max-width: 560px;
}

/* ---------- Frames and labels ---------- */
.access-frame {
  border: 2px solid var(--access-frame-border);
  background: var(--landing-canvas-soft);
  box-shadow: 6px 6px 0 var(--access-frame-shadow);
}

.access-label {
  margin: 0;
  color: var(--landing-accent);
  font-family: var(--access-pixel);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- The form ---------- */
.access-form-frame {
  padding: 26px 28px;
  /* A press that leads to the form must not land with its title under the fixed navigation. */
  scroll-margin-top: calc(var(--landing-nav-h) + 16px);
}

.access-form-frame h2 {
  margin: 8px 0 20px;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* The message is the one field nobody has to fill: it stays low, so the button is in sight without scrolling. */
.access-form-frame textarea {
  min-height: 84px;
}

.access-form-actions {
  display: flex;
}

.access-form-actions .landing-button {
  width: 100%;
  justify-content: center;
}

/* ---------- The steps ---------- */
.access-how .access-label {
  margin-bottom: 14px;
}

.access-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A step: its number at the left of its title and sentence. */
.access-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0 16px;
  /* Side by side, the steps are as tall as the tallest: the room a shorter one has left goes under its words. */
  align-content: start;
  padding: 18px 20px;
}

.access-step-number {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--landing-accent);
  color: var(--landing-canvas);
  font-family: var(--access-pixel);
  font-size: 1.125rem;
  font-weight: 700;
}

.access-step h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
  line-height: 1.3;
}

.access-step p {
  color: var(--landing-muted);
  font-size: 0.9375rem;
}

/* ---------- Narrow windows ---------- */
/* One column, in the order of the markup: the title, the form at once, then the words and the steps. */
@media (max-width: 860px) {
  .access-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "form"
      "intro"
      "steps";
    grid-template-rows: none;
    padding: 24px 0 56px;
  }

  .access-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .access-title .landing-display {
    max-width: none;
    margin: 14px 0 16px;
    font-size: clamp(1.875rem, 8.4vw, 2.5rem);
  }

  .access-intro {
    margin: 32px 0 24px;
  }

  .access-frame {
    box-shadow: 4px 4px 0 var(--access-frame-shadow);
  }

  .access-form-frame {
    padding: 20px 18px;
  }

  .access-how {
    max-width: none;
  }
}
