/* =============================================
   COLORIVA — Professional Website Styles
   ============================================= */

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B85FF;
  --accent: #FF6B6B;
  --accent-dark: #E55A5A;
  --warm: #FFB347;
  --warm-light: #FFD699;
  --green: #4ECDC4;
  --text-dark: #2D3436;
  --text-medium: #636E72;
  --text-light: #B2BEC3;
  --bg-white: #FFFFFF;
  --bg-cream: #FFF9F5;
  --bg-light: #F8F6FF;
  --bg-alt: #F0EDFF;
  --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.08);
  --shadow-md: 0 4px 20px rgba(108, 99, 255, 0.12);
  --shadow-lg: 0 8px 40px rgba(108, 99, 255, 0.16);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108, 99, 255, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-amazon {
  background: linear-gradient(135deg, #FF9900, #FFB347);
  color: #232F3E;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.35);
}

.btn-amazon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 153, 0, 0.45);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-img {
  height: 80px;
  width: auto;
  transition: var(--transition);
}

.navbar.scrolled .nav-logo-img {
  height: 65px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 4px 0;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
  position: relative;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-cream) 50%, #FFF0F0 100%);
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--warm);
  top: 50%;
  left: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  height: 320px;
  width: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 20px rgba(108, 99, 255, 0.2));
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-medium);
  max-width: 550px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll a {
  color: var(--text-light);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* === SECTIONS === */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 16px;
  border-radius: var(--radius-xl);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-medium);
  max-width: 550px;
  margin: 0 auto;
}

/* === BOOKS === */
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.book-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.book-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.book-card.animate-in:hover {
  transform: translateY(-8px);
}

.book-cover-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-light);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.book-card:hover .book-cover {
  transform: scale(1.05);
}

.book-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: white;
  padding: 4px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
}

.book-info {
  padding: 24px;
}

.book-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.book-description {
  color: var(--text-medium);
  font-size: 0.92rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.book-details {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.book-details span {
  font-size: 0.8rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-details i {
  color: var(--primary);
}

/* === PREVIEW GALLERY === */
.preview-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.preview-tab {
  padding: 10px 24px;
  border: 2px solid var(--bg-alt);
  background: white;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-medium);
}

.preview-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.preview-tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.preview-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.preview-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.preview-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-card:nth-child(2).animate-in { transition-delay: 0.1s; }
.preview-card:nth-child(3).animate-in { transition-delay: 0.2s; }

.preview-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.preview-card.animate-in:hover {
  transform: translateY(-5px) scale(1.02);
}

.preview-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.preview-card:hover img {
  transform: scale(1.05);
}

.preview-label {
  display: block;
  text-align: center;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: white;
}

/* === CHI SONO === */
.about-card {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-card);
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
}

.about-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.about-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.about-content p {
  color: var(--text-medium);
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.about-content .btn {
  margin-top: 8px;
}

/* === NEWSLETTER === */
.section-newsletter {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 80px 0;
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

.newsletter-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter-content > p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.newsletter-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.95rem;
  transition: var(--transition);
}

.newsletter-form input::placeholder {
  color: rgba(255,255,255,0.6);
}

.newsletter-form input:focus {
  outline: none;
  border-color: white;
  background: rgba(255,255,255,0.25);
}

.newsletter-form .btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  white-space: nowrap;
}

.newsletter-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

.form-note {
  font-size: 0.8rem;
  opacity: 0.7;
}

.form-note i {
  margin-right: 4px;
}

.newsletter-success {
  padding: 24px;
}

.newsletter-success i {
  font-size: 3rem;
  margin-bottom: 12px;
}

.newsletter-success p {
  font-size: 1.1rem;
}

/* === CONTATTI === */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.contact-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(30px);
}

.contact-form-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E8E8F0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-cream);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-success {
  text-align: center;
  padding: 40px;
}

.contact-success i {
  font-size: 3rem;
  color: var(--green);
  margin-bottom: 12px;
}

.contact-success p {
  font-size: 1.1rem;
  color: var(--text-dark);
}

.contact-info {
  opacity: 0;
  transform: translateY(30px);
}

.contact-info.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.2s;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  transition: var(--transition);
}

.contact-info-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.contact-info-item a {
  font-size: 0.9rem;
  color: var(--primary);
  transition: var(--transition);
}

.contact-info-item a:hover {
  color: var(--primary-dark);
}

.social-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--text-dark);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  transition: var(--transition);
}

.social-link:hover {
  transform: translateY(-3px) scale(1.1);
}

.social-link.instagram {
  background: linear-gradient(135deg, #833AB4, #FD1D1D, #F77737);
}

.social-link.facebook {
  background: #1877F2;
}

.social-link.tiktok {
  background: #000000;
}

/* === FOOTER === */
.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  height: 100px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.7;
  max-width: 280px;
}

.footer-links h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
  padding: 4px 0;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-light);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .nav-links.active {
    display: flex;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-logo {
    height: 220px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .preview-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .preview-tabs {
    flex-direction: column;
    align-items: center;
  }

  .about-card {
    flex-direction: column;
    padding: 32px;
    gap: 20px;
  }

  .newsletter-form .form-row {
    flex-direction: column;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .preview-gallery {
    grid-template-columns: 1fr;
  }
}
