/**
 * Adixy Brand Kit CSS
 * Version: 1.0.0
 * Date: 2026-07-08
 * Agent: Adixy_Brand_Architect
 * 
 * Usage: Import this file as the foundation of any Adixy-branded web property.
 * It provides CSS custom properties (variables) and base utility classes.
 * 
 * Integration:
 *   - Vanilla CSS: @import url('brand-kit.css'); or <link rel="stylesheet">
 *   - Tailwind: Map these tokens in tailwind.config.js
 *   - Existing project: Override specific variables as needed
 */

/* ────────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ──────────────────────────────────────────────────────────────── */

:root {
  /* Primary Palette */
  --adixy-black: #0A0A0F;
  --adixy-white: #FAFAFA;
  --adixy-accent: #FF6B35;

  /* Secondary Palette */
  --adixy-slate: #1E1E2E;
  --adixy-slate-light: #2D2D44;
  --adixy-gray: #8B8B9E;
  --adixy-success: #22C55E;
  --adixy-warning: #F59E0B;
  --adixy-error: #EF4444;

  /* Accent Gradient */
  --adixy-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8F5C 50%, #FFB380 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Type Scale */
  --display-xl: 4rem;      /* 64px */
  --display-lg: 3rem;      /* 48px */
  --display-md: 2rem;      /* 32px */
  --heading-lg: 1.5rem;    /* 24px */
  --heading-md: 1.25rem;   /* 20px */
  --body-lg: 1.125rem;     /* 18px */
  --body: 1rem;            /* 16px */
  --body-sm: 0.875rem;     /* 14px */
  --caption: 0.75rem;      /* 12px */

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.6;

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 16px rgba(255, 107, 53, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* Responsive type scale override for mobile */
@media (max-width: 767px) {
  :root {
    --display-xl: 3rem;    /* 48px */
    --display-lg: 2.25rem; /* 36px */
    --display-md: 1.75rem; /* 28px */
    --heading-lg: 1.375rem;/* 22px */
  }
}

/* ────────────────────────────────────────────────────────────────
   2. BASE STYLES
   ──────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  color: var(--adixy-white);
  background-color: var(--adixy-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Typography resets */
h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
  margin: 0;
}

h1 { font-size: var(--display-lg); font-weight: 700; line-height: var(--leading-tight); letter-spacing: -0.02em; }
h2 { font-size: var(--display-md); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: var(--heading-lg); font-weight: 600; line-height: var(--leading-snug); letter-spacing: -0.01em; }
h4 { font-size: var(--heading-md); font-weight: 600; line-height: 1.4; }

a {
  color: var(--adixy-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #FF8F5C;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ────────────────────────────────────────────────────────────────
   3. UTILITY CLASSES
   ──────────────────────────────────────────────────────────────── */

/* Container */
.adixy-container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.adixy-container--sm { max-width: var(--container-sm); }
.adixy-container--md { max-width: var(--container-md); }
.adixy-container--lg { max-width: var(--container-lg); }

/* Typography utilities */
.adixy-text-display { font-size: var(--display-lg); font-weight: 700; line-height: var(--leading-tight); letter-spacing: -0.02em; }
.adixy-text-heading { font-size: var(--heading-lg); font-weight: 600; line-height: var(--leading-snug); }
.adixy-text-body { font-size: var(--body); line-height: var(--leading-normal); }
.adixy-text-body-sm { font-size: var(--body-sm); line-height: 1.5; }
.adixy-text-caption { font-size: var(--caption); font-weight: 500; letter-spacing: 0.02em; }
.adixy-text-mono { font-family: var(--font-mono); }

/* Colors */
.adixy-text-white { color: var(--adixy-white); }
.adixy-text-gray { color: var(--adixy-gray); }
.adixy-text-accent { color: var(--adixy-accent); }
.adixy-text-success { color: var(--adixy-success); }
.adixy-text-warning { color: var(--adixy-warning); }
.adixy-text-error { color: var(--adixy-error); }

.adixy-bg-black { background-color: var(--adixy-black); }
.adixy-bg-slate { background-color: var(--adixy-slate); }
.adixy-bg-slate-light { background-color: var(--adixy-slate-light); }

/* Spacing utilities */
.adixy-mb-1 { margin-bottom: var(--space-1); }
.adixy-mb-2 { margin-bottom: var(--space-2); }
.adixy-mb-3 { margin-bottom: var(--space-3); }
.adixy-mb-4 { margin-bottom: var(--space-4); }
.adixy-mb-5 { margin-bottom: var(--space-5); }
.adixy-mb-6 { margin-bottom: var(--space-6); }

.adixy-p-4 { padding: var(--space-4); }
.adixy-p-5 { padding: var(--space-5); }
.adixy-p-6 { padding: var(--space-6); }

/* ────────────────────────────────────────────────────────────────
   4. COMPONENT CLASSES
   ──────────────────────────────────────────────────────────────── */

/* Buttons */
.adixy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--body);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  border: none;
  text-decoration: none;
}

.adixy-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

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

.adixy-btn--primary {
  background: var(--adixy-gradient);
  color: var(--adixy-black);
  box-shadow: var(--shadow-sm);
}

.adixy-btn--primary:hover {
  box-shadow: var(--shadow-accent);
}

.adixy-btn--secondary {
  background: transparent;
  color: var(--adixy-white);
  border: 1px solid var(--adixy-slate-light);
}

.adixy-btn--secondary:hover {
  border-color: var(--adixy-accent);
  background: rgba(255, 107, 53, 0.05);
}

.adixy-btn--ghost {
  background: transparent;
  color: var(--adixy-gray);
  padding: var(--space-2) var(--space-4);
}

.adixy-btn--ghost:hover {
  color: var(--adixy-white);
  background: transparent;
  box-shadow: none;
}

.adixy-btn--sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--body-sm);
}

/* Cards */
.adixy-card {
  background: var(--adixy-slate);
  border: 1px solid var(--adixy-slate-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.adixy-card:hover {
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: var(--shadow-lg);
}

/* Form inputs */
.adixy-input {
  width: 100%;
  background: var(--adixy-black);
  color: var(--adixy-white);
  border: 1px solid var(--adixy-slate-light);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--body);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.adixy-input:focus {
  outline: none;
  border-color: var(--adixy-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.adixy-input::placeholder {
  color: var(--adixy-gray);
}

.adixy-input--error {
  border-color: var(--adixy-error);
}

.adixy-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Labels */
.adixy-label {
  display: block;
  font-size: var(--body-sm);
  font-weight: 500;
  color: var(--adixy-gray);
  margin-bottom: var(--space-2);
}

/* Badges */
.adixy-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--caption);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.adixy-badge--accent {
  background: rgba(255, 107, 53, 0.15);
  color: #FF8F5C;
}

.adixy-badge--success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--adixy-success);
}

.adixy-badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--adixy-warning);
}

.adixy-badge--error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--adixy-error);
}

.adixy-badge--neutral {
  background: var(--adixy-slate-light);
  color: var(--adixy-gray);
}

/* Tables */
.adixy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--body);
}

.adixy-table th,
.adixy-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--adixy-slate-light);
}

.adixy-table th {
  font-weight: 600;
  color: var(--adixy-gray);
  font-size: var(--body-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adixy-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.adixy-table .adixy-table__highlight {
  background: rgba(255, 107, 53, 0.05);
}

/* Focus ring (accessibility) */
.adixy-focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.4);
}

/* Skeleton loading */
.adixy-skeleton {
  background: linear-gradient(90deg, var(--adixy-slate) 25%, var(--adixy-slate-light) 50%, var(--adixy-slate) 75%);
  background-size: 200% 100%;
  animation: adixy-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes adixy-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fade-in animation */
.adixy-fade-in {
  animation: adixy-fadeInUp 0.4s ease-out;
}

@keyframes adixy-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ────────────────────────────────────────────────────────────────
   5. PRINT STYLES
   ──────────────────────────────────────────────────────────────── */

@media print {
  :root {
    --adixy-black: #000;
    --adixy-white: #fff;
    --adixy-slate: #f5f5f5;
    --adixy-slate-light: #ddd;
    --adixy-gray: #666;
    --adixy-accent: #d9531e;
  }

  .adixy-btn,
  .adixy-card,
  .adixy-input {
    border: 1px solid #ccc;
  }
}
