/* ==========================================================================
   BoostaMe — authentication pages
   Split layout: proof on one side, form on the other.

   The form sits on the right on desktop and FIRST on mobile. On a phone the
   marketing copy is scroll-past noise -- the person already decided to sign
   up, so the form is the page.
   ========================================================================== */

.bm-auth {
  min-height: 100vh;
  display: grid;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
}

@media (min-width: 900px) {
  .bm-auth { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- proof side */

.bm-auth__aside {
  display: none;
  position: relative;
  padding: var(--space-14) var(--space-10);
  background: var(--surface-sunken);
  border-inline-end: 1px solid var(--border-subtle);
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 900px) { .bm-auth__aside { display: flex; } }

/* One drifting indigo bloom. Enough to stop the panel reading as flat,
   restrained enough not to compete with the form. */
.bm-auth__aside::before {
  content: '';
  position: absolute;
  inset-block-start: -30%;
  inset-inline-start: -20%;
  width: 70%;
  height: 70%;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16) 0%, transparent 70%);
  filter: blur(60px);
  animation: bm-auth-drift 24s var(--ease-inout) infinite alternate;
}
@keyframes bm-auth-drift {
  to { transform: translate3d(18%, 22%, 0) scale(1.15); }
}

.bm-auth__aside-inner { position: relative; max-width: 26rem; }

.bm-auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-action);
  background: var(--color-action-subtle);
  border: 1px solid var(--color-action-border);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.bm-auth__headline {
  font-size: var(--fs-h1);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
}

.bm-auth__sub {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin: 0 0 var(--space-10);
}

/* Trust points. Specific claims, not adjectives -- "30-day refill" beats
   "reliable service" because it can be checked. */
.bm-auth__points { display: flex; flex-direction: column; gap: var(--space-5); }

.bm-auth__point { display: flex; gap: var(--space-4); align-items: flex-start; }

.bm-auth__point-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--color-action-subtle);
  color: var(--color-action);
}
.bm-auth__point-icon svg { width: 17px; height: 17px; }

.bm-auth__point-title {
  font-size: var(--fs-base);
  font-weight: var(--weight-semi);
  margin: 0 0 2px;
}
.bm-auth__point-body {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

.bm-auth__stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.bm-auth__stat-value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: var(--weight-semi);
}
.bm-auth__stat-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------------------------------------------------------------- form side */

.bm-auth__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
}
@media (min-width: 900px) { .bm-auth__main { padding: var(--space-14) var(--space-10); } }

.bm-auth__form { width: 100%; max-width: 25rem; margin-inline: auto; }

.bm-auth__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-bold);
  font-size: 1.1rem;
  letter-spacing: var(--tracking-snug);
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--space-8);
}
.bm-auth__brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-action);
  color: var(--color-action-text);
  display: grid;
  place-items: center;
  font-weight: var(--weight-bold);
  font-size: 0.9rem;
}

.bm-auth__title {
  font-size: var(--fs-h2);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug);
  margin: 0 0 var(--space-2);
}
.bm-auth__lede {
  color: var(--text-muted);
  font-size: var(--fs-base);
  margin: 0 0 var(--space-8);
}
.bm-auth__lede a { color: var(--color-action); font-weight: var(--weight-medium); }

.bm-auth__fields { display: flex; flex-direction: column; gap: var(--space-4); }

/* Two-up on wide screens, stacked on narrow. First/last name only. */
.bm-auth__row { display: grid; gap: var(--space-4); }
@media (min-width: 460px) { .bm-auth__row { grid-template-columns: 1fr 1fr; } }

.bm-auth__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  margin-top: var(--space-1);
}
.bm-auth__meta a { color: var(--color-action); }

.bm-auth__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  cursor: pointer;
}
.bm-auth__check input {
  margin-block-start: 2px;
  accent-color: var(--color-action);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.bm-auth__submit { margin-top: var(--space-6); }

.bm-auth__divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--text-disabled);
  font-size: var(--fs-sm);
}
.bm-auth__divider::before,
.bm-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.bm-auth__footnote {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--space-6);
}
.bm-auth__footnote a { color: var(--color-action); font-weight: var(--weight-medium); }

/* Secure-connection cue. Only rendered when the request is actually HTTPS --
   claiming it over plaintext would be worse than saying nothing. */
.bm-auth__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  font-size: var(--fs-xs);
  color: var(--text-disabled);
}
.bm-auth__secure svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- alerts */

.bm-auth__alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-error-border);
  background: var(--color-error-subtle);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-6);
}
.bm-auth__alert--success {
  border-color: var(--color-delivered-border);
  background: var(--color-delivered-subtle);
}
.bm-auth__alert ul { margin: 0; padding-inline-start: var(--space-4); }

/* ---------------------------------------------------------------- RTL */

/* Logical properties throughout, so the split simply mirrors. The aside moves
   to the right and the form to the left with no extra rules. */
[dir='rtl'] .bm-auth__aside::before {
  inset-inline-start: auto;
  inset-inline-end: -20%;
}
