:root {
  --primary: #722327;          /* colore principale */
  --primary-dark: #5B1A1A;     /* colore scuro per sera */
  --primary-light: #8B3539;    /* colore più chiaro per giorno */
  --shadow-rgb: 50, 12, 12;    /* ombra sotto il logo */
}

/* RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* STRUTTURA BASE */
body {
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 1.5s ease-in-out;
  cursor: url("../logo/logo_desto_black_minimal_small.png") 16 16, pointer;
}

/* LOGO CENTRALE */
.logo-wrap {
  position: relative;
  cursor: inherit;
  animation: breathe 10s ease-in-out infinite;
  transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out;
}

.logo {
  width: clamp(120px, 10vw, 280px);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(var(--shadow-rgb), 0.7));
  opacity: 0;
  transition: opacity 1s ease-in-out, transform .8s ease, filter .8s ease;
}
.logo.visible { opacity: 1; }

/* OMBRA */
.shadow {
  position: absolute;
  left: 50%;
  bottom: clamp(-55px, -4.8vw, -32px);
  transform: translateX(-50%) scale(1.3, 1);
  width: 100%;
  height: clamp(30px, 3.8vw, 46px);
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(var(--shadow-rgb), 0.85) 0%,
    rgba(var(--shadow-rgb), 0.55) 50%,
    rgba(var(--shadow-rgb), 0.25) 80%,
    transparent 100%);
  filter: blur(10px);
  opacity: 0.9;
  z-index: -1;
  transition: all 1s ease-in-out;
}

/* RESPIRO */
@keyframes breathe {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes breatheFast {
  0% { transform: scale(1); }
  50% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* INTERAZIONE */
.logo-wrap:hover {
  animation: breatheFast 6s ease-in-out infinite;
}
.logo-wrap:hover .logo {
  transform: scale(1.04);
}
.logo-wrap:hover .shadow {
  transform: translateX(-50%) scale(1.35, 1.15);
  opacity: 1;
}

/* DISSOLVENZA */
.logo-wrap.disappear {
  animation: none;
  transform: scale(1.2);
  opacity: 0;
  filter: blur(6px);
  transition: transform 1.5s ease-in-out,
              opacity 1.5s ease-in-out,
              filter 1.5s ease-in-out;
}
.logo-wrap.disappear .logo {
  transform: scale(1.25);
  opacity: 0;
  filter: blur(14px);
}
.logo-wrap.disappear .shadow {
  opacity: 0;
  filter: blur(12px);
  transform: translateX(-50%) scale(1.5, 1.2);
}

/* SFONDO GIORNO / NOTTE */
body.fade-dark  { background-color: var(--primary-dark); }  /* sera → scurisce */
body.fade-light { background-color: var(--primary-light); } /* giorno → schiarisce */

/* CURSORE CHIARO SU LOGO */
body.cursor-glow {
  cursor: url("../logo/logo_desto_minimal_small.png") 16 16, pointer;
}

/* ACCESSIBILITÀ */
@media (prefers-reduced-motion: reduce) {
  .logo-wrap { animation: none; transition: none; }
  .logo, .shadow, body { transition: none; }
}