/* ========================================
   BRIZ - Modern Premium Color Scheme
   Цветовая схема и стили для девелопера
   коммерческой недвижимости
   ======================================== */

/* ========================================
   CSS VARIABLES - ЦВЕТОВАЯ ПАЛИТРА
   ======================================== */
:root {
  /* Primary Colors - Основная палитра */
  --briz-navy: #1B2A6B;
  --briz-navy-light: #243785;
  --briz-navy-dark: #121d4d;
  
  --briz-blue: #3366BE;
  --briz-blue-light: #4A7FD6;
  --briz-blue-dark: #2552A3;
  
  --briz-sky: #8BB4D9;
  --briz-sky-light: #A8C9E8;
  --briz-sky-dark: #6E9BC4;
  
  /* Accent Colors - Акценты */
  --briz-gold: #C9A962;
  --briz-gold-light: #D9BE7A;
  --briz-gold-dark: #B0944F;
  
  /* Neutral Colors - Нейтральные */
  --white: #FFFFFF;
  --gray-50: #FAFBFC;
  --gray-100: #F5F7FA;
  --gray-200: #E8EDF3;
  --gray-300: #D1D9E6;
  --gray-400: #9AA8BC;
  --gray-500: #6B7A94;
  --gray-600: #4A5568;
  --gray-700: #2D3748;
  --gray-800: #1A202C;
  --gray-900: #0D1117;
  
  /* Semantic Colors - Семантические */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* Gradients - Градиенты */
  --gradient-primary: linear-gradient(135deg, var(--briz-navy) 0%, var(--briz-blue) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(27, 42, 107, 0.95) 0%, rgba(51, 102, 190, 0.85) 50%, rgba(139, 180, 217, 0.75) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  --gradient-sky: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 251, 252, 0.95) 100%);
  
  /* Glassmorphism - Стеклянные эффекты */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-dark: rgba(27, 42, 107, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(27, 42, 107, 0.1);
  --glass-blur: blur(20px);
  
  /* Typography - Типографика (Apple-style) */
  --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;
  
  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  
  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(27, 42, 107, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(27, 42, 107, 0.08), 0 2px 4px -2px rgba(27, 42, 107, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(27, 42, 107, 0.1), 0 4px 6px -4px rgba(27, 42, 107, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(27, 42, 107, 0.12), 0 8px 10px -6px rgba(27, 42, 107, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(27, 42, 107, 0.25);
  --shadow-inner: inset 0 2px 4px rgba(27, 42, 107, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
}

/* ========================================
   BASE STYLES
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: var(--briz-blue);
  color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--briz-sky);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--briz-blue);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--briz-navy);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
  h3 { font-size: var(--text-4xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--text-7xl); }
  h2 { font-size: var(--text-6xl); }
}

p {
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

/* ========================================
   GLASSMORPHISM UTILITIES
   ======================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.glass-dark {
  background: var(--glass-bg-dark);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-dark);
}

.glass-card {
  background: var(--gradient-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(27, 42, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 42, 107, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--briz-navy);
  border: 1.5px solid var(--briz-navy);
}

.btn-outline:hover {
  background: var(--briz-navy);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--white);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--briz-navy);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  color: var(--briz-navy);
  border: 1px solid var(--glass-border);
}

.btn-glass:hover {
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-text);
  font-size: var(--text-base);
  color: var(--gray-700);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
  outline: none;
}

.form-input:focus {
  border-color: var(--briz-blue);
  box-shadow: 0 0 0 3px rgba(51, 102, 190, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-sky {
  background: var(--gradient-sky);
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.section-padding {
  padding: var(--space-20) var(--space-6);
}

@media (min-width: 768px) {
  .section-padding {
    padding: var(--space-24) var(--space-8);
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: var(--space-24) var(--space-16);
  }
}

/* Quiz Option Buttons - Fix text wrapping */
#quiz-step-1 .quiz-option {
  min-height: 140px;
}

#quiz-step-1 .quiz-option div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Animation Utilities */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes typing {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 767px) {
  html {
    font-size: 14px;
  }
}

/* Hide scrollbar for horizontal scroll */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
