/* Complete redesign with premium light corporate theme */
/* OPTIMIZED FOR SMOOTH SCROLLING PERFORMANCE */

/* Base reset - minimal */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

/* Simplified background - removed heavy gradient animation */
body {
  background: linear-gradient(180deg, #fafbfc 0%, #f0f4f8 50%, #fafbfc 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Removed animated body::before overlay completely for performance */

/* CSS Variables for light theme */
:root {
  --background: #fafbfc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: rgba(16, 185, 129, 0.1);
  --muted: #64748b;
  --ethereum: #6366f1;
}

/* Simplified animations - only essential ones */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.5s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Modal CSS */
.modal-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

.modal-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(15, 23, 42, 0.7) !important;
}

.modal-content {
  position: relative !important;
  z-index: 10 !important;
  background: white !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 24px !important;
  padding: 24px !important;
  max-width: 28rem !important;
  width: 100% !important;
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  animation: modalFadeIn 0.2s ease-out forwards !important;
}

@media (min-width: 640px) {
  .modal-content {
    padding: 32px !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* FAQ Animation */
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-trigger {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

/* Simplified template card transitions */
.template-card {
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  background: white;
  border: 2px solid #e2e8f0;
}

.template-card.selected {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.05) !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.template-card.selected .template-check {
  display: flex !important;
}

.template-card:not(.selected) .template-check {
  display: none !important;
}

.template-card:hover:not(.selected) {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.02);
}

/* Input focus states */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Simplified glass effect - removed backdrop-filter */
.glass {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Image upload preview */
.image-preview {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Custom range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #10b981;
  border-radius: 50%;
  cursor: pointer;
}

/* Custom checkbox */
.custom-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.custom-checkbox:checked {
  background: #10b981;
  border-color: #10b981;
}

.custom-checkbox:checked::after {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 12px;
  color: #f8fafc;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Drop zone */
.drop-zone {
  transition: border-color 0.2s ease, background-color 0.2s ease;
  border: 2px dashed #e2e8f0;
  background: #fafbfc;
}

.drop-zone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

/* Simplified card hover - removed transform for performance */
.card-corporate {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.card-corporate:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Header scroll state */
#mainHeader.scrolled #headerBg {
  opacity: 1;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Soft shadows */
.shadow-soft {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
}

.shadow-soft-lg {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 8px 48px rgba(0, 0, 0, 0.08);
}

/* Text colors for light theme */
.text-foreground {
  color: #0f172a;
}

.text-muted {
  color: #64748b;
}

.text-primary {
  color: #10b981;
}

.text-ethereum {
  color: #6366f1;
}

/* Background colors for light theme */
.bg-background {
  background-color: #fafbfc;
}

.bg-card {
  background-color: #ffffff;
}

.bg-primary {
  background-color: #10b981;
}

.border-border {
  border-color: #e2e8f0;
}

/* Success/Error states */
.bg-success {
  background-color: rgba(16, 185, 129, 0.1);
}

.bg-error {
  background-color: rgba(239, 68, 68, 0.1);
}

.text-success {
  color: #10b981;
}

.text-error {
  color: #ef4444;
}

/* Simplified button effects */
button,
.btn,
[role="button"] {
  position: relative;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

button:active:not(:disabled),
.btn:active:not(:disabled) {
  opacity: 0.8;
}

/* Primary button effects */
button.bg-primary:hover,
button.bg-emerald-500:hover {
  background-color: #059669;
}

/* Template card click */
.template-card:active {
  opacity: 0.9;
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Added smooth scroll sections with intersection observer support */
section {
  opacity: 1;
}

.section-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}
