/*
 * assets/shared.css
 *
 * PURPOSE: Shared CSS extracted from all pages to eliminate duplication.
 *   Contains: CSS variables, global reset, buttons, auth overlay, nav, footer.
 *
 * Loaded on every page immediately after assets/fonts.css.
 */

/* ── CSS VARIABLES ── */
:root {
  --bg:             #0c0e12;
  --bg-card:        #13161c;
  --bg-card2:       #1a1d26;
  --bg-alt:         #13161b;
  --purple:         #a100ff;
  --text-primary:   #f7f7f7;
  --text-secondary: #cecfd2;
  --text-muted:     #94979c;
  --border:         #373a41;
  --max-w:          1280px;
  --px:             80px;
}

/* ── GLOBAL RESET ── */
html { overflow-x: hidden; background: var(--bg); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  max-width: 1400px; width: 90%; margin: 0 auto;
  font-family: 'Inter', sans-serif;
  background: var(--bg); color: var(--text-primary);
  line-height: 1.5; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px; border-radius: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600;
  cursor: pointer; border: none; transition: opacity 0.18s; white-space: nowrap;
}
.btn:hover { opacity: 0.86; }
.btn-primary { background: var(--purple); color: #fff; border: 2px solid rgba(255,255,255,0.12); }
.btn-sm  { font-size: 14px; padding: 7px 14px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 14px; padding: 7px 14px; border-radius: 8px;
}
.btn-ghost:hover { background: #1a1d26; opacity: 1; }

/* ── AUTH OVERLAY ── */
#auth-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(12,14,18,0.97);
  display: flex; align-items: center; justify-content: center;
}
.auth-box {
  background: #13161c; border: 1px solid var(--border);
  border-radius: 20px; padding: 56px 48px; width: 420px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.auth-logo-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(155deg, #7340c8 10%, #9b6ef3 90%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(127,86,217,0.4); margin-bottom: 8px;
}
.auth-box h2 { font-size: 26px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; }
.auth-box p  { font-size: 15px; color: var(--text-muted); line-height: 1.6; max-width: 240px; }
.btn-ms {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: #1a1a1a; border: none; border-radius: 8px;
  padding: 12px 24px; font-size: 15px; font-weight: 600;
  cursor: pointer; width: 100%; justify-content: center;
  margin-top: 8px; transition: background 0.15s;
}
.btn-ms:hover { background: #f0f0f0; }
.btn-ms:disabled { opacity: 0.5; cursor: not-allowed; }
#auth-error { font-size: 13px; color: #f97066; display: none; }
.auth-loading { font-size: 14px; color: var(--text-muted); margin-top: 8px; display: none; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: 80px; display: flex; align-items: center;
  background: var(--bg);
}
.nav-inner {
  width: 90%; max-width: 1400px; margin: 0 auto; padding: 0 var(--px);
  display: flex; align-items: center; justify-content: flex-start; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.logo-name { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
.nav-auth { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-user { font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #6941c6, #9b6ef3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: 16px; font-weight: 600; color: var(--text-secondary);
  padding: 4px 6px; border-radius: 8px;
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text-primary); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #13161c; border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; min-width: 220px;
  display: none; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 10px 14px; font-size: 15px; font-weight: 500;
  color: var(--text-secondary); border-radius: 6px;
}
.nav-dropdown-menu a:hover { background: #1a1d26; color: var(--text-primary); }
.nav-hamburger {
  display: none; margin-left: auto;
  background: none; border: none; color: var(--text-primary);
  font-size: 22px; cursor: pointer; padding: 4px 8px;
  align-items: center; justify-content: center; line-height: 1;
}
.nav-mobile-menu {
  display: none; position: absolute; top: 80px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  flex-direction: column; padding: 12px var(--px) 20px; gap: 2px; z-index: 19;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-link {
  font-size: 16px; font-weight: 600; color: var(--text-secondary);
  padding: 11px 8px; border-radius: 8px; display: block;
}
.nav-mobile-link:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-mobile-sub {
  font-size: 15px; font-weight: 500; color: var(--text-muted);
  padding: 8px 8px 8px 24px; border-radius: 8px; display: block;
}
.nav-mobile-sub:hover { color: var(--text-secondary); background: var(--bg-card); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ── FOOTER (shared bottom bar) ── */
.footer-bottom { padding: 0 0 48px; }
.footer-bottom-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 32px var(--px) 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 16px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 16px; color: var(--text-muted); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }

/* ── FOOTER CTA (solution pages + home + faq) ── */
.footer-cta { padding: 96px 0 80px; }
.footer-cta-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--px); }
.footer-cta-content {
  display: flex; flex-direction: column; align-items: center; gap: 48px;
}
.footer-cta-text {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 900px; text-align: center;
}
.footer-cta-heading { font-size: 30px; font-weight: 600; color: #fff; line-height: 38px; }
.footer-cta-sub { font-size: 20px; color: var(--text-muted); line-height: 30px; }
.footer-cta-actions { display: flex; gap: 12px; }

/* ── SCROLL DOWN ARROW ── */
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}
.scroll-down-arrow {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
  animation: scroll-bounce 2.2s ease-in-out infinite;
}
.scroll-down-arrow.visible { opacity: 1; pointer-events: auto; }

/* ── RESPONSIVE ── */
@media (max-width: 1023px) {
  :root { --px: 48px; }
  body { width: 92%; }
  .nav-inner { width: 92%; }
}
@media (max-width: 767px) {
  :root { --px: 20px; }
  body { width: 95%; }
  .nav-inner { width: 95%; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .auth-box { width: calc(100% - 40px); padding: 40px 28px; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
}
