/* ==========================================================================
   Join / QR landing page  (/join/) and the unsubscribe confirmation.

   Loaded only on those two routes by fatboys-join.php. It adds nothing to the
   rest of the site's CSS budget and reuses mockup.css tokens and buttons
   throughout — the page is a new screen, not a new identity.

   Sizing note: the single most likely visitor is someone standing in the shop
   holding a phone, so this is written narrow-first and every control is
   comfortably over the 44px tap-target floor at 320px wide. Font-size on the
   inputs is 16px and never smaller — iOS Safari zooms the whole page on focus
   for anything under 16px, which throws the layout sideways mid-form.
   ========================================================================== */

.join-narrow { max-width: 620px; }

.join-page h1 { font-size: clamp(1.9rem, 6vw, 2.9rem); margin: 0 0 14px; }
.join-page .lede { margin: 0 0 26px; }

/* --- the four reasons to bother ------------------------------------------ */

.join-benefits {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.join-benefits li {
  position: relative;
  padding: 11px 14px 11px 40px;
  background: var(--paper-2, rgba(255, 255, 255, 0.5));
  border: 1px solid rgba(34, 29, 26, 0.12);
  border-radius: 6px;
  font-size: 0.97rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.join-benefits li strong { color: var(--ink); }
.join-benefits li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 1.15em;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--meat);
  transform: rotate(45deg);
}

/* --- the form ------------------------------------------------------------ */

.join-form {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(34, 29, 26, 0.14);
  border-radius: 10px;
  padding: 24px 22px 20px;
}

.join-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .join-row { grid-template-columns: 1fr; } }

.join-field { margin: 0 0 18px; }
.join-field label {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 7px;
}
/* The "(optional)" and the aside on the mobile field are secondary to the label
   they sit in, so they drop the caps and the weight rather than the size alone. */
.join-field label span {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.join-field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 16px;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  /* 0.55 alpha of the ink, not the 0.28 it shipped with. The border is the only thing
     that marks where the field is (white fill on a near-white card is 1.07:1), and at
     0.28 it measured 1.82:1 on white and 1.70:1 against the card, both under the 3:1
     WCAG 1.4.11 needs for a control boundary. 0.55 measures 3.78:1 and 3.53:1. */
  border: 1px solid rgba(34, 29, 26, 0.55);
  border-radius: 5px;
  -webkit-appearance: none;
  appearance: none;
}
.join-field input:focus-visible,
.join-consent input:focus-visible {
  outline: 3px solid var(--meat);
  outline-offset: 2px;
  border-color: var(--meat);
}
.join-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* --- consent ------------------------------------------------------------- */

/* Deliberately given its own block and its own border. The box is unticked and
   the account is created either way (Spam Act: express consent), so it must not
   read as part of the required fields above it.

   The box IS the label. The padding, fill and border sit on the <label>, not on
   the <p> around it, so every pixel of the visible box toggles the checkbox. When
   the <p> carried them, a tap on the box's own padding hit the paragraph and did
   nothing (measured with a trusted touch at 390px: elementFromPoint returned
   P.join-consent and the box stayed unticked). The My Account edit form prints the
   same markup, and fatboys-join.php enqueues this sheet there too. */
.join-consent { margin: 4px 0 22px; }
.join-consent label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid rgba(34, 29, 26, 0.18);
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}
.join-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--meat);
}

.join-account-consent { margin-top: 26px; }
.join-account-consent legend {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

/* --- submit, errors, fine print ------------------------------------------ */

.join-submit { margin: 0 0 16px; }
.join-submit .btn {
  width: 100%;
  text-align: center;
  font-size: 1.05rem;
  padding: 16px 24px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.join-error {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 6px;
  background: #fbe9e9;
  border: 1px solid var(--meat);
  color: var(--meat-deep);
  /* The failure redirect lands on #join-error; without this the box is pinned to
     the very top edge of the viewport (measured top=0 at 320..430). */
  scroll-margin-top: 16px;
}
.join-error p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.join-error p + p { margin-top: 8px; }
.join-error a { color: var(--meat-deep); }

.join-fineprint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* --- honeypot ------------------------------------------------------------
   Off-screen rather than display:none. A bot that parses CSS can spot the
   latter trivially; this stays in the layout tree while being unreachable by
   sight, by tab (tabindex="-1") and by screen reader (aria-hidden). */
.join-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .join-submit .btn:hover { transform: none; }
}

/* --- the sign-up offer ---------------------------------------------------
   Rendered only when the shop has written an offer for that code (WooCommerce
   -> Specials list). Deliberately NOT styled like .join-error: those two boxes
   would otherwise share a colour, and the one thing on this page that is good
   news would read as the one thing that went wrong. */
.join-offer {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--pink-soft);
  border: 1px solid var(--pink);
  border-left: 5px solid var(--meat);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}
.join-offer strong,
.join-offer a { color: var(--meat-deep); }

/* Sits directly under the consent box, so it reads as being about that box and
   not as a new paragraph. The consent block carries 22px beneath it. */
.join-offer-hint { margin: -12px 0 22px; }
