/* ============================================
   FORNI FABIO SAGL — Design System
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --verde-profondo: #2D5016;
  --verde-salvia: #6B8F4E;
  --accento-terra: #C4922A;
  --bg-warm: #FAFAF8;
  --grigio-chiaro: #F0F0EB;
  --testo: #2C3E1F;
  --bianco: #FFFFFF;
  --ombra: rgba(44,62,31,0.12);
  --ombra-forte: rgba(44,62,31,0.22);
  --raggio: 8px;
  --raggio-grande: 16px;
  --transizione: 0.3s ease;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --container: 1200px;
}

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

body {
  font-family: var(--font-body);
  color: var(--testo);
  background: var(--bg-warm);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--verde-profondo);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }
p { margin-bottom: 1rem; }
a { color: var(--verde-profondo); text-decoration: none; transition: color var(--transizione); }
a:hover { color: var(--accento-terra); }
strong { font-weight: 600; }
ul { list-style: none; }

/* --- Layout --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section--scuro { background: var(--verde-profondo); color: var(--bianco); }
.section--scuro h2, .section--scuro h3 { color: var(--bianco); }
.section--scuro p { color: rgba(255,255,255,0.85); }
.section--scuro a { color: rgba(255,255,255,0.9); }
.section--scuro a:hover { color: var(--bianco); }
.section--grigio { background: var(--grigio-chiaro); }
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accento-terra);
  margin-bottom: 0.5rem;
  display: block;
}
.section-title { margin-bottom: 1rem; }
.section-subtitle { font-size: 1.1rem; color: #5a6a4a; max-width: 600px; margin-bottom: 3rem; }
.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--raggio);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transizione);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accento-terra);
  color: var(--bianco);
  border-color: var(--accento-terra);
}
.btn-primary:hover {
  background: #a87a1e;
  border-color: #a87a1e;
  color: var(--bianco);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,146,42,0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--verde-profondo);
  border-color: var(--verde-profondo);
}
.btn-secondary:hover {
  background: var(--verde-profondo);
  color: var(--bianco);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--bianco);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  color: var(--bianco);
  border-color: var(--bianco);
}
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Cards --- */
.card {
  background: var(--bianco);
  border-radius: var(--raggio-grande);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--ombra);
  transition: transform var(--transizione), box-shadow var(--transizione);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--ombra-forte);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--grigio-chiaro);
  border-radius: var(--raggio);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 0.75rem; font-size: 1.2rem; }
.card p { font-size: 0.95rem; color: #5a6a4a; margin-bottom: 1.25rem; }
.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accento-terra);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.card-link:hover { color: var(--verde-profondo); gap: 0.5rem; }

/* --- Header --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: all var(--transizione);
  background: transparent;
}
.header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px var(--ombra);
  padding: 0.75rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.logo-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bianco);
  line-height: 1;
  transition: color var(--transizione);
}
.logo-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.75);
  transition: color var(--transizione);
}
.header.scrolled .logo-name { color: var(--verde-profondo); }
.header.scrolled .logo-sub { color: var(--verde-salvia); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: color var(--transizione);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accento-terra);
  transform: scaleX(0);
  transition: transform var(--transizione);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a:hover { color: var(--bianco); }
.header.scrolled .nav a { color: var(--testo); }
.header.scrolled .nav a:hover { color: var(--verde-profondo); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bianco);
  transition: all var(--transizione);
  border-radius: 2px;
}
.header.scrolled .menu-toggle span { background: var(--verde-profondo); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--verde-profondo);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transizione);
}
.mobile-menu.active {
  display: flex;
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--bianco);
  text-decoration: none;
}
.mobile-menu a:hover { color: var(--accento-terra); }
.mobile-menu-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none;
  border: none;
  color: var(--bianco);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(45,80,22,0.88) 0%, rgba(45,80,22,0.65) 100%),
              url('../assets/images/hero-giardino.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
}
.hero-content { max-width: 700px; }
.hero h1 { color: var(--bianco); margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,0.88); font-size: 1.15rem; margin-bottom: 2.5rem; max-width: 560px; }
.hero .btn-group { margin-top: 0; }

/* --- Stats --- */
.stats { background: var(--verde-profondo); padding: 3.5rem 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accento-terra);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

/* --- Chi siamo (split) --- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-img {
  border-radius: var(--raggio-grande);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--grigio-chiaro);
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.9rem;
}

/* --- Recensioni --- */
.recensione-card {
  background: var(--bianco);
  border-radius: var(--raggio-grande);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--ombra);
  position: relative;
}
.stelle { color: #FFD700; font-size: 1.2rem; margin-bottom: 1rem; letter-spacing: 2px; }
.recensione-testo {
  font-size: 1rem;
  color: var(--testo);
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.65;
}
.recensione-autore { font-weight: 600; font-size: 0.9rem; color: var(--verde-profondo); }

/* --- Blog cards --- */
.blog-card {
  background: var(--bianco);
  border-radius: var(--raggio-grande);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--ombra);
  transition: transform var(--transizione), box-shadow var(--transizione);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px var(--ombra-forte); }
.blog-card-img {
  aspect-ratio: 16/9;
  background: var(--grigio-chiaro);
  overflow: hidden;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 1.5rem; }
.blog-card-cat {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accento-terra);
  margin-bottom: 0.5rem;
}
.blog-card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }
.blog-card p { font-size: 0.9rem; color: #5a6a4a; margin-bottom: 1rem; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--verde-profondo) 0%, var(--verde-salvia) 100%);
  padding: 5rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--bianco); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 2rem; }
.cta-banner a:hover { color: var(--bianco); }

/* --- Footer --- */
.footer {
  background: #1a2e0d;
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer h4 {
  color: var(--bianco);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-logo-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--bianco);
  margin-bottom: 0.25rem;
}
.footer-logo-sub { font-size: 0.75rem; color: var(--accento-terra); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer p { font-size: 0.9rem; line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color var(--transizione); }
.footer-links a:hover { color: var(--accento-terra); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.footer-contact-item a { color: rgba(255,255,255,0.75); }
.footer-contact-item a:hover { color: var(--accento-terra); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* --- Pagine interne hero --- */
.page-hero {
  padding: 10rem 0 5rem;
  background: linear-gradient(135deg, rgba(45,80,22,0.92) 0%, rgba(107,143,78,0.85) 100%),
              url('../assets/images/hero-giardino.jpg') center/cover no-repeat;
}
.page-hero h1 { color: var(--bianco); margin-bottom: 0.75rem; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 550px; }

/* Breadcrumb */
.breadcrumb { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; font-size: 0.85rem; }
.breadcrumb a { color: rgba(255,255,255,0.65); }
.breadcrumb a:hover { color: var(--bianco); }
.breadcrumb span { color: rgba(255,255,255,0.45); }

/* --- Form --- */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--verde-profondo); margin-bottom: 0.4rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #d4e0c8;
  border-radius: var(--raggio);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--testo);
  background: var(--bianco);
  transition: border-color var(--transizione), box-shadow var(--transizione);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--verde-salvia);
  box-shadow: 0 0 0 3px rgba(107,143,78,0.15);
}
.form-group textarea { resize: vertical; min-height: 130px; }

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .split-img { order: -1; }
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .header .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat-number { font-size: 2rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
}
