/* ============================================
   CHATTASK AI — DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* --- CSS VARIABLES --- */
:root {
  /* Brand */
  --brand-light:    #7c7ef5;
  --brand:          #5d5fef;
  --brand-dark:     #3d3fcc;
  --brand-glow:     rgba(93,95,239,0.35);

  /* Gradients */
  --grad-brand:     linear-gradient(135deg, #5d5fef 0%, #a855f7 50%, #ec4899 100%);
  --grad-cyan:      linear-gradient(135deg, #5d5fef 0%, #06b6d4 100%);
  --grad-text:      linear-gradient(135deg, #a78bfa 0%, #f0abfc 50%, #f9a8d4 100%);

  /* Backgrounds */
  --bg-base:        #07070f;
  --bg-deep:        #0a0a16;
  --bg-card:        rgba(255,255,255,0.028);
  --bg-card-hover:  rgba(255,255,255,0.05);
  --bg-subtle:      rgba(255,255,255,0.015);
  --bg-input:       rgba(255,255,255,0.05);

  /* Borders */
  --border:         rgba(255,255,255,0.08);
  --border-brand:   rgba(93,95,239,0.4);
  --border-hover:   rgba(255,255,255,0.15);

  /* Text */
  --text-primary:   #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted:     #60607a;

  /* Semantic */
  --success:        #22c55e;
  --warning:        #f59e0b;
  --error:          #ef4444;

  /* Typography */
  --font-head:      'Sora', sans-serif;
  --font-body:      'DM Sans', sans-serif;

  /* Spacing */
  --container:      1200px;
  --section-py:     100px;
  --card-p:         32px;
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-xl:      32px;
  --radius-pill:    999px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
.h2 { font-size: clamp(1.9rem, 3.8vw, 3rem);   font-weight: 700; }
.h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 600; }
.h4 { font-size: 1.2rem; font-weight: 600; }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-brand { color: var(--brand-light); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* --- LAYOUT --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-py) 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-light);
  background: rgba(93,95,239,0.1);
  border: 1px solid rgba(93,95,239,0.25);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.7;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 0 24px var(--brand-glow), 0 4px 16px rgba(0,0,0,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--brand-glow), 0 8px 24px rgba(0,0,0,0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--brand);
  color: var(--brand-light);
}

.btn-ghost {
  background: rgba(93,95,239,0.1);
  color: var(--brand-light);
  border: 1px solid var(--border-brand);
}

.btn-ghost:hover {
  background: rgba(93,95,239,0.2);
  box-shadow: 0 0 20px rgba(93,95,239,0.2);
}

.btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* --- CARDS --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-p);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.glow-card {
  position: relative;
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.glow-card:hover::before { opacity: 0.5; }

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-popular {
  background: var(--grad-brand);
  color: #fff;
}

.badge-new {
  background: rgba(34,197,94,0.15);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.3);
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: all 0.3s ease;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav.scrolled {
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 36px; height: 36px;
  background: var(--grad-brand);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 16px var(--brand-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-cta { display: flex; align-items: center; gap: 12px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- MOBILE NAV --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: rgba(7,7,15,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  z-index: 999;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}
.mobile-menu a:hover { background: var(--bg-card); color: var(--text-primary); }

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 0.9rem;
  max-width: 260px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--brand-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }

.social-links { display: flex; gap: 12px; }

.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.social-link:hover {
  border-color: var(--brand);
  color: var(--brand-light);
  background: rgba(93,95,239,0.1);
}

/* --- BG EFFECTS --- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(93,95,239,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93,95,239,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.35;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #5d5fef 0%, transparent 70%);
  top: -200px; left: -100px;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  top: -100px; right: -100px;
  opacity: 0.2;
}

/* --- DIVIDERS --- */
.noise-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
  margin: 0;
}

/* --- SCROLL ANIMATIONS --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.fade-in.visible { opacity: 1; }

/* delay utilities */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* --- FORM ELEMENTS --- */
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}

.input::placeholder, .textarea::placeholder { color: var(--text-muted); }

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  background: rgba(93,95,239,0.06);
  box-shadow: 0 0 0 3px rgba(93,95,239,0.15);
}

.textarea { resize: vertical; min-height: 140px; }

.select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23606080' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.select option { background: #0f0f1e; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* --- MISC UTILITIES --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px;  }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.mt-8  { margin-top:  8px;  }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom:  8px;  }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* --- CHECKMARK LIST --- */
.check-list { display: flex; flex-direction: column; gap: 14px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.95rem; color: var(--text-secondary);
}
.check-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--success);
  margin-top: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 70px; }
  .nav-links, .nav-cta .btn:not(.btn-sm) { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  :root { --section-py: 56px; --card-p: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
}
