/* RepViewer Premium Design System */
/* Toptal meets Stripe — Bold, Rich, High-Impact */

:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-accent: #7C3AED;
  --color-accent-light: #F5F3FF;
  --dark-900: #0B0F1A;
  --dark-800: #111827;
  --dark-700: #1F2937;
  --dark-600: #374151;
  --color-text: #1F2937;
  --color-text-secondary: #6B7280;
  --color-text-tertiary: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  --color-bg: #FFFFFF;
  --color-bg-subtle: #F9FAFB;
  --color-bg-muted: #F3F4F6;
  --color-success: #059669;
  --color-success-bg: #ECFDF5;
  --color-error: #DC2626;
  --color-error-bg: #FEF2F2;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-bg); }
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--dark-800); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p { color: var(--color-text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #2563EB, #7C3AED, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition);
}
.nav--solid {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
}
.nav--dark {
  background: transparent;
}
.nav--dark.scrolled {
  background: rgba(11,15,26,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav--solid.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; display: flex; align-items: center; gap: 2px; }
.nav-logo--light { color: #fff; }
.nav-logo--light span { color: #60A5FA; }
.nav-logo--dark { color: var(--dark-800); }
.nav-logo--dark span { background: linear-gradient(135deg, #2563EB, #7C3AED); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a { font-size: 0.9375rem; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-full); transition: all var(--transition); }
.nav-links--light a { color: rgba(255,255,255,0.7); }
.nav-links--light a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links--dark a { color: var(--color-text-secondary); }
.nav-links--dark a:hover { color: var(--dark-800); background: var(--color-bg-muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600;
  border-radius: var(--radius-full); border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,0.3), 0 4px 12px rgba(37,99,235,0.2);
}
.btn-primary:hover { box-shadow: 0 1px 2px rgba(37,99,235,0.4), 0 8px 24px rgba(37,99,235,0.3); transform: translateY(-1px); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-border); padding: 10.5px 28px; }
.btn-secondary:hover { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary); }
.btn-white { background: #fff; color: var(--dark-800); box-shadow: var(--shadow-md); }
.btn-white:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); color: var(--dark-800); }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.25); padding: 10.5px 28px; }
.btn-outline-white:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.06); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text-secondary); padding: 12px 16px; }
.btn-ghost:hover { color: var(--dark-800); background: var(--color-bg-muted); }
.btn-dark { background: var(--dark-800); color: #fff; }
.btn-dark:hover { background: var(--dark-900); color: #fff; box-shadow: var(--shadow-lg); }
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 40px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 32px; transition: all var(--transition);
}
.card:hover { border-color: #d0d0d0; box-shadow: var(--shadow-lg); }
.card-glass {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card-gradient-border {
  position: relative; background: var(--color-bg); border: none; border-radius: var(--radius-lg); padding: 32px;
}
.card-gradient-border::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); padding: 1px;
  background: linear-gradient(135deg, var(--color-border), var(--color-border));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: background var(--transition);
}
.card-gradient-border:hover::before {
  background: linear-gradient(135deg, #2563EB, #7C3AED, #EC4899);
}
.card-gradient-border:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--dark-800); margin-bottom: 6px; }
.form-hint { font-size: 0.8125rem; color: var(--color-text-tertiary); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; font-family: var(--font-sans); font-size: 0.9375rem;
  color: var(--color-text); background: var(--color-bg); border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); transition: all var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--color-text-tertiary); }
.form-textarea { resize: vertical; min-height: 120px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
  font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-full);
  background: var(--color-bg-muted); color: var(--color-text-secondary);
}
.badge-primary { background: var(--color-primary-light); color: var(--color-primary); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); }

/* Alerts */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; margin-bottom: 24px; }
.alert-error { background: var(--color-error-bg); color: var(--color-error); }
.alert-success { background: var(--color-success-bg); color: var(--color-success); }

/* Avatar */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--color-bg-muted);
  display: flex; align-items: center; justify-content: center; font-weight: 600; color: #fff; flex-shrink: 0;
}
.avatar-lg { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 2rem; }

/* Sections */
.section { padding: 120px 0; }
.section-sm { padding: 80px 0; }
.section-alt { background: var(--color-bg-subtle); }
.section-dark { background: var(--dark-900); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.6); }

/* Footer */
.footer { background: var(--dark-900); color: rgba(255,255,255,0.6); padding: 80px 0 40px; }
.footer h4 { color: #fff; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.footer a { color: rgba(255,255,255,0.5); font-size: 0.9375rem; display: block; margin-bottom: 12px; transition: color var(--transition); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-brand p { font-size: 0.9375rem; line-height: 1.7; color: rgba(255,255,255,0.4); margin-top: 16px; }
.footer-newsletter { margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: center; }
.footer-newsletter h4 { color: #fff; font-size: 1.125rem; font-weight: 700; text-transform: none; letter-spacing: -0.01em; margin-bottom: 8px; }
.footer-newsletter p { font-size: 0.9375rem; color: rgba(255,255,255,0.4); margin-bottom: 20px; }
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; font-size: 0.9375rem; font-family: var(--font-sans);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full); color: #fff; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-form input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.2); }
.newsletter-form button {
  padding: 12px 28px; font-size: 0.9375rem; font-weight: 600; font-family: var(--font-sans);
  background: linear-gradient(135deg, #2563EB, #1D4ED8); color: #fff;
  border: none; border-radius: var(--radius-full); cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.newsletter-form button:hover { box-shadow: 0 4px 16px rgba(37,99,235,0.3); transform: translateY(-1px); }
.newsletter-success { color: #34d399; font-size: 0.875rem; margin-top: 12px; display: none; }
.footer-bottom { padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; color: rgba(255,255,255,0.3); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { width: 22px; height: 2px; border-radius: 2px; transition: var(--transition); }
.hamburger--light span { background: #fff; }
.hamburger--dark span { background: var(--dark-800); }
.mobile-menu {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px); border-bottom: 1px solid var(--color-border);
  padding: 16px 24px; z-index: 999;
}
.mobile-menu.active { display: block; }
.mobile-menu a { display: block; padding: 14px 0; font-size: 1rem; font-weight: 500; color: var(--color-text); border-bottom: 1px solid var(--color-border-light); }
.mobile-menu--dark {
  background: rgba(11,15,26,0.96); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu--dark a { color: rgba(255,255,255,0.8); border-bottom-color: rgba(255,255,255,0.06); }
.mobile-menu--dark a:hover { color: #fff; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* Page top padding */
.page-content { padding-top: var(--nav-height); }

/* Smooth focus styles */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Better link underline on hover for body text */
.section a:not(.btn):hover, .profile-section a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }

/* Notification bell */
.nav-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px; cursor: pointer; color: var(--color-text-secondary); transition: color 0.2s;
}
.nav-bell:hover { color: var(--dark-800); }
.nav-bell svg { width: 20px; height: 20px; }
.nav-bell-badge {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #DC2626; color: #fff; font-size: 0.625rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.nav-bell-badge:empty { display: none; }

/* Notification dropdown */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 360px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); z-index: 1001; display: none; max-height: 420px; overflow-y: auto;
}
.notif-dropdown.open { display: block; }
.notif-header {
  padding: 16px 20px; border-bottom: 1px solid var(--color-border-light);
  display: flex; justify-content: space-between; align-items: center;
}
.notif-header h4 { font-size: 0.9375rem; margin: 0; }
.notif-header button { background: none; border: none; font-size: 0.8125rem; color: var(--color-primary); cursor: pointer; font-weight: 500; }
.notif-item {
  padding: 14px 20px; border-bottom: 1px solid var(--color-border-light);
  cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: var(--color-bg-subtle); }
.notif-item.unread { background: #EFF6FF; }
.notif-item-title { font-size: 0.875rem; font-weight: 600; color: var(--dark-800); margin-bottom: 2px; }
.notif-item-body { font-size: 0.8125rem; color: var(--color-text-tertiary); }
.notif-item-time { font-size: 0.75rem; color: var(--color-text-tertiary); margin-top: 4px; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--color-text-tertiary); font-size: 0.875rem; }

@media (max-width: 480px) {
  .notif-dropdown { width: calc(100vw - 32px); right: -60px; }
}

/* Sticky CTA bar */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 850;
  background: linear-gradient(135deg, #0B0F1A 0%, #1E293B 100%);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.sticky-cta.show { transform: translateY(0); }
.sticky-cta-text { font-size: 0.9375rem; font-weight: 500; color: rgba(255,255,255,0.8); }
.sticky-cta-text strong { color: #fff; }
.sticky-cta .btn { padding: 10px 24px; font-size: 0.875rem; }
.sticky-cta-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer;
  font-size: 1.25rem; padding: 4px 8px; transition: color 0.2s;
}
.sticky-cta-close:hover { color: #fff; }
@media (max-width: 600px) {
  .sticky-cta { flex-direction: column; gap: 10px; padding: 16px 48px 16px 16px; }
  .sticky-cta-text { font-size: 0.8125rem; text-align: center; }
}

/* Back to top button */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--dark-800); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary); }
.back-to-top svg { width: 20px; height: 20px; }

/* Social links in footer */
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social-link { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.footer-social-link:hover { background: rgba(255,255,255,0.12); color: #fff; transform: translateY(-2px); }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  h1 { font-size: clamp(2rem, 7vw, 2.75rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
  .btn-lg { padding: 14px 32px; font-size: 1rem; }
}
@media (max-width: 600px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 24px; width: 100%; }
}
