/* ==========================================================================
   Design Tokens — Agape Labs
   ========================================================================== */

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

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

/* Lenis overrides native smooth scroll */
html.lenis, html.lenis body {
  scroll-behavior: auto;
}
html.lenis {
  height: auto;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* --- Light Theme (Default) — Cool Technical --- */
:root {
  /* Primary palette */
  --color-primary: #0891b2;
  --color-primary-dark: #0e7490;
  --color-primary-light: #e0f7fa;
  --color-accent: #7c3aed;
  --color-accent-light: #ede9fe;

  /* Backgrounds */
  --color-bg: #ffffff;
  --color-bg-alt: #f0edfa;
  --color-surface: #ffffff;

  /* Text */
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-text-inverse: #ffffff;

  /* Borders & misc */
  --color-border: rgba(8, 145, 178, 0.18);
  --color-shadow: rgba(15, 23, 42, 0.07);
  --color-shadow-lg: rgba(15, 23, 42, 0.13);
  --color-overlay: rgba(15, 23, 42, 0.5);

  /* Gradients */
  --gradient-hero:
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(8, 145, 178, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse 50% 40% at 85% 25%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    linear-gradient(160deg, #e0f7fa 0%, #ffffff 35%, #f0edfa 65%, #e0f7fa 100%);
  --gradient-primary: linear-gradient(135deg, #0891b2, #7c3aed);
  --gradient-card: linear-gradient(180deg, transparent 0%, rgba(8, 145, 178, 0.05) 100%);

  /* Tech accent colors */
  --color-tech-green: #34d399;
  --color-tech-amber: #fbbf24;
  --color-tech-red: #f87171;
  --color-tech-cyan: #22d3ee;

  /* Typography */
  --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;

  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.775rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  --text-xl: clamp(1.1875rem, 1.1rem + 0.45vw, 1.3125rem);
  --text-2xl: clamp(1.4375rem, 1.25rem + 0.95vw, 1.75rem);
  --text-3xl: clamp(1.75rem, 1.45rem + 1.5vw, 2.25rem);
  --text-4xl: clamp(2.125rem, 1.65rem + 2.4vw, 3rem);
  --text-5xl: clamp(2.5rem, 1.8rem + 3.5vw, 3.75rem);

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --header-height: 7.5rem;
  --header-height-scrolled: 3.25rem;

  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px var(--color-shadow);
  --shadow-md: 0 4px 6px -1px var(--color-shadow), 0 2px 4px -2px var(--color-shadow);
  --shadow-lg: 0 10px 15px -3px var(--color-shadow-lg), 0 4px 6px -4px var(--color-shadow);
  --shadow-xl: 0 20px 25px -5px var(--color-shadow-lg), 0 8px 10px -6px var(--color-shadow);
  --shadow-glow: 0 0 20px rgba(8, 145, 178, 0.18), 0 0 40px rgba(8, 145, 178, 0.08);
  --shadow-glow-primary: 0 0 30px rgba(8, 145, 178, 0.22), 0 0 60px rgba(124, 58, 237, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Status colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
}

/* --- Dark Theme — Deep Space --- */
[data-theme="dark"] {
  --color-primary: #22d3ee;
  --color-primary-dark: #06b6d4;
  --color-primary-light: #0c2d3f;
  --color-accent: #a78bfa;
  --color-accent-light: #1e1045;

  --color-bg: #020617;
  --color-bg-alt: #0f172a;
  --color-surface: #1e293b;

  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #020617;

  --color-border: rgba(34, 211, 238, 0.12);
  --color-shadow: rgba(0, 0, 0, 0.3);
  --color-shadow-lg: rgba(0, 0, 0, 0.4);
  --color-overlay: rgba(0, 0, 0, 0.7);

  --gradient-hero:
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #020617 0%, #0a0f1e 50%, #020617 100%);
  --gradient-primary: linear-gradient(135deg, #22d3ee, #a78bfa);
  --gradient-card: linear-gradient(180deg, rgba(34, 211, 238, 0.02) 0%, rgba(167, 139, 250, 0.04) 100%);

  --shadow-glow: 0 0 20px rgba(34, 211, 238, 0.12), 0 0 40px rgba(34, 211, 238, 0.05);
  --shadow-glow-primary: 0 0 30px rgba(34, 211, 238, 0.2), 0 0 60px rgba(167, 139, 250, 0.08);

  /* Tech accent colors (dark) */
  --color-tech-green: #34d399;
  --color-tech-amber: #fbbf24;
  --color-tech-red: #f87171;
  --color-tech-cyan: #22d3ee;

  /* Status colors (dark) */
  --color-success: #34d399;
  --color-success-light: #064e3b;
  --color-error: #f87171;
  --color-error-light: #7f1d1d;
  --color-warning: #fbbf24;
  --color-warning-light: #78350f;
  --color-info: #60a5fa;
  --color-info-light: #1e3a5f;
}
