/* =============================================================
   onboarding.css  —  BrineHive onboarding flow
   Light treatment: warm off-white page, white card, brand accents.
   ============================================================= */


/* -------------------------------------------------------------
   PAGE SHELL
   ------------------------------------------------------------- */
.ob-page {
  min-height: 100svh;
  background-color: var(--color-brand-off-white, #f5f5f5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
}


/* -------------------------------------------------------------
   WORDMARK
   ------------------------------------------------------------- */
.ob-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: #3d441e;
  text-decoration: none;
  margin-bottom: 2.25rem;
  transition: opacity 0.15s ease;
}
.ob-wordmark:hover { opacity: 0.65; }


/* -------------------------------------------------------------
   STEP INDICATOR
   ------------------------------------------------------------- */
.ob-steps {
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
}

.ob-step {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ob-step-chip {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid rgba(61, 68, 30, 0.18);
  background: rgba(61, 68, 30, 0.05);
  color: rgba(61, 68, 30, 0.30);
  transition: all 0.3s ease;
}
.ob-step-chip.is-active {
  background: #a24e2e;
  border-color: #a24e2e;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(162, 78, 46, 0.18);
}
.ob-step-chip.is-complete {
  background: rgba(140, 150, 122, 0.20);
  border-color: rgba(140, 150, 122, 0.50);
  font-size: 0;
}
.ob-step-chip.is-complete::after {
  content: '✓';
  font-size: 0.7rem;
  color: #8c967a;
}

.ob-step-label {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(61, 68, 30, 0.28);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.ob-step-label.is-active   { color: #3d441e; }
.ob-step-label.is-complete { color: #8c967a; }

.ob-step-connector {
  width: 32px;
  height: 1px;
  background: rgba(61, 68, 30, 0.12);
  margin: 0 10px;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.ob-step-connector.is-complete { background: rgba(140, 150, 122, 0.45); }

@media (max-width: 480px) {
  .ob-step-label { display: none; }
  .ob-step-connector { width: 20px; margin: 0 6px; }
}


/* -------------------------------------------------------------
   CARD  — white, orange left border
   ------------------------------------------------------------- */
.ob-card {
  background: #ffffff;
  border: 1px solid rgba(61, 68, 30, 0.08);
  border-left: 3px solid #a24e2e;
  border-radius: 20px;
  box-shadow:
    0 1px 3px rgba(61, 68, 30, 0.05),
    0 12px 40px rgba(61, 68, 30, 0.09);
  width: 100%;
  max-width: 460px;
  padding: 2.5rem;
}
.ob-card-wide { max-width: 560px; }

@media (max-width: 520px) {
  .ob-card { padding: 1.75rem 1.375rem; border-radius: 16px; }
}

.ob-form-errors {
  background: rgba(162, 78, 46, 0.07);
  border: 1px solid rgba(162, 78, 46, 0.20);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.875rem;
  color: #a24e2e;
}


/* -------------------------------------------------------------
   CARD HEADER COPY
   ------------------------------------------------------------- */
.ob-step-meta {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #a24e2e;
  margin-bottom: 0.35rem;
}

.ob-heading {
  font-family: 'Lexend Deca', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #3d441e;
  margin-bottom: 0.4rem;
}

.ob-subheading {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #8c967a;
  margin-bottom: 1.75rem;
}


/* -------------------------------------------------------------
   FORM FIELDS
   ------------------------------------------------------------- */
.ob-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.125rem;
}
.ob-field:last-of-type { margin-bottom: 0; }

.ob-label {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8c967a;
}

.ob-input,
.ob-select,
.ob-textarea {
  display: block;
  width: 100%;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.9375rem;
  color: #3d441e;
  background: #fafaf8;
  border: 1.5px solid rgba(61, 68, 30, 0.16);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.ob-input::placeholder,
.ob-textarea::placeholder {
  color: rgba(61, 68, 30, 0.28);
}
.ob-input:focus,
.ob-select:focus,
.ob-textarea:focus {
  background: #fff;
  border-color: #3d441e;
  box-shadow: 0 0 0 3px rgba(61, 68, 30, 0.08);
}
.ob-input.ob-error,
.ob-select.ob-error,
.ob-textarea.ob-error {
  border-color: #a24e2e;
  box-shadow: 0 0 0 3px rgba(162, 78, 46, 0.09);
}

.ob-select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238c967a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.ob-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.ob-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.125rem;
}
.ob-field-row .ob-field { margin-bottom: 0; }

@media (max-width: 520px) {
  .ob-field-row { grid-template-columns: 1fr; }
}

.ob-errorlist {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
}
.ob-errorlist li {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.78rem;
  color: #a24e2e;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ob-errorlist li::before {
  content: '↑';
  font-size: 0.65rem;
  opacity: 0.55;
}

.ob-help {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.78rem;
  color: #8c967a;
  margin-top: 0.15rem;
}


/* -------------------------------------------------------------
   OPTIONAL OVERRIDES  (Alpine-driven)
   ------------------------------------------------------------- */
.ob-divider {
  height: 1px;
  background: rgba(61, 68, 30, 0.07);
  margin: 1.375rem 0;
}

.ob-optional-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8c967a;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.ob-optional-toggle:hover { color: #3d441e; }
.ob-optional-toggle svg   { transition: transform 0.25s ease; flex-shrink: 0; }

.ob-optional-note {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.8rem;
  color: #8c967a;
  line-height: 1.6;
  margin: 0.875rem 0 1rem;
}


/* -------------------------------------------------------------
   SUBMIT BUTTON
   ------------------------------------------------------------- */
.ob-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: 'Lexend Deca', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: #a24e2e;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  margin-top: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ob-btn:hover {
  background: #8e4428;
  transform: scale(1.015);
  box-shadow: 0 6px 20px rgba(162, 78, 46, 0.28);
}
.ob-btn:active { transform: scale(1); }

.ob-btn .ob-btn-text    { transition: opacity 0.15s ease; }
.ob-btn .ob-btn-spinner { position: absolute; opacity: 0; transition: opacity 0.15s ease; }
.htmx-request .ob-btn .ob-btn-text    { opacity: 0; }
.htmx-request .ob-btn .ob-btn-spinner { opacity: 1; }
.htmx-request .ob-btn { pointer-events: none; }

@keyframes ob-spin { to { transform: rotate(360deg); } }
.ob-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: ob-spin 0.7s linear infinite;
  display: inline-block;
}


/* -------------------------------------------------------------
   HTMX SWAP ANIMATION
   ------------------------------------------------------------- */
@keyframes ob-swap-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
#form-area { animation: ob-swap-in 0.25s ease both; }


/* -------------------------------------------------------------
   FOOTER NOTE
   ------------------------------------------------------------- */
.ob-footer-note {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 0.78rem;
  color: rgba(61, 68, 30, 0.35);
  text-align: center;
  margin-top: 1.25rem;
}