*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --color-sage:         #6B8F71;
  --color-sage-dark:    #4A6B4F;
  --color-sage-light:   #B5CDB9;
  --color-terracotta:   #C66B4D;
  --color-terracotta-soft: #DF8A6A;
  --color-cream:        #FBF7F0;
  --color-cream-alt:    #F5EDE0;
  --color-forest:       #2A3B32;
  --color-forest-light: #4A5E52;
  --color-text:         #3D3830;
  --color-muted:        #8C8273;
  --color-white:        #FFFCF8;
  --color-border:       #E5DCCE;
  --font-display:       'Fraunces', Georgia, serif;
  --font-body:          'Sora', system-ui, sans-serif;
  --max-width:          1120px;
  --nav-height:         72px;
  --radius-sm:          6px;
  --radius-md:          14px;
  --radius-lg:          24px;
}

body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-forest);
}
strong { font-weight: 600; }

.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }

/* ═══ SCROLL PROGRESS ═══ */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-sage), var(--color-terracotta));
  z-index: 1001;
  width: 0%;
}

/* ═══ NAVBAR ═══ */
#main-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--nav-height);
  display: flex; align-items: center;
  transition: background 0.5s ease, box-shadow 0.5s ease;
  background: transparent;
}
#main-header.scrolled {
  background: rgba(255,252,248,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border);
}
#main-header .container { display: flex; align-items: center; justify-content: space-between; }

.logo a {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--color-white);
  letter-spacing: -0.01em;
  transition: color 0.4s ease;
}
#main-header.scrolled .logo a { color: var(--color-forest); }
.logo a span { color: var(--color-terracotta); }

#top-menu { list-style: none; display: flex; gap: 32px; align-items: center; }
#top-menu a {
  font-size: 12.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.8);
  transition: color 0.3s ease; position: relative; padding-bottom: 4px;
}
#top-menu a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--color-terracotta);
  transition: width 0.4s ease;
}
#top-menu a:hover { color: var(--color-white); }
#top-menu a:hover::after { width: 100%; }
#main-header.scrolled #top-menu a { color: var(--color-muted); }
#main-header.scrolled #top-menu a:hover { color: var(--color-forest); }

.mobile_menu_bar { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.mobile_menu_bar span {
  display: block; width: 22px; height: 2px;
  background: var(--color-white); border-radius: 2px;
  transition: 0.3s ease;
}
#main-header.scrolled .mobile_menu_bar span { background: var(--color-forest); }

#mobile-nav {
  display: none; position: fixed; top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(255,252,248,0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(42,59,50,0.12);
  z-index: 999; padding: 16px 0;
}
#mobile-nav.open { display: block; }
#mobile-nav ul { list-style: none; }
#mobile-nav ul li a {
  display: block; padding: 14px 28px;
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-forest);
  border-bottom: 1px solid var(--color-border);
}

/* ═══ HERO ═══ */
#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#home .hero-bg {
  position: absolute; inset: -8px;
  background-size: cover; background-position: center;
}
#home .hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,59,50,0.2) 0%, rgba(42,59,50,0.55) 50%, rgba(42,59,50,0.8) 100%);
}
#home .hero-content {
  position: relative; z-index: 2;
  text-align: center; max-width: 820px;
  padding: 120px 20px 60px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  background: rgba(255,252,248,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,252,248,0.2);
  border-radius: 50px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  color: rgba(255,252,248,0.85);
  margin-bottom: 32px;
}
.hero-badge svg { width: 14px; height: 14px; }

.hero-title-wrap h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 500; color: var(--color-white);
  line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-line-1, .hero-line-2 {
  display: block;
  overflow: hidden;
}
.hero-line-1 span, .hero-line-2 span {
  display: block;
  transform: translateY(100%);
  animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-line-1 span { animation-delay: 0.2s; }
.hero-line-2 span { animation-delay: 0.4s; }
@keyframes slideUp { to { transform: translateY(0); } }
.hero-line-1 em, .hero-line-2 em {
  font-style: italic; font-weight: 300;
  color: var(--color-terracotta-soft);
  display: inline-block;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300; color: rgba(255,252,248,0.75);
  margin-bottom: 40px; line-height: 1.6;
}
.hero-sub strong { font-weight: 500; color: rgba(255,252,248,0.95); }

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn svg { width: 16px; height: 16px; }
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,252,248,0.35);
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border: none; border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; cursor: pointer;
  transition: all 0.3s ease;
}
.btn-primary { background: var(--color-terracotta); color: var(--color-white); }
.btn-primary:hover { background: var(--color-terracotta-soft); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(198,107,77,0.3); }
.btn-secondary { background: transparent; color: var(--color-white); border: 1.5px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { border-color: var(--color-white); background: rgba(255,255,255,0.1); transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--color-sage-dark); border: 1.5px solid var(--color-sage); }
.btn-outline:hover { background: var(--color-sage); color: var(--color-white); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(107,143,113,0.25); }

/* ═══ SECTIONS ═══ */
section { position: relative; }
.section-pad { padding: 100px 0; }

.section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--color-sage); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500; color: var(--color-forest);
  line-height: 1.15; margin-bottom: 16px;
}
.section-title em { font-style: italic; color: var(--color-terracotta); }

/* ═══ QUOTE ═══ */
.section-quote {
  background: var(--color-cream);
  text-align: center; padding: 80px 0;
}
.section-quote blockquote { max-width: 780px; margin: 0 auto; }
.section-quote blockquote .quote-mark {
  font-size: 4rem; font-family: var(--font-display);
  color: var(--color-sage-light); line-height: 0.5; opacity: 0.3;
  margin-bottom: 12px; display: block;
}
.section-quote blockquote h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 350; font-style: italic;
  color: var(--color-forest-light); line-height: 1.65;
}

.leaf-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin: 40px auto 0; opacity: 0.4;
}
.leaf-divider .line { width: 60px; height: 1px; background: var(--color-muted); }
.leaf-divider svg { width: 20px; height: 20px; color: var(--color-sage); flex-shrink: 0; }

/* ═══ APPROCCIO ═══ */
#approccio { background: var(--color-white); overflow: hidden; }
#approccio .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center;
}
.approccio-visual { position: relative; display: flex; justify-content: center; }
.approccio-visual .frame {
  position: relative; width: 100%; max-width: 440px;
  aspect-ratio: 5/6; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 24px 80px rgba(42,59,50,0.12);
}
.approccio-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
.approccio-visual .frame::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(42,59,50,0.08) 100%);
}
.approccio-text h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin-bottom: 24px; }
.approccio-text p { color: var(--color-muted); margin-bottom: 18px; font-size: 15px; }
.approccio-text .highlight {
  font-size: 1rem; color: var(--color-text); font-weight: 500;
  border-left: 3px solid var(--color-terracotta);
  padding-left: 20px; margin: 28px 0;
}

/* ═══ SERVIZI ═══ */
#servizi { background: var(--color-cream); }
.servizi-header { text-align: center; margin-bottom: 56px; }
.servizi-header p { color: var(--color-muted); max-width: 560px; margin: 0 auto; font-size: 15px; }

.servizi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.servizio-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  border: 1px solid var(--color-border);
}
.servizio-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(42,59,50,0.08); border-color: var(--color-sage-light); }
.servizio-card-icon { width: 40px; height: 40px; margin-bottom: 18px; color: var(--color-sage); }
.servizio-card h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; color: var(--color-forest); }
.servizio-card .servizio-card-testo {
  font-size: 13.5px; color: var(--color-muted); line-height: 1.7;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0; margin-top: 0;
}
.servizio-card.aperta .servizio-card-testo { max-height: 280px; opacity: 1; margin-top: 12px; }
.servizio-card-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-sage);
  margin-top: 16px; transition: color 0.2s; cursor: pointer;
}
.servizio-card:hover .servizio-card-toggle { color: var(--color-terracotta); }
.servizio-card-toggle-arrow { display: inline-block; transition: transform 0.3s ease; font-size: 10px; }
.servizio-card.aperta .servizio-card-toggle-arrow { transform: rotate(180deg); }

/* ═══ ABOUT ═══ */
#about { background: var(--color-white); }
#about .container {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; align-items: start;
}
.about-text p { color: var(--color-muted); margin-bottom: 16px; font-size: 14.5px; text-align: justify; }
.about-image { position: sticky; top: calc(var(--nav-height) + 40px); }
.about-image .frame {
  width: 100%; max-width: 380px; margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: 0 24px 80px rgba(42,59,50,0.1);
}
.about-image .frame img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center 20%; }

/* ═══ CONTATTI ═══ */
#contatti { background: var(--color-cream-alt); }
#contatti .container {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: start;
}
.contatti-form-area .form-intro { color: var(--color-muted); font-size: 14.5px; margin-bottom: 32px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-sage-dark);
}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 18px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px;
  color: var(--color-text); background: var(--color-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(107,143,113,0.12);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button {
  align-self: flex-start; padding: 16px 40px;
  background: var(--color-sage); color: var(--color-white); border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; cursor: pointer;
  transition: all 0.3s ease;
}
.contact-form button:hover { background: var(--color-sage-dark); transform: translateY(-2px); }
#form-result { display: none; padding: 16px 20px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; }

.contatti-info { padding-top: 12px; }
.contatti-info .info-item { display: flex; gap: 16px; margin-bottom: 28px; }
.contatti-info .info-item svg { width: 18px; height: 18px; color: var(--color-sage); flex-shrink: 0; margin-top: 3px; }
.contatti-info .info-item h4 { font-size: 14px; font-weight: 600; color: var(--color-forest); margin-bottom: 4px; font-family: var(--font-body); }
.contatti-info .info-item p, .contatti-info .info-item a { font-size: 14px; color: var(--color-muted); }
.contatti-info .info-item a { color: var(--color-terracotta); text-decoration: underline; text-underline-offset: 2px; }

/* ═══ FOOTER ═══ */
#main-footer { background: var(--color-forest); color: rgba(255,252,248,0.5); }
#footer-main { padding: 60px 0 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
#footer-main .container { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--color-white); margin-bottom: 8px; }
.footer-brand h3 span { color: var(--color-terracotta-soft); }
.footer-brand p { font-size: 13px; line-height: 1.6; }
.footer-links h4 { font-family: var(--font-body); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,252,248,0.4); margin-bottom: 16px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,252,248,0.55); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--color-white); }
#footer-bottom { padding: 24px 0; }
#footer-bottom .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
#footer-info { font-size: 12px; }

/* ═══ SLIDING REVEAL (no fade) ═══ */
.slide {
  transform: translateY(24px);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide.visible { transform: translateY(0); }
.slide-delay-1 { transition-delay: 0.1s; }
.slide-delay-2 { transition-delay: 0.2s; }
.slide-delay-3 { transition-delay: 0.3s; }

@media (max-width: 960px) {
  #home .container,
  #approccio .container,
  #about .container,
  #contatti .container { grid-template-columns: 1fr; }
  #home .container { display: flex; flex-direction: column; text-align: center; }
  #approccio .container { gap: 40px; }
  #about .container { gap: 40px; }
  #contatti .container { gap: 48px; }
  .approccio-visual .frame { max-width: 100%; }
  .about-image { position: static; }
  .about-image .frame { max-width: 300px; }
  .servizi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  #top-menu { display: none; }
  .mobile_menu_bar { display: flex; }
  .section-pad { padding: 70px 0; }
  .btn { padding: 14px 28px; }
  .hero-actions { justify-content: center; }
  .servizi-grid { grid-template-columns: 1fr; }
  #footer-main .container { flex-direction: column; gap: 32px; }
  #footer-bottom .container { flex-direction: column; text-align: center; }
}
