/* Doveryet Technologies — custom styles
   Tailwind handles 95% of styling; this file is for animations
   and a few details that are awkward to do inline. */

html { scroll-behavior: smooth; }

body {
  overflow-x: hidden;
}

/* Reveal-on-scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child reveals slightly when they share a parent grid */
.reveal:nth-child(2) { transition-delay: 0.05s; }
.reveal:nth-child(3) { transition-delay: 0.1s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }

/* Service card hover lift */
.service-card {
  transition: transform 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Subtle scrollbar (Webkit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06060d; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4f46e5, #06b6d4);
  border-radius: 8px;
}

/* Sticky header background after scroll */
#site-header.scrolled {
  backdrop-filter: blur(10px);
  background-color: rgba(11, 11, 22, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Reduced-motion users get no movement */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* Memory Match — card styles (avoid relying on Tailwind for JS-injected classes) */
#mm-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
@media (min-width: 640px) {
  #mm-board { gap: 0.75rem; }
}
.mm-cell {
  aspect-ratio: 1 / 1;
  min-height: 64px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #0b0b16;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  padding: 0;
}
.mm-cell:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.4);
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}
.mm-cell:disabled { cursor: default; }
.mm-cell.flipped {
  border-color: rgba(99, 102, 241, 0.5);
  background-color: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
}
.mm-cell.matched {
  border-color: rgba(52, 211, 153, 0.4);
  background-color: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}
.mm-cell svg { width: 1.75rem; height: 1.75rem; }
@media (min-width: 640px) {
  .mm-cell svg { width: 2rem; height: 2rem; }
}
.mm-cell .mm-back { opacity: 0.35; width: 1.25rem; height: 1.25rem; }
