/* ============================================================
   PayClear — Brand Design System
   Shared across landing, survey, and demo pages.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #fafbfd;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-subtle: #f1f5f9;

  --accent: #059669;
  --accent-light: #10b981;
  --accent-dim: #047857;
  --accent-glow: rgba(5, 150, 105, 0.08);
  --accent-glow-strong: rgba(5, 150, 105, 0.15);
  --accent-surface: rgba(5, 150, 105, 0.06);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-accent: rgba(5, 150, 105, 0.25);

  --red: #dc2626;
  --red-surface: rgba(220, 38, 38, 0.08);
  --red-border: rgba(220, 38, 38, 0.18);
  --amber: #d97706;
  --amber-surface: rgba(217, 119, 6, 0.08);
  --amber-border: rgba(217, 119, 6, 0.18);
  --green: #059669;
  --green-surface: rgba(5, 150, 105, 0.08);
  --green-border: rgba(5, 150, 105, 0.18);

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.02);
  --shadow-md: 0 4px 16px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 40px rgba(15,23,42,0.08), 0 4px 12px rgba(15,23,42,0.04);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.1), 0 8px 24px rgba(15,23,42,0.06);

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}

body.no-scroll { overflow: hidden; }

a { color: inherit; }

/* ── Ambient gradient blobs ── */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(5,150,105,0.05) 0%, transparent 65%);
  animation: drift 25s ease-in-out infinite;
}
.ambient::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(59,130,246,0.03) 0%, transparent 65%);
  animation: drift 30s ease-in-out infinite reverse;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 2%) scale(1.05); }
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

/* ── Floating Pill Navbar ── */
nav.brand-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  z-index: 100;
  padding: 0 8px 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: 0 2px 16px rgba(15,23,42,0.06);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-logo .shield {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--text-primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
}
.nav-links a.nav-cta:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 30px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  font-family: inherit;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(5,150,105,0.25), var(--shadow-sm);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(5,150,105,0.3), var(--shadow-md);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 30px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: #cbd5e1;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-secondary);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.18s;
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* ── Live badge (with pulse) ── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--accent-surface);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.live-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow-strong); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}

/* ── Section primitives (used on landing + survey) ── */
.section-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.9rem, 3.3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.1;
  color: var(--text-primary);
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 56px;
  font-size: 1.02rem;
  line-height: 1.6;
}

/* ── Success modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 44px 36px 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border);
  text-align: center;
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}
.modal-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  position: relative;
}
.modal-icon svg {
  width: 100%;
  height: 100%;
}
.modal-icon-ring {
  fill: none;
  stroke: var(--accent-surface);
  stroke-width: 4;
}
.modal-icon-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  transform-origin: center;
  transform: rotate(-90deg);
}
.modal-backdrop.is-open .modal-icon-ring-fg {
  animation: ring-fill 0.7s 0.05s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.modal-icon-check {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
}
.modal-backdrop.is-open .modal-icon-check {
  animation: check-draw 0.35s 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes ring-fill {
  to { stroke-dashoffset: 0; }
}
@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}
.modal h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.modal p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}
.modal-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.modal-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.modal .btn-primary {
  width: 100%;
}

/* ── Toast ── */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  background: var(--text-primary);
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  font-weight: 500;
  pointer-events: auto;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 380px;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ── Form primitives ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.field-input,
.field-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  transition: all 0.18s;
}
.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--text-muted);
}
.field-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

/* Reusable inline waitlist row (email + submit pill) */
.waitlist-inline {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-md);
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}
.waitlist-inline input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  min-width: 0;
}
.waitlist-inline input:focus { outline: none; }
.waitlist-inline input::placeholder { color: var(--text-muted); }
.waitlist-inline button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.waitlist-inline button:hover {
  background: var(--accent-dim);
  box-shadow: 0 2px 10px rgba(5,150,105,0.35);
}

/* ── Status chip primitives ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.chip-green { background: var(--green-surface); color: var(--green); border: 1px solid var(--green-border); }
.chip-amber { background: var(--amber-surface); color: var(--amber); border: 1px solid var(--amber-border); }
.chip-red   { background: var(--red-surface);   color: var(--red);   border: 1px solid var(--red-border); }
.chip-neutral { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 760px) {
  nav.brand-nav { padding: 0 6px 0 18px; }
  .nav-links { gap: 16px; }
  .nav-links li:not(:last-child):not(:first-child) { display: none; }
  .modal { padding: 36px 24px 24px; }
}
