/* ============================================
   CUELAB DESIGN SYSTEM — SHARED STYLES
   Dark + Light theme via CSS variables
   ============================================ */

/* ---------- DARK THEME (default) ---------- */
:root {
  --bg-primary: #06080d;
  --bg-secondary: #0c1017;
  --bg-card: #111822;
  --bg-card-hover: #172030;
  --border-subtle: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.1);
  --text-primary: #f0f2f5;
  --text-secondary: #8b95a5;
  --text-muted: #5a6577;
  --accent: #00b4d8;
  --accent-bright: #48cae4;
  --accent-glow: rgba(0, 180, 216, 0.15);
  --accent-glow-strong: rgba(0, 180, 216, 0.3);
  --gradient-hero: linear-gradient(135deg, #00b4d8 0%, #0077b6 50%, #023e8a 100%);
  --gradient-card: linear-gradient(145deg, rgba(0,180,216,0.08) 0%, rgba(0,119,182,0.02) 100%);
  --green: #10b981;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --shadow-glow: 0 0 60px rgba(0,180,216,0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.2);
  --nav-bg: rgba(6, 8, 13, 0.85);
  --phone-bg: #1a1a2e;
  --phone-screen-start: #0f172a;
  --phone-screen-end: #1e293b;
  --code-bg: rgba(0,0,0,0.3);
  --toggle-icon-sun: 0;
  --toggle-icon-moon: 1;
}

/* ---------- LIGHT THEME ---------- */
[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-subtle: rgba(0,0,0,0.06);
  --border-medium: rgba(0,0,0,0.1);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #0077b6;
  --accent-bright: #0096c7;
  --accent-glow: rgba(0, 119, 182, 0.08);
  --accent-glow-strong: rgba(0, 119, 182, 0.15);
  --gradient-hero: linear-gradient(135deg, #0096c7 0%, #0077b6 50%, #023e8a 100%);
  --gradient-card: linear-gradient(145deg, rgba(0,119,182,0.04) 0%, rgba(0,119,182,0.01) 100%);
  --shadow-glow: 0 0 60px rgba(0,119,182,0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
  --nav-bg: rgba(255,255,255,0.85);
  --phone-bg: #1e293b;
  --phone-screen-start: #0f172a;
  --phone-screen-end: #1e293b;
  --code-bg: rgba(0,0,0,0.04);
  --toggle-icon-sun: 1;
  --toggle-icon-moon: 0;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: 'Outfit', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes notifSlide {
  0% { opacity: 0; transform: translateX(80px) scale(0.9); }
  15% { opacity: 1; transform: translateX(0) scale(1); }
  85% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(-80px) scale(0.9); }
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, padding 0.3s ease, border 0.3s ease;
  background: transparent;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img {
  height: 36px;
  width: auto;
}
.nav-logo .logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 10px 24px !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,180,216,0.3);
}
.nav-cta:hover {
  background: var(--accent-bright) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(0,180,216,0.4);
}
.nav-cta::after { display: none !important; }

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.3s ease, border 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 12px;
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.mobile-toggle {
  display: none;
  background: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 8px;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 24px rgba(0,180,216,0.3);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0,180,216,0.4);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: transparent;
  color: var(--text-primary);
  border-radius: 50px;
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid var(--border-medium);
  transition: border 0.3s ease, background 0.3s ease;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: #25D366;
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 24px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(37,211,102,0.4);
}

/* ---------- SECTION HELPERS ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 48px;
}
.gradient-text {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientMove 4s ease infinite;
}

/* ---------- INTEGRATIONS BAR ---------- */
.integrations-bar {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.integrations-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.integrations-scroll {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.integration-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border 0.3s ease, color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}
.integration-chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-glow);
}
.integration-chip .ic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ic-fb { background: #1877F2; }
.ic-google { background: #EA4335; }
.ic-inm { background: #1565C0; }
.ic-li { background: #0A66C2; }
.ic-wa { background: #25D366; }
.ic-99 { background: #F04B55; }
.ic-hc { background: #E8632F; }
.ic-mb { background: #C62828; }
.ic-ti { background: #1B5E20; }
.ic-jd { background: #FFD700; }
.ic-su { background: #FF6F00; }
.ic-tf { background: #262627; }
[data-theme="light"] .ic-tf { background: #999; }
.ic-tg { background: #26A5E4; }
.ic-sm { background: #9C27B0; }

/* ---------- FOOTER ---------- */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text-muted);
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--accent-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a:hover { color: var(--accent-bright); }

/* ---------- LEGAL PAGE STYLES ---------- */
.legal-hero {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.legal-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.legal-hero .legal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-content {
  padding: 80px 0;
}
.legal-body {
  max-width: 800px;
  margin: 0 auto;
}
.legal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.legal-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.legal-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.legal-body ul, .legal-body ol {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}
.legal-body li {
  margin-bottom: 8px;
}
.legal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-body a:hover { color: var(--accent-bright); }
.legal-body .highlight-box {
  background: var(--accent-glow);
  border: 1px solid rgba(0,180,216,0.15);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.legal-body .highlight-box p {
  color: var(--text-primary);
  margin-bottom: 0;
}
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}
.legal-body th, .legal-body td {
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  text-align: left;
  color: var(--text-secondary);
}
.legal-body th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}
.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 32px;
  margin-bottom: 48px;
}
.legal-toc h3 {
  margin-top: 0;
  font-size: 1rem;
}
.legal-toc ol {
  padding-left: 20px;
}
.legal-toc a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}
.legal-toc a:hover { color: var(--accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .section-title { font-size: 2.2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 16px;
  }
  .section-title { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .legal-hero h1 { font-size: 2rem; }
}
