/* ============================================================
   LATITUD CHAT — main.css
   Variables, Reset, Typography, Dark Mode, Utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand */
  --accent:        #2D6A4F;
  --accent-hover:  #245740;
  --accent-mid:    #52B788;
  --accent-light:  #E8F5EE;
  --accent-glow:   rgba(45,106,79,0.15);

  /* Backgrounds */
  --bg:            #FFFFFF;
  --bg-alt:        #F8F8F6;
  --bg-subtle:     #F3F3F0;
  --surface:       #FFFFFF;
  --surface-2:     #F5F5F2;
  --surface-3:     #EFEFEB;

  /* Borders */
  --border:        #E6E6E0;
  --border-light:  #EFEFEA;

  /* Text */
  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #999999;
  --text-inverse:   #FFFFFF;

  /* Accent colors for feature cards */
  --blue:          #2B6CB0;
  --blue-light:    #EBF4FF;
  --purple:        #6B46C1;
  --purple-light:  #FAF5FF;
  --orange:        #C05621;
  --orange-light:  #FFFAF0;
  --teal:          #285E61;
  --teal-light:    #E6FFFA;
  --pink:          #B83280;
  --pink-light:    #FFF5F7;
  --indigo:        #3C366B;
  --indigo-light:  #EBF4FF;

  /* Shadows — warm/soft */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.09), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.11), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-2xl: 0 32px 80px rgba(0,0,0,0.14);

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Transitions */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:    150ms;
  --t-base:    220ms;
  --t-slow:    380ms;

  /* Layout */
  --max-w:      1200px;
  --max-w-text: 680px;
  --navbar-h:   68px;
  --section-py: 100px;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #0C0C0C;
  --bg-alt:       #141414;
  --bg-subtle:    #1A1A1A;
  --surface:      #161616;
  --surface-2:    #1E1E1E;
  --surface-3:    #242424;

  --border:       #282828;
  --border-light: #222222;

  --text-primary:   #EFEFEF;
  --text-secondary: #A0A0A0;
  --text-muted:     #585858;

  --accent-light:   rgba(45,106,79,0.18);
  --accent-glow:    rgba(45,106,79,0.25);
  --blue-light:     rgba(43,108,176,0.15);
  --purple-light:   rgba(107,70,193,0.15);
  --orange-light:   rgba(192,86,33,0.15);
  --teal-light:     rgba(40,94,97,0.15);
  --pink-light:     rgba(184,50,128,0.15);
  --indigo-light:   rgba(60,54,107,0.15);

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.45);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.55);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-2xl: 0 32px 80px rgba(0,0,0,0.7);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-slow) var(--ease), color var(--t-base) var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
.h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.h2 { font-size: clamp(1.8rem, 4vw, 3rem);   font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.lead { font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; color: var(--text-secondary); }
.small { font-size: 0.875rem; }
.xs    { font-size: 0.75rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

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

.section--sm {
  padding-block: 64px;
}

.section--lg {
  padding-block: 128px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--t-base) var(--ease);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn--secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--bg-subtle);
}

.btn--lg {
  padding: 15px 32px;
  font-size: 1rem;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

/* ── Badge / Pill ────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge--accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge--new {
  background: linear-gradient(135deg, #2D6A4F, #52B788);
  color: #fff;
}

/* ── Section Header ──────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 64px;
}

.section-header .badge {
  margin-bottom: 16px;
}

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

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--accent-mid);
}

/* ── Icon box ─────────────────────────────────────────────────── */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Scroll animations ────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.19s; }
.stagger-4 { transition-delay: 0.26s; }
.stagger-5 { transition-delay: 0.33s; }
.stagger-6 { transition-delay: 0.40s; }

/* ── Divider ──────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-light);
  border: none;
}

/* ── Check list ───────────────────────────────────────────────── */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.check-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232D6A4F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-py: 72px;
    --navbar-h:   60px;
  }
  .container { padding-inline: 20px; }
  .section-header { margin-bottom: 48px; }
}

@media (max-width: 480px) {
  :root { --section-py: 56px; }
  .container { padding-inline: 16px; }
}
