/* ══════════════════════════════════════════════════════════════════
   CHATTTO LANDING PAGE
   ══════════════════════════════════════════════════════════════════ */

/* ── TOKENS ────────────────────────────────────────────────────── */
:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Transitions */
  --transition-fast: 180ms ease;
  --transition-med: 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-slow: 700ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Colors */
  --color-bg: #000000;
  --color-surface: #0e0e10;
  --color-surface-2: #1c1c1e;
  --color-surface-3: #2a2a2d;
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.12);

  --color-text: #ffffff;
  --color-text-secondary: #b0b0b8;
  --color-text-muted: #8a8a93;
  --color-text-faint: #55555e;

  --color-accent: #5b6af0;
  --color-accent-hover: #7580ff;
  --color-accent-glow: rgba(91, 106, 240, 0.25);
  --color-accent-soft: rgba(91, 106, 240, 0.10);

  /* Shadows & Glows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.7);
}

/* ── RESET & BASE ──────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 16px;
  color: var(--color-text);
  letter-spacing: -0.04em;
  font-weight: 800;
  line-height: 1.1;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 2400px;
  margin: 0 auto;
  padding: 0 5vw;
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
  padding: 24px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(14, 14, 16, 0.8);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-med);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent) 0%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--color-accent-glow);
}

.logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  line-height: 1;
}

.logo-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--color-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.btn-nav {
  padding: 10px 24px;
  background: var(--color-text);
  color: var(--color-bg);
  white-space: nowrap;
}

.btn-nav:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
  color: var(--color-bg) !important;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  font-size: 18px;
  padding: 18px 40px;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--color-accent-glow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-strong);
  font-size: 18px;
  padding: 18px 40px;
}

.btn-secondary:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-text:hover {
  color: var(--color-text);
}

.btn-text .btn-icon {
  display: none;
}

.btn-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
}

/* ── HERO SECTION ──────────────── */
.hero {
  padding: 200px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
  z-index: -1;
  opacity: 0.6;
}

.hero h1 {
  font-size: 72px;
  line-height: 1.05;
  margin-bottom: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 22px;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto 56px;
  line-height: 1.6;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ── FEATURE CARDS ───── */
.features-container {
  padding: 100px 0 200px;
  position: relative;
}

.features-header {
  text-align: center;
  margin-bottom: 120px;
}

.features-header h2 {
  font-size: 56px;
  background: linear-gradient(90deg, #fff, var(--color-text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.features-header p {
  color: var(--color-text-muted);
  font-size: 20px;
}

/* The Sticky Stack */
.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 100px;
}

.feature-card-premium {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(40px, 5vw, 100px);
  padding: clamp(40px, 5vw, 100px);
  border-radius: var(--radius-xl);
  background: rgba(28, 28, 30, 0.5);
  /* Using var(--color-surface-2) equivalent */
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 480px;
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.feature-card-premium:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* nth-child logic to offset stacking visuals */
.feature-card-premium:nth-child(1) {
  z-index: 1;
  top: 120px;
}

.feature-card-premium:nth-child(2) {
  z-index: 2;
  top: 140px;
}

.feature-card-premium:nth-child(3) {
  z-index: 3;
  top: 160px;
}

.feature-card-premium:nth-child(4) {
  z-index: 4;
  top: 180px;
}

.feature-card-premium:nth-child(5) {
  z-index: 5;
  top: 200px;
}

.feature-card-premium:nth-child(6) {
  z-index: 6;
  top: 220px;
}

.feature-card-premium:nth-child(7) {
  z-index: 7;
  top: 240px;
}

.feature-card-premium:nth-child(8) {
  z-index: 8;
  top: 260px;
}

.feature-card-premium:nth-child(9) {
  z-index: 9;
  top: 260px;
}

.feature-card-premium:nth-child(10) {
  z-index: 10;
  top: 260px;
}

.feature-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.feature-number {
  font-family: var(--font-display);
  font-size: clamp(120px, 12vw, 240px);
  font-weight: 900;
  line-height: 1;
  position: absolute;
  top: clamp(-60px, -6vw, -100px);
  left: clamp(-30px, -3vw, -60px);
  color: rgba(255, 255, 255, 0.03);
  z-index: -1;
  pointer-events: none;
}

.feature-content h3 {
  font-size: clamp(36px, 3.5vw, 64px);
  margin-bottom: clamp(16px, 2vw, 32px);
  line-height: 1.1;
}

.feature-content p {
  font-size: clamp(16px, 1.5vw, 26px);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 100%;
}

.feature-visual {
  flex: 1;
  max-width: 55%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-3);
}

.feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.feature-card-premium:hover .feature-visual img {
  transform: scale(1.05);
}

/* Alternating layout */
.feature-card-premium:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-card-premium:nth-child(even) .feature-number {
  left: auto;
  right: -40px;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section {
  padding: 160px 0;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, var(--color-accent-soft) 100%);
  border-top: 1px solid var(--color-border);
}

.cta-section h2 {
  font-size: 64px;
  margin-bottom: 24px;
}

.cta-section p {
  font-size: 20px;
  color: var(--color-text-secondary);
  margin-bottom: 48px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--color-text-faint);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--color-text-secondary);
}

.footer p {
  color: var(--color-text-faint);
  font-weight: 500;
  font-size: 14px;
  margin: 0;
}

/* ── LEGAL PAGES ─────────────────────────────────────────────── */
.content-page {
  padding: 160px 0 100px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--color-text-secondary);
}

.prose h1 {
  font-size: 48px;
}

.prose h2 {
  font-size: 24px;
  margin-top: 48px;
}

.prose li {
  margin-bottom: 12px;
}

.prose strong {
  color: var(--color-text);
}

.last-updated {
  display: block;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.nav-links a.is-active {
  color: var(--color-text);
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero {
    padding: 160px 0 80px;
  }

  .hero h1 {
    font-size: 52px;
  }

  /* Disable sticky stack on smaller screens to prevent overflow overlap */
  .feature-card-premium {
    flex-direction: column !important;
    padding: 40px;
    text-align: center;
    gap: 32px;
    position: relative !important;
    top: auto !important;
    min-height: auto;
  }

  .feature-content p {
    max-width: 100%;
    margin: 0 auto;
  }

  .feature-visual {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  .feature-number {
    font-size: 100px;
    top: -30px;
    left: 50% !important;
    transform: translateX(-50%);
    right: auto !important;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 16px 0;
  }

  .logo {
    font-size: 18px;
    gap: 10px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .logo-img {
    width: 18px;
    height: 18px;
  }

  .logo-subtitle {
    font-size: 9px;
    margin-top: 2px;
    letter-spacing: 0.02em;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 18px;
    padding: 0 10px;
  }

  /* Stack buttons vertically on mobile */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
    padding: 0 20px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 16px 20px;
  }

  .hero-actions .btn-text {
    margin-top: 8px;
  }

  .features-container {
    padding: 60px 0 80px;
  }

  .features-header {
    margin-bottom: 60px;
  }

  .features-header h2 {
    font-size: 32px;
  }

  .feature-card-premium {
    padding: 32px 20px;
    gap: 24px;
    border-radius: var(--radius-lg);
  }

  .feature-content h3 {
    font-size: 28px;
  }

  .feature-content p {
    font-size: 16px;
  }

  .cta-section {
    padding: 100px 0;
  }

  .cta-section h2 {
    font-size: 36px;
  }

  .cta-section p {
    font-size: 18px;
  }

  .content-page {
    padding-top: 120px;
  }

  .prose h1 {
    font-size: 36px;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }
}