/* base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family, sans-serif);
  background: var(--color-bg, #FFF8F0);
  color: var(--color-text, #333333);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(-45deg, #FFF8F0, #FFF0E0, #FFE4CC, #FFF8F0);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  padding-top: 70px; /* Spazio per Header Sticky */
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Background dinamico */
body {
  background: linear-gradient(-45deg, #FFF8F0, #FFF0E0, #FFE4CC, #FFF8F0);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

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

/* Onde decorative */
.bg-waves {
  position: absolute;
  top: 40vh;
  left: 0;
  width: 100%;
  height: 200px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 120 28" xmlns="http://www.w3.org/2000/svg"><path d="M0 28 Q 30 0, 60 14 T 120 28" fill="rgba(242,140,56,0.05)"/></svg>') repeat-x;
  background-size: 100px 50px;
  animation: waveAnimBg 10s linear infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes waveAnimBg {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100px); }
}

/* ============================================================
   AMBIENT GLOW PREMIUM (Sfondo)
   ============================================================ */
.premium-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(242,140,56,0.15) 0%, rgba(255,248,240,0) 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

@media (min-width: 768px) {
  .premium-ambient-glow {
    width: 40vw;
    height: 40vw;
  }
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ============================================================
   HEADER GLOBALE (Sticky & Glassmorphism)
   ============================================================ */
.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(242, 140, 56, 0.1);
  z-index: 2000;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.main-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header__logo {
  height: 40px;
  cursor: pointer;
}

.main-header__nav a {
  margin-left: var(--space-md);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.main-header__nav a:hover {
  color: var(--color-primary);
}

/* ============================================================
   FOOTER GLOBALE
   ============================================================ */
.main-footer {
  background-color: #2D2D2D;
  color: #fff;
  padding: var(--space-2xl) 0 var(--space-md);
  margin-top: auto;
  font-family: var(--font-family);
}

.main-footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.main-footer__brand p {
  color: #AAA;
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.main-footer__logo {
  height: 50px;
  filter: brightness(0) invert(1);
}

.main-footer h4 {
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.main-footer__links a {
  display: block;
  color: #DDD;
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.main-footer__links a:hover {
  color: var(--color-primary);
}

.main-footer__contact p {
  color: #DDD;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.main-footer__bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  color: #777;
  font-size: 0.8rem;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0; right: 0;
  background: var(--color-white);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
  padding: var(--space-md);
  z-index: 3000;
  transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-banner__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--color-text);
  margin: 0;
}

@media (min-width: 768px) {
  .cookie-banner__content {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
  .cookie-banner .btn-primary {
    min-width: 150px;
  }
}
