/* ==========================================================================
   ALIANI + SILEO ARCHITETTI — DESIGN SYSTEM
   Palette: #FFFFFF / #F7F6F4 | #2B2D31 | #9C7748 | #E2CDA9 | #E4E0DB
   Tipografia: Montserrat 200, 300, 400, 500
   ========================================================================== */

:root {
  --bg-primary: #FFFFFF;
  --bg-warm: #F7F6F4;
  --text-main: #2B2D31;
  --text-muted: #6E6F73;
  --accent: #9C7748;
  --accent-light: #E2CDA9;
  --border-light: #E4E0DB;
  --border-dark: #2B2D31;
  --bg-hover: #FAF9F7;
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1360px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus-visible {
  color: var(--accent);
}

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

button {
  font-family: inherit;
}

/* Tipografia */
h1, h2, h3, h4 {
  font-weight: 200;
  color: var(--text-main);
  margin-top: 0;
  line-height: 1.2;
}

.label-overline {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
  display: block;
}

.text-muted {
  color: var(--text-muted);
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-primary);
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 58px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 400;
}

.site-nav a {
  padding: 10px 0;
  position: relative;
}

.site-nav a.active {
  color: var(--accent);
  font-weight: 500;
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent);
}

/* Footer */
.site-footer {
  margin-top: 140px;
  border-top: 1px solid var(--border-light);
  padding: 64px 24px 48px;
  background: var(--bg-primary);
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
}

.footer-brand {
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* Animazioni Reveal con IntersectionObserver */
.rv {
  transition: opacity 1.1s ease, transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.armed .rv {
  opacity: 0;
  transform: translateY(40px);
}

.armed .rv.in {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  .rv, .armed .rv, .armed .rv.in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Modalità Screenshot: visibilità garantita di tutti gli elementi e immagini */
.screenshot-mode .rv,
.screenshot-mode.armed .rv,
.screenshot-mode.armed .rv.in,
body.screenshot-mode .rv,
body.screenshot-mode.armed .rv,
body.screenshot-mode.armed .rv.in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

body.screenshot-mode .map-pin {
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: none !important;
}

/* Zoom foto card */
.zoom {
  overflow: hidden;
  display: block;
}

.zoom img {
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  width: 100%;
}

.zoom:hover img {
  transform: scale(1.04);
}

/* Riquadro neutro per foto mancanti */
.placeholder-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-warm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Ottimizzazione mobile (fino a 360px) */
@media (max-width: 640px) {
  .site-header {
    padding: 16px;
    gap: 12px;
    align-items: center;
  }
  .site-logo img {
    height: 50px;
  }
  .site-nav {
    gap: 10px 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }
  .container {
    padding: 0 16px;
  }
  .site-footer {
    margin-top: 80px;
    padding: 40px 16px 32px;
  }
}
