:root {
  --bg: #f5f1ea;
  --surface: #fbf8f3;
  --surface-2: #efe8dc;
  --text: #1f1a17;
  --muted: #665c55;
  --line: rgba(31, 26, 23, 0.1);
  --accent: #8b6b43;
  --accent-dark: #6d522f;
  --white: #ffffff;
  --dark: #171310;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  --radius-lg: 26px;
  --radius-md: 18px;
  --container: 1240px;
  --transition: 240ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 14ch;
}

p {
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.86);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(245, 241, 234, 0.84);
  border-bottom: 1px solid rgba(31, 26, 23, 0.06);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  background-image: url("assets/img/logomuseyoum.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.brand-tag,
.footer-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  position: relative;
  font-size: 0.96rem;
  color: var(--muted);
  transition: color var(--transition);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
}

.lang-btn {
  min-width: 44px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  transition: background var(--transition), color var(--transition);
}

.lang-btn.is-active {
  background: var(--text);
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.projects-hero {
  padding: 56px 0 90px;
}

.projects-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.projects-hero-copy,
.projects-hero-media {
  min-height: 690px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.projects-hero-copy {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.9), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.75)),
    var(--surface);
  padding: clamp(34px, 4vw, 56px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-hero-copy .lead {
  margin-top: 1.2rem;
  font-size: 1.08rem;
  max-width: 58ch;
}

.hero-stats {
  display: grid;
  gap: 16px;
  margin-top: 2.2rem;
}

.hero-stat {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(31,26,23,0.06);
  border-radius: var(--radius-md);
  padding: 18px;
}

.hero-stat strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.projects-hero-media {
  position: relative;
  box-shadow: var(--shadow);
  background: #2e251d;
}

.hero-image-card {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.42)),
    url("assets/img/progetti-hero.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-overlay-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px;
  color: var(--white);
}

.hero-tag {
  display: inline-flex;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-overlay-content h2 {
  color: var(--white);
  max-width: 12ch;
}

.section {
  padding: 100px 0;
}

.selected-section {
  background: rgba(255,255,255,0.38);
}

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 42px;
}

.section-head p {
  max-width: 58ch;
  justify-self: end;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.featured-card {
  position: relative;
  min-height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: end;
  color: var(--white);
  background-color: #2d241d;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.56)),
    linear-gradient(135deg, rgba(255,255,255,0.03), transparent 40%);
}

.featured-content {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.featured-content h3 {
  color: var(--white);
  margin-bottom: 0.85rem;
}

.featured-content p {
  color: rgba(255,255,255,0.82);
  margin-bottom: 1rem;
}

.project-category {
  display: inline-flex;
  margin-bottom: 0.8rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.86);
}

.project-link,
.archive-link {
  display: inline-flex;
  font-weight: 700;
  color: var(--black);
}

.featured-vittorio {
  grid-column: span 7;
  min-height: 460px;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.52)),
    url("assets/img/vittorio-cini-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.featured-fasti {
  grid-column: span 5;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.50)),
    url("assets/img/fasti-veneziani-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.featured-marco {
  grid-column: span 4;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.50)),
    url("assets/img/marcopolo.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.featured-sanmarco {
  grid-column: span 4;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.50)),
    url("assets/img/san-marco-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.featured-rotary {
  grid-column: span 4;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.50)),
    url("assets/img/rotary-card.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.filters-section {
  background: var(--bg);
}

.filters-bar {
  display: grid;
  gap: 24px;
  margin-bottom: 34px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.filter-group {
  display: grid;
  gap: 12px;
}

.filter-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  color: var(--text);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn.is-active {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.archive-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.archive-card:hover {
  transform: translateY(-2px);
}

.archive-card[hidden] {
  display: none !important;
}

.archive-card-body {
  padding: 24px;
}

.archive-year {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.archive-type {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.archive-card h3 {
  margin-bottom: 0.9rem;
}

.archive-card p {
  margin-bottom: 1rem;
}

.archive-note {
  display: inline-flex;
  font-size: 0.9rem;
  color: var(--muted);
}

.no-results {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.cross-links {
  padding-top: 50px;
  padding-bottom: 50px;
}

.bridge-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.62));
  border: 1px solid rgba(31, 26, 23, 0.08);
  box-shadow: var(--shadow);
}

.bridge-copy h2 {
  margin-bottom: 1rem;
  max-width: 14ch;
}

.bridge-copy p {
  max-width: 62ch;
}

.bridge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.cta-section {
  padding: 0 0 110px;
}

.cta-shell {
  background: var(--dark);
  color: var(--white);
  border-radius: 32px;
  overflow: hidden;
  padding: clamp(36px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  box-shadow: var(--shadow);
}

.cta-shell h2 {
  color: var(--white);
  max-width: 12ch;
}

.cta-shell p {
  color: rgba(255,255,255,0.76);
  max-width: 58ch;
  margin-top: 1rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--white);
  color: var(--text);
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: var(--white);
}

.btn-secondary-dark {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-secondary-dark:hover {
  background: rgba(255,255,255,0.55);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .projects-hero-grid,
  .section-head,
  .cta-shell {
    grid-template-columns: 1fr;
  }

  .projects-hero-copy,
  .projects-hero-media {
    min-height: 560px;
  }

  .section-head p {
    justify-self: start;
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-vittorio,
  .featured-fasti,
  .featured-marco,
  .featured-sanmarco,
  .featured-rotary {
    grid-column: auto;
    min-height: 340px;
  }
}

@media (max-width: 980px) {
  .bridge-shell {
    grid-template-columns: 1fr;
  }

  .bridge-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: 82px;
    left: 20px;
    right: 20px;
    background: rgba(251, 248, 243, 0.98);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .section,
  .projects-hero {
    padding: 74px 0;
  }

  .cta-section {
    padding-bottom: 74px;
  }

  .filters-bar,
  .archive-card-body,
  .bridge-shell,
  .cta-shell {
    padding-left: 22px;
    padding-right: 22px;
  }

  .projects-hero-copy,
  .projects-hero-media {
    min-height: auto;
  }
}