/* ================= LAYERS ================= */
@layer base, components, utilities;

/* ================= ROOT VARIABLES ================= */
:root {
  --primary-color: #1f4fa3;
  --primary-light: #4f8cff;
  --accent-orange: #ff7a2f;

  --success-color: #10b981;
  --warning-color: #f59e0b;

  --text-dark: #1a1a1a;
  --text-light: #6b7280;
  --text-muted: #9ca3af;

  --bg-light: #f8fafc;
  --white: #ffffff;

  --border-radius: 8px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);

  --purple-primary: #8b5cf6;
  --purple-light: #a78bfa;

  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-glass: 0 25px 60px rgba(139, 92, 246, 0.2);

  --purple-gradient: linear-gradient(135deg, var(--purple-primary), var(--purple-light));
  --stats-gradient: linear-gradient(135deg, var(--accent-orange), #ff9a56);

  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --hero-gradient: linear-gradient(135deg, #667eea, #764ba2);
}

/* ================= BASE ================= */
@layer base {
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
  }

  h1, h2, h3, h4 {
    color: var(--text-dark);
  }

  p {
    color: var(--text-dark);
  }
}

/* ================= COMPONENTS ================= */
@layer components {

  /* container - responsive padding */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(15px, 5vw, 40px);
  }

  /* Global responsive images */
  img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Touch-friendly min-height for buttons */
  .btn {
    min-height: 44px;
  }

  /* buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    min-height: 48px;
  }

  .btn.primary {
    background: var(--accent-orange);
    color: var(--white);
  }

  .btn.primary:hover {
    background: #e96a20;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }

  .btn.outline {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
  }

  .btn.outline:hover {
    background: currentColor;
    color: var(--white);
    transform: translateY(-2px);
  }


  /* section header */
  .section-header {
    text-align: center;
    margin-bottom: 4rem;
  }

  .section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
  }

  .section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--stats-gradient);
    border-radius: 2px;
  }

  .section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 36rem;
    margin: 0 auto;
  }

  /* glass card */
  .glass-card {
    background: var(--white);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
  }

  .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--black);
  }

  .glass-card:hover {
    box-shadow: var(--shadow-glass);
    transform: translateY(-10px);
  }
}

/* ================= UTILITIES ================= */
@layer utilities {
  .text-center { text-align: center; }

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