/* ═══════════════════════════════════════════
   ChatLens — Upload / Landing Page Styles
   Single-viewport glassmorphism layout
   ═══════════════════════════════════════════ */

/* ── Upload Screen ── */
#upload-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* ── Navigation Bar ── */
.landing-nav {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(5, 10, 16, 0.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #00b4d8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
}

.nav-link:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

/* ── Animated Background ── */
.upload-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.upload-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: orbFloat 12s ease-in-out infinite;
  will-change: transform;
}

.upload-bg .orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 161, 0.12), transparent 70%);
  top: -25%;
  right: -10%;
  animation-delay: 0s;
}

.upload-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1), transparent 70%);
  bottom: -15%;
  left: -5%;
  animation-delay: -4s;
  animation-duration: 14s;
}

.upload-bg .orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
  top: 45%;
  left: 55%;
  animation-delay: -6s;
  animation-duration: 16s;
}

.upload-bg .orb-4 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.06), transparent 70%);
  top: 65%;
  right: 20%;
  animation-delay: -8s;
  animation-duration: 18s;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.05); }
  50% { transform: translate(-15px, -50px) scale(0.97); }
  75% { transform: translate(25px, -20px) scale(1.03); }
}

/* ── Landing Content (replaces scroll container) ── */
.landing-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ── Hero Section — centered in viewport ── */
.hero-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 28px;
  text-align: center;
  animation: heroFadeIn 0.8s var(--ease) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: rgba(0, 212, 161, 0.08);
  border: 1px solid rgba(0, 212, 161, 0.15);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Hero Title */
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #00b4d8, #e879f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 24px;
  font-weight: 400;
}

/* ── Drop Zone ── */
.drop-zone {
  width: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.file-input-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-dim);
  background: rgba(0, 212, 161, 0.04);
  box-shadow: 0 0 0 1px rgba(0, 212, 161, 0.1), 0 8px 32px rgba(0, 212, 161, 0.08);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  opacity: 1;
}

.drop-zone.drag-over {
  transform: scale(1.01);
  border-color: var(--accent);
}

.drop-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 212, 161, 0.08);
  border: 1px solid rgba(0, 212, 161, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: all 0.35s var(--ease);
}

.drop-zone:hover .upload-icon-wrapper {
  background: rgba(0, 212, 161, 0.14);
  border-color: rgba(0, 212, 161, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.upload-icon-anim {
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: all var(--duration) var(--ease);
}

.drop-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drop-content .hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ── Trust Indicators ── */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.trust-item svg {
  color: var(--accent);
  opacity: 0.7;
}

/* ── Progress Section ── */
.progress-section {
  margin-top: 16px;
  display: none;
}

.progress-section.active {
  display: block;
  animation: fadeIn 0.3s var(--ease) both;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #00b4d8);
  border-radius: var(--r-pill);
  transition: width 0.4s var(--ease);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  border-radius: var(--r-pill);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Error Message ── */
.error-msg {
  margin-top: 12px;
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--r-sm);
  color: #fca5a5;
  font-size: 0.8rem;
  display: none;
}

.error-msg.active {
  display: block;
  animation: fadeIn 0.3s var(--ease) both;
}

/* ── Features — Compact inline row ── */
.features-section {
  padding: 0 28px 0;
  text-align: center;
  flex-shrink: 0;
}

.section-title,
.section-subtitle {
  display: none; /* hidden — features are self-explanatory as pills */
}

.features-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--glass-border-light);
}

.feature-icon-bg {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon-bg svg {
  width: 14px;
  height: 14px;
}

.feature-card h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.feature-card p {
  display: none; /* keep it clean — title is enough */
}

/* ── Security Section — merged into a minimal line ── */
.security-section {
  padding: 0 28px;
  flex-shrink: 0;
  display: none; /* hidden; trust row above covers it */
}

.security-card,
.security-icon,
.security-badges {
  display: none;
}

/* ── Footer — slim bottom bar ── */
.landing-footer {
  flex-shrink: 0;
  padding: 10px 28px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.landing-footer p {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Light Theme Overrides ── */
[data-theme="light"] .landing-nav {
  background: rgba(245, 247, 250, 0.7);
}

[data-theme="light"] .grid-overlay {
  background-image: 
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

[data-theme="light"] .upload-bg .orb-1 {
  background: radial-gradient(circle, rgba(0, 168, 132, 0.15), transparent 70%);
}

[data-theme="light"] .upload-bg .orb-2 {
  background: radial-gradient(circle, rgba(0, 180, 216, 0.12), transparent 70%);
}

[data-theme="light"] .upload-bg .orb-3 {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
}

[data-theme="light"] .upload-bg .orb-4 {
  background: radial-gradient(circle, rgba(251, 146, 60, 0.06), transparent 70%);
}

[data-theme="light"] .drop-zone {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .drop-zone:hover,
[data-theme="light"] .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(0, 168, 132, 0.04);
}

[data-theme="light"] .hero-title {
  color: #111b21;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #00a884, #0077b6, #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="light"] .feature-icon-bg {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .upload-icon-wrapper {
  background: rgba(0, 168, 132, 0.08);
  border-color: rgba(0, 168, 132, 0.15);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .landing-nav {
    padding: 10px 16px;
  }

  .nav-link {
    display: none;
  }

  .hero-section {
    padding: 16px 20px;
  }

  .hero-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .hero-subtitle {
    font-size: 0.82rem;
    margin-bottom: 18px;
  }

  .drop-zone {
    padding: 22px 18px;
  }

  .upload-icon-wrapper {
    width: 44px;
    height: 44px;
  }

  .upload-icon-anim {
    width: 20px;
    height: 20px;
  }

  .drop-title {
    font-size: 0.85rem;
  }

  .trust-row {
    gap: 12px;
    margin-top: 14px;
  }

  .features-section {
    padding: 0 16px;
  }

  .features-grid {
    gap: 6px;
  }

  .feature-card {
    padding: 6px 10px;
    gap: 6px;
  }

  .feature-icon-bg {
    width: 24px;
    height: 24px;
  }

  .feature-icon-bg svg {
    width: 12px;
    height: 12px;
  }

  .feature-card h3 {
    font-size: 0.7rem;
  }

  .landing-footer {
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px;
  }
}

/* Short viewports (landscape phones, etc.) */
@media (max-height: 650px) {
  .hero-badge {
    margin-bottom: 10px;
    padding: 4px 12px;
    font-size: 0.62rem;
  }

  .hero-title {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    margin-bottom: 6px;
  }

  .hero-subtitle {
    font-size: 0.78rem;
    margin-bottom: 14px;
    line-height: 1.4;
  }

  .drop-zone {
    padding: 18px 16px;
  }

  .upload-icon-wrapper {
    width: 40px;
    height: 40px;
  }

  .trust-row {
    margin-top: 10px;
    gap: 10px;
  }

  .features-section {
    padding: 0 20px;
  }
}

@media (max-height: 500px) {
  .hero-badge { display: none; }
  .hero-subtitle { display: none; }
  .features-section { display: none; }
  .trust-row { display: none; }
}