/* ═══════════════════════════════════
   CHATMORE THEME — aipoweredapps design system
   Shared across homepage, landing pages, generated SEO pages, blog.
   Visual layer only — no content, no SEO markup.
═══════════════════════════════════ */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-variable.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-variable.woff2') format('woff2-variations');
}

:root {
  --bg-primary: #050507;
  --bg-secondary: #0e0e12;
  --bg-card: rgba(18, 18, 24, 0.7);
  --bg-card-hover: rgba(28, 28, 38, 0.8);
  --bg-glass: rgba(12, 12, 18, 0.75);
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-tertiary: #5a5a6e;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-purple-soft: #a78bfa;
  --accent-purple-strong: #7c3aed; /* button fill — keeps white text ≥4.5:1 (WCAG AA, enforced by seo-visual test) */
  --accent-teal: #14b8a6;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg-primary);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════
   ANIMATED MESH BACKGROUND
═══════════════════════════════════ */
.mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}

.mesh-blob:nth-child(1) {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
  top: -10%;
  left: -5%;
  animation: meshFloat1 20s ease-in-out infinite;
}

.mesh-blob:nth-child(2) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 70%);
  top: 20%;
  right: -10%;
  animation: meshFloat2 25s ease-in-out infinite;
}

.mesh-blob:nth-child(3) {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35), transparent 70%);
  bottom: 10%;
  left: 20%;
  animation: meshFloat3 22s ease-in-out infinite;
}

.mesh-blob:nth-child(4) {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
  bottom: 30%;
  right: 15%;
  animation: meshFloat1 18s ease-in-out infinite reverse;
}

@keyframes meshFloat1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(80px, 50px) scale(1.1);
  }
  66% {
    transform: translate(-40px, 80px) scale(0.95);
  }
}

@keyframes meshFloat2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-60px, 70px) scale(1.05);
  }
  66% {
    transform: translate(50px, -40px) scale(1.1);
  }
}

@keyframes meshFloat3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -60px) scale(1.08);
  }
  66% {
    transform: translate(-70px, 30px) scale(0.97);
  }
}

.mesh-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .mesh-blob {
    animation: none;
  }
}

/* ═══════════════════════════════════
   STICKY NAV — styles existing .site-nav markup
═══════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav.scrolled {
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav .mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.site-nav .mark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.site-nav .keep {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-purple-strong);
  color: #fff;
  font-weight: 600;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.site-nav .keep:hover {
  background: var(--accent-purple-soft);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .site-nav {
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
}

/* ═══════════════════════════════════
   LAYOUT PRIMITIVES
═══════════════════════════════════ */
.content {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  scroll-margin-top: 80px;
}

main {
  position: relative;
  z-index: 1;
}

section {
  scroll-margin-top: 90px;
}

/* ═══════════════════════════════════
   SCROLL REVEAL (applied by theme.js — progressive enhancement)
═══════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ═══════════════════════════════════
   GRADIENT TEXT
═══════════════════════════════════ */
.gradient-text,
.theme-gradient-text {
  background: linear-gradient(135deg, #fff 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ═══════════════════════════════════
   GLASS CARD PRIMITIVE
═══════════════════════════════════ */
.glass-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ═══════════════════════════════════
   BUTTONS + LINKS
═══════════════════════════════════ */
a.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent-purple-strong);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

a.button:hover,
button.button:hover {
  background: var(--accent-purple-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}

a.button.ghost,
.button.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

a.button.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.text-link {
  color: var(--accent-purple-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.text-link:hover {
  color: var(--text-primary);
}

/* ═══════════════════════════════════
   APP STORE BADGE — styles existing a.app-store-badge markup
═══════════════════════════════════ */
a.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a.app-store-badge:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

a.app-store-badge svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

a.app-store-badge .app-store-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

a.app-store-badge .app-store-copy small {
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.01em;
}

a.app-store-badge .app-store-copy strong {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ═══════════════════════════════════
   FOOTER — styles existing footer.footer markup
═══════════════════════════════════ */
footer.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 24px;
  margin-top: 40px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

footer.footer a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

footer.footer a:hover {
  color: var(--text-secondary);
}
