/* ============================================
   RESET & VARIABILI
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #faf7f2;
  --color-text: #2b2420;
  --color-muted: #8a7f72;
  --color-border: #e8e1d6;
  --color-accent: #b5652f;
  --color-overlay: rgba(40, 25, 15, 0.4);
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-width: 1180px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-weight: 300;
}

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

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

ul {
  list-style: none;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ============================================
   HEADER / NAVIGAZIONE
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.logo span {
  font-weight: 700;
}

.main-nav {
  display: flex;
  gap: 40px;
}

.main-nav a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-text);
  border-color: var(--color-accent);
}

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

.nav-toggle span {
  width: 24px;
  height: 1px;
  background: var(--color-text);
}

/* ============================================
   HERO (Home)
   ============================================ */
.hero {
  position: relative;
  height: 82vh;
  min-height: 480px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-overlay), transparent 55%);
}

.hero-caption {
  position: absolute;
  left: 0;
  bottom: 48px;
  width: 100%;
  padding: 0 32px;
  color: #fff;
  text-align: center;
}

.hero-caption h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 8px;
}

.hero-caption p {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ============================================
   SEZIONI GENERICHE
   ============================================ */
.section {
  padding: 96px 0;
}

.section-narrow {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.section-intro p {
  color: var(--color-muted);
  font-size: 1.05rem;
}

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

.section-header .kicker {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* ============================================
   GRIGLIA CATEGORIE (Home)
   ============================================ */
.categorie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.categoria-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.categoria-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.categoria-card:hover img {
  transform: scale(1.06);
}

.categoria-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 60%);
}

.categoria-card span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  z-index: 1;
}

/* ============================================
   GALLERIA (pagina Gallerie)
   ============================================ */
.filtri {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filtro-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  cursor: pointer;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filtro-btn:hover,
.filtro-btn.active {
  color: var(--color-text);
  border-color: var(--color-accent);
}

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

.galleria-item {
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f4f2ef;
}

.galleria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.galleria-item:hover img {
  transform: scale(1.04);
}

.galleria-item.nascosto {
  display: none;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}

.lightbox.aperta {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-chiudi,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  font-family: var(--font-body);
  line-height: 1;
  padding: 12px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-chiudi:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-chiudi {
  top: 24px;
  right: 24px;
  font-size: 1.6rem;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* ============================================
   BIO
   ============================================ */
.bio-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
}

.bio-foto img {
  width: 100%;
}

.bio-testo h1 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.bio-testo p {
  margin-bottom: 18px;
  color: var(--color-muted);
}

.bio-liste {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.bio-liste h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.bio-liste li {
  color: var(--color-muted);
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

/* ============================================
   CONTATTI
   ============================================ */
.contatti-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.contatti-email {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin: 24px 0 32px;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 4px;
  color: var(--color-accent);
}

.contatti-info {
  color: var(--color-muted);
  margin-bottom: 8px;
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.social-list a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}

.social-list a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .bio-layout {
    grid-template-columns: 1fr;
  }

  .categorie-grid,
  .galleria-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .main-nav {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.aperto {
    max-height: 320px;
  }

  .main-nav a {
    padding: 16px 32px;
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 64px 0;
  }

  .categorie-grid,
  .galleria-grid {
    grid-template-columns: 1fr;
  }

  .bio-liste {
    grid-template-columns: 1fr;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 1.4rem;
  }
}
