/* ==========================================================================
   VADR landing · section 04 "Join" (the signup form)
   1. Section + shared bits   2. Offer reminders + the form panel   3. Phones
   Reuses the tokens from css/how.css, .btn--amber from base.css
   ========================================================================== */

/* 1. Section + shared bits --------------------------------------------------- */
.join { position: relative; padding: 0 var(--gutter) clamp(140px, 18vh, 220px); background: var(--ink); }

.join h2 {
  font-size: clamp(36px, 4.6vw, 80px); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: #fff;
}
.join h2 em {
  font-style: normal;
  background: linear-gradient(100deg, #FFE1B0 0%, var(--amber-1) 40%, var(--amber-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* store type toggle: a pill with two options, the picked one turns gold */
.join__type { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .03); }
.join__type label { position: relative; cursor: pointer; }
.join__type input { position: absolute; opacity: 0; pointer-events: none; }
.join__type span {
  display: block; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background .25s, color .25s;
}
.join__type label:hover span { color: #fff; }
.join__type input:checked + span { background: var(--amber-1); color: var(--ink); }
.join__type input:focus-visible + span { outline: 2px solid var(--amber-1); outline-offset: 2px; }

/* one field: small mono label, a thin underline that turns gold on focus */
.join__field { display: block; }
.join__field > span:first-child {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.join__field input {
  display: block; width: 100%; margin-top: 8px; padding: 10px 0;
  font: inherit; font-size: 17px; color: #fff; background: transparent;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .18); border-radius: 0; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.join__field input::placeholder { color: rgba(255, 255, 255, .28); }
.join__field input:focus { border-color: var(--amber-1); box-shadow: 0 1px 0 var(--amber-1); }
.join__field.is-bad input { border-color: #FF8F7E; box-shadow: 0 1px 0 #FF8F7E; }
.join__err { display: block; min-height: 18px; margin-top: 6px; font-size: 13px; color: #FF8F7E; }
.join [data-only][hidden] { display: none; }

/* done: a gold check, "You're in." */
.join__done { text-align: center; padding: clamp(32px, 5vw, 64px) 0; animation: join-rise .7s cubic-bezier(.2, .8, .2, 1); }
.join__check {
  display: block; width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 50%;
  background: no-repeat center / 28px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' fill='none' stroke='%230B1220' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #FFE1B0, var(--amber-1) 45%, var(--amber-2));
  box-shadow: 0 10px 40px rgba(247, 169, 86, .35);
}
.join__done h3 { font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -.03em; }
.join__done p { max-width: 420px; margin: 12px auto 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

@keyframes join-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* everything rises in once the section scrolls into view */
.join-a__intro, .join-a__panel {
  opacity: 0; transform: translateY(28px); transition: opacity .8s, transform .9s cubic-bezier(.2, .8, .2, 1);
}
.join.is-in .join-a__intro, .join.is-in .join-a__panel { opacity: 1; transform: none; }
.join.is-in .join-a__panel { transition-delay: .15s; }

/* 2. Offer reminders + the form panel ------------------------------------------------------------ */
.join-a {
  display: grid; max-width: 1280px; margin: 0 auto;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: center;
}
.join-a h2 { max-width: 10ch; }
.join-a h2 + p { margin-top: 20px; max-width: 420px; color: var(--muted); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.55; }
.join__notes { list-style: none; display: grid; gap: 12px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.join__notes li { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 15px; }
.join__notes li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-1); box-shadow: 0 0 12px var(--amber-1); }

.join-a__panel {
  padding: clamp(24px, 3vw, 44px); border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
}
.join-a__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin-top: 32px; }
.join__field--wide { grid-column: 1 / -1; }
.join-a .join__cta { margin-top: 16px; min-width: 200px; }
.join__cta:disabled { opacity: .6; cursor: progress; transform: none; }
.join__send-err { margin-top: 14px; font-size: 14px; color: #FF8F7E; }

/* 3. Phones ------------------------------------------------------------------------ */
@media (max-width: 900px) {
  .join-a { grid-template-columns: 1fr; gap: 40px; }
  .join-a__fields { grid-template-columns: 1fr; }
  .join .join__cta { width: 100%; }
  .join__type { display: flex; }
  .join__type label { flex: 1; text-align: center; }
  .join__type span { padding: 10px 8px; }
}
