/* ============================================================
   SCOPRI PIZZONE — design tokens
   A mountain village at dusk: deep pine-night backgrounds,
   warm stone panels, and amber window-light as the accent.
   Signature motif: the Mainarde ridge line + the borgo's own
   three historic gates (Porta Lecina, dei Santi, Borea).
   ============================================================ */

:root{
  --bg-deep:   #131E19;
  --bg-deep-2: #0D1512;
  --bg-panel:  #1B2A22;
  --stone:     #EAE0CB;
  --stone-2:   #E1D5B8;
  --ink:       #211E17;
  --ink-soft:  #4A4638;
  --cream:     #F5EFE2;
  --cream-dim: rgba(245,239,226,0.72);
  --amber:     #D68C3E;
  --amber-soft:#E9B36F;
  --sage:      #86A183;
  --line-dark: rgba(245,239,226,0.14);
  --line-stone:rgba(33,30,23,0.14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h2{ font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 600; }
h3{ font-size: 1.25rem; font-weight: 600; }
h4{ font-size: 1.02rem; font-weight: 600; }
p{ margin: 0 0 1em; }
a{ color: inherit; }
ul{ list-style: none; margin: 0; padding: 0; }
img{ max-width: 100%; display: block; }

.section-stone h2, .section-stone h3, .section-stone h4{ color: var(--ink); }
.section-stone p{ color: var(--ink-soft); }
.section-dark p{ color: var(--cream-dim); }

/* subtle grain overlay for texture, purely decorative */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ layout helpers ============ */
.section{ position: relative; padding: 6.5rem 1.5rem; overflow: hidden; }
.section-inner{ max-width: var(--container); margin: 0 auto; }
.section-stone{ background: var(--stone); }
.section-dark{ background: var(--bg-panel); }
.section-deep{ background: var(--bg-deep); }

.grid-2{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.grid-2.reverse{ grid-template-columns: 0.9fr 1.1fr; }
.grid-2.reverse > *:first-child{ order: 2; }
.grid-2.top{ align-items: start; }
@media (max-width: 860px){
  .grid-2, .grid-2.reverse{ grid-template-columns: 1fr; gap: 2.4rem; }
  .grid-2.reverse > *:first-child{ order: 0; }
}

.eyebrow{
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin: 0 0 1rem;
}
.eyebrow-dark{ color: #9C6A2E; }

.lead{ font-size: 1.1rem; max-width: 62ch; }
.section-inner > .lead{ margin-bottom: 1.2rem; }

.sub-head{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  margin: 2.6rem 0 0.8rem;
}
.section-stone .sub-head{ color: var(--ink); }

.source{
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin-top: 2.6rem;
  opacity: 0.75;
}
.source strong{ font-weight: 700; }

/* ============ scroll-reveal ============ */
.reveal{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ============ header ============ */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 1.5rem;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.scrolled{
  background: rgba(19, 30, 25, 0.86);
  backdrop-filter: blur(10px);
  padding: 0.7rem 1.5rem;
  box-shadow: 0 1px 0 var(--line-dark);
}
.header-inner{
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand{ display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--cream); }
.brand-mark{ width: 26px; height: 22px; color: var(--amber-soft); flex-shrink: 0; }
.brand-word{ font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }

.site-nav{ display: flex; gap: 1.6rem; }
.site-nav a{
  text-decoration: none; color: var(--cream-dim); font-size: 0.9rem; font-weight: 500;
  position: relative; padding-bottom: 4px;
}
.site-nav a::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--amber-soft); transition: right 0.3s var(--ease);
}
.site-nav a:hover{ color: var(--cream); }
.site-nav a:hover::after{ right: 0; }

.nav-toggle{
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span{ display: block; width: 22px; height: 2px; background: var(--cream); transition: transform .3s var(--ease), opacity .3s var(--ease); }

@media (max-width: 900px){
  .nav-toggle{ display: flex; }
  .site-nav{
    position: fixed; inset: 0 0 auto 0; top: 64px;
    flex-direction: column; gap: 0;
    background: rgba(15, 24, 20, 0.98);
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  .site-nav.open{ max-height: 600px; }
  .site-nav a{ padding: 1rem 1.5rem; border-bottom: 1px solid var(--line-dark); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}

/* ============ hero ============ */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% -10%, #1E3128 0%, var(--bg-deep) 55%, var(--bg-deep-2) 100%);
  overflow: hidden;
  padding: 7rem 1.5rem 6rem;
}
.hero-photo{
  position: absolute; inset: 0; z-index: 0;
  background: url("../assets/img/hero-mainarde.jpg") center 40% / cover no-repeat;
  opacity: 0.55;
  filter: saturate(0.85) contrast(1.02);
}
.hero-veil{
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(13,21,18,0.82) 0%, rgba(13,21,18,0.42) 38%, rgba(13,21,18,0.78) 78%, var(--bg-deep) 100%);
}
.hero-sky{ position: absolute; inset: 0; z-index: 1; }
.star{
  position: absolute; left: var(--x); top: var(--y);
  width: 2px; height: 2px; border-radius: 50%;
  background: var(--cream);
  animation: twinkle 3.5s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes twinkle{
  0%, 100%{ opacity: 0.15; }
  50%{ opacity: 0.85; }
}

.ridge{
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; z-index: 1;
}
.ridge path{ fill: var(--bg-panel); }
.ridge-far path{ fill: #223428; opacity: 0.55; }
.ridge-mid path{ fill: #1B2A22; opacity: 0.8; }
.ridge-near path{ fill: #101B15; }
.ridge-near{ z-index: 2; }
.windows rect{
  fill: var(--amber);
  opacity: 0.25;
  transition: opacity 0.6s ease;
}
.windows rect.lit{ opacity: 1; filter: drop-shadow(0 0 4px var(--amber)); }

.hero-content{ position: relative; z-index: 3; text-align: center; max-width: 860px; }
.hero-script{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  color: var(--amber-soft);
  margin: 0 0 -0.15em;
  transform: translateX(-0.15em);
}
.hero-title{
  font-size: clamp(3rem, 11vw, 7.5rem);
  color: var(--cream);
  letter-spacing: 0.04em;
  margin: 0 0 0.3em;
}
.hero-sub{
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--cream-dim);
  max-width: 54ch;
  margin: 0 auto 2rem;
}
.hero-actions{ display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-note{
  position: relative; z-index: 3;
  max-width: 780px; margin: 0 auto;
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 5.4rem; padding: 0 1.5rem;
  font-size: 0.73rem; line-height: 1.55;
  color: rgba(245,239,226,0.5);
  text-align: center;
}
.hero-note a{ color: rgba(245,239,226,0.7); }
@media (max-width: 780px){ .hero-note{ display: none; } }

.btn{
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn-primary{ background: var(--amber); color: #1B1305; }
.btn-primary:hover{ background: var(--amber-soft); transform: translateY(-2px); }
.btn-ghost{ border: 1px solid var(--line-dark); color: var(--cream); }
.btn-ghost:hover{ border-color: var(--amber-soft); color: var(--amber-soft); transform: translateY(-2px); }

.scroll-cue{
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3; width: 22px; height: 36px; border: 1.5px solid var(--line-dark);
  border-radius: 999px; display: flex; justify-content: center; padding-top: 6px;
}
.scroll-cue span{
  width: 3px; height: 8px; border-radius: 2px; background: var(--amber-soft);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue{
  0%{ transform: translateY(0); opacity: 1; }
  70%{ transform: translateY(10px); opacity: 0; }
  100%{ opacity: 0; }
}

/* ============ figures & photos ============ */
figure{ margin: 0; }
.photo{
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-deep-2);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.6);
}
.photo img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.photo:hover img{ transform: scale(1.035); }
figcaption{
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  margin-top: 0.6rem;
  color: var(--cream-dim);
  line-height: 1.45;
}
.section-stone figcaption{ color: var(--ink-soft); opacity: 0.85; }
.photo-frame{
  padding: 0.55rem;
  background: rgba(245,239,226,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 22px;
}
.section-stone .photo-frame{
  background: rgba(33,30,23,0.04);
  border-color: var(--line-stone);
}
.zoomable{ cursor: zoom-in; }

/* full-width photo band with parallax
   L'immagine sorgente (borgo-band.jpg) è 1240x190 ed è ritagliata sul
   centro abitato. La fascia usa lo stesso rapporto della foto, così
   l'ingrandimento resta minimo e le case restano al centro. */
.band{
  position: relative;
  width: 100%;
  aspect-ratio: 1240 / 190;
  min-height: 160px; max-height: 300px;
  overflow: hidden;
  background: var(--bg-deep-2);
}
.band-img{
  position: absolute; inset: -14px 0;
  background-size: cover; background-position: center center;
  will-change: transform;
}
.band::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(19,30,25,0.45) 14%, rgba(19,30,25,0.10) 34%, rgba(19,30,25,0.28) 74%, var(--bg-panel) 100%);
}
.band-caption{
  position: absolute; z-index: 2; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  font-size: 0.75rem; color: rgba(245,239,226,0.6); letter-spacing: 0.04em;
}
.band-stone::after{
  background: linear-gradient(180deg, var(--stone) 0%, rgba(234,224,203,0.45) 13%, rgba(234,224,203,0) 32%, rgba(19,30,25,0.26) 74%, var(--bg-panel) 100%);
}

/* ============ origini ============ */
.stat-card{
  background: var(--bg-deep);
  border-radius: 20px;
  padding: 2.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.35);
}
.stat{ display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num{ font-family: var(--font-display); font-size: 2.1rem; color: var(--amber-soft); font-weight: 600; }
.stat-label{ font-size: 0.8rem; color: var(--cream-dim); letter-spacing: 0.03em; }

/* insediamenti list */
.gates{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 2.4rem;
}
@media (max-width: 780px){ .gates{ grid-template-columns: 1fr; } }

.gate{
  background: var(--bg-deep);
  border: 1px solid var(--line-dark);
  border-radius: 20px 20px 8px 8px;
  padding: 2rem 1.6rem 1.7rem;
  text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.gate:hover{ transform: translateY(-6px); border-color: var(--amber); }
.gate-arch{ width: 56px; height: 66px; margin: 0 auto 1rem; color: var(--amber-soft); }
.gate-arch svg{ width: 100%; height: 100%; }
.gate h3{ color: var(--cream); margin-bottom: 0.45rem; font-size: 1.08rem; }
.gate p{ color: var(--cream-dim); font-size: 0.92rem; margin: 0; }

/* ============ chiese ============ */
.church{
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 3rem;
  align-items: center;
  padding: 3.2rem 0;
  border-top: 1px solid var(--line-dark);
}
.church:first-of-type{ border-top: none; padding-top: 1.4rem; }
.church.flip{ grid-template-columns: 0.78fr 1fr; }
.church.flip > *:first-child{ order: 2; }
@media (max-width: 860px){
  .church, .church.flip{ grid-template-columns: 1fr; gap: 1.8rem; padding: 2.4rem 0; }
  .church.flip > *:first-child{ order: 0; }
}
.church h3{ color: var(--cream); font-size: 1.5rem; }
.church .church-alt{
  font-family: var(--font-display); font-style: italic;
  font-size: 1.02rem; color: var(--amber-soft);
  margin: -0.4rem 0 0.9rem;
}
.inline-link{
  color: var(--amber-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(233,179,111,0.35);
  transition: border-color .3s var(--ease);
}
.inline-link:hover{ border-color: var(--amber-soft); }
.section-stone .inline-link{ color: #9C6A2E; border-bottom-color: rgba(156,106,46,0.35); }

.note-card{
  background: rgba(245,239,226,0.05);
  border: 1px solid var(--line-dark);
  border-left: 3px solid var(--amber);
  border-radius: 0 16px 16px 0;
  padding: 1.6rem 1.8rem;
  margin-top: 3rem;
}
.note-card h3{ color: var(--cream); font-size: 1.15rem; }
.note-card p:last-child{ margin: 0; }

/* ============ tradizioni ============ */
.trad{
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  align-items: center;
  padding: 3.2rem 0;
  border-top: 1px solid var(--line-stone);
}
.trad:first-of-type{ border-top: none; padding-top: 1.2rem; }
.trad.flip > *:first-child{ order: 2; }
@media (max-width: 860px){
  .trad{ grid-template-columns: 1fr; gap: 1.8rem; padding: 2.4rem 0; }
  .trad.flip > *:first-child{ order: 0; }
}
.feast-days{
  display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.2rem 0 0;
}
.feast-days li{
  background: var(--stone-2);
  border: 1px solid var(--line-stone);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}
.feast-days li span{ display: block; font-weight: 500; font-size: 0.76rem; opacity: 0.7; }

/* ============ dati demografici ============ */
.chart-card{
  background: var(--bg-deep);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 1.8rem 1.6rem 1.4rem;
}
.chart-card h3{ color: var(--cream); font-size: 1.15rem; text-align: center; margin-bottom: 1.2rem; }
.bar-chart{ width: 100%; height: auto; overflow: visible; }
.bar-chart .bar{
  fill: var(--amber);
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 1s var(--ease), fill .25s ease;
}
.bar-chart.animate .bar{ transform: scaleY(1); }
.bar-chart .bar:hover{ fill: var(--amber-soft); }
.bar-chart .grid-line{ stroke: rgba(245,239,226,0.12); stroke-width: 1; }
.bar-chart .axis-label{ fill: rgba(245,239,226,0.55); font-size: 9px; font-family: var(--font-body); }
.bar-chart .x-label{ fill: rgba(245,239,226,0.5); font-size: 8.5px; font-family: var(--font-body); }
.chart-readout{
  text-align: center; font-size: 0.85rem; color: var(--cream-dim);
  min-height: 1.6em; margin: 0.6rem 0 0;
}
.chart-readout strong{ color: var(--amber-soft); font-weight: 700; }

.pie-wrap{ display: flex; justify-content: center; padding: 0.4rem 0 0.8rem; }
.pie{ width: 240px; height: 240px; }
.pie circle{
  fill: none; stroke-width: 60;
  transition: stroke-dasharray 1.4s var(--ease), opacity .25s ease;
}
.pie-legend{ display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.6rem; }
.pie-legend li{
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; color: var(--cream-dim);
}
.pie-legend .dot{ width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.pie-legend b{ color: var(--cream); font-weight: 700; margin-left: auto; }
.pie-legend .votes{ color: rgba(245,239,226,0.45); font-size: 0.8rem; }

.mayors{
  columns: 3; column-gap: 2.4rem;
  margin-top: 2rem;
  font-size: 0.88rem;
}
@media (max-width: 860px){ .mayors{ columns: 2; } }
@media (max-width: 520px){ .mayors{ columns: 1; } }
.mayors li{
  break-inside: avoid;
  padding: 0.34rem 0;
  color: var(--cream-dim);
  border-bottom: 1px solid rgba(245,239,226,0.06);
}
.mayors li span{ color: rgba(245,239,226,0.45); font-size: 0.82rem; }
.mayors li.current{ color: var(--amber-soft); font-weight: 700; }

/* ============ geografia ============ */
.geo-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.6rem;
}
@media (max-width: 780px){ .geo-grid{ grid-template-columns: 1fr; } }
.geo-grid .photo{ aspect-ratio: 4 / 3; }
.tag-list{ display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.tag-list li{
  background: rgba(245,239,226,0.06);
  border: 1px solid var(--line-dark);
  color: var(--cream);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.section-stone .tag-list li{
  background: rgba(33,30,23,0.06);
  border-color: var(--line-stone);
  color: var(--ink);
}

/* ============ fauna e flora ============ */
.nature-split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6rem;
  margin-top: 3rem;
  align-items: start;
}
@media (max-width: 860px){ .nature-split{ grid-template-columns: 1fr; gap: 2.2rem; } }

.nature-card{
  background: rgba(33,30,23,0.045);
  border: 1px solid var(--line-stone);
  border-radius: 20px;
  padding: 1.9rem 1.8rem;
}
.nature-card h3{ font-size: 1.2rem; margin-bottom: 0.9rem; }
.nature-card p:last-of-type{ margin-bottom: 0; }
.nature-card .species{
  margin-top: 1.2rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.nature-card .species li{
  display: flex; align-items: baseline; gap: 0.7rem;
  font-size: 0.9rem; color: var(--ink-soft);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(33,30,23,0.08);
}
.nature-card .species li:last-child{ border-bottom: none; padding-bottom: 0; }
.nature-card .species b{
  color: var(--ink); font-weight: 700; flex-shrink: 0; min-width: 10.5rem;
}
@media (max-width: 460px){
  .nature-card .species li{ flex-direction: column; gap: 0.15rem; }
  .nature-card .species b{ min-width: 0; }
}

.fauna-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.2rem;
}
@media (max-width: 780px){ .fauna-grid{ grid-template-columns: 1fr; } }
.fauna-grid .photo{ aspect-ratio: 4 / 3; }

.highlight-note{
  margin-top: 2.4rem;
  background: rgba(33,30,23,0.05);
  border: 1px solid var(--line-stone);
  border-left: 3px solid #9C6A2E;
  border-radius: 0 16px 16px 0;
  padding: 1.4rem 1.7rem;
}
.highlight-note p{ margin: 0; font-size: 0.95rem; }
.highlight-note strong{ color: var(--ink); }

.photo-strip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 0.4rem;
}
@media (max-width: 700px){
  .photo-strip{ grid-template-columns: 1fr 1fr; gap: 1rem; }
}

/* ============ racconti orali ============ */
.racconto{
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 3rem;
  align-items: center;
  padding: 3.2rem 0;
  border-top: 1px solid var(--line-dark);
}
.racconto:first-of-type{ border-top: none; padding-top: 1.4rem; }
.racconto.flip{ grid-template-columns: 0.72fr 1fr; }
.racconto.flip > *:first-child{ order: 2; }
@media (max-width: 860px){
  .racconto, .racconto.flip{ grid-template-columns: 1fr; gap: 1.8rem; padding: 2.4rem 0; }
  .racconto.flip > *:first-child{ order: 0; }
}
.racconto h3{ color: var(--cream); font-size: 1.5rem; }
#racconti .note-card h3{ margin-bottom: 0.5rem; }

/* ============ attività paesane ============ */
.attivita{
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 3rem;
  align-items: start;
  padding: 3.2rem 0;
  border-top: 1px solid var(--line-dark);
}
.attivita:first-of-type{ border-top: none; padding-top: 1.4rem; }
.attivita.flip{ grid-template-columns: 0.72fr 1fr; }
.attivita.flip > *:first-child{ order: 2; }
@media (max-width: 860px){
  .attivita, .attivita.flip{ grid-template-columns: 1fr; gap: 1.8rem; padding: 2.4rem 0; }
  .attivita.flip > *:first-child{ order: 0; }
}
.attivita h3{ color: var(--cream); font-size: 1.5rem; }
.attivita .aside-note{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--amber-soft);
  margin: -0.2rem 0 1.1rem;
}

.walk-list{ display: flex; flex-direction: column; gap: 0.7rem; margin: 1.4rem 0 0; }
.walk-list li{
  display: grid;
  grid-template-columns: 6.6rem 1fr;
  gap: 0.9rem;
  align-items: baseline;
  background: rgba(245,239,226,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  color: var(--cream-dim);
}
.walk-list .when{
  color: var(--amber-soft); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.02em; line-height: 1.35;
}
.walk-list .what{ color: var(--cream); font-weight: 600; }
.walk-list .what span{ display: block; font-weight: 400; color: var(--cream-dim); font-size: 0.85rem; margin-top: 0.15rem; }
@media (max-width: 520px){
  .walk-list li{ grid-template-columns: 1fr; gap: 0.25rem; }
}

.info-strip{
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin-top: 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem; color: var(--cream-dim);
}
.info-strip span strong{ color: var(--cream); font-weight: 700; }

/* ============ pizzone in foto ============ */
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem 1.2rem;
  margin-top: 2.8rem;
}
@media (max-width: 980px){ .gallery{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px){ .gallery{ grid-template-columns: repeat(2, 1fr); gap: 1.1rem 0.9rem; } }
.gallery .photo{ aspect-ratio: 3 / 4; border-radius: 14px; }
.gallery figcaption{
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

/* ============ inni ============ */
.hymns{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.4rem;
}
@media (max-width: 780px){ .hymns{ grid-template-columns: 1fr; } }
.hymn{
  background: var(--bg-deep);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 2.2rem 2rem;
}
.hymn h3{ color: var(--cream); font-style: italic; margin-bottom: 1.2rem; }
.hymn .verse{
  color: var(--cream-dim);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0 0 1.1rem;
}
.hymn .refrain{ color: var(--amber-soft); font-weight: 700; }

/* ============ padre alfredo ============ */
.memorial{
  background: linear-gradient(160deg, rgba(214,140,62,0.08), rgba(245,239,226,0.03));
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  padding: 2.6rem;
}
@media (max-width: 640px){ .memorial{ padding: 1.8rem; } }

/* ============ contatti ============ */
.contact-card{
  background: rgba(245,239,226,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 2rem;
}
.contact-row{
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.95rem;
}
.contact-row:last-child{ border-bottom: none; }
.contact-row a{ text-decoration: none; color: var(--amber-soft); }
.contact-row a:hover{ text-decoration: underline; }
.contact-label{ color: var(--cream-dim); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ============ privacy ============ */
.privacy h3{ margin-top: 2rem; font-size: 1.1rem; }
.privacy ul{ margin: 0 0 1em; }
.privacy ul li{
  position: relative; padding-left: 1.2rem; margin-bottom: 0.35rem;
  color: var(--cream-dim); font-size: 0.95rem;
}
.privacy ul li::before{
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
}

/* ============ lightbox ============ */
.lightbox{
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(9, 14, 12, 0.94);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1rem; padding: 2rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
  cursor: zoom-out;
}
.lightbox.open{ opacity: 1; pointer-events: auto; }
.lightbox img{
  max-width: min(1100px, 92vw); max-height: 78vh;
  border-radius: 10px; object-fit: contain;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8);
}
.lightbox p{ color: var(--cream-dim); font-size: 0.85rem; text-align: center; max-width: 60ch; margin: 0; }
.lightbox-close{
  position: absolute; top: 1.2rem; right: 1.4rem;
  background: none; border: none; color: var(--cream);
  font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0.7;
}
.lightbox-close:hover{ opacity: 1; }

/* ============ footer ============ */
.site-footer{ background: var(--bg-deep-2); padding: 3.5rem 1.5rem 2.2rem; text-align: center; }
.footer-inner{ max-width: var(--container); margin: 0 auto; }
.footer-brand{ justify-content: center; margin-bottom: 0.8rem; }
.footer-tagline{ color: var(--cream-dim); font-size: 0.95rem; margin-bottom: 1.4rem; }
.footer-disclaimer{
  color: rgba(245,239,226,0.45); font-size: 0.76rem; line-height: 1.6;
  max-width: 74ch; margin: 0 auto 1.4rem;
}
.footer-disclaimer a{ color: rgba(245,239,226,0.7); }
.footer-copy{ color: rgba(245,239,226,0.45); font-size: 0.8rem; margin: 0; }

/* crediti dei realizzatori */
.credits{
  max-width: 620px;
  margin: 0 auto 1.8rem;
  padding: 1.6rem 1.5rem 1.4rem;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.credits-title{
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber-soft);
  margin: 0 0 1rem;
}
.credits-list{
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
@media (max-width: 560px){ .credits-list{ grid-template-columns: 1fr; gap: 1rem; } }
.credits-list li{ text-align: center; }
.credits-role{
  display: block; font-size: 0.72rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: rgba(245,239,226,0.45);
  margin-bottom: 0.28rem;
}
.credits-name{
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; color: var(--cream); line-height: 1.25;
}

/* back to top */
.to-top{
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(19,30,25,0.9); border: 1px solid var(--line-dark);
  color: var(--amber-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
  backdrop-filter: blur(8px);
}
.to-top.show{ opacity: 1; pointer-events: auto; }
.to-top:hover{ transform: translateY(-3px); border-color: var(--amber); }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--amber-soft);
  outline-offset: 3px;
}
