/* ============================================================
   HiveMind email signup form (#signup). CF-03 / HM-554
   The homepage's single conversion goal. Loads AFTER skills.css +
   plugins.css and reuses their sk-* patterns (section head, lead,
   buttons, mono command block) read-only; this file styles only the
   form, the Turnstile widget, and the inline success reveal.

   Accent discipline (DESIGN.md): interactive teal (--hive-500) only on
   the submit button + focus/hover states; non-interactive accents Sage
   (--hive-300). No Ember (footer lockup dot owns the single use).
   Copy: docs/copy-deck.md §15.1 (form) + §15.2 (success reveal).
   ============================================================ */

/* Sticky-header clearance so the #signup anchor doesn't hide under the header. */
.plugins-page #signup {
  scroll-margin-top: var(--nav-h);
}

/* Narrow, centred conversion column. */
.sg {
  max-width: 34rem;
  margin-inline: auto;
}

.sg-head {
  max-width: none;
  margin-bottom: var(--space-xl);
  text-align: center;
}

/* Either view (form / success) hidden means hidden. */
.sg-view[hidden] {
  display: none;
}

/* ---- Form ---- */
.sg-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sg-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

.sg-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--offwhite);
}

.sg-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--offwhite);
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-button);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-input::placeholder {
  color: var(--muted-dark);
}

.sg-input:focus-visible {
  outline: none;
  border-color: var(--hive-500);
  box-shadow: 0 0 0 3px rgba(31, 122, 130, 0.35);
}

/* Invalid: stronger border (no red in the brand palette; the error text
   below carries the message, so we never rely on colour alone). */
.sg-input[aria-invalid="true"] {
  border-color: var(--muted-dark);
}

/* ---- Turnstile widget ---- */
.sg-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px; /* reserve height so the reveal doesn't shift on render */
}

.sg-turnstile-note {
  margin: 0;
  font-size: var(--fs-eyebrow);
  color: var(--muted-dark);
  text-align: center;
}

.sg-submit {
  width: 100%;
}

/* ---- Supporting microcopy ---- */
.sg-microcopy,
.sg-privacy {
  margin: 0;
  color: var(--muted-dark);
  text-align: center;
}

.sg-microcopy {
  font-size: var(--fs-sm);
}

.sg-privacy {
  font-size: var(--fs-eyebrow);
}

/* ---- Error message (text-led, not colour-led) ---- */
.sg-error {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--offwhite);
  background: var(--ink-3);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--hive-300);
  border-radius: var(--radius-button);
  text-align: left;
}

.sg-error[hidden] {
  display: none;
}

/* ---- Success reveal ---- */
.sg-success {
  text-align: center;
}

.sg-success-title:focus-visible {
  outline: 2px solid var(--hive-500);
  outline-offset: 4px;
  border-radius: 4px;
}

.sg-cmds {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  text-align: left;
}

.sg-cmd-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-sm);
}

.sg-cmd {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--offwhite);
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-button);
  white-space: nowrap;
  overflow-x: auto;
}

.sg-copy {
  flex: none;
  padding: 0 var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  color: var(--hive-300);
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sg-copy:hover,
.sg-copy:focus-visible {
  border-color: var(--hive-500);
  color: var(--hive-500);
}

.sg-copy.is-copied {
  border-color: var(--hive-500);
  color: var(--hive-500);
}

.sg-availability {
  margin-top: var(--space-lg);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}
