/* ============================================================
 * SturdyBuddy Design System — Global Visual Foundation
 * ============================================================
 * All brand tokens, reusable components, and CSS classes.
 * Every page that imports this file participates in the unified
 * SturdyBuddy product identity.
 *
 * Expected Timmy avatar asset paths (uploaded files, NOT generated):
 *   /images/timmy-calm.png   — calm/idle state
 *   /images/timmy-alert.png  — warning/mode state
 *   /images/timmy-proud.png   — achievement/win state
 * ============================================================ */

/* ── GOOGLE FONTS IMPORT ── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Backgrounds */
  --color-bg: #080810;
  --color-bg-2: #0a0a0f;
  --color-surface: #0f0f1a;
  --color-surface-raised: #13131f;

  /* Accent gradient */
  --color-violet: #7c3aed;
  --color-violet-bright: #8b5cf6;
  --color-blue: #6366f1;
  --color-blue-bright: #818cf8;
  --color-blue-light: #a5b4fc;

  /* Secondary */
  --color-mint: #22c55e;
  --color-red: #ef4444;
  --color-amber: #f59e0b;

  /* Text */
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-hover: rgba(255, 255, 255, 0.14);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #818cf8 100%);
  --gradient-headline: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #6366f1 100%);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Border radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

/* ── GRADIENT HEADLINE ── */
.gradient-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--gradient-headline);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ── NEON CARD (dark glass with bright inner border) ── */
.card-glass {
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.08) inset,
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(124, 58, 237, 0.1);
}

/* ── GLOW PANEL (elevated card with stronger glow) ── */
.panel-glow {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.1) inset,
    0 0 30px rgba(124, 58, 237, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── FEATURE ICON CARD ── */
.feature-card {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── TIMMY AVATAR (uploaded asset, no generated art) ── */
.timmy-avatar {
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
}

.timmy-avatar.timmy-alert {
  filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.5));
}

.timmy-avatar.timmy-proud {
  filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.4));
}

.timmy-avatar.timmy-placeholder {
  background: rgba(124, 58, 237, 0.1);
  border: 1px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
}

/* ── STAT RING / PROGRESS RING ── */
.stat-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stat-ring svg circle.track {
  stroke: rgba(99, 102, 241, 0.15);
}

.stat-ring svg circle.fill {
  stroke: url(#gradient-brand);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}

/* ── DASHBOARD SHELL ── */
.dashboard-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--color-bg);
}

.dashboard-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.dashboard-topbar {
  width: 100%;
  height: 56px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.dashboard-main {
  flex: 1;
  overflow-y: auto;
  background: var(--color-bg);
}

/* ── NAV LINK STATES ── */
.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--color-violet-bright);
  background: rgba(124, 58, 237, 0.12);
}

.nav-link.active:hover {
  color: var(--color-blue-bright);
  background: rgba(99, 102, 241, 0.15);
}

/* ── REUSABLE GRADIENT ── */
.gradient-brand {
  background: var(--gradient-brand);
}

/* ── SHARED ICON SIZING (Lucide icons at 20px) ── */
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

/* ── GLASS SURFACE ── */
.glass-surface {
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* ── VIOLET BADGE ── */
.badge-violet {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-violet-bright);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 100px;
  letter-spacing: 0.05em;
}

/* ── AMBER BADGE ── */
.badge-amber {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 100px;
  letter-spacing: 0.05em;
}

/* ── FONT BODY ── */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

/* ── TEXT UTILITIES ── */
.text-gradient-headline {
  background: var(--gradient-headline);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ── TIMMY HERO ── */
@keyframes timmyPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes timmyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-timmy-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 320px;
  margin-bottom: 32px;
  animation: timmyFloat 3s ease-in-out infinite;
}

.hero-timmy-wrap::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.5);
  animation: timmyPulse 2s ease-in-out infinite;
}

.hero-timmy-img {
  width: 300px;
  height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(124,58,237,0.5)) drop-shadow(0 0 100px rgba(99,102,241,0.2));
  animation: heroEntrance 0.6s ease-out both;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  background: var(--gradient-headline);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 12px;
  animation: heroEntrance 0.6s ease-out 0.2s both;
}

.hero-subhead {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: rgba(167,139,250,0.85);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  animation: heroEntrance 0.6s ease-out 0.3s both;
}

.hero-copy {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 36px;
  animation: heroEntrance 0.6s ease-out 0.4s both;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroEntrance 0.6s ease-out 0.5s both;
}

.btn-primary {
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-brand);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 24px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(124,58,237,0.55);
}

.btn-ghost {
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost:hover {
  color: var(--color-text);
  border-color: rgba(124,58,237,0.4);
  background: rgba(124,58,237,0.08);
}

/* ── HERO EYEBROW ── */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--color-primary-lt);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  animation: heroEntrance 0.6s ease-out 0.1s both;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary-lt);
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ── HERO GLOW BG ── */
.hero-glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, rgba(99,102,241,0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── FEATURE CAROUSEL ── */
.feature-carousel-section {
  padding: 80px 40px;
  position: relative;
  z-index: 1;
}

.feature-carousel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-carousel-card {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-carousel-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-carousel-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.feature-carousel-card p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
