/* =========================================================================
   Nuvira Family — design tokens
   Palette is fixed by brief: black canvas, purple/magenta/orange/gold accent
   ramp, white text. The ramp reads left→right as a single aurora gradient
   everywhere it appears (wordmark, progress rail, primary buttons).
   ========================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,500;9..144,600&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --black: #060608;
  --surface: #100e17;
  --surface-raised: #16131f;
  --hairline: rgba(255, 255, 255, 0.09);

  --purple: #660099;
  --magenta: #cc3380;
  --orange: #ff8000;
  --gold: #ffbf4d;

  --white: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.68);
  --ink-faint: rgba(255, 255, 255, 0.42);

  --aurora: linear-gradient(100deg, var(--purple) 0%, var(--magenta) 38%, var(--orange) 72%, var(--gold) 100%);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --radius-lg: 26px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-card: 0 40px 90px -30px rgba(102, 0, 153, 0.45), 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------------
   Ambient backdrop — three soft, motionless aurora blooms behind everything.
   ------------------------------------------------------------------------ */

.aurora-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-field::before,
.aurora-field::after,
.aurora-field .bloom {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.aurora-field::before {
  top: -18vmax;
  left: -14vmax;
  background: radial-gradient(circle, var(--purple), transparent 65%);
}

.aurora-field::after {
  bottom: -22vmax;
  right: -16vmax;
  background: radial-gradient(circle, var(--orange), transparent 65%);
  opacity: 0.28;
}

.aurora-field .bloom {
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vmax;
  height: 50vmax;
  background: radial-gradient(circle, var(--magenta), transparent 68%);
  opacity: 0.22;
}

/* ------------------------------------------------------------------------
   Page scaffold
   ------------------------------------------------------------------------ */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
}

.brand {
  text-align: center;
  margin-bottom: 34px;
}

.brand-mark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  margin-top: 6px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ------------------------------------------------------------------------
   Card
   ------------------------------------------------------------------------ */

.card {
  width: 100%;
  max-width: 452px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 38px 34px 30px;
  position: relative;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--hairline);
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--aurora);
  opacity: 0.55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.view {
  display: none;
  animation: rise 0.32s ease both;
}

.view.is-active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin: 0 0 6px;
}

h1.step-title,
h2.step-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.step-copy {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 22px;
}

.step-copy strong {
  color: var(--white);
}

.fine-print {
  color: var(--ink-faint);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: 18px;
}

.fine-print a {
  color: var(--gold);
}

/* ------------------------------------------------------------------------
   Step / progress rail — this content really is a sequence, so a tracker
   earns its place.
   ------------------------------------------------------------------------ */

.step-rail {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
}

.step-rail span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--hairline);
  overflow: hidden;
  position: relative;
}

.step-rail span.done,
.step-rail span.current {
  background: var(--aurora);
}

.step-rail span.current {
  opacity: 0.55;
}

/* ------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------ */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--magenta);
  background: #1a1725;
}

.field textarea {
  resize: vertical;
  min-height: 78px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 5px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
}

.pin-input {
  letter-spacing: 0.5em;
  font-size: 1.3rem;
  text-align: center;
}

/* ------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--aurora);
  color: var(--black);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--ink-soft);
}

.btn-link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: auto;
}

.btn-link:hover {
  color: var(--white);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.actions-row {
  display: flex;
  gap: 10px;
}

.actions-row .btn {
  flex: 1;
}

.back-row {
  text-align: center;
  margin-top: 16px;
}

/* ------------------------------------------------------------------------
   Choice cards (sign in / sign up, together / just-the-kid)
   ------------------------------------------------------------------------ */

.choice-grid {
  display: grid;
  gap: 12px;
}

.choice-card {
  text-align: left;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.choice-card:hover {
  border-color: var(--magenta);
  transform: translateY(-1px);
}

.choice-card .choice-title {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 3px;
}

.choice-card .choice-desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------------
   Ageefy / verification status
   ------------------------------------------------------------------------ */

.verify-panel {
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.verify-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.verify-panel li + li {
  margin-top: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
}

.status-pill.ok {
  color: var(--black);
  background: var(--aurora);
}

.status-pill.error {
  background: rgba(204, 51, 128, 0.2);
  color: var(--gold);
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------------
   SMID reveal
   ------------------------------------------------------------------------ */

.smid-display {
  text-align: center;
  padding: 26px 10px 22px;
}

.smid-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.4rem;
  letter-spacing: 0.06em;
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 10px 0 4px;
}

/* ------------------------------------------------------------------------
   Alerts
   ------------------------------------------------------------------------ */

.alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: none;
}

.alert.is-visible {
  display: block;
}

.alert-error {
  background: rgba(204, 51, 128, 0.14);
  border: 1px solid rgba(204, 51, 128, 0.4);
  color: #ffd3ea;
}

.alert-info {
  background: rgba(102, 0, 153, 0.18);
  border: 1px solid rgba(102, 0, 153, 0.45);
  color: #e6cfff;
}

/* ------------------------------------------------------------------------
   Portal (stub)
   ------------------------------------------------------------------------ */

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.portal-greeting {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.portal-tile {
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px;
}

.portal-tile .tile-label {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.portal-tile .tile-value {
  font-weight: 700;
  font-size: 1.02rem;
  word-break: break-word;
}

.portal-note {
  background: var(--surface-raised);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------ */

@media (max-width: 480px) {
  .card {
    padding: 30px 22px 26px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }
}
