/* ===== CUSTOM STYLES FOR ANDMAWS ATTIC ===== */

/* Base reset and smooth scrolling */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ===== HERO GEOMETRIC ANIMATIONS ===== */
.hero-geo {
  animation: float 6s ease-in-out infinite;
}

.geo-circle-1 { animation-delay: 0s; }
.geo-circle-2 { animation-delay: -1.5s; }
.geo-square-1 { animation-delay: -3s; }
.geo-square-2 { animation-delay: -4.5s; }
.geo-triangle { animation-delay: -2s; }
.geo-dots span:nth-child(1) { animation: float 4s ease-in-out infinite; animation-delay: 0s; }
.geo-dots span:nth-child(2) { animation: float 4s ease-in-out infinite; animation-delay: -1s; }
.geo-dots span:nth-child(3) { animation: float 4s ease-in-out infinite; animation-delay: -2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-20px) rotate(var(--rotate, 0deg)); }
}

.geo-square-1 { --rotate: 45deg; animation-name: floatRotate; }
.geo-square-2 { --rotate: 12deg; animation-name: floatRotate; }
.geo-triangle { animation-name: floatRotate; }

@keyframes floatRotate {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-15px) rotate(calc(var(--rotate, 0deg) + 5deg)); }
}

/* ===== MARQUEE ANIMATION ===== */
.marquee-track {
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
  transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
  width: 1.5rem;
}

/* ===== SCROLL REVEAL (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible even without JS */
@media screen and (max-width: 360px) {
  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #732019;
}

/* ===== SELECTION ===== */
::selection {
  background: #8B271E;
  color: #FFF8F0;
}

/* ===== COLLECTION CARD HOVER EFFECTS ===== */
.group:hover .group-hover\:-translate-y-2 {
  transform: translateY(-0.5rem);
}

/* ===== IMAGE SHARPNESS ===== */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(139, 39, 30, 0.1);
}

/* ===== MOBILE LINK TRANSITIONS ===== */
.mobile-link {
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
  transform: scale(1.05);
}

/* ===== ACCESSIBILITY: Focus Styles ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #8B271E;
  outline-offset: 4px;
  border-radius: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
  nav, .marquee-track, footer {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  section {
    page-break-inside: avoid;
  }
}
