/* RILEY Onboarding Portal — Matches staging.revivebusiness.ca/riley/ brand */
@import url('https://fonts.googleapis.com/css2?family=Catamaran:wght@600;700;800;900&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --purple-deep: #4B286D;
  --purple-medium: #5E3A82;
  --purple-light: #7B52A0;
  --purple-glow: rgba(75, 40, 109, 0.15);
  --orchid: #9B3AA0;
  --orchid-light: #B84DB8;
  --rose: #D64F8C;
  --pink-soft: #E87AAF;
  --white: #ffffff;
  --bg-light: #fafafa;
  --bg-section-alt: #f5f2f8;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --text-on-dark: #e8e0f0;
  --gradient-hero: linear-gradient(135deg, #4B286D 0%, #2D1845 30%, #3A1845 60%, #9B3AA0 100%);
  --gradient-accent: linear-gradient(135deg, #7B52A0 0%, #D64F8C 100%);
  --gradient-card-top: linear-gradient(90deg, #4B286D, #D64F8C);
  --shadow-sm: 0 2px 8px rgba(75, 40, 109, 0.06);
  --shadow-md: 0 4px 20px rgba(75, 40, 109, 0.1);
  --shadow-lg: 0 8px 40px rgba(75, 40, 109, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-heading: 'Catamaran', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(155, 58, 160, 0.2);
  color: var(--text-primary);
}

img { max-width: 100%; display: block; }

/* ============================================
   HERO HEADER
   ============================================ */
header {
  background: var(--gradient-hero);
  color: var(--white);
  padding: 60px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(155, 58, 160, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(214, 79, 140, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(75, 40, 109, 0.4) 0%, transparent 50%);
  z-index: 0;
}

header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

header > * { position: relative; z-index: 1; }

header .logo {
  width: 200px;
  height: auto;
  margin: 0 auto 20px;
}

header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 10px;
}

header p {
  font-size: 1.05rem;
  color: var(--text-on-dark);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.logout-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 14px;
  border-radius: 50px;
  transition: all var(--transition-fast);
}

.logout-link:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.role-badge {
  background: rgba(214, 79, 140, 0.25);
  color: var(--pink-soft);
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  max-width: 820px;
  margin: -30px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* ============================================
   CARDS / SECTIONS
   ============================================ */
section {
  background: var(--white);
  margin-bottom: 24px;
  padding: 36px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-card-top);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

section:hover::before { opacity: 1; }

section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

section p:last-child { margin-bottom: 0; }

/* Step numbers */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Lists */
ol { list-style: none; margin-left: 0; counter-reset: step; }
ul { list-style: none; margin-left: 0; }

ol li {
  margin-bottom: 12px;
  padding-left: 32px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-section-alt);
  color: var(--orchid);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

ul li {
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-accent);
}

li strong { color: var(--text-primary); }

a {
  color: var(--orchid);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--rose); }

/* ============================================
   AUTH SECTION (Login page)
   ============================================ */
.auth-section {
  text-align: center;
  padding: 48px 36px;
}

.auth-section h2 { justify-content: center; }

.auth-section > p {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.auth-form {
  max-width: 400px;
  margin: 28px auto 0;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-heading);
}

.form-group .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
}

.form-group .optional a { color: var(--orchid); }

.form-group input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e8e4ee;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--orchid);
  box-shadow: 0 0 0 4px rgba(155, 58, 160, 0.1);
}

.form-group input::placeholder { color: #b8b0c4; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--orchid), var(--rose));
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 24px rgba(155, 58, 160, 0.3);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(155, 58, 160, 0.4);
  color: var(--white);
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::after { left: 100%; }

.btn-secondary {
  background: var(--white);
  color: var(--orchid);
  border: 2px solid #e8e4ee;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--orchid);
  box-shadow: var(--shadow-md);
  color: var(--orchid);
}

/* ============================================
   BANNERS
   ============================================ */
.error-banner {
  background: #fef2f5;
  border: 1px solid #f5c6d0;
  border-left: 4px solid var(--rose);
  color: #8b2040;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.info-banner {
  background: #f3f0f8;
  border: 1px solid #ddd4ea;
  border-left: 4px solid var(--orchid);
  color: var(--purple-deep);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.note {
  background: #fff8f0;
  border-left: 4px solid #f0a050;
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.9rem;
  color: #6a4a20;
}

.note a { color: var(--orchid); }

/* ============================================
   DOWNLOAD CARDS
   ============================================ */
.download-card {
  background: var(--bg-light);
  border: 2px solid #ebe7f0;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
  transition: all var(--transition-smooth);
}

.download-card:hover { border-color: #d4cce0; }

.download-card.highlighted {
  border-color: var(--orchid-light);
  background: #faf5fc;
  box-shadow: 0 4px 20px rgba(155, 58, 160, 0.12);
}

.download-card h3 {
  margin-bottom: 14px;
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-card .btn {
  margin-top: 12px;
}

code {
  background: #f0ecf4;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: "SF Mono", "Monaco", "Courier New", monospace;
  font-size: 0.82rem;
  color: var(--purple-deep);
}

/* ============================================
   PROMPT BOX
   ============================================ */
.prompt-box {
  background: #1e1030;
  border-radius: var(--radius-lg);
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(155, 58, 160, 0.2);
}

.prompt-box pre {
  color: #e0d8f0;
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  font-family: "SF Mono", "Monaco", "Courier New", monospace;
}

.copy-btn {
  display: block;
  width: 100%;
  background: rgba(155, 58, 160, 0.15);
  color: var(--orchid-light);
  border: none;
  border-top: 1px solid rgba(155, 58, 160, 0.2);
  padding: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.copy-btn:hover { background: rgba(155, 58, 160, 0.25); color: var(--white); }

/* ============================================
   FOCUS AREA CARDS
   ============================================ */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.focus-card {
  background: var(--bg-light);
  border: 1px solid #ebe7f0;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--transition-smooth);
}

.focus-card:hover {
  border-color: var(--orchid-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.focus-card .icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.focus-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.focus-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ============================================
   PROGRESS TIMELINE (dashboard)
   ============================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #e8e4ee;
}

.timeline-step {
  position: relative;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid #d4cce0;
}

.timeline-step.active::before {
  border-color: var(--orchid);
  background: var(--orchid);
  box-shadow: 0 0 0 4px rgba(155, 58, 160, 0.15);
}

.timeline-step.complete::before {
  border-color: #4CAF50;
  background: #4CAF50;
}

.timeline-step strong { color: var(--text-primary); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a { color: var(--orchid); }
footer a:hover { color: var(--rose); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  header { padding: 40px 16px 36px; }
  header h1 { font-size: 1.6rem; }
  header .logo { width: 140px; }
  .header-bar { flex-direction: column; gap: 10px; text-align: center; }
  main { padding: 0 14px; margin-top: -20px; }
  section { padding: 28px 22px; border-radius: var(--radius-lg); }
  .auth-section { padding: 36px 22px; }
  .focus-grid { grid-template-columns: 1fr; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
}
