:root {
  color-scheme: light;
  font-family: "Inter", system-ui, sans-serif;
  background: #f7f5f0;
  color: #222;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1f2937;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 104px;
  height: auto;
  flex: 0 0 auto;
  border: 2px solid #078aa6;
  background: #fff;
}

.brand span {
  white-space: nowrap;
}

nav a {
  margin-left: 1.5rem;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover {
  color: #111827;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(17, 24, 39, 0.52), rgba(17, 24, 39, 0.52)),
    url("assets/foto/castello.jpg") center / cover no-repeat;
  color: white;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-logo {
  width: min(420px, 88vw);
  margin: 0 auto 2rem;
  border: 4px solid #078aa6;
  background: #fff;
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.22);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 1rem;
}

.hero p {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
}

.button {
  display: inline-flex;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  background: #111827;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.text-link {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: #115e59;
  text-decoration: underline;
}

.section-photo {
  width: min(720px, 100%);
  margin: 2rem 0 0;
  border-radius: 0.5rem;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 2rem;
  align-items: start;
}

.side-photo {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

.section-light,
.section-dark {
  padding: 4rem 0;
}

.section-light {
  background: #fff;
}

.section-dark {
  background: #111827;
  color: white;
}

.section-dark h2,
.section-dark p,
.section-dark .card {
  color: white;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

p {
  margin: 0 0 1rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  padding: 1.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card h3 {
  margin-top: 0;
}

.page-intro {
  max-width: 760px;
  margin-bottom: 2rem;
}

.page-intro h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.event-card {
  overflow: hidden;
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

.event-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f3f4f6;
}

.event-card--document {
  grid-column: 1 / -1;
}

.event-document-pages {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: #f3f4f6;
}

.event-card--document .event-document-pages img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

.event-card-content {
  padding: 1rem;
}

.event-card-content h2 {
  margin: 0;
  font-size: 1.35rem;
}

.event-number {
  margin: 0 0 0.25rem;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: #f9fafb;
  border: 1px solid rgba(34, 34, 34, 0.12);
  padding: 1.75rem;
  border-radius: 1rem;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  color: #111827;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6b7280;
}

.contact-form button {
  border: none;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  background: #f59e0b;
  color: #111827;
  cursor: pointer;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
}

.site-footer {
  padding: 1.5rem 0;
  background: #f3f4f6;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #374151;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: center;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
  }

  nav a {
    margin-left: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand {
    flex-direction: column;
    gap: 0.35rem;
    font-size: 1rem;
  }

  .brand img {
    width: 132px;
  }

  .hero {
    min-height: 72vh;
  }
}
