/* ABA Hub — conversion-focused landing page
   Palette: bg #0A0E1A · accent #38BDF8 · gradient #38BDF8 → #A78BFA → #FB923C
*/

:root {
  --bg: #0A0E1A;
  --bg-2: #0F172A;
  --surface: rgba(56, 189, 248, 0.04);
  --surface-2: rgba(255, 255, 255, 0.03);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.32);

  --text: #F8FAFC;
  --text-2: rgba(248, 250, 252, 0.72);
  --text-3: rgba(248, 250, 252, 0.52);

  --accent: #38BDF8;
  --accent-2: #A78BFA;
  --accent-3: #FB923C;
  --error: #FB7185;
  --grad: linear-gradient(135deg, #38BDF8 0%, #A78BFA 50%, #FB923C 100%);
  --grad-soft: linear-gradient(135deg, rgba(56,189,248,0.18), rgba(167,139,250,0.16), rgba(251,146,60,0.16));

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lede: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --text-h1: clamp(2rem, 1.4rem + 2.6vw, 3.75rem);

  --radius: 16px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, button, fieldset { font-family: inherit; }
fieldset { border: 0; padding: 0; margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ---------- ambient orbs ---------- */
.bg-orbs {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(56, 189, 248, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #07090F 100%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: drift 24s var(--ease) infinite alternate;
}
.orb-1 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5), transparent 60%);
  top: -160px; left: -160px;
}
.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.4), transparent 60%);
  top: 25%; right: -120px;
  animation-delay: -8s;
}
.orb-3 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.22), transparent 60%);
  bottom: -120px; left: 38%;
  animation-delay: -16s;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  gap: 12px;
  flex-shrink: 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
}
.brand img {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.22);
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.brand-word em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.topbar-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dotsep { color: var(--text-3); margin: 0 4px; }

@media (max-width: 480px) {
  .topbar-meta { display: none; }
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: clamp(8px, 1.5vw, 24px) clamp(20px, 4vw, 48px) clamp(28px, 4vw, 56px);
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  line-height: 1.4;
  max-width: 100%;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
  font-feature-settings: "ss01" 1, "liga" 1;
}
h1.display { font-size: var(--text-h1); }
.display em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
}

.hero h1 { margin: 4px 0 2px; }
.lede {
  font-size: var(--text-lede);
  color: var(--text-2);
  margin: 0;
  max-width: 52ch;
  line-height: 1.45;
}

/* ---------- form ---------- */
.stage-form {
  width: 100%;
  max-width: 520px;
  display: flex; flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.audience {
  display: flex; flex-direction: column; gap: 8px;
  width: 100%;
}
.chip {
  appearance: none;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 11px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.chip:hover {
  border-color: var(--border-strong);
  background: rgba(56, 189, 248, 0.05);
}
.chip:active { transform: scale(0.98); }
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}
.chip-primary {
  padding: 14px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: rgba(56, 189, 248, 0.06);
  min-height: 48px;
}
.chip-primary[aria-pressed="true"] {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent);
}
.chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field input {
  background: rgba(0,0,0,0.32);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  min-height: 44px;
  width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field input:focus {
  outline: 0;
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.06);
}
.field input::placeholder { color: var(--text-3); }
.field input[aria-invalid="true"] {
  border-color: var(--error);
  background: rgba(251, 113, 133, 0.06);
}
.field-error {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1em;
  line-height: 1.2;
  padding: 0 4px;
  text-align: left;
}

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .chip-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  min-height: 48px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.3s var(--ease), opacity 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #0B0F1A;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
  position: relative;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.42);
}
.btn-primary:disabled { opacity: 0.65; cursor: progress; transform: none; }
.btn-xl {
  padding: 16px 26px;
  font-size: 1.05rem;
  width: 100%;
  min-height: 52px;
}

.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(11,15,26,0.25);
  border-top-color: #0B0F1A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-arrow { transition: transform 0.2s var(--ease); }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }
.btn.is-loading .btn-text { opacity: 0.6; }
.btn.is-loading .btn-arrow { display: none; }
.btn.is-loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-fine {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-2);
  text-align: center;
  line-height: 1.45;
  min-height: 1.45em;
  padding: 0 4px;
}

.stage-form.is-success .form-fine { color: var(--accent); }
.stage-form.is-error .form-fine { color: var(--error); }

/* ---------- features (below the fold) ---------- */
.features {
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px) clamp(40px, 5vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 480px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  min-height: 44px;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0; transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.card:hover::before { opacity: 0.55; }
.card > * { position: relative; }
.card-icon {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border);
  color: var(--accent);
}
.card h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.1;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.45;
}
.card-go {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}

/* ---------- footer ---------- */
.bottombar {
  flex-shrink: 0;
  padding: 18px clamp(20px, 4vw, 48px);
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(7, 9, 15, 0.6);
}
.bottombar p { margin: 0; }
.bottombar-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto 10px !important;
}
.bottombar-legal {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-3);
  display: flex; flex-wrap: wrap; gap: 4px 6px;
  justify-content: center;
  align-items: center;
}
.bottombar-legal a {
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.bottombar-legal a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- success state ---------- */
.success-state {
  text-align: center;
  padding: 28px 16px;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.success-state .check {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35);
}
.success-state h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.65rem;
  margin: 0;
  line-height: 1.15;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.success-state p { color: var(--text-2); margin: 0; max-width: 38ch; line-height: 1.45; }
.success-state strong { color: var(--text); font-weight: 600; }

/* ---------- legal / support pages ---------- */
body.page-legal { background: var(--bg); }
.legal-canvas {
  flex: 1 1 auto;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px) clamp(48px, 6vw, 80px);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 36px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56,189,248,0.06);
}

.legal-header {
  margin-bottom: clamp(24px, 4vw, 40px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.legal-header .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.legal-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.legal-header h1 em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.legal-header .lede {
  font-size: var(--text-lede);
  color: var(--text-2);
  margin: 0;
}
.legal-meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.legal-body section { display: flex; flex-direction: column; gap: 10px; }
.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.7rem);
  line-height: 1.15;
  margin: 0;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.legal-body h2 em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.legal-body p, .legal-body li {
  color: var(--text-2);
  line-height: 1.65;
  font-size: 1rem;
}
.legal-body p strong { color: var(--text); font-weight: 600; }
.legal-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.legal-body ul li {
  display: flex; gap: 12px; align-items: baseline;
}
.legal-body ul li::before {
  content: '';
  flex: 0 0 auto;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}
.legal-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(56,189,248,0.3);
  transition: border-color 0.2s var(--ease);
}
.legal-body a:hover { border-color: var(--accent); }

.legal-callout {
  padding: 20px 22px;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top right, rgba(56,189,248,0.1), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
}
.legal-callout h2 { margin: 0 0 6px; }
.legal-callout p { margin: 0; color: var(--text-2); }

.legal-callout-crisis {
  background:
    radial-gradient(ellipse at top right, rgba(251,146,60,0.12), transparent 60%),
    var(--surface);
  border-color: rgba(251,146,60,0.35);
}
.legal-callout-crisis strong { color: var(--accent-3); font-weight: 700; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
