/**
 * Cutting-Edge Design System 2026
 * Inspired by: Linear, Vercel, Stripe
 * For: Marko Stokić Consulting
 */

/* ===========================
   DESIGN TOKENS (Linear-inspired)
   =========================== */

:root {
  /* Colors - Sophisticated Neutrals */
  --color-bg: #fafafa;
  --color-bg-secondary: #ffffff;
  --color-text-primary: #18181b;
  --color-text-secondary: #52525b;
  --color-text-tertiary: #a1a1aa;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;

  /* Spacing Scale (8px 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-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-24: 6rem;    /* 96px */

  /* Typography (Linear-style hierarchy) */
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;

  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */

  /* Shadows (Subtle) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);

  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   BASE STYLES
   =========================== */

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

html {
  font-size: 16px;
  /* scroll-behavior handled by Lenis for smoother control */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
}

/* ===========================
   MODERN HERO (with visible photo)
   =========================== */

.hero-cutting-edge {
  position: relative;
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-16) var(--space-8);
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-text {
  z-index: 10;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25),
              0 0 20px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35),
              0 0 30px rgba(37, 99, 235, 0.25),
              0 0 45px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: 1px solid #e4e4e7;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: #fafafa;
  border-color: #d4d4d8;
}

.hero-photo {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===========================
   BENTO GRID (2026 Trend)
   =========================== */

.section-modern {
  padding: var(--space-24) var(--space-8);
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 50%, #fafafa 100%);
  position: relative;
}

.section-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-5xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.bento-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
              0 1px 3px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .bento-card {
    background: rgba(255, 255, 255, 0.98);
  }
}

.bento-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(37, 99, 235, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-4px);
}

.bento-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  font-size: 24px;
  color: white;
}

.bento-card-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.bento-card-description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===========================
   GLASSMORPHISM CHAT (Modern)
   =========================== */

#ai-chatbot-overlay {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
}

#ai-chatbot-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-xl);
}

.chatbot-header {
  background: linear-gradient(135deg, var(--color-accent) 0%, #3b82f6 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.chatbot-input-wrapper {
  background: var(--color-bg);
  border: 2px solid #e4e4e7;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.chatbot-input-wrapper:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
  .hero-cutting-edge {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-12) var(--space-6);
  }

  .hero-photo {
    height: 400px;
    order: -1;
  }

  .hero-title {
    font-size: var(--text-5xl);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-4xl);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
