/* Marketing/signup public pages — matches arcmarketing.xyz visual language
   (Plus Jakarta Sans + Bricolage Grotesque, purple #6d28d9 on white).
   Used by /signup, /verify-otp, /pending-approval. */

:root {
  --bg: #ffffff;
  --bg2: #faf8ff;
  --surface: #f3eefe;
  --border: #e6dff5;
  --accent: #6d28d9;
  --accent-light: #f3e8ff;
  --accent2: #a855f7;
  --accent-dark: #4c1d95;
  --text: #1a0a2e;
  --muted: #5a4f70;
  --muted2: #9088a3;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --shadow: 0 2px 20px rgba(109,40,217,0.08);
  --shadow-md: 0 4px 32px rgba(109,40,217,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Backdrop with the same soft purple radials as arcmarketing.xyz ─── */
body::before {
  content: '';
  position: fixed; top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(109,40,217,0.07) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; bottom: -150px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Nav (matches arcmarketing.xyz header) ──────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 22px; color: var(--text);
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .arc {
  width: 24px; height: 24px; position: relative; display: inline-block;
}
.nav-logo .arc::before {
  content: ''; position: absolute; inset: 0;
  border: 3px solid var(--accent); border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}
.nav-logo .arc::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; background: var(--accent2); border-radius: 50%;
}
.nav-logo span { color: var(--accent); }
.nav-link {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color .2s;
}
.nav-link:hover { color: var(--accent); }

/* ── Main container ─────────────────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 48px auto 80px;
  padding: 0 24px;
}
.page.wide { max-width: 820px; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}

/* Tablet-and-down — give the card and content more horizontal room. */
@media (max-width: 720px) {
  .page { margin: 24px auto 60px; padding: 0 16px; }
  .card { padding: 28px 22px; border-radius: 14px; }
  .nav { padding: 0 16px; height: 60px; }
  .nav-logo { font-size: 19px; }
  .nav-link { font-size: 13px; }
}

/* Phone-and-down — most aggressive shrink so we don't waste any width. */
@media (max-width: 480px) {
  .card { padding: 22px 18px; border-radius: 12px; }
  h1 { font-size: 26px; letter-spacing: -0.5px; }
  .sub { font-size: 14px; margin-bottom: 22px; }
  .otp-input { font-size: 26px; letter-spacing: 8px; padding: 14px; }
  /* "Already have an account? Sign in →" gets clipped on narrow phones —
     hide the "Already have an account?" preamble, keep just the action. */
  .nav-link .nav-link-pre { display: none; }
}

/* ── Headings ───────────────────────────────────────────────────────── */
h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15; letter-spacing: -0.8px;
  color: var(--text); margin-bottom: 12px;
}
h1 .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sub {
  color: var(--muted); font-size: 16px; line-height: 1.6;
  margin-bottom: 32px;
}

/* ── Badges (small contextual pills above headings) ─────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-light); border: 1px solid rgba(109,40,217,0.2);
  color: var(--accent); font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px; margin-bottom: 20px;
}
.badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent2); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
label .req { color: var(--accent); margin-left: 2px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], select, textarea {
  width: 100%;
  font-family: inherit; font-size: 14px;
  color: var(--text);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}
textarea { resize: vertical; min-height: 96px; font-family: inherit; }
.hint {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}

/* OTP big-digit input */
.otp-input {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px; font-weight: 700;
  letter-spacing: 12px; padding: 16px;
}

/* Honeypot — visually hidden but still focusable would be a giveaway,
   so we kill display entirely. */
.hp {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* ── Searchable country picker ─────────────────────────────────────────
   Custom dropdown replacing the native <select> so users can filter by
   country name. Trigger looks like a regular input so it sits next to the
   phone number cleanly. Panel is absolute-positioned and closes on outside
   click / Esc / selection. Scrolls when the list overflows; max-height
   keeps it from covering the rest of the form. */
.country-picker {
  position: relative;
  flex: 0 0 150px;
}
.cp-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 6px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: inherit; font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cp-trigger:hover { border-color: var(--accent2); }
.cp-trigger.open,
.cp-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}
.cp-trigger .cp-flag { font-size: 16px; line-height: 1; }
.cp-trigger .cp-code { font-weight: 600; }
.cp-trigger .cp-arrow { margin-left: auto; color: var(--muted); font-size: 11px; }

.cp-panel {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  z-index: 50;
  width: min(320px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.cp-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.cp-search {
  width: 100%;
  font-family: inherit; font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  outline: none;
  color: var(--text);
}
.cp-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.10);
}
.cp-list {
  list-style: none;
  margin: 0; padding: 4px 0;
  max-height: 260px;
  overflow-y: auto;
}
.cp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 14px; color: var(--text);
  cursor: pointer;
  user-select: none;
}
.cp-item .cp-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-item .cp-dial { color: var(--muted); font-size: 13px; }
.cp-item:hover,
.cp-item.kbd-focus { background: var(--accent-light); }
.cp-item.selected { background: rgba(109,40,217,0.08); font-weight: 600; }
.cp-empty {
  padding: 16px; text-align: center; color: var(--muted); font-size: 13px;
}

/* On phones, stack the picker above the number so both get full width. */
@media (max-width: 480px) {
  .country-picker { flex: 1 1 auto; }
  .cp-panel { width: 100%; }
  .mobile-row { flex-direction: column; gap: 8px; }
  .mobile-row > * { width: 100%; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: white;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: var(--muted2); cursor: not-allowed; }
.btn-outline {
  background: transparent; color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }
.btn-full { width: 100%; }

/* ── Status messages ────────────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px; line-height: 1.5;
  margin-bottom: 18px;
  display: none;
}
.alert.show { display: block; }
.alert-err {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #fecaca;
}
.alert-ok {
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid #bbf7d0;
}

/* ── Decorative success icon for the pending-approval page ──────────── */
.icon-circle {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 40px;
  box-shadow: var(--shadow-md);
}

/* ── Footer link row ────────────────────────────────────────────────── */
.footer-row {
  margin-top: 24px; text-align: center;
  color: var(--muted); font-size: 14px;
}
.footer-row a {
  color: var(--accent); text-decoration: none; font-weight: 600;
}
.footer-row a:hover { text-decoration: underline; }
