/**
 * Public Site Styles
 * Minimal, responsive styling for public marketing pages
 * Does not affect authenticated app pages
 */

/* === Reset & Base === */
.public-page {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #22d3ee;
  --text-primary: #e7e9f3;
  --text-secondary: #cbd5f5;
  --bg-dark: #050915;
  --bg-card: rgba(13, 18, 33, 0.9);
  --border-color: rgba(148, 163, 184, 0.2);
  --header-bg: rgba(9, 14, 28, 0.95);
  --footer-bg: rgba(5, 9, 21, 0.98);
}

/* === Light Theme === */
.public-page.light-theme {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #0891b2;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --border-color: rgba(100, 116, 139, 0.2);
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #f1f5f9;
  background: linear-gradient(150deg, #f8fafc 0%, #f1f5f9 48%, #e2e8f0 100%);
  color: var(--text-primary);
}

.public-page {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(150deg, #070d1d 0%, #0b1326 48%, #0b172f 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
.public-header {
  background: var(--header-bg, rgba(9, 14, 28, 0.95));
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.logo-text {
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 2px;
}

/* === Header Controls (Theme & Language) === */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.settings-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary-color);
  color: var(--text-primary);
}

.settings-icon {
  font-size: 1rem;
  line-height: 1;
}

.settings-label {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
  color: #0b1224;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary-color);
}

/* === Main Content === */
.public-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* === Hero Section === */
.hero-section {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-cta.trust-cta {
  margin-top: 2rem;
}

.hero-cta .btn {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

/* === Final CTA Section === */
.final-cta-section {
  padding-top: 2rem;
}

.final-cta-subtext {
  color: var(--text-secondary);
  max-width: 700px;
  margin: 1rem auto;
}

/* === Feature Grid === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--primary-color);
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* === Trust Section === */
.trust-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 4rem 0;
  text-align: center;
}

.trust-section h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
  color: var(--primary-color);
}

.trust-section p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.7;
}

.trust-badges {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.trust-badge {
  padding: 0.75rem 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  color: var(--primary-color);
}

/* === Footer === */
.public-footer {
  background: var(--footer-bg, rgba(9, 14, 28, 0.95));
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 2rem 1.5rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-legal {
  margin-bottom: 1rem;
}

.footer-legal p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--primary-color);
}

.footer-policies {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .header-controls {
    order: 2;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .settings-group {
    order: 1;
  }

  .cta-buttons {
    order: 2;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section h2 {
    font-size: 1.25rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .settings-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  .settings-icon {
    font-size: 1rem;
  }

  .settings-label {
    display: none;
  }
}
