/* FLO FACTION — SHARED DESIGN SYSTEM */
:root {
  --black: #0a0a0f;
  --dark: #111118;
  --surface: #16161f;
  --surface2: #1c1c27;
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.15);
  --text: #e8e8f0;
  --muted: #7a7a95;
  --accent: #6c63ff;
  --accent-hover: #5a51e8;
  --accent2: #00d4aa;
  --accent3: #ff6b6b;
  --gold: #f5c842;
  --white: #ffffff;
  --success: #00d4aa;
  --warning: #f5c842;
  --danger: #ff6b6b;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108,99,255,0.4);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--black); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

/* === NAV (shared across all pages) === */
.ff-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.ff-nav.scrolled { background: rgba(10,10,15,0.98); }
.ff-logo { font-family: var(--font-serif); font-size: 1.5rem; color: var(--white); text-decoration: none; letter-spacing: -0.5px; display: inline-flex; align-items: center; gap: 0.7rem; position: relative; }
.ff-logo span { color: var(--accent); }
.ff-logo-img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 10px rgba(108,99,255,0.45)) drop-shadow(0 0 1px rgba(255,255,255,0.2)); transition: filter 0.3s, transform 0.3s; }
.ff-logo:hover .ff-logo-img { filter: drop-shadow(0 4px 16px rgba(108,99,255,0.65)) drop-shadow(0 0 2px rgba(0,212,170,0.4)); transform: rotate(-6deg) scale(1.05); }
.ff-logo-img-lg { width: 64px; height: 64px; }
.ff-logo-img-xl { width: 120px; height: 120px; }
/* Enhanced halo treatment for hero contexts */
.ff-logo-halo { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ff-logo-halo::before, .ff-logo-halo::after {
  content: ''; position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
}
.ff-logo-halo::before {
  background: radial-gradient(circle, rgba(108,99,255,0.35) 0%, rgba(0,140,255,0.15) 45%, transparent 70%);
  filter: blur(8px); animation: ffHaloPulse 4s ease-in-out infinite;
}
.ff-logo-halo::after {
  border: 1px solid rgba(108,99,255,0.25); inset: -8%;
  animation: ffHaloSpin 18s linear infinite;
}
.ff-logo-halo > img { position: relative; z-index: 1; }
@keyframes ffHaloPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes ffHaloSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.ff-nav-links { display: flex; gap: 1.6rem; align-items: center; list-style: none; }
.ff-nav-links a { text-decoration: none; color: var(--muted); font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.ff-nav-links a:hover, .ff-nav-links a.active { color: var(--white); }
.ff-nav-cta { background: var(--accent); color: var(--white) !important; padding: 0.55rem 1.3rem; border-radius: var(--radius-sm); font-weight: 600 !important; }
.ff-nav-cta:hover { background: var(--accent-hover); }
.ff-nav-portal { border: 1px solid var(--border); color: var(--text) !important; padding: 0.55rem 1.3rem; border-radius: var(--radius-sm); }
.ff-nav-portal:hover { border-color: var(--accent); color: var(--accent) !important; }
.ff-nav-agent { border: 1px solid rgba(245,200,66,0.4); color: var(--gold) !important; padding: 0.5rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.78rem !important; font-weight: 600 !important; }
.ff-nav-agent:hover { background: rgba(245,200,66,0.1); }

/* === BUTTONS === */
.ff-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.8rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s; border: none; font-family: var(--font-sans); }
.ff-btn-primary { background: var(--accent); color: var(--white); box-shadow: var(--shadow-glow); }
.ff-btn-primary:hover { transform: translateY(-2px); background: var(--accent-hover); }
.ff-btn-outline { background: transparent; border: 1px solid var(--border-bright); color: var(--text); }
.ff-btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.ff-btn-ghost { background: rgba(255,255,255,0.05); color: var(--text); }
.ff-btn-ghost:hover { background: rgba(255,255,255,0.1); }
.ff-btn-lg { padding: 1rem 2.2rem; font-size: 1rem; }
.ff-btn-sm { padding: 0.55rem 1.1rem; font-size: 0.82rem; }

/* === CARDS === */
.ff-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.8rem; transition: border-color 0.25s, transform 0.25s; }
.ff-card-hover:hover { transform: translateY(-4px); border-color: rgba(108,99,255,0.4); box-shadow: var(--shadow); }

/* === FORMS === */
.ff-form-group { margin-bottom: 1.1rem; }
.ff-form-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
.ff-form-label.required::after { content: ' *'; color: var(--danger); }
.ff-form-input, .ff-form-select, .ff-form-textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1rem; color: var(--text);
  font-family: var(--font-sans); font-size: 0.92rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.ff-form-input:focus, .ff-form-select:focus, .ff-form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.ff-form-input::placeholder, .ff-form-textarea::placeholder { color: rgba(122,122,149,0.6); }
.ff-form-textarea { resize: vertical; min-height: 90px; }
.ff-form-select option { background: var(--surface2); color: var(--text); }
.ff-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

/* === BADGES === */
.ff-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.7rem; border-radius: 100px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.ff-badge-accent { background: rgba(108,99,255,0.15); color: #a8a3ff; border: 1px solid rgba(108,99,255,0.25); }
.ff-badge-success { background: rgba(0,212,170,0.15); color: var(--accent2); border: 1px solid rgba(0,212,170,0.25); }
.ff-badge-warning { background: rgba(245,200,66,0.15); color: var(--gold); border: 1px solid rgba(245,200,66,0.25); }
.ff-badge-danger { background: rgba(255,107,107,0.15); color: var(--danger); border: 1px solid rgba(255,107,107,0.25); }
.ff-badge-muted { background: rgba(122,122,149,0.15); color: var(--muted); border: 1px solid rgba(122,122,149,0.25); }

/* === FOOTER === */
.ff-footer { background: var(--dark); border-top: 1px solid var(--border); padding: 3rem 3rem 2rem; }
.ff-footer-inner { max-width: 1200px; margin: 0 auto; }
.ff-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.ff-footer-col h4 { font-size: 0.78rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.ff-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.ff-footer-col a { color: var(--muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.ff-footer-col a:hover { color: var(--white); }
.ff-footer-col p { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.ff-footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; gap: 1rem; }

/* === SECTIONS === */
.ff-section { padding: 5rem 3rem; }
.ff-container { max-width: 1200px; margin: 0 auto; }
.ff-section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
.ff-section-title { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: var(--white); line-height: 1.15; letter-spacing: -0.5px; }
.ff-section-sub { font-size: 1rem; color: var(--muted); max-width: 540px; line-height: 1.7; font-weight: 300; margin-top: 1rem; }

/* === MOBILE === */
@media (max-width: 1000px) {
  .ff-nav { padding: 1rem 1.2rem; }
  .ff-nav-links { display: none; }
  .ff-nav-mobile-btn { display: flex; }
  .ff-section { padding: 3rem 1.2rem; }
  .ff-footer { padding: 2rem 1.2rem 1.5rem; }
  .ff-footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .ff-form-row { grid-template-columns: 1fr; }
  .ff-footer-bottom { flex-direction: column; text-align: center; }
}

/* === MOBILE NAV === */
.ff-nav-mobile-btn { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }
.ff-mobile-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 320px; height: 100vh; background: var(--dark); border-left: 1px solid var(--border); z-index: 200; transition: right 0.3s; padding: 5rem 2rem 2rem; }
.ff-mobile-menu.open { right: 0; }
.ff-mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
.ff-mobile-menu a { color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 500; }
.ff-mobile-close { position: absolute; top: 1.5rem; right: 1.5rem; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }

/* === FLOATING CHAT BADGE === */
.ff-agent-pulse { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--surface); border: 1px solid var(--accent); border-radius: 100px; padding: 0.7rem 1.2rem; display: flex; align-items: center; gap: 0.7rem; box-shadow: var(--shadow-lg); z-index: 90; max-width: 280px; }
.ff-agent-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); animation: ffPulse 2s infinite; }
.ff-agent-pulse-text { font-size: 0.78rem; color: var(--text); }
.ff-agent-pulse-text strong { color: var(--accent); display: block; font-size: 0.82rem; }
@keyframes ffPulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* === TOAST === */
.ff-toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--surface); border: 1px solid var(--accent2); border-radius: var(--radius); padding: 1rem 1.5rem; color: var(--white); font-size: 0.88rem; z-index: 999; transform: translateY(120px); opacity: 0; transition: all 0.4s; max-width: 340px; }
.ff-toast.show { transform: translateY(0); opacity: 1; }
.ff-toast-title { font-weight: 600; color: var(--accent2); margin-bottom: 0.25rem; font-size: 0.92rem; }
