/* === ScholarFlow Landing — Light Tech Theme === */

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --brand: #2563eb;
  --brand-bright: #3b82f6;
  --brand-glow: rgba(37, 99, 235, 0.2);
  --cyan: #0891b2;
  --violet: #7c3aed;
  --emerald: #059669;
  --border: rgba(37, 99, 235, 0.12);
  --border-strong: rgba(37, 99, 235, 0.25);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
}

/* Background */
.light-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 20% 90%, rgba(8, 145, 178, 0.04) 0%, transparent 35%),
    var(--bg);
}

.light-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--brand);
  color: white;
  font-weight: 700;
  border-radius: 0 0 0.75rem 0.75rem;
  transition: top 0.2s var(--ease-out-expo);
  box-shadow: 0 0 25px var(--brand-glow);
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-glow {
  text-shadow: 0 0 40px rgba(37, 99, 235, 0.15);
}

/* Glass panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Navigation */
.nav-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s var(--ease-out-expo);
}

#navbar.scrolled .nav-glass {
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  border-color: var(--border-strong);
  box-shadow: 0 4px 25px rgba(37, 99, 235, 0.1);
}

.nav-link {
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.06);
}

/* Mobile nav links */
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  background: rgba(37, 99, 235, 0.06);
  color: var(--brand);
  outline: none;
}

/* Buttons */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--brand);
  color: white;
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s var(--ease-out-expo);
  box-shadow: 0 4px 15px var(--brand-glow);
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--brand-bright);
  box-shadow: 0 6px 25px var(--brand-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: white;
  color: var(--text);
  font-weight: 700;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s var(--ease-out-expo);
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 20px var(--brand-glow);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Feature cards */
.feature-card {
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid #e2e8f0;
  transition: all 0.25s var(--ease-out-expo);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 20px var(--brand-glow);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.25s var(--ease-out-expo);
  border: 1px solid currentColor;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 0 15px currentColor;
}

/* Showcase points */
.showcase-point {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-elevated);
}

.showcase-point:hover {
  border-color: var(--border-strong);
}

.showcase-point.active {
  background: rgba(37, 99, 235, 0.04);
  border-color: var(--brand);
  box-shadow: 0 0 20px var(--brand-glow);
}

.showcase-point:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.showcase-frame {
  position: relative;
}

.showcase-frame::before {
  content: '';
  position: absolute;
  inset: -0.75rem;
  border: 1px solid var(--brand);
  border-radius: 1rem;
  opacity: 0.2;
  z-index: -1;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-full {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.status-partial {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-exp {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.status-none {
  background: rgba(100, 116, 139, 0.08);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Privacy points */
.privacy-point {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.privacy-point:hover {
  border-color: var(--emerald);
  box-shadow: 0 0 15px rgba(5, 150, 105, 0.08);
}

/* Reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (scripting: none) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* Floating badges */
.floating-badge {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

.floating-badge-1 {
  top: 12%;
  left: -1.5rem;
  animation-delay: 0s;
}

.floating-badge-2 {
  bottom: 18%;
  right: -1.25rem;
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 640px) {
  .floating-badge {
    display: none;
  }
}

/* Table responsive */
@media (max-width: 768px) {
  .overflow-x-auto table {
    min-width: 700px;
  }
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.5s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Hero badge */
.hero-badge {
  position: relative;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid var(--border);
  color: var(--brand);
}

/* CTA section */
.cta-glow {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0891b2 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.cta-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #2563eb, #60a5fa, #2563eb);
  background-size: 300% 300%;
  z-index: -1;
  animation: gradientMove 8s ease infinite;
  opacity: 0.35;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Back to top */
#back-to-top {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#back-to-top:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 20px var(--brand-glow);
}

/* No scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
