/* Join: the sign-up (docs/review/new-plan.md 2.5). Full PurpleFlick, Victor's two lines, a white field and a lime
   "Join the waitlist", then the shell's purple footer. No number, no lead of our own, no object, no motion: reduced
   motion is the same page. Every selector starts with #join; the form itself is base.css's .signup, and the colours
   (white type, white field, lime button with deep type, white focus ring, blush error) come from .surface-flick.

   The last screen is this section and the footer together. The section is one screen under the bar less the footer's
   height (--foot-floor), so:
   - the "Join the waitlist" jump (site.js) can always bring the section's top right up to the bar, since section and
     footer fill the screen: no strip of the mission shows above it;
   - from 375 × 812 up, the bottom of the page, where a fling or the End key comes to rest, is that same frame, with
     the words whole and the footer under them. On a shorter screen (320 × 568, a phone on its side) form and footer
     are taller than the screen: the jump still lands on the section's top, and the page's end shows the form's lower
     part over the footer.
   --foot-floor is the footer's own height, measured (site.js --foot-h), so a change to the footer needs nothing here.
   Until the script runs it is a floor just under the footer's height (15rem on phones, 8.5rem from 900 px): erring
   low keeps the jump right. The words sit in the middle of the section, on the wrap's left edge: the opening's words
   and the footer's logo share it. */
#join {
  /* The footer's measured height (site.js writes --foot-h); the floors below stand in until the script has run. */
  --foot-floor: var(--foot-h, 15rem);
  /* lvh, the screen with the browser's toolbar slid away: the tallest a phone's screen gets, so with the toolbar gone
     section and footer still fill it, and no strip of the mission's deep field shows above the sign-up. */
  min-height: calc(100lvh - var(--bar-top) - var(--foot-floor));
  display: grid; align-content: center;
  /* The least room above and below the words; on a short screen (a phone on its side) it shrinks with the height, so
     the jump still shows the whole form and the message line under it. */
  padding-block: min(clamp(4.5rem, 3.5rem + 4vw, 7rem), 10svh);
  /* The jump honours scroll-padding-top (the bar plus 1rem), which would leave a 16 px strip of the mission's deep
     field between the purple bar and this purple section. Taking that 1rem back here lands the section's top on the
     bar's bottom edge, so bar and sign-up read as one field. */
  scroll-margin-top: -1rem;
}
@media (min-width: 56.25rem) { #join { --foot-floor: var(--foot-h, 8.5rem); } }
/* Phones (16 Nov, co-founder: the keyboard covered the field): the words and the form sit at the top of the section,
   just under the bar, not in its middle, so when the keyboard comes up the field is already in the screen's upper half
   (site.js also keeps it above the keyboard while it has focus). */
@media (max-width: 37.49rem) { #join { align-content: start; padding-top: 2rem; } }

/* The page's last word, at the opening tagline's size (--t-h1, not the --t-h2 a section headline takes), so the first
   and the last screen answer each other. */
#join .h2 { font-size: var(--t-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
/* Two even lines on a narrow phone; one line, never wider than the form, once the column holds it (about 430 px up). */
#join .lead { margin-top: clamp(1rem, 0.85rem + 0.6vw, 1.5rem); max-width: 34rem; text-wrap: balance; }
#join .signup { margin-top: clamp(2.25rem, 1.9rem + 1.6vw, 3.5rem); }
