/* ============================================================
   pieseautorun.ro — enhance layer (polish)
   Aditiv. Site-ul are DEJA reveal la scroll (.reveal) — nu-l dublăm.
   Aici adăugăm doar ce lipsește: focus-visible, hover carduri, feedback
   apăsare, smooth-scroll + respectarea prefers-reduced-motion.
   Animă DOAR transform + opacity + box-shadow. Brand: #dc2626.
   ============================================================ */

html { scroll-behavior: smooth; }

/* --- Carduri: umbră stratificată tinted + ridicare lină pe hover --- */
.enh-card {
  transition: transform .35s cubic-bezier(.16, 1, .3, 1),
              box-shadow .35s cubic-bezier(.16, 1, .3, 1);
}
.enh-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 2px rgba(24, 24, 27, .06),
    0 10px 26px -8px rgba(220, 38, 38, .18),
    0 18px 44px -14px rgba(24, 24, 27, .22);
}

/* --- Focus-visible ring pe elementele clickabile (inputs deja tratate inline) --- */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
  border-radius: .5rem;
}

/* --- Feedback la apăsare pe butoane --- */
.btn-primary:active,
button:active {
  transform: translateY(1px);
}

/* --- Logo 3D în hero (index): ridicat, vizibil, plutește + se înclină în perspectivă --- */
.hero-logo-3d {
  position: absolute;
  right: clamp(-2%, 1vw, 3%);
  top: 38%;
  transform: translateY(-50%);
  perspective: 900px;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.hero-logo-3d__img {
  width: clamp(280px, 33vw, 540px);
  height: auto;
  opacity: .92;
  filter: drop-shadow(0 22px 48px rgba(220, 38, 38, .28)) drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
  transform-style: preserve-3d;
  animation: heroLogoFloat 7s ease-in-out infinite;
  transition: transform .25s ease-out;
}
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0) rotateY(-13deg) rotateX(5deg); }
  50%      { transform: translateY(-16px) rotateY(13deg) rotateX(-4deg); }
}
/* WebGL canvas (Three.js) — ascuns până se inițializează; înlocuiește imaginea CSS */
.hero-logo-3d__canvas { display: none; width: clamp(320px, 40vw, 620px); height: auto; }
.hero-logo-3d.webgl-on .hero-logo-3d__img { display: none; }
.hero-logo-3d.webgl-on .hero-logo-3d__canvas { display: block; }
.hero-logo-3d.webgl-on { animation: none; }

/* --- Accesibilitate: reduced-motion dezactivează tot, inclusiv reveal-ul site-ului --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .enh-card, .enh-card:hover { transition: none !important; transform: none !important; }
  .btn-primary:active, button:active { transform: none !important; }
  .hero-logo-3d__img { animation: none !important; transform: rotateY(0) !important; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
