/* =================================================================
   AIM DEV Demo — Base Design System
   Used by all demo pages
================================================================= */

:root {
  /* Brand Colors */
  --aim-p: #6366f1;           /* primary */
  --aim-s: #ec4899;           /* secondary */
  --aim-gold: #fbbf24;
  --aim-green: #10b981;
  --aim-red: #ef4444;
  --aim-blue: #3b82f6;
  --aim-teal: #14b8a6;
  --aim-purple: #a855f7;

  /* Surfaces */
  --aim-bg: #0a0a0f;
  --aim-bg2: #050508;
  --aim-card: #111827;
  --aim-card2: #1f2937;

  /* Text */
  --aim-txt: #f9fafb;
  --aim-muted: #94a3b8;
  --aim-dim: #64748b;

  /* Borders */
  --aim-border: rgba(255, 255, 255, 0.08);
  --aim-border2: rgba(255, 255, 255, 0.15);

  /* Tier colors */
  --t1-color: #10b981;
  --t2-color: #14b8a6;
  --t3-color: #fbbf24;
  --t4-color: #f59e0b;
  --t5-color: #a855f7;

  /* Shadows */
  --aim-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
  --aim-shadow-lg: 0 20px 40px rgba(99, 102, 241, 0.25);

  /* Radius */
  --aim-radius: 12px;
  --aim-radius-lg: 20px;

  /* Transitions */
  --aim-trans: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Segoe UI', system-ui, sans-serif;
  background: var(--aim-bg);
  color: var(--aim-txt);
  line-height: 1.7;
  font-size: 15px;
  min-height: 100vh;
}

/* =================================================================
   DEMO MODE BANNER
================================================================= */
.demo-banner {
  background: linear-gradient(90deg, var(--aim-gold), #f59e0b);
  color: #000;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.demo-banner::before { content: "🎬 "; }

.demo-banner a {
  color: #000;
  text-decoration: underline;
  margin-left: 0.5rem;
}

/* =================================================================
   NAVIGATION
================================================================= */
.demo-nav {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  position: sticky;
  top: 32px;
  z-index: 99;
  border-bottom: 1px solid var(--aim-border);
}

.demo-nav-in {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.demo-logo {
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--aim-p), var(--aim-s));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.demo-logo-sub {
  font-size: 0.7rem;
  color: var(--aim-muted);
  font-weight: normal;
  margin-left: 0.5rem;
  letter-spacing: 0.1em;
}

.demo-nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.demo-nav-links a {
  color: var(--aim-txt);
  text-decoration: none;
  transition: var(--aim-trans);
}

.demo-nav-links a:hover {
  color: var(--aim-p);
}

.demo-cta {
  background: linear-gradient(135deg, var(--aim-p), var(--aim-s)) !important;
  color: white !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
}

/* =================================================================
   HERO
================================================================= */
.demo-hero {
  padding: 5rem 2rem 3rem;
  text-align: center;
  background: radial-gradient(ellipse at center top, rgba(99, 102, 241, 0.2), transparent 60%);
}

.demo-hero-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--aim-p);
  color: var(--aim-p);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.demo-hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--aim-p), var(--aim-s), var(--aim-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  line-height: 1.2;
}

.demo-hero p {
  font-size: 1.15rem;
  color: var(--aim-muted);
  max-width: 780px;
  margin: 0 auto 2rem;
}

/* =================================================================
   CONTAINER
================================================================= */
.demo-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* =================================================================
   CARDS
================================================================= */
.demo-card {
  background: var(--aim-card);
  border: 1px solid var(--aim-border);
  border-radius: var(--aim-radius-lg);
  padding: 2rem;
  transition: var(--aim-trans);
  position: relative;
  overflow: hidden;
}

.demo-card:hover {
  transform: translateY(-4px);
  border-color: var(--aim-p);
  box-shadow: var(--aim-shadow);
}

.demo-card.interactive {
  cursor: pointer;
}

.demo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* =================================================================
   BUTTONS
================================================================= */
.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--aim-trans);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--aim-p), var(--aim-s));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--aim-shadow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--aim-p);
  color: var(--aim-p);
}

.btn-outline:hover {
  background: var(--aim-p);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--aim-muted);
}

.btn-ghost:hover {
  color: var(--aim-p);
  background: rgba(99, 102, 241, 0.1);
}

/* =================================================================
   TIER BADGES
================================================================= */
.tier-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tier-badge.t1 { background: rgba(16, 185, 129, 0.15); color: var(--t1-color); border: 1px solid var(--t1-color); }
.tier-badge.t2 { background: rgba(20, 184, 166, 0.15); color: var(--t2-color); border: 1px solid var(--t2-color); }
.tier-badge.t3 { background: rgba(251, 191, 36, 0.15); color: var(--t3-color); border: 1px solid var(--t3-color); }
.tier-badge.t4 { background: rgba(245, 158, 11, 0.15); color: var(--t4-color); border: 1px solid var(--t4-color); }
.tier-badge.t5 { background: rgba(168, 85, 247, 0.15); color: var(--t5-color); border: 1px solid var(--t5-color); }

/* =================================================================
   FOOTER
================================================================= */
.demo-footer {
  background: var(--aim-bg2);
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--aim-border);
  margin-top: 4rem;
  color: var(--aim-muted);
  font-size: 0.85rem;
}

.demo-footer a {
  color: var(--aim-p);
  text-decoration: none;
}

/* =================================================================
   UTILITIES
================================================================= */
.text-gradient {
  background: linear-gradient(135deg, var(--aim-p), var(--aim-s));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-muted { color: var(--aim-muted); }

/* =================================================================
   RESPONSIVE
================================================================= */
@media (max-width: 768px) {
  .demo-nav { padding: 0.8rem 1rem; }
  .demo-hero { padding: 3rem 1rem 2rem; }
  .demo-container { padding: 1rem; }
  .demo-card-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   ANIMATIONS
================================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-fade-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
