/* Gildia Premium Design System */
/* Modern SaaS aesthetic - Linear, Framer, Stripe inspired */

:root {
  /* ==================== COLOR PALETTE ==================== */
  /* Primary */
  --color-primary: #0f172a;           /* Deep navy blue */
  --color-primary-light: #1e293b;     /* Slightly lighter navy */
  --color-primary-lighter: #334155;   /* Light slate */
  
  /* Accent */
  --color-accent: #2563eb;            /* Royal blue */
  --color-accent-light: #3b82f6;      /* Lighter blue */
  --color-accent-lighter: #60a5fa;    /* Light blue */
  
  /* Secondary */
  --color-secondary: #0dd4b3;         /* Teal accent */
  
  /* Neutrals */
  --color-white: #ffffff;
  --color-bg: #f8fafc;                /* Light gray background */
  --color-surface: #f1f5f9;           /* Card background */
  --color-surface-dark: #e2e8f0;      /* Hover state */
  --color-border: #cbd5e1;            /* Border color */
  --color-border-light: #e2e8f0;      /* Light border */
  --color-text: #0f172a;              /* Primary text */
  --color-text-secondary: #475569;    /* Secondary text */
  --color-text-tertiary: #64748b;     /* Tertiary text */
  
  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  
  /* ==================== SPACING ==================== */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --space-5xl: 48px;
  --space-6xl: 56px;
  --space-7xl: 64px;
  --space-8xl: 80px;
  
  /* ==================== TYPOGRAPHY ==================== */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "Menlo", "Monaco", "Courier New", monospace;
  
  /* Font sizes - modern scaling */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 24px;
  --text-4xl: 30px;
  --text-5xl: 36px;
  --text-6xl: 44px;
  --text-7xl: 52px;
  
  /* Line heights */
  --lh-tight: 1.2;
  --lh-normal: 1.4;
  --lh-relaxed: 1.6;
  --lh-loose: 1.8;
  
  /* Font weights */
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;
  --fw-800: 800;
  
  /* ==================== RADIUS ==================== */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 28px;
  --radius-full: 9999px;
  
  /* ==================== SHADOWS ==================== */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.15);
  --shadow-xl: 0 12px 40px rgba(15, 23, 42, 0.18);
  --shadow-2xl: 0 16px 56px rgba(15, 23, 42, 0.22);
  --shadow-3xl: 0 20px 72px rgba(15, 23, 42, 0.26);
  
  /* Elevated shadows */
  --shadow-glow-sm: 0 4px 16px rgba(37, 99, 235, 0.12);
  --shadow-glow-md: 0 8px 32px rgba(37, 99, 235, 0.18);
  --shadow-glow-lg: 0 12px 48px rgba(37, 99, 235, 0.24);
  
  /* ==================== TRANSITIONS ==================== */
  --transition-fast: 120ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* ==================== BREAKPOINTS ==================== */
  /* Mobile first */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1536px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== UTILITIES ==================== */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-3xl);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1400px;
    padding: 0 var(--space-6xl);
  }
}

/* Typography scales */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-700);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-5xl); }
h3 { font-size: var(--text-4xl); }
h4 { font-size: var(--text-3xl); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }

/* ==================== LINKS ==================== */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base) var(--ease-in-out);
}

a:hover {
  color: var(--color-accent-light);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: var(--fw-600);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-base) var(--ease-in-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: var(--color-white);
  border-color: transparent;
  box-shadow: var(--shadow-glow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
  box-shadow: var(--shadow-glow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary button */
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface-dark);
  border-color: var(--color-text-tertiary);
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text-secondary);
}

/* Large button */
.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
}

/* Small button */
.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
}

/* ==================== CARDS ==================== */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base) var(--ease-in-out);
}

.card:hover {
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-lg);
}

.card-elevated {
  background: var(--color-white);
  border: none;
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

/* ==================== GRADIENTS ==================== */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
}

.gradient-subtle {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.gradient-glow {
  background: radial-gradient(at 50% 0%, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0) 50%);
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.animate-fade-in {
  animation: fade-in var(--transition-base) var(--ease-in-out);
}

.animate-slide-up {
  animation: slide-up var(--transition-base) var(--ease-in-out);
}

.animate-slide-down {
  animation: slide-down var(--transition-base) var(--ease-in-out);
}

.animate-scale-in {
  animation: scale-in var(--transition-base) var(--ease-in-out);
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

/* ==================== UTILITY CLASSES ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mt-4xl { margin-top: var(--space-4xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.mb-4xl { margin-bottom: var(--space-4xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }
.p-3xl { padding: var(--space-3xl); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Responsive utilities */
@media (max-width: 768px) {
  .hidden-mobile { display: none; }
}

@media (min-width: 769px) {
  .hidden-desktop { display: none; }
}
