 :root {
    --brown:       #5C3D1E;
    --brown-mid:   #8B5E3C;
    --gold:        #A07830;
    --gold-light:  #C49A4A;
    --cream:       #F9F3E8;
    --sand:        #EDE5D4;
    --stone:       #E8E2D8;
    --stone-mid:   #B0A898;
    --ink:         #1C1814;
    --ink-soft:    #3D3530;
    --text-muted:  #7A6F64;
    --white:       #FFFFFF;
    --border:      rgba(92,61,30,0.12);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--ink);
    overflow-x: hidden;
  }


  .btn-primary {
    display: inline-block;
    background-color: var(--sand);
    color: var(--ink);
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    margin: 20px 0;
  }

  /* ───── NAV ───── */
  nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 0 3.5rem;
    background-color: #fff;
  }

nav .grid {
  position: relative;
  margin: 0 auto;
  max-width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

  nav.over-hero {
    background: #fff;
  }
  nav.scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: 0 1px 0 var(--border);

  }
  nav.scrolled .nav-link { color: var(--ink); }
  nav.scrolled .nav-link:hover { color: var(--gold); }
  nav.scrolled .lang-btn { color: var(--text-muted); }
  nav.scrolled .lang-btn.active { color: var(--brown); }

  .nav-logo img {
    height: 56px;
  }

  .nav-center {
    display: flex;
    gap: 2.8rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav-link {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brown);
    text-decoration: none;
    transition: color 0.2s;
  }
  .nav-link:hover { color: var(--gold-light); }

  .lang-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .lang-btn {
    background: none; border: none; cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.2s;
    padding: 0;
  }
  .lang-btn.active { color: rgba(255,255,255,0.95); font-weight: 500; }
  .lang-sep { color: rgba(255,255,255,0.25); font-size: 0.6rem; }
  nav.scrolled .lang-sep { color: var(--stone-mid); }

  /* ───── HERO ───── */
  #hero {
    position: relative;
    height: 100vh;
    min-height: 620px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
  }
  .hero-media {
    position: absolute;
    inset: 0;
  }


  .hero-media .hero-video {
  position: absolute;
  inset: 0;
  z-index: 6;
}
.hero-media .hero-video.nascosto {
  z-index: 0;
}

/* Proporzioni 16/9 con iframe che copre tutto */
.hero-media .hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw; /* 16/9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16/9 inverso */
  filter: saturate(108%) contrast(103%);
}


  .hero-media .hero-img {
    position: absolute;
    inset: 0;
  }
  .hero-media .hero-img img{
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: saturate(108%) contrast(103%);
  }


  .hero-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(28,24,20,0.22) 0%,
      rgba(28,24,20,0.0) 35%,
      rgba(28,24,20,0.5) 72%,
      rgba(28,24,20,0.88) 100%
    );
    z-index: 1;
  }
  .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem 5.5rem;
    max-width: 780px;
    animation: riseIn 1.2s cubic-bezier(0.22,1,0.36,1) both;
    animation-delay: 0.2s;
  }
  .hero-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 1.4rem;
  }
  .hero-h1 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(3.6rem, 8vw, 7rem);
    line-height: 0.95;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 1.6rem;
  }
  .hero-h1 em {
    font-style: italic;
    color: rgba(255,255,255,0.78);
  }
  .hero-rule {
    width: 40px;
    height: 1px;
    background: var(--gold-light);
    margin: 0 auto 1.5rem;
    opacity: 0.7;
  }
  .hero-sub {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 3rem;
  }


.play-video {    display: inline-block;
    background-color: var(--gold-light);
    color: var(--ink);
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    margin: 20px 0;
    cursor: pointer;
}

.play-video.hero-video.nascosto {
  opacity: 0;
}


  .scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.45);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    animation: nudge 2.4s ease-in-out infinite;
    animation-delay: 2s;
  }
  .scroll-hint svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; }

  /* ───── SECTION BASE ───── */
  .sec { padding: 7rem 2rem; }
  .sec-inner { max-width: 1120px; margin: 0 auto; }
  .sec-white  { background: var(--white); }
  .sec-cream  { background: var(--cream); }
  .sec-sand   { background: var(--sand); }
  .sec-stone  { background: var(--stone); }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.4rem;
  }
  .eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px; height: 1px;
    background: var(--gold);
    opacity: 0.6;
  }

  h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  h2 em { font-style: italic; color: var(--brown-mid); }

  .body-text {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.82;
    color: var(--text-muted);
    max-width: 58ch;
  }
  .body-text strong { color: var(--ink-soft); font-weight: 500; }

  /* ───── ABOUT ───── */
  .about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 580px;
  }

  
  .about-text-col {
    padding: 5rem 5rem 5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    max-width:none; padding-left: calc((100vw - 1120px)/2 + 2rem); padding-right: 5rem; padding-top: 6rem; padding-bottom: 6rem;
  }
  .about-img-col {
    position: relative;
    overflow: hidden;
  }
  .about-img-col img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: saturate(108%) contrast(103%);
  }
  .about-img-col::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 4px 0 24px rgba(28,24,20,0.07);
  }
  .stats-row {
    display: flex;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }
  .stat-n {
    font-family: 'DM Serif Display', serif;
    font-size: 2.4rem;
    color: var(--brown);
    line-height: 1;
  }
  .stat-l {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--stone-mid);
    margin-top: 0.3rem;
  }

  /* ───── EVENTS ───── */
  .events-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 3.5rem;
    gap: 2rem;
    flex-wrap: wrap;
  }
  .events-grid {
    display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    border: 1px solid var(--border);
  }
  .ev-card {
    background: var(--white);
    padding: 2.4rem 2.2rem;
    transition: background 0.25s;
    cursor: default;
  }
  .ev-card:hover { background: var(--cream); }
  .ev-day {
    font-family: 'DM Serif Display', serif;
    font-size: 3.2rem;
    line-height: 1;
    color: var(--brown);
    opacity: 0.22;
    margin-bottom: 0.2rem;
  }
  .ev-month {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.2rem;
  }
  .ev-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.45rem;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }
  .ev-desc {
    font-size: 0.83rem;
    font-weight: 300;
    line-height: 1.72;
    color: var(--text-muted);
  }

  .ev-img {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
  }
  .ev-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position:left;
    filter: saturate(108%) contrast(103%);
  }

  /* ───── ACTIVITIES ───── */
  .act-intro {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: end;
  }
  .act-intro-note {
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .act-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
  }
  .act-card {
    background: var(--white);
    padding: 2rem 1.8rem 1.8rem;
    transition: background 0.2s, transform 0.2s;
    position: relative;
  }
  .act-card:hover { background: var(--cream); transform: translateY(-2px); }
  .act-icon { font-size: 1.5rem; margin-bottom: 1rem; display: block; }
  .act-cat {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4rem;
  }
  .act-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 0.6rem;
    line-height: 1.2;
  }
  .act-desc {
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
  }

.act-img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.act-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(108%) contrast(103%);
}

.act-card button {
  background-color: var(--sand);
  border-radius: 10px;
  border: none;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 2px;
}

  .act-link {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brown);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: border-color 0.2s, color 0.2s;
  }
  .act-link:hover { color: var(--gold); border-color: var(--gold-light); }

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(0,0,0,0.6);
  z-index: 999;
}

.popup.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background: #fff;
  padding: 20px;
  max-width: 1000px;
  width: 90%;

}
#popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  background-color: transparent;
  border: 0;
}


#popup-body {
  display: grid;
  grid-template-columns:repeat(2,1fr);
  gap: 20px;
  padding: 20px;
}

 #popup-body .act-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--ink);
    margin-bottom: 0.6rem;
    line-height: 1.2;
  }
#popup-body  .act-desc {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    padding: 5px 0;
  }

  
  /* ───── FOOTER ───── */
  footer {
    background: var(--ink);
    color: rgba(255,255,255,0.5);
    padding: 4rem 2rem 2.5rem;
  }
  .footer-inner { max-width: 1120px; margin: 0 auto; }
  .footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
  }
  .footer-logo img {
    height: 42px;
    filter: brightness(0) invert(1);
    opacity: 0.45;
  }
  .socials {
    display: flex;
    gap: 2rem;
  }
  .socials a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
  }
  .socials a:hover { color: var(--gold-light); }
  .socials svg { width: 16px; height: 16px; fill: currentColor; }
  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .footer-copy {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }
  .footer-copy a { color: rgba(255,255,255,0.45); text-decoration: none; }
  .footer-tagline {
    font-family: 'DM Serif Display', serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(255,255,255,0.2);
  }


  .section-storia {
    background-color: #fff;
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 7rem 2rem;
  }

  .section-storia h1 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

    .section-storia h2 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    line-height: 1.08;
    padding: 40px 0;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

      .section-storia a:link, a:visited {
      color: var(--gold);
      text-decoration: none;
    }

    .section-storia h3 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    padding: 10px 0;
    font-size:1.4rem;
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

    .section-storia h4 {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    line-height: 1.08;
    color: var(--ink);
    letter-spacing: -0.01em;
  }
  
    .section-storia p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.82;
    color: var(--text-muted);
  }

  
    .section-storia ul {
      list-style: disc;
      padding: 20px
  }
  
    .section-storia li {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.82;
    color: var(--text-muted);
  }


  /* ───── ANIMATIONS ───── */
  @keyframes riseIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
  }
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
  .reveal-d1 { transition-delay: 0.08s; }
  .reveal-d2 { transition-delay: 0.16s; }
  .reveal-d3 { transition-delay: 0.24s; }
  .reveal-d4 { transition-delay: 0.32s; }

  /* ───── LANG ───── */
  .lang-it [data-lang="it"],
  .lang-en [data-lang="en"] { display: block; }
  .lang-it span[data-lang="it"],
  .lang-en span[data-lang="en"],
  .lang-it a[data-lang="it"],
  .lang-en a[data-lang="en"] { display: inline; }

  /* ───── RESPONSIVE ───── */


  @media (max-width: 960px) {
  nav { padding: 0 1.8rem; }
  nav.scrolled { padding: 0.9rem 1.8rem; }
  .nav-center { display: none; }
  #popup-body { grid-template-columns: repeat(1,1fr); }
  .about-layout { grid-template-columns: 1fr; min-height: auto; }
  .about-img-col { height: 340px; position: relative; }
  .about-img-col img { position: absolute; }
  .about-text-col { padding: 3rem 1.5rem; }
  .act-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .act-grid { grid-template-columns: repeat(2, 1fr); }
  .sec { padding: 5rem 1.5rem; }
}

@media (max-width: 600px) {

.popup {
  position: fixed;
  overflow-y: scroll;
}

.popup-content {
  background: #fff;
  padding: 20px;
  max-width: 1000px;
  width: 100%;
  margin-top: 20px;

}

.act-img {
  width: 100%;
  height: 100%;
  max-height: 300px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.act-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(108%) contrast(103%);
}

#popup-body .act-desc {
  font-size: .9rem;
}

  .act-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 1.5rem; }
  .hero-h1 { font-size: 3rem; }
  .about-text-col { padding: 2.5rem 1.2rem; }
  .ev-card { padding: 1.8rem 1.4rem; }
  .act-card { padding: 1.6rem 1.4rem; }
  .play-video { font-size: 0.9rem; padding: 8px 16px; }
  footer { padding: 3rem 1.2rem 2rem; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .socials { gap: 1.2rem; }
}

@media (max-width: 600px) {
  #hero {
    padding-top: 40px;
    height: auto;
    min-height: auto;
    flex-direction: column;
    justify-content: flex-start;
  }

  .hero-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
  }

  .hero-media .hero-video,
  .hero-media .hero-img {
    position: absolute;
    inset: 0;
  }

  .hero-media .hero-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    min-height: unset;
    min-width: unset;
    transform: none;
  }

  .hero-grad { display: none; }

  .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.2rem 3rem;
    max-width: 100%;
    background: var(--ink);  /* o var(--cream) se preferisci chiaro */
    animation: none;
  }

  .hero-tag { color: var(--gold-light); }

  .hero-h1 {
    font-size: 2.6rem;
    color: #fff;
  }

  .hero-sub { color: rgba(255,255,255,0.6); }

  .scroll-hint { display: none; }

.about-text-col {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    max-width:none;
  }


}