/* ===== Variables – Professional theme ===== */
:root {
  --color-bg: #fafaf9;
  --color-bg-alt: #f5f5f4;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-accent: #b45309;
  --color-accent-light: #fef3c7;
  --color-border: #e7e5e4;
  --color-overlay: rgba(28, 25, 23, 0.75);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space: 1.25rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;
  --container: min(92vw, 1120px);
  --container-narrow: min(92vw, 720px);
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
}

/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
}
.container--narrow { max-width: var(--container-narrow); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}
.logo:hover { color: var(--color-accent); text-decoration: none; }
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--color-accent); text-decoration: none; }
.nav a.active { color: var(--color-accent); }
.nav-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  color: var(--color-text);
}
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.nav-toggle::before { top: 0.5rem; }
.nav-toggle::after { bottom: 0.5rem; }
.nav-toggle[aria-expanded="true"]::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"]::after {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* ===== Hero (home) ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-text) url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920') center/cover no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-overlay) 0%, rgba(28,25,23,0.5) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: var(--space-xl) var(--space);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  margin: 0 0 var(--space);
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.hero-tagline {
  font-size: 1.15rem;
  opacity: 0.95;
  margin: 0 0 var(--space);
  font-weight: 500;
}
.hero-intro {
  font-size: 1.05rem;
  opacity: 0.9;
  margin: 0 0 var(--space-lg);
  line-height: 1.7;
}
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: #924208;
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: #fff;
}

/* ===== Page hero (internal pages) ===== */
.page-hero {
  background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  text-align: center;
}
.page-hero .section-title { color: #fff; margin-bottom: var(--space); }
.page-hero .section-intro { color: rgba(255,255,255,0.85); margin: 0 auto; }

/* ===== Sections ===== */
.section {
  padding: var(--space-2xl) 0;
}
.section--alt { background: var(--color-bg-alt); }
.section--compact { padding: var(--space-xl) 0; }
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 var(--space);
  color: var(--color-text);
}
.section-intro {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 56ch;
  font-size: 1.05rem;
}
.section-note {
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.section-note a { color: var(--color-accent); }

/* ===== Stats / highlights ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-lg);
  text-align: center;
  margin: var(--space-xl) 0;
}
.stat-item { padding: var(--space); }
.stat-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 var(--space-xs);
  line-height: 1.2;
}
.stat-label { font-size: 0.9rem; color: var(--color-text-muted); margin: 0; }

/* ===== Cards grid ===== */
.cards {
  display: grid;
  gap: var(--space-lg);
}
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 900px) {
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-image {
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  object-fit: cover;
  width: 100%;
}
.card-body { padding: var(--space-lg); }
.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 var(--space);
  color: var(--color-text);
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--color-accent); text-decoration: none; }
.card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.6; }
.card--compact .card-body { padding: var(--space); }
.card--compact .card-title { font-size: 1.1rem; }

/* ===== Bio / About ===== */
.bio-grid {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}
@media (min-width: 800px) {
  .bio-grid { grid-template-columns: 1fr 320px; }
}
.bio-content .lead { font-size: 1.15rem; color: var(--color-text); line-height: 1.7; }
.bio-content p { margin: 0 0 var(--space); }
.bio-content strong { color: var(--color-accent); }
.bio-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-alt);
}
.bio-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-unstyled li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.list-unstyled li:last-child { border-bottom: none; }
.list-unstyled strong { color: var(--color-text); margin-right: 0.5rem; }

/* ===== Services detail (with image) ===== */
.service-block {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: center;
}
.service-block:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .service-block { grid-template-columns: 1fr 1fr; }
  .service-block:nth-child(even) .service-block-image { order: 2; }
  .service-block:nth-child(even) .service-block-content { order: 1; }
}
.service-block-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-alt);
}
.service-block-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.service-block-content h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 var(--space);
  color: var(--color-text);
}
.service-block-content p { margin: 0 0 var(--space); color: var(--color-text-muted); }
.service-block-content ul { margin: 0 0 var(--space); padding-left: 1.25rem; color: var(--color-text-muted); }

/* ===== Clienti list ===== */
.clienti-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52ch;
}
.clienti-list li {
  padding: 0.6rem 0 0.6rem 1.75rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 1.02rem;
}
.clienti-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Key facts (SEO / IA) */
.keyfacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}
.keyfacts-list li { padding: 0.25rem 0; }
.keyfacts-list strong { color: var(--color-text); }
.keyfacts-list a { color: var(--color-accent); }

/* ===== Contacts ===== */
.contacts-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--space-xl);
}
.contact-block {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contact-block h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-block p { margin: 0; color: var(--color-text); }
.contact-block a { color: var(--color-text); }
.contact-block a:hover { color: var(--color-accent); }
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-alt);
  aspect-ratio: 21/9;
  max-height: 360px;
}
.map-wrap img { width: 100%; height: 100%; object-fit: cover; }
.map-wrap--embed { aspect-ratio: 21/9; height: 320px; max-height: none; }
.map-wrap--embed iframe { width: 100%; height: 100%; border: 0; }

/* ===== Timeline (chi sono) ===== */
.timeline { margin: var(--space-lg) 0; }
.timeline-item {
  display: grid;
  gap: var(--space);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.timeline-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
@media (min-width: 600px) {
  .timeline-item { grid-template-columns: 140px 1fr; }
}
.timeline-year {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 1rem;
}
.timeline-content h4 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.timeline-content p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

/* ===== CTA block ===== */
.cta-block {
  text-align: center;
  padding: var(--space-2xl) var(--space);
  background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}
.cta-block .section-title { color: #fff; }
.cta-block .section-intro { color: rgba(255,255,255,0.85); margin-left: auto; margin-right: auto; }
.cta-block .btn { margin-top: var(--space); }

/* ===== Footer ===== */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: var(--space-2xl);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space);
}
.footer-nav { display: flex; gap: var(--space-lg); flex-wrap: wrap; }
.footer-nav a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--color-accent); text-decoration: none; }
.footer-text { margin: 0; font-size: 0.875rem; color: var(--color-text-muted); }

/* ===== Mobile nav ===== */
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: 4.25rem;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .hero { min-height: 75vh; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space); }
}
