/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1420;
}
::-webkit-scrollbar-thumb {
  background: #1e303e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2d4558;
}

/* ===== ANIMATIONS ===== */

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes floatDelay {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
  animation: floatDelay 8s ease-in-out infinite;
}

.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ===== */

/* Default state: visible (progressive enhancement — works without JS) */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
}

/* When JS adds the class, animate into view */
.reveal-up.is-visible {
  animation: revealUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-left.is-visible {
  animation: revealLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-right.is-visible {
  animation: revealRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .animate-float,
  .animate-float-delay,
  .animate-scroll-line {
    animation: none !important;
  }
}

/* ===== MOBILE MENU ===== */

.menu-line {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== LINKS & BUTTONS ===== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #48c9b0;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== SELECTION ===== */

::selection {
  background: #48c9b0;
  color: #0a1420;
}

/* ===== MOBILE NAV LINKS ===== */

.mobile-link {
  transition: color 0.2s ease;
}

.mobile-link:hover {
  color: #48c9b0;
}

/* ===== IMAGE LAZY LOAD SHIMMER ===== */

img[loading="lazy"] {
  transition: opacity 0.3s ease;
}

/* ===== FORM FOCUS STATES ===== */

input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(72, 201, 176, 0.15);
}

/* ===== CARD HOVER GLOW ===== */

.group:hover img {
  filter: brightness(1.02);
}
