:root {
  --bg: #f7f4ef;
  --white: #ffffff;
  --text: #1e1e1e;
  --muted: #666666;
  --line: rgba(255, 255, 255, 0.18);
  --line-dark: rgba(0, 0, 0, 0.08);
  --accent: #b89b72;
  --accent-dark: #9a7d57;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --container: 1200px;
  --header-h: 88px;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--white);
  overflow: hidden;
  background: #111;
}

.hero-slides,
.hero-slide,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.2s ease, transform 6s ease;
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Resolve image URLs relative to assets/css, including file:// and subfolder previews. */
.hero-slide--piazza {
  background-image: var(--image-piazza-della-vergogna);
}

.hero-slide--cattedrale {
  background-image: var(--image-cattedrale-2);
}

.hero-slide--teatro {
  background-image: var(--image-teatro-massimo);
}

.hero-slide--quattro-canti {
  background-image: var(--image-quattro-canti);
}

.hero-overlay {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.48)),
    linear-gradient(to right, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.10));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

.hero h1 {
  margin: 0 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 640px;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 30px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.slider-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.slider-dot.active {
  background: var(--white);
  transform: scale(1.05);
}

.section {
  padding: 100px 0;
}

.section-light {
  background: var(--white);
}

.section-beige {
  background: #f3ede4;
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-heading .mini {
  display: inline-block;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.section-heading h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.03rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 46px;
  align-items: center;
}

.intro-text p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 1rem;
}

.intro-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 28px;
}

.intro-point {
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--white);
  box-shadow: var(--shadow);
}

.intro-point strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.intro-point span {
  color: var(--muted);
  font-size: 0.95rem;
}

.intro-image {
  position: relative;
  overflow: hidden;
  width: min(100%, 420px, calc((100svh - var(--header-h) - 48px) * 0.75));
  aspect-ratio: 3 / 4;
  min-height: 0;
  justify-self: center;
  box-shadow: var(--shadow);
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 400px, calc((100svh - var(--header-h) - 48px) * 0.75));
  aspect-ratio: 3 / 4;
  min-height: 0;
  justify-self: center;
  box-shadow: var(--shadow);
  background: #ddd;
}

.gallery-card.tall {
  min-height: 0;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  color: var(--white);
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.gallery-caption strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
}

.gallery-caption span {
  font-size: 0.92rem;
  opacity: 0.95;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.04));
  z-index: 1;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.highlight-card {
  background: var(--white);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.highlight-card h3 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
  font-weight: 600;
}

.highlight-card p {
  margin: 0;
  color: var(--muted);
}

.contact-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.contact-box h2 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 600;
}

.contact-box p {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 640px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-link {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.contact-link:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {

  .intro-grid,
  .footer-grid,
  .highlights {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    gap: 32px;
  }
}

@media (max-width: 920px) {
  .nav-wrap {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .nav-wrap.open {
    display: flex;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }

  .nav a,
  .header-phone,
  .menu-toggle,
  .site-header:not(.scrolled) .nav a,
  .site-header:not(.scrolled) .header-phone {
    color: var(--text);
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-cta {
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .menu-toggle {
    display: inline-flex;
    color: var(--white);
  }

  .site-header.scrolled .menu-toggle {
    color: var(--text);
  }

  .header-phone {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 78px;
  }

  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .brand-subtitle {
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 12vw, 4.1rem);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
  }

  .btn {
    width: 100%;
  }

  .intro-points {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading {
    margin-bottom: 34px;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
