/*
Theme Name: Spazio Marketing
Theme URI: https://spaziomarketing.com
Author: Spazio Marketing Team
Author URI: https://spaziomarketing.com
Description: Tema custom per Spazio Marketing - La stazione spaziale del marketing digitale
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spazio-marketing
*/

/* ============================================
   VARIABILI CSS GLOBALI
============================================ */
:root {
  /* Colori Brand */
  --color-bg-primary: #0a0e14;
  --color-bg-secondary: #141922;
  --color-bg-card: rgba(26, 32, 44, 0.6);
  
  /* Gradienti Brand */
  --gradient-primary: linear-gradient(135deg, #FDB927 0%, #F8961E 50%, #F3722C 100%);
  --gradient-secondary: linear-gradient(135deg, #4ECDC4 0%, #556FB5 50%, #C44569 100%);
  --gradient-tertiary: linear-gradient(135deg, #F94144 0%, #F3722C 50%, #F8961E 100%);
  --gradient-accent: linear-gradient(135deg, #90E0EF 0%, #00B4D8 50%, #0077B6 100%);
  
  /* Colori Testo */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A0AEC0;
  --color-text-muted: #718096;
  
  /* Colori Accent */
  --color-accent-yellow: #FDB927;
  --color-accent-orange: #F8961E;
  --color-accent-pink: #F3722C;
  
  /* Spaziature */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
 --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* Transizioni */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Ombre */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(253, 185, 39, 0.3);
}

/* ============================================
   RESET E BASE
============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Sfondo con effetto stellato */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 33% 33%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 79% 53%, rgba(255, 255, 255, 0.3), transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  pointer-events: none;
  z-index: 0;
  animation: stars 20s ease-in-out infinite;
}

@keyframes stars {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

/* ============================================
   UTILITIES
============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-secondary {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(0);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(253, 185, 39, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--color-accent-yellow);
  box-shadow: 0 0 20px rgba(253, 185, 39, 0.3);
}

/* ============================================
   CARDS
============================================ */
.card {
  background: var(--color-bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
}

/* ============================================
   ANIMAZIONI SCROLL
============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.logo-icon::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 15px;
  background: linear-gradient(to bottom, rgba(253, 185, 39, 0.8), transparent);
  border-radius: 50%;
  opacity: 0;
  animation: rocket-trail 3s ease-in-out infinite;
}

@keyframes rocket-trail {
  0%, 100% { 
    opacity: 0;
    height: 10px;
  }
  50% { 
    opacity: 1;
    height: 20px;
  }
}

.site-logo a:hover .logo-icon::after {
  opacity: 1;
  height: 25px;
}