/* =========================================================================
   Borgo di Castevoli — foglio di stile unico, scritto a mano.
   Nessun framework, nessuna compilazione: questo file va online com'è.
   Mobile-first: le media query salgono, non scendono.
   ========================================================================= */

/* ---------- Font, serviti da qui: nessuna chiamata a Google ---------- */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/karla-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/karla-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
                 U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Variabili ---------- */

:root {
  /* Pietra, calce e cotto: la tavolozza viene dal borgo, l'arancio dal logo. */
  --ink:        #1b1613;
  --ink-soft:   #4a403a;
  --muted:      #7a6d63;
  --paper:      #faf7f2;
  --stone:      #efe9e0;
  --stone-line: #ddd3c6;
  --terra:      #b85c0d;
  --terra-deep: #8f4508;
  --night:      #16110e;

  --shadow-sm: 0 1px 2px rgba(27, 22, 19, .06), 0 4px 14px rgba(27, 22, 19, .05);
  --shadow-md: 0 2px 6px rgba(27, 22, 19, .08), 0 18px 40px rgba(27, 22, 19, .12);

  --wrap: 74rem;
  --gutter: 1.375rem;
  --radius: 4px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset misurato ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
iframe { border: 0; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0;
  font-variation-settings: 'opsz' 96, 'SOFT' 0, 'WONK' 1;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terra-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--terra); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .75rem 1.25rem;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---------- Impalcatura ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 46rem; }

.section { padding-block: clamp(3.5rem, 9vw, 7.5rem); position: relative; }

/* Gli elementi di una griglia nascono con `min-width: auto`: una fotografia da
   800px di lato allarga la sua colonna a 800px e su un telefono il testo smette
   di andare a capo, uscendo dallo schermo. Va azzerato ovunque ci sia una
   griglia con dentro immagini. */
.intro > *,
.cards > *,
.projects > *,
.split > *,
.gallery > *,
.footer__grid > * { min-width: 0; }

.section__head { max-width: 42rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }

/* ---------- Tipografia ---------- */

.eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--terra);
  margin: 0 0 1.1rem;
}
.eyebrow--light { color: #e9a45c; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }

.h2 { font-size: clamp(2.1rem, 7vw, 3.9rem); margin-bottom: 1.1rem; }
.h2--light { color: var(--paper); }

.lead {
  font-size: clamp(1.06rem, 2.2vw, 1.22rem);
  line-height: 1.62;
  color: var(--ink-soft);
}
.lead--light { color: rgba(250, 247, 242, .84); }

/* ---------- Bottoni e link ---------- */

.btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .85rem 1.9rem;
  background: var(--ink);
  color: var(--paper);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { background: var(--terra); border-color: var(--terra); color: #fff; transform: translateY(-2px); }

.btn--ghost {
  background: rgba(250, 247, 242, .08);
  border-color: rgba(250, 247, 242, .55);
  color: var(--paper);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--terra-deep);
}
.link-arrow::after {
  content: '→';
  transition: transform .35s var(--ease);
}
.link-arrow:hover::after { transform: translateX(5px); }
.link-arrow--light { color: #e9a45c; }

/* =========================================================================
   Navigazione
   ========================================================================= */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
  /* Velo scuro sotto la barra: sull'hero il testo chiaro deve reggere
     qualunque cosa ci sia nella fotografia. */
  background: linear-gradient(to bottom, rgba(22, 17, 14, .55), rgba(22, 17, 14, 0));
}

/* Stato "vetro": compare appena la pagina scorre (classe messa da site.js). */
.nav.is-stuck {
  background: rgba(250, 247, 242, .72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: rgba(27, 22, 19, .1);
  box-shadow: 0 1px 24px rgba(27, 22, 19, .07);
}

.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: .6rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav__brand { flex: 0 0 auto; line-height: 0; }
.nav__brand img {
  width: auto;
  height: 2.9rem;
  /* Sopra la fotografia il logo diventa una silhouette bianca; torna nero e
     arancio appena la barra passa a vetro chiaro. */
  filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0, 0, 0, .45));
  transition: filter .4s var(--ease);
}
.nav.is-stuck .nav__brand img { filter: none; }

.nav__checkbox { position: absolute; opacity: 0; pointer-events: none; }

.nav__burger {
  margin-left: auto;
  width: 2.75rem; height: 2.75rem;
  display: flex; flex-direction: column; justify-content: center; gap: .32rem;
  padding: 0 .55rem;
  cursor: pointer;
}
.nav__burger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  transition: transform .35s var(--ease), opacity .25s var(--ease), background .4s var(--ease);
}
.nav.is-stuck .nav__burger span { background: var(--ink); box-shadow: none; }

#nav-toggle:checked ~ .nav__burger span:nth-child(1) { transform: translateY(.53rem) rotate(45deg); }
#nav-toggle:checked ~ .nav__burger span:nth-child(2) { opacity: 0; }
#nav-toggle:checked ~ .nav__burger span:nth-child(3) { transform: translateY(-.53rem) rotate(-45deg); }

.nav__menu {
  flex-basis: 100%;
  display: grid;
  overflow: hidden;
  max-height: 0;
  transition: max-height .45s var(--ease);
}
#nav-toggle:checked ~ .nav__menu { max-height: 22rem; }

.nav__menu a {
  padding: .85rem .2rem;
  border-top: 1px solid rgba(27, 22, 19, .12);
  color: var(--ink);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.nav__menu a:hover { color: var(--terra); }

/* Menu aperto sopra l'hero: serve una superficie, non testo scuro sul buio. */
.nav:not(.is-stuck):has(#nav-toggle:checked) {
  background: rgba(250, 247, 242, .93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav:not(.is-stuck):has(#nav-toggle:checked) .nav__brand img { filter: none; }
.nav:not(.is-stuck):has(#nav-toggle:checked) .nav__burger span { background: var(--ink); box-shadow: none; }

@media (min-width: 62rem) {
  .nav__burger { display: none; }
  .nav__menu {
    flex-basis: auto;
    margin-left: auto;
    max-height: none;
    display: flex;
    gap: 2.4rem;
    overflow: visible;
  }
  .nav__menu a {
    border-top: 0;
    padding: .35rem 0;
    color: var(--paper);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    position: relative;
  }
  .nav__menu a::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -.1rem;
    height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left;
    transition: transform .4s var(--ease);
  }
  .nav__menu a:hover::after { transform: scaleX(1); }
  .nav.is-stuck .nav__menu a { color: var(--ink); text-shadow: none; }
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  background: var(--night);
}

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 58%;
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.09); }
  to   { transform: scale(1); }
}

.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(22, 17, 14, .92) 0%, rgba(22, 17, 14, .5) 45%, rgba(22, 17, 14, .2) 75%, rgba(22, 17, 14, .35) 100%),
    /* secondo velo da sinistra: è lì che sta il testo */
    linear-gradient(to right, rgba(22, 17, 14, .62) 0%, rgba(22, 17, 14, .25) 45%, rgba(22, 17, 14, 0) 72%);
}

.hero__body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(5rem, 14vh, 9rem);
}

.hero__title {
  font-size: clamp(3.1rem, 15vw, 8.5rem);
  color: var(--paper);
  letter-spacing: -.03em;
  line-height: .92;
  margin-bottom: 1.2rem;
  font-variation-settings: 'opsz' 144, 'SOFT' 20, 'WONK' 1;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}

.hero__lede {
  font-size: clamp(1.02rem, 2.6vw, 1.35rem);
  color: rgba(250, 247, 242, .88);
  line-height: 1.5;
  max-width: 26ch;
  margin-bottom: 2.2rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}

/* Entrata scaglionata, una volta sola, al caricamento. */
.hero__body > * { animation: rise .9s var(--ease) both; }
.hero__body > :nth-child(1) { animation-delay: .15s; }
.hero__body > :nth-child(2) { animation-delay: .28s; }
.hero__body > :nth-child(3) { animation-delay: .44s; }
.hero__body > :nth-child(4) { animation-delay: .58s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(1.6rem); }
  to   { opacity: 1; transform: none; }
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  left: 50%; bottom: 1.8rem;
  transform: translateX(-50%);
  width: 1px; height: 3.2rem;
  background: rgba(250, 247, 242, .25);
  overflow: hidden;
}
.hero__scroll span {
  display: block; width: 100%; height: 45%;
  background: var(--paper);
  animation: scrollCue 2.4s var(--ease) infinite;
}
@keyframes scrollCue {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(220%); }
  100% { transform: translateY(220%); }
}

/* =========================================================================
   Intro + video
   ========================================================================= */

.section--intro { background: var(--paper); }

.intro { display: grid; gap: clamp(2.25rem, 5vw, 4rem); }

@media (min-width: 60rem) {
  .intro { grid-template-columns: 1fr 1fr; align-items: center; }
}

.video { position: relative; }

.video__btn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--night);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.video__btn img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.video__btn:hover img { transform: scale(1.045); opacity: .85; }

.video__play {
  position: absolute; z-index: 1; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  background: rgba(250, 247, 242, .18);
  border: 1px solid rgba(250, 247, 242, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.video__play::before {
  content: '';
  position: absolute; top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: .55rem 0 .55rem .95rem;
  border-color: transparent transparent transparent var(--paper);
}
.video__btn:hover .video__play { background: var(--terra); transform: translate(-50%, -50%) scale(1.08); }

/* Velo in basso: l'etichetta deve reggere su qualunque fotogramma. */
.video__btn::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to top, rgba(22, 17, 14, .75), rgba(22, 17, 14, 0));
  pointer-events: none;
}

.video__label {
  position: absolute; z-index: 1; left: 1.1rem; bottom: 1rem;
  color: var(--paper);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.video iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); display: block; }

/* =========================================================================
   Sezioni scure con sfondo fotografico
   ========================================================================= */

.section--dark { background: var(--night); color: rgba(250, 247, 242, .8); }
.section--dark .card__title, .section--dark h3 { color: var(--paper); }

/* Le fotografie di sfondo stanno qui e non in un attributo style: dentro una
   custom property Chrome risolve gli url() rispetto al foglio che la usa, non
   al documento, e i percorsi si rompono. */
#soggiornare::before,
#progetti::before { background-image: url('../assets/images/muro-1024x575.jpg'); }
#vivere::before   { background-image: url('../assets/images/vista-borgo-castello-di-castevoli-1812x1359-800x600.jpg'); opacity: .42; }

.parallax::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .55;
}
.parallax::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(22, 17, 14, .5), rgba(22, 17, 14, .74));
}
.parallax > * { position: relative; z-index: 1; }

/* Niente `background-attachment: fixed`: su iOS non funziona e su Chrome, in una
   pagina lunga come questa, manda in tilt la composizione (intere fasce restano
   bianche allo scorrimento). Verificato. Lo sfondo resta fermo e basta. */

/* =========================================================================
   Schede
   ========================================================================= */

.cards { display: grid; gap: 1.6rem; }

@media (min-width: 48rem) { .cards--2, .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--stone-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card--glass {
  background: rgba(250, 247, 242, .07);
  border-color: rgba(250, 247, 242, .16);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  color: rgba(250, 247, 242, .78);
}
.card--glass:hover { border-color: rgba(233, 164, 92, .5); }

.card__media { overflow: hidden; background: var(--stone); }
.card__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }

.card__body { padding: 1.5rem 1.4rem 1.7rem; display: flex; flex-direction: column; gap: .85rem; flex: 1; }

.card__title { font-size: 1.42rem; }

.card__quote {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.5;
  padding-left: .95rem;
  border-left: 2px solid var(--terra);
}

.card__meta { font-size: .88rem; color: var(--muted); margin: 0; }
.card--glass .card__meta { color: rgba(250, 247, 242, .55); }

.card--glass .link-arrow { color: #e9a45c; }
.card__body .link-arrow { margin-top: auto; align-self: flex-start; }

.card--wide .card__media img { aspect-ratio: 16 / 9; }

/* =========================================================================
   Galleria
   ========================================================================= */

.section--gallery { background: var(--stone); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem;
}
@media (min-width: 40rem) { .gallery { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (min-width: 68rem) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery__item {
  padding: 0; border: 0; background: var(--ink);
  cursor: pointer; overflow: hidden;
  border-radius: 2px;
  position: relative;
}
.gallery__item img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: transform .7s var(--ease), opacity .4s var(--ease), filter .5s var(--ease);
}
.gallery__item:hover img { transform: scale(1.07); filter: saturate(1.15); }

/* La prima tessera occupa un quadrante 2×2 e l'ultima due colonne: la griglia
   smette di essere un foglio di calcolo e si chiude senza buchi. */
@media (min-width: 40rem) {
  .gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery__item:nth-child(1) img { height: 100%; aspect-ratio: auto; }
}
@media (min-width: 68rem) {
  .gallery__item:last-child { grid-column: span 2; }
  .gallery__item:last-child img { aspect-ratio: 2 / 1; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(14, 11, 9, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade .3s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
  max-width: 92vw; max-height: 86vh;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(250, 247, 242, .1);
  border: 1px solid rgba(250, 247, 242, .22);
  color: var(--paper);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  border-radius: 50%;
  width: 2.9rem; height: 2.9rem;
  display: grid; place-items: center;
  line-height: 1;
  transition: background .3s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(250, 247, 242, .25); }

.lightbox__close { top: 1rem; right: 1rem; font-size: 1.6rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 1.9rem; }
.lightbox__nav--prev { left: .7rem; }
.lightbox__nav--next { right: .7rem; }

/* =========================================================================
   Sezione a due colonne (case)
   ========================================================================= */

.section--split { padding-block: 0; background: var(--paper); }

.split { display: grid; }

.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

.split__body {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: 38rem;
  margin-inline: auto;
}

@media (min-width: 60rem) {
  .split { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .split__media img { aspect-ratio: auto; min-height: 100%; }
  .split__body { margin: 0; padding-inline: clamp(2.5rem, 5vw, 4.5rem); align-self: center; }
}

/* =========================================================================
   Progetti
   ========================================================================= */

.projects {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 1.6rem;
  counter-reset: p;
}
@media (min-width: 56rem) { .projects { grid-template-columns: repeat(3, 1fr); } }

.project {
  counter-increment: p;
  border: 1px solid rgba(250, 247, 242, .14);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(250, 247, 242, .05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .45s var(--ease), transform .45s var(--ease);
}
.project:hover { border-color: rgba(233, 164, 92, .45); transform: translateY(-4px); }

.project__media { overflow: hidden; }
.project__media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  opacity: .82;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.project:hover .project__media img { transform: scale(1.05); opacity: 1; }

.project__body { padding: 1.4rem 1.4rem 1.6rem; position: relative; }
.project__body::before {
  content: '0' counter(p);
  position: absolute; top: -2.4rem; right: 1.1rem;
  font-family: 'Fraunces', serif;
  font-size: 3.2rem;
  color: rgba(250, 247, 242, .22);
  line-height: 1;
}
.project__body p { font-size: .97rem; margin-top: .6rem; }

.projects__cta {
  margin-top: 2.5rem;
  font-size: 1.05rem;
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
}

/* =========================================================================
   Mappa
   ========================================================================= */

.section--map { padding: 0; }

.map { height: clamp(18rem, 45vh, 26rem); background: var(--stone); }
.map iframe { width: 100%; height: 100%; display: block; filter: saturate(.72) contrast(1.03); }

.map__note {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  font-size: .87rem;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
  background: var(--night);
  color: rgba(250, 247, 242, .66);
  padding-top: clamp(3rem, 7vw, 5rem);
  font-size: .95rem;
}

.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }

.footer__brand img {
  width: 11rem; height: auto;
  margin-bottom: 1.1rem;
  filter: brightness(0) invert(1);
  opacity: .72;
}
.footer__brand p { max-width: 24rem; color: rgba(250, 247, 242, .5); }

.footer__title {
  font-family: 'Karla', sans-serif;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #e9a45c;
  margin-bottom: 1.1rem;
}

.footer address { font-style: normal; line-height: 1.9; }
.footer a { color: rgba(250, 247, 242, .82); text-decoration: none; }
.footer a:hover { color: #e9a45c; text-decoration: underline; }

.footer__links { list-style: none; margin: 0; padding: 0; line-height: 2.15; }

.footer__bottom {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-block: 1.5rem;
  border-top: 1px solid rgba(250, 247, 242, .12);
  font-size: .8rem;
  color: rgba(250, 247, 242, .42);
  display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: space-between;
}
.footer__bottom p { margin: 0; }

/* =========================================================================
   Rivelazione allo scorrimento (site.js aggiunge .is-in)
   ========================================================================= */

.reveal { opacity: 0; transform: translateY(1.75rem); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal:nth-child(2).is-in { transition-delay: .09s; }
.reveal:nth-child(3).is-in { transition-delay: .18s; }
.reveal:nth-child(4).is-in { transition-delay: .27s; }

/* ---------- Chi ha chiesto meno movimento, ne ottiene nessuno ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
