/* Custom Styles for LHF Agency */
/* Hero canvas full bleed */
#hero-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sticky CTA */
#sticky-cta {
  pointer-events: none;
}

#sticky-cta a {
  pointer-events: auto;
}

/* Magnetic buttons */
.magnetic {
  will-change: transform;
  transition: transform 0.2s ease;
}

/* Enhance cards for interactive tilt */
.service-card,
.project-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.service-card:hover,
.project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, #00A0FF, #0066FF);
  box-shadow: 0 0 12px rgba(0, 160, 255, 0.6);
}

/* Organic gradient blobs */
.blob {
  position: absolute;
  width: 40vw;
  height: 40vw;
  filter: blur(60px);
  opacity: 0.25;
  mix-blend-mode: screen;
  border-radius: 50%;
  animation: blobMove 18s ease-in-out infinite;
}
.blob-1 { background: radial-gradient(circle at 30% 30%, #00A0FF, transparent 60%); top: -10%; left: -10%; }
.blob-2 { background: radial-gradient(circle at 70% 30%, #7C3AED, transparent 60%); top: -15%; right: -10%; animation-delay: 4s; }
.blob-3 { background: radial-gradient(circle at 50% 70%, #22C55E, transparent 60%); bottom: -20%; left: 10%; animation-delay: 8s; }

@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2%, -2%) scale(1.05); }
}


/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero section animations */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Floating shapes in hero */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

/* Navigation styles */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0066FF;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button styles */
.cta-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button-outline {
    position: relative;
    overflow: hidden;
}

.cta-button-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: white;
    transition: width 0.3s ease;
    z-index: -1;
}

.cta-button-outline:hover::before {
    width: 100%;
}

/* Skill tags */
.skill-tag {
    display: inline-block;
    background: linear-gradient(135deg, #0066FF, #00A0FF);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.05), transparent);
    transition: left 0.8s;
}

.service-card:hover::before {
    left: 100%;
}

/* Project cards */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(0, 160, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::after {
    opacity: 1;
}

/* Form styles */
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.15);
}

#contact-form button[type="submit"] {
    position: relative;
    overflow: hidden;
}

#contact-form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#contact-form button[type="submit"]:hover::before {
    left: 100%;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Loading animation for form */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success message */
.success-message {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Error message */
.error-message {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shape-1, .shape-2, .shape-3 {
        display: none;
    }
    
    .floating-shapes {
        display: none;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    body { background: #0b1222; color: #e5e7eb; }
    nav { background: rgba(15,23,42,0.85) !important; border-color: rgba(148,163,184,0.12) !important; }
    .bg-light-gray { background: #0f172a !important; }
    .service-card, .project-card { background: #0b1222 !important; border: 1px solid rgba(148,163,184,0.12); }
    .text-dark-blue { color: #e5e7eb !important; }
    .text-gray-600 { color: #cbd5e1 !important; }
    footer.bg-dark-blue { background: #0b1222 !important; }
    .border-gray-100 { border-color: rgba(148,163,184,0.12) !important; }
}

/* Forced dark theme via data attribute */
[data-theme="dark"] body { background: #0b1222; color: #e5e7eb; }
[data-theme="dark"] nav { background: rgba(15,23,42,0.85) !important; border-color: rgba(148,163,184,0.12) !important; }
[data-theme="dark"] .bg-light-gray { background: #0f172a !important; }
[data-theme="dark"] .service-card, [data-theme="dark"] .project-card { background: #0b1222 !important; border: 1px solid rgba(148,163,184,0.12); }
[data-theme="dark"] .text-dark-blue { color: #e5e7eb !important; }
[data-theme="dark"] .text-gray-600 { color: #cbd5e1 !important; }
[data-theme="dark"] footer.bg-dark-blue { background: #0b1222 !important; }
[data-theme="dark"] .border-gray-100 { border-color: rgba(148,163,184,0.12) !important; }
[data-theme="dark"] .bg-white { background-color: #0b1222 !important; }
[data-theme="dark"] .text-gray-900 { color: #e5e7eb !important; }

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .theme-toggle {
  background: rgba(30,41,59,0.6);
  border-color: rgba(148,163,184,0.2);
}

/* Language select */
.lang-select {
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  border-radius: 9999px;
  padding: 6px 10px;
}
[data-theme="dark"] .lang-select {
  background: rgba(30,41,59,0.6);
  color: #e5e7eb;
  border-color: rgba(148,163,184,0.2);
}

/* Lang dropdown modern */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .lang-toggle .code { color: #e5e7eb; }
.lang-toggle .flag { font-size: 18px; line-height: 1; }
.lang-toggle .flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
[data-theme="dark"] .lang-toggle { background: rgba(30,41,59,0.6); color: #e5e7eb; border-color: rgba(148,163,184,0.2); }
.lang-dropdown {
  position: absolute;
  right: 0;
  margin-top: 8px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 6px;
  min-width: 220px;
  box-shadow: 0 20px 40px rgba(2,6,23,0.15);
  backdrop-filter: blur(10px);
  z-index: 60;
}
[data-theme="dark"] .lang-dropdown { background: rgba(15,23,42,0.95); border-color: rgba(148,163,184,0.2); }
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.lang-item:hover { background: rgba(0,102,255,0.08); }
[data-theme="dark"] .lang-item:hover { background: rgba(99,102,241,0.15); }
.lang-item span:first-child { font-size: 18px; }
.lang-item span:last-child { font-size: 14px; }

/* Mobile bottom sheet for languages */
.lang-sheet { position: fixed; inset: 0; z-index: 60; }
.lang-sheet.hidden { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.5); backdrop-filter: blur(2px); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  border-top-left-radius: 16px; border-top-right-radius: 16px;
  box-shadow: 0 -20px 40px rgba(2,6,23,0.2);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
[data-theme="dark"] .sheet-panel { background: rgba(15,23,42,0.98); color: #e5e7eb; }
.lang-sheet.active .sheet-panel { transform: translateY(0); }
.sheet-header { display:flex; align-items:center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.08); }
[data-theme="dark"] .sheet-header { border-color: rgba(148,163,184,0.2); }
.sheet-close { width: 36px; height: 36px; border-radius: 9999px; display:inline-flex; align-items:center; justify-content:center; border: 1px solid rgba(0,0,0,0.08); background: transparent; }
[data-theme="dark"] .sheet-close { border-color: rgba(148,163,184,0.2); }
.sheet-content { padding: 8px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.lang-sheet .lang-item { justify-content: flex-start; }

/* Print styles */
@media print {
    .floating-shapes,
    nav,
    #contact,
    footer {
        display: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .skill-tag {
        border: 2px solid;
    }
    
    .service-card,
    .project-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
