/* NoBackOffice - Modern Design System */

:root {
  /* Colors - Light Theme */
  --color-text-primary: #171717;
  --color-text-secondary: #525252;
  --color-text-muted: #a3a3a3;
  --color-background: #FDFCF8;
  --color-background-alt: #ffffff;
  --color-border: #e5e5e5;
  --color-border-light: #f5f5f5;
  --color-accent: #000000;
  --color-accent-hover: #262626;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-serif: 'Playfair Display', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  
  /* 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;
  
  /* Layout */
  --max-width-container: 1200px;
  --max-width-content: 800px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { 
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 500;
  line-height: 1.2;
}

/* Glass morphism effect */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* Animation classes - Optimized for performance */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Staggered animation delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Hero text animation - Optimized */
.hero-word {
  position: relative;
  display: inline-block;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4.5rem;
  will-change: opacity, transform;
}

/* Button animations - Optimized for performance */
@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes autoShine {
  0%, 88% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.btn-shine {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.btn-shine:hover {
  transform: scale(1.05);
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: autoShine 5s infinite;
  will-change: transform;
}

.btn-shine:hover::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loading-content {
  text-align: center;
  padding: var(--space-10);
  background: var(--color-background-alt);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 300px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-5);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form styles */
.form-group {
  display: flex;
  background: var(--color-background-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.form-group:focus-within {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.form-input {
  flex: 1;
  border: none;
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
  background: transparent;
  color: var(--color-text-primary);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-submit {
  background: var(--color-accent);
  color: var(--color-background-alt);
  border: none;
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.form-submit:hover {
  background: var(--color-accent-hover);
}

/* FAQ styles */
.faq-toggle {
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
}

.faq-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-content.hidden {
  max-height: 0;
}

.faq-icon {
  transition: transform 0.2s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .hero-headline {
    font-size: var(--font-size-4xl);
  }
  
  .hero-description {
    font-size: var(--font-size-lg);
  }
  
  .section-headline {
    font-size: var(--font-size-3xl);
  }
  
  .form-group {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }
  
  .form-input, .form-submit {
    border-radius: 0;
  }
  
  .form-input {
    border-bottom: 1px solid var(--color-border);
  }
  
  .form-submit {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: var(--font-size-3xl);
  }
  
  .section-headline {
    font-size: var(--font-size-2xl);
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.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;
}

/* Cursor styles for interactive elements */
a, button, [role="button"], .faq-toggle, .btn-shine {
  cursor: pointer;
}

input[type="text"], input[type="tel"], input[type="email"], textarea {
  cursor: text;
}

/* Hover effects */
.hover-lift:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .loading-overlay {
    display: none !important;
  }
  
  nav, footer {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #000000;
    --color-text-secondary: #333333;
    --color-background: #ffffff;
    --color-border: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-word,
  .btn-shine,
  .loading-spinner {
    animation: none;
    transition: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Keep light theme for now, but structure is ready for dark mode */
}