/* SnapDo AI — Shared Design System */
/* Based on readme.md design specification */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-600: #7C3AED;
  --purple-500: #8B5CF6;
  --purple-100: #F3ECFF;
  --purple-50:  #FAF7FF;

  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-tertiary:  #9CA3AF;

  --bg-app:  #FAFAFC;
  --bg-card: #FFFFFF;
  --bg-soft: #F7F4FF;

  --green:  #22C55E;
  --red:    #EF4444;
  --orange: #F59E0B;
  --blue:   #3B82F6;
  --pink:   #EC4899;

  --border: #EEF0F4;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.10);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --nav-height: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 252, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  height: var(--nav-height);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124,58,237,0.25);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--purple-50);
}
.nav-link.active { color: var(--purple-600); font-weight: 600; }
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta { margin-left: 0; }

/* ── LANGUAGE SWITCHER ── */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}
.lang-current:hover { border-color: var(--purple-500); color: var(--purple-600); }
.lang-globe { display: block; flex-shrink: 0; }
.lang-code { letter-spacing: 0.02em; }
.lang-caret { font-size: 10px; color: var(--text-tertiary); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}
.lang-menu.open { display: flex; }
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-option:hover { background: var(--purple-50); color: var(--purple-600); }
.lang-option.active { background: var(--purple-50); color: var(--purple-600); font-weight: 600; }
.lang-opt-code { font-size: 11px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.03em; }
.lang-option:hover .lang-opt-code,
.lang-option.active .lang-opt-code { color: var(--purple-500); }

/* Mobile language grid */
.nav-mobile-langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 0 4px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.nav-mobile-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.nav-mobile-lang .nml-code { font-size: 10px; font-weight: 600; color: var(--text-tertiary); }
.nav-mobile-lang.active {
  color: var(--purple-600);
  border-color: var(--purple-500);
  background: var(--purple-50);
  font-weight: 600;
}
.nav-mobile-lang.active .nml-code { color: var(--purple-500); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.25s ease;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px;
  background: rgba(250,250,252,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.nav-mobile-link:hover, .nav-mobile-link.active {
  color: var(--purple-600);
  background: var(--purple-50);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
  letter-spacing: -0.01em;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: -0.01em;
}
.btn-secondary:hover {
  border-color: var(--purple-500);
  color: var(--purple-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-50);
  border: 1px solid rgba(124,58,237,0.2);
  color: var(--purple-600);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
}
.page-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}
.page-hero-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 12px;
}

/* ── CONTENT WRAPPER ── */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 100px;
}
.content-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  margin-bottom: 20px;
}
@media(max-width: 600px) { .content-section { padding: 28px 24px; } }

.content-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.content-section h2 .sec-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--purple-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.content-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
}
.content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}
.content-section p:last-child { margin-bottom: 0; }
.content-section ul, .content-section ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.content-section li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 6px;
}
.content-section a { color: var(--purple-600); text-decoration: none; }
.content-section a:hover { text-decoration: underline; }

.highlight-box {
  background: var(--purple-50);
  border: 1px solid rgba(124,58,237,0.15);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0;
}
.highlight-box p {
  color: var(--purple-600);
  font-weight: 500;
  margin: 0;
}

/* ── FOOTER ── */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  margin-bottom: 48px;
}
@media(max-width: 640px) { .footer-inner { grid-template-columns: 1fr; gap: 40px; } }
.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 220px;
}
.footer-links {
  display: flex;
  gap: 60px;
}
@media(max-width: 480px) { .footer-links { gap: 32px; } }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--purple-600); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-copy { font-size: 13px; color: var(--text-tertiary); }
.footer-privacy-note { font-size: 13px; color: var(--text-tertiary); }

/* ── ANIMATION HELPERS ── */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.anim-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media(max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: flex; }
}
@media(max-width: 480px) {
  .footer-links { flex-wrap: wrap; gap: 28px; }
}
