/* 🔥 INFERNO v2.0 - Build finale 🔥 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=UnifrakturMaguntia&family=Noto+Serif+Display:wght@300;700&display=swap');

/* Sistema di variabili ottimizzato */
:root {
  --bg-1: #0a0200;
  --bg-2: #2d0800;
  --bg-3: #4d0f00;
  --accent: #ff2a00;
  --gold: #ffaa00;
  --glow: rgba(255, 60, 0, 0.8);
  --glass: rgba(15, 4, 0, 0.5);
  --glass-strong: rgba(0, 0, 0, 0.7);
  --card-border: 1px solid rgba(255, 100, 0, 0.3);
  --text: #ffd8c8;
  --muted: rgba(255, 200, 180, 0.65);
}

/* Reset ottimizzato per performance */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Noto Serif Display', serif;
  background: 
    radial-gradient(ellipse at 20% 30%, var(--bg-2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, var(--bg-3) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-1) 100%);
  color: var(--text);
  position: relative;
  /* Rispetta preferenze accessibilità */
  animation: global-pulse 8s ease-in-out infinite;
}

@keyframes global-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.05); }
}

/* Texture di cenere/vapore */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 1px, var(--accent) 1px, var(--accent) 2px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  animation: smoke-drift 20s linear infinite;
}

@keyframes smoke-drift {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-50px) translateY(-30px); }
}

/* Mouse-track fire glow */
#mouse-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
  will-change: transform;
}
body:hover #mouse-glow { opacity: 0.4; }

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header - Metallo fuso con scanlines */
.site-header {
  background: linear-gradient(180deg, rgba(20, 6, 2, 0.9), rgba(10, 3, 1, 0.6));
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.brand {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 1.6rem;
  color: var(--gold);
  text-decoration: none;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(255, 180, 0, 0.1), rgba(255, 120, 0, 0.05));
  border-radius: 10px;
  text-shadow: 0 0 20px var(--gold);
  position: relative;
  will-change: transform;
}

.brand::before {
  content: '☠';
  margin-right: 10px;
  filter: drop-shadow(0 0 8px var(--accent));
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.menu-btn {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  filter: drop-shadow(0 0 5px var(--accent));
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 12px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  position: relative;
  transition: color 0.3s ease;
  overflow: hidden;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.3s ease;
}

.nav a:hover::after { width: 100%; }
.nav a.active {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  color: var(--bg-1);
  font-weight: 900;
  box-shadow: 0 0 20px var(--glow);
}

/* Hero - Titolo cinematica */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 8vw, 4rem);
  margin: 0 0 20px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: fire-breath 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 30px rgba(255, 100, 0, 0.7));
  position: relative;
  display: inline-block;
}

@keyframes fire-breath {
  0% { 
    text-shadow: 0 0 20px rgba(255, 50, 0, 0.9), 0 0 40px rgba(255, 100, 0, 0.6);
    transform: scale(1);
  }
  100% { 
    text-shadow: 0 0 40px rgba(255, 0, 0, 1), 0 0 80px rgba(255, 150, 0, 0.8);
    transform: scale(1.02);
  }
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  color: var(--bg-1);
  padding: 15px 30px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 0 30px var(--glow);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 50px var(--glow), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Lista servizi (inserita da patch) */
.service-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.service-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-list li:last-child {
    border-bottom: none;
}

/* Cards - Effetto 3D parallax */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
  perspective: 1000px;
}

.card {
  position: relative;
  background: var(--glass);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.9,.3,1), box-shadow 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  transform-style: preserve-3d;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 100, 0, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before { opacity: 1; }

.card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 0 60px var(--glow);
}

.card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--gold);
  position: relative;
  z-index: 1;
}

.card p {
  color: var(--muted);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.price {
  font-weight: 900;
  color: var(--accent);
  font-size: 1.2rem;
  text-shadow: 0 0 10px var(--glow);
  position: relative;
  z-index: 1;
}

/* Footer */
.site-footer {
  padding: 22px 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255, 100, 0, 0.1);
  margin-top: 50px;
  position: relative;
}

/* Form - Lava crust */
.login-form, .feedback-form {
  background: var(--glass-strong);
  border: 2px solid rgba(255, 100, 0, 0.2);
  padding: 24px;
  border-radius: var(--radius-lg);
  max-width: 560px;
  margin: 26px auto;
  box-shadow: 0 0 40px rgba(255, 60, 0, 0.3);
  position: relative;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 100, 0, 0.2);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

button {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  color: var(--bg-1);
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  width: 100%;
  box-shadow: 0 0 20px var(--glow);
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px var(--glow);
}

/* Media query per performance */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  #mouse-glow { display: none; }
  .hero h1 { letter-spacing: 1px; }
  .cards { perspective: none; }
  .card:hover { transform: translateY(-10px) !important; }
}

/* Left sidebar layout used only on `the-mafia-city.html` (body has class left-sidebar-page) */
body.left-sidebar-page .left-sidebar-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 30px;
}

body.left-sidebar-page .left-menu {
  background: rgba(10,6,3,0.6);
  border: 1px solid rgba(255,100,0,0.12);
  padding: 18px;
  border-radius: 12px;
  position: sticky;
  top: 90px;
}

body.left-sidebar-page .left-menu h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--gold);
}

body.left-sidebar-page .left-menu ul { list-style: none; padding: 0; }
body.left-sidebar-page .left-menu li { margin-bottom: 10px; }
body.left-sidebar-page .left-menu a { color: var(--text); text-decoration: none; padding: 8px 10px; display: block; border-radius: 8px; }
body.left-sidebar-page .left-menu a:hover { background: rgba(255,40,0,0.08); color: var(--gold); }

body.left-sidebar-page .left-content { }

@media (max-width: 900px) {
  body.left-sidebar-page .left-sidebar-layout { grid-template-columns: 1fr; }
  body.left-sidebar-page .left-menu { position: relative; top: 0; }
}

/* Override specifico per la pagina download: immagini e pulsanti più grandi */
#download-grid .card {
  padding: 28px;
}

#download-grid .card img {
  width: 100%;
  max-width: 320px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

#download-grid .card p { margin: 10px 0; }

#download-grid .card .btn, #download-grid .card button {
  width: auto; /* non full-width qui */
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 12px;
}

#download-grid .card .btn + .btn { margin-left: 8px; }