/* =========================================================================
   TOKEN DI BASE
   ========================================================================= */
:root {
  --cream-color: #fff8d3;
  --light-cream-color: #fffdf6;
  --forest-green-color: #183017;
  --sage-green-color: #5c7a52;
  --terracotta-color: #a8532b;
  --heading-font: "Fraunces", serif;
  --body-font: "Karla", sans-serif;

  /* Progresso dell'esplorazione nell'hero, aggiornato da vines.js. */
  --exploration-progress: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  margin: 0;
  color: var(--forest-green-color);
  background-color: var(--cream-color);
  font-family: var(--body-font);
  line-height: 1.6;
}

h1, h2, h3 { margin: 0; font-family: var(--heading-font); }
p { margin: 0 0 1.25rem; }
a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--terracotta-color);
  outline-offset: 3px;
}

.content-container {
  width: min(100% - 3rem, 42rem);
  margin: 0 auto;
}

/* =========================================================================
   VITE: tralci continui e fogliame in primo piano
   L'illustrazione è ancorata alla pagina, non alla finestra.
   ========================================================================= */
.vine-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.vine-frame__side {
  position: absolute;
  top: 0;
  width: clamp(76px, 23vw, 330px);
  height: 100%;
  overflow: visible;
}

.vine-frame__side--left { left: 0; }
.vine-frame__side--right { right: 0; transform: scaleX(-1); }

.vine__stem, .vine__branch, .vine__tendril, .vine__veins {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vine__stem { stroke: #78825b; stroke-width: 2.4; }
.vine__branch { stroke: #758052; stroke-width: 1.4; }
.vine__tendril { stroke: #a0a777; stroke-width: 1; }
.vine__leaf { fill: #314b29; stroke: #748359; stroke-width: 0.7; }
.vine__leaf--light { fill: #607348; stroke: #96a174; }
.vine__leaf--dark { fill: #1a3522; stroke: #4c6540; }
.vine__veins { stroke: #bec293; stroke-width: 0.8; opacity: 0.5; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  color: var(--light-cream-color);
  text-align: center;
  background-color: var(--forest-green-color);
}

/* La foto resta in vista mentre attraversiamo i quattro piani.
   La maggiore altezza si attiva solo dopo l'inizializzazione dello script. */
.hero--immersive { height: 320svh; }

.hero__scene {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: var(--light-cream-color);
  text-align: center;
  background-color: var(--forest-green-color);
}

.hero__landscape {
  position: absolute;
  inset: 0;
  transform: scale(calc(1 + var(--exploration-progress) * 0.055));
  transform-origin: 50% 58%;
}

.hero__landscape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.12);
}

/* Velo neutro molto leggero: conserva la luminosità della facciata. */
.hero__scene::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.08));
}

.hero__scroll-link { position: relative; z-index: 6; }

.hero__content { position: relative; width: 34%; padding: 0 0 2.27rem; }

/* Il contenitore non crea un livello proprio: l'alone resta sotto le foglie. */
.hero__content::before {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
  left: -10%;
  top: 5px;
  width: 120%;
  aspect-ratio: 3.3 / 1;
  transform: translateY(-10%);
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.16) 45%, transparent 72%);
  filter: blur(10px);
}

.hero__vegetation {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hero__vegetation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__vegetation-side { will-change: transform; }
.hero__vegetation .vine__leaf {
  fill: var(--foliage-color);
  stroke: var(--foliage-outline);
  stroke-width: 0.65;
}
.hero__vegetation .vine__leaf--light { fill: var(--foliage-highlight); }
.hero__vegetation .vine__leaf--dark { fill: var(--foliage-shadow); }
.hero__vegetation .vine__veins { stroke: var(--foliage-outline); opacity: 0.55; }
.hero__vegetation .vine__branch { stroke: var(--foliage-outline); opacity: 0.65; }
.hero__vegetation-mass { fill: var(--foliage-shadow); }

.hero__brand {
  position: relative;
  z-index: 6;
  aspect-ratio: 4 / 1;
  transform: translateY(5px);
}

/* Il file ha ampi margini trasparenti: inquadriamo solo la scritta. */
.hero__brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.hero__location {
  position: absolute;
  /* Punto della facciata al 49% in orizzontale e al 64% in verticale:
     i due max seguono il ritaglio cover della fotografia in 4:3. */
  left: calc(50% - max(1vw, 1.33svh));
  top: calc(50% + max(10.5vw, 14svh));
  transform: translate(-50%, -50%);
  z-index: 6;
  color: #251919;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hero__scroll-link {
  position: absolute;
  bottom: 2rem;
  padding: 0.25rem 1rem;
  font-size: 2rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero__scroll-link:hover, .hero__scroll-link:focus-visible {
  opacity: 0.7;
  transform: translateY(3px);
}

.hero__scroll-link--inviting {
  animation: hero-scroll-invitation 3.8s ease-in-out 3s infinite;
}

/* Un piccolo cenno di 6px, seguito da tre secondi di pausa. */
@keyframes hero-scroll-invitation {
  0%, 21%, 100% { transform: translateY(0); }
  10.5% { transform: translateY(6px); }
}

/* =========================================================================
   CONTENUTO ED EVENTI
   ========================================================================= */
.section { padding: 6rem 0; }

#about { padding-top: 2rem; }

.about__logo {
  display: block;
  width: 10rem;
  height: 10rem;
  margin: -0.5rem auto -0.75rem;
  background-color: currentColor;
  -webkit-mask: url("../img/logo-dark.png") center / contain no-repeat;
  mask: url("../img/logo-dark.png") center / contain no-repeat;
}

.section h2 {
  margin-bottom: 2rem;
  color: var(--forest-green-color);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  font-style: italic;
  text-align: center;
}

/* Contenuti modificabili: i controlli compaiono soltanto dopo il login. */
.editable-field { position: relative; }
.editable-field--heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.editable-field--heading h2 { margin-bottom: 0; white-space: pre-line; }
.editable-field--paragraph {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.editable-field--paragraph > p { flex: 1; white-space: pre-line; }

.about-blocks { display: flex; flex-direction: column; gap: 0; }
.about-text-block { position: relative; min-width: 0; }
.about-text-block__content {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.about-text-block__content--fallback-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 40px;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
}
.about-text-block__controls {
  position: absolute;
  top: 50%;
  right: -5rem;
  display: none;
  align-items: center;
  gap: 0.45rem;
  transform: translateY(-50%);
}
.admin-mode .about-text-block__controls { display: flex; }
.about-text-block.is-editing .about-text-block__controls { display: none; }

.delete-block-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #8a3025;
  background: transparent;
  font: 500 1.35rem/1 var(--body-font);
  cursor: pointer;
  opacity: 0.8;
}
.admin-mode .delete-block-button { display: inline-flex; }
.delete-block-button:hover, .delete-block-button:focus-visible { background: rgba(138, 48, 37, 0.1); opacity: 1; }

.add-text-block-button {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 2rem auto 0;
  padding: 0.65rem 1rem;
  border: 1px dashed var(--sage-green-color);
  border-radius: 999px;
  color: var(--forest-green-color);
  background: rgba(255, 253, 246, 0.45);
  font: 700 0.85rem/1 var(--body-font);
  cursor: pointer;
}
.admin-mode .add-text-block-button { display: flex; width: fit-content; }
.add-text-block-button:hover, .add-text-block-button:focus-visible { border-style: solid; background: var(--light-cream-color); }

.block-editor {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(24, 48, 23, 0.2);
  border-radius: 0.6rem;
  background: rgba(255, 253, 246, 0.75);
}
.block-editor__text {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem;
  border: 1px solid var(--sage-green-color);
  border-radius: 0.35rem;
  color: var(--forest-green-color);
  background: #fff;
  overflow-y: hidden;
  resize: vertical;
}
.block-editor__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.125rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 48, 23, 0.25) transparent;
  margin-top: 0.65rem;
  padding: 0.45rem 0.3rem;
  border: 1px solid rgba(24, 48, 23, 0.2);
  border-radius: 0.45rem;
  background: #f3eedc;
}
.block-editor__toolbar > * { flex: 0 0 auto; }
.block-editor__tool { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.block-editor__caption { padding-left: 0.15rem; color: rgba(24, 48, 23, 0.72); font-size: 0.62rem; font-weight: 700; line-height: 1; }
.block-editor__tool select, .block-editor__tool input[type="number"] {
  height: 2.1rem;
  min-width: 0;
  padding: 0.32rem 0.42rem;
  border: 1px solid rgba(24, 48, 23, 0.3);
  border-radius: 0.25rem;
  color: inherit;
  background: #fff;
  font: 500 0.78rem/1 var(--body-font);
}
.block-editor__tool--font select { width: 6rem; }
.block-editor__tool--number input { width: 2.75rem; padding-inline: 0.2rem; }
.block-editor__tool--spacing { flex: 0 0 auto; }
.spacing-stepper {
  display: flex;
  align-items: stretch;
  padding: 0;
  border: 0;
  color: var(--forest-green-color);
  background: transparent;
}
.spacing-stepper__center { display: flex; flex-direction: column; align-items: center; width: 1.8rem; }
.spacing-stepper__icon { display: block; width: 1.8rem; height: 1.4rem; }
.spacing-stepper__icon svg { display: block; width: 100%; height: 100%; }
.spacing-stepper__center input[type="number"] {
  width: 100%;
  height: 1.1rem;
  padding: 0;
  border: 0;
  border-radius: 0.15rem;
  background: transparent;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(24, 48, 23, 0.7);
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.spacing-stepper__center input::-webkit-inner-spin-button,
.spacing-stepper__center input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.spacing-stepper__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  color: rgba(24, 48, 23, 0.65);
  background: transparent;
  font: 500 1.1rem/1 var(--body-font);
  cursor: pointer;
  transition: background 150ms, color 150ms;
}
.spacing-stepper__button svg { width: 1rem; height: 1rem; }
.spacing-stepper__button:hover:not(:disabled) { color: var(--forest-green-color); background: rgba(24, 48, 23, 0.06); }
.spacing-stepper__button:active:not(:disabled) { background: rgba(24, 48, 23, 0.1); }
.spacing-stepper__button:disabled { opacity: 0.3; cursor: default; }
.spacing-stepper__button:focus-visible,
.spacing-stepper__center input:focus-visible { outline: 2px solid var(--forest-green-color); outline-offset: 1px; }
.block-editor__toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  color: var(--forest-green-color);
  background: transparent;
  font: 500 1rem/1 var(--body-font);
  cursor: pointer;
}
.block-editor__toolbar-button:hover { border-color: rgba(24, 48, 23, 0.2); background: rgba(255, 255, 255, 0.6); }
.block-editor__toolbar-button[aria-pressed="true"] { color: var(--light-cream-color); background: var(--forest-green-color); }
.block-editor__toolbar-button--bold { margin-left: 0.2rem; font-weight: 700; }
.block-editor__toolbar-button--italic { font-family: Georgia, serif; font-style: italic; }
.block-editor__alignment-group {
  display: flex;
  gap: 0;
  margin: 0 0.1rem;
  padding: 0 0.15rem;
  border-right: 1px solid rgba(24, 48, 23, 0.18);
  border-left: 1px solid rgba(24, 48, 23, 0.18);
}
.alignment-icon { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 1rem; height: 1rem; }
.alignment-icon span { display: block; height: 1.5px; border-radius: 2px; background: currentColor; }
.alignment-icon--center { align-items: center; }
.alignment-icon--right { align-items: flex-end; }
.alignment-icon--justify span { width: 100%; }

.edit-button {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--terracotta-color);
  background: transparent;
  font: 700 1rem/1 var(--body-font);
  cursor: pointer;
  opacity: 0.8;
}
.admin-mode .edit-button { display: inline-flex; }
.edit-button:hover, .edit-button:focus-visible { opacity: 1; background: rgba(168, 83, 43, 0.1); }
.is-editing > .edit-button { display: none; }

.inline-editor { width: 100%; }
.inline-editor__control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--sage-green-color);
  border-radius: 0.3rem;
  color: var(--forest-green-color);
  background: var(--light-cream-color);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.inline-editor__actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.inline-editor__save, .inline-editor__cancel {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--forest-green-color);
  border-radius: 999px;
  font: 700 0.8rem/1 var(--body-font);
  cursor: pointer;
}
.inline-editor__save { color: var(--cream-color); background: var(--forest-green-color); }
.inline-editor__cancel { color: var(--forest-green-color); background: transparent; }
.inline-editor__save:disabled, .inline-editor__cancel:disabled { cursor: wait; opacity: 0.55; }
.inline-editor__error { display: block; margin-top: 0.5rem; color: #9b2c20; font-size: 0.85rem; }

/* Foto nel formato originale, con la successiva parzialmente in vista. */
.gallery {
  --gallery-gap: clamp(0.75rem, 2vw, 2rem);
  --gallery-image-height: clamp(15rem, 45vw, 36rem);
  margin: 0 clamp(2.5rem, 6vw, 6rem);
  padding-bottom: clamp(4.5rem, 8vw, 6rem);
}

.gallery__track {
  display: flex;
  align-items: flex-start;
  gap: var(--gallery-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sage-green-color) transparent;
}

/* Lo snap torna attivo al termine della transizione delle frecce. */
.gallery__track--animating { scroll-snap-type: none; scroll-behavior: auto; }
.gallery__track--dragging { scroll-snap-type: none; scroll-behavior: auto; }

.gallery__track:focus-visible {
  outline: 2px solid var(--terracotta-color);
  outline-offset: 6px;
}

.gallery__slide {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 0 0 0.75rem;
  scroll-snap-align: start;
}

.gallery__slide img {
  display: block;
  width: auto;
  max-width: none;
  height: var(--gallery-image-height);
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.25rem;
}

.gallery__controls[hidden] { display: none; }
.gallery__position { min-width: 3rem; margin: 0; text-align: center; font-variant-numeric: tabular-nums; }

.gallery__button {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--sage-green-color);
  border-radius: 50%;
  color: var(--forest-green-color);
  background: transparent;
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.gallery__button:hover:not(:disabled) { color: var(--cream-color); background: var(--forest-green-color); }
.gallery__button:disabled { opacity: 0.3; cursor: default; }

.gallery-admin, .gallery__remove, .gallery__drag-handle { display: none; }
.admin-mode .gallery-admin { display: block; margin-bottom: 1.5rem; }
.gallery-admin__tools { min-width: 0; margin: 0; padding: 1rem; border: 1px dashed var(--sage-green-color); border-radius: 0.75rem; }
.gallery-admin__tools legend { padding: 0 0.4rem; font-size: 0.85rem; }
.gallery-admin__upload { position: relative; display: inline-flex; align-items: center; padding: 0.55rem 0.9rem; border-radius: 999px; color: var(--light-cream-color); background: var(--forest-green-color); cursor: pointer; }
.gallery-admin__upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.gallery-admin__upload:focus-within { outline: 2px solid var(--terracotta-color); outline-offset: 3px; }
.gallery-admin__upload:has(input:disabled) { opacity: 0.45; }
.gallery-admin__hint { margin: 0.5rem 0 0; font-size: 0.8rem; }
.gallery-admin__link-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin-top: 1rem; }
.gallery-admin__link-form label { display: flex; flex: 1 1 12rem; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; }
.gallery-admin__link-form input { width: 100%; min-width: 0; padding: 0.6rem; border: 1px solid var(--sage-green-color); border-radius: 0.35rem; color: inherit; background: var(--light-cream-color); font: inherit; }
.gallery-admin__link-form button { padding: 0.6rem 0.9rem; border: 1px solid var(--sage-green-color); border-radius: 999px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.gallery-admin__message { margin: 0.5rem 0 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.gallery-admin__message--error { color: #9b2c20; }
.admin-mode .gallery__remove { position: absolute; top: 0.75rem; right: 0.75rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 50%; color: var(--forest-green-color); background: var(--light-cream-color); box-shadow: 0 2px 8px #0002; cursor: pointer; }
.gallery__remove svg { width: 1.2rem; height: 1.2rem; }
.gallery__remove:hover { color: #9b2c20; }
.gallery__remove:disabled { opacity: 0.45; cursor: wait; }
.admin-mode .gallery__drag-handle {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--forest-green-color);
  background: var(--light-cream-color);
  box-shadow: 0 2px 8px #0002;
  cursor: grab;
}
.gallery__drag-handle svg { width: 1.35rem; height: 1.35rem; }
.admin-mode .gallery__slide[draggable="true"] { cursor: grab; }
.gallery__slide--dragging { opacity: 0.45; }
.gallery__slide--drop-before::before, .gallery__slide--drop-after::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0.75rem;
  width: 0.25rem;
  border-radius: 999px;
  background: var(--terracotta-color);
  content: "";
}
.gallery__slide--drop-before::before { left: calc(var(--gallery-gap) / -2); }
.gallery__slide--drop-after::after { right: calc(var(--gallery-gap) / -2); }
.gallery__slide:first-child.gallery__slide--drop-before::before { left: 0; }
.gallery__slide:last-child.gallery__slide--drop-after::after { right: 0; }
.gallery__image-error { display: grid; place-items: center; height: var(--gallery-image-height); aspect-ratio: 4 / 3; margin: 0; background: var(--light-cream-color); }
.gallery__empty { padding: 2rem 1rem; text-align: center; }
body:not(.admin-mode) .gallery--empty { display: none; }

.section--events {
  border-top: 1px solid rgba(24, 48, 23, 0.1);
  border-bottom: 1px solid rgba(24, 48, 23, 0.1);
  background-color: var(--light-cream-color);
}

.events-list { display: flex; flex-direction: column; }

.event {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(24, 48, 23, 0.12);
}

.event:last-child { border-bottom: none; }

.event__date {
  flex-shrink: 0;
  width: 4.5rem;
  color: var(--terracotta-color);
  font-family: var(--heading-font);
  line-height: 1.1;
  text-align: center;
}

.event__day { display: block; font-size: 1.75rem; font-weight: 600; }
.event__month { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.event__details { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.event__image {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  max-height: 28rem;
  margin-top: 1rem;
  object-fit: contain;
  object-position: left center;
  border-radius: 0.35rem;
}
.event__details h3 { margin-bottom: 0.25rem; font-family: var(--body-font); font-size: 1.1rem; font-weight: 700; }
.event__meta { margin: 0; color: rgba(24, 48, 23, 0.75); font-size: 0.9rem; }
.event__description {
  margin: 0.75rem 0 0;
  line-height: 1.6;
  white-space: pre-line;
}

.events__status {
  margin: 0;
  padding: 2rem 0;
  color: rgba(24, 48, 23, 0.7);
  text-align: center;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  padding: 2rem 1.5rem 2rem;
  color: var(--cream-color);
  background-color: var(--forest-green-color);
  text-align: center;
}

.footer__logo {
  display: block;
  width: 10rem;
  height: 10rem;
  margin: -0.5rem auto -0.75rem;
  background-color: currentColor;
  -webkit-mask: url("../img/logo-light.png") center / contain no-repeat;
  mask: url("../img/logo-light.png") center / contain no-repeat;
}
.footer__brand { margin-bottom: 1rem; font-family: var(--heading-font); font-size: 1.5rem; font-style: italic; }
.footer address { font-style: normal; line-height: 1.8; opacity: 0.9; }
.footer address a { text-decoration: none; }
.footer address a:hover, .footer address a:focus-visible { text-decoration: underline; }
.editable-field--contact { display: flex; align-items: center; justify-content: center; gap: 0.55rem; }
.editable-field--contact[data-field="address"] [data-content] { white-space: pre-line; }
.editable-field--social { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; }
.footer__social-link { display: inline-block; margin-top: 1rem; border-bottom: 1px solid rgba(255, 248, 211, 0.4); text-decoration: none; }
.footer__social-link:hover, .footer__social-link:focus-visible { border-bottom-color: var(--cream-color); }
.footer__note { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 248, 211, 0.15); font-size: 0.8rem; opacity: 0.7; }
.footer .edit-button { color: var(--cream-color); }
.footer .edit-button:hover, .footer .edit-button:focus-visible { background: rgba(255, 248, 211, 0.12); }
.footer .inline-editor { width: min(100%, 30rem); margin: 0.5rem auto; text-align: left; }
.footer .inline-editor__actions { justify-content: center; }
.footer .inline-editor__save { border-color: var(--cream-color); color: var(--forest-green-color); background: var(--cream-color); }
.footer .inline-editor__cancel { border-color: var(--cream-color); color: var(--cream-color); }
.footer .inline-editor__error { color: #ffd2c4; text-align: center; }

.footer__admin { min-height: 1.35rem; margin-top: 0.35rem; font-size: 0.72rem; opacity: 0.7; }
.footer__admin-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.footer__admin-link:hover, .footer__admin-link:focus-visible { border-bottom-color: currentColor; }
.footer__admin-session { display: inline-flex; gap: 0.7rem; align-items: center; }

.login-dialog {
  width: min(calc(100% - 2rem), 25rem);
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  color: var(--forest-green-color);
  background: var(--light-cream-color);
  box-shadow: 0 1.5rem 5rem rgba(8, 23, 8, 0.35);
}
.login-dialog::backdrop { background: rgba(8, 23, 8, 0.7); backdrop-filter: blur(3px); }
.login-dialog:target {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: block;
  margin: 0;
  transform: translate(-50%, -50%);
}
.login-dialog:target { box-shadow: 0 0 0 100vmax rgba(8, 23, 8, 0.7), 0 1.5rem 5rem rgba(8, 23, 8, 0.35); }
.login-form { padding: 1.75rem; }
.login-form__heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; }
.login-form__heading h2 { font-size: 2rem; font-weight: 500; }
.login-form__eyebrow { margin: 0 0 0.2rem; color: var(--terracotta-color); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.login-form__instruction { margin: 0 0 0.75rem; color: rgba(24, 48, 23, 0.78); font-size: 0.95rem; }
.login-form__instruction i { font-family: var(--heading-font); font-size: 1.05em; }
.login-form__close { padding: 0; border: 0; color: inherit; background: transparent; font: 400 1.8rem/1 var(--body-font); text-decoration: none; cursor: pointer; }
.login-form label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.85rem; font-weight: 700; }
.login-form input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(24, 48, 23, 0.35);
  border-radius: 0.3rem;
  color: inherit;
  background: #fff;
  font: inherit;
}
.login-form__submit {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--forest-green-color);
  border-radius: 999px;
  color: var(--cream-color);
  background: var(--forest-green-color);
  font: 700 0.9rem/1 var(--body-font);
  cursor: pointer;
}
.login-form__submit:disabled { cursor: wait; opacity: 0.6; }
.login-form__error { margin: 0.8rem 0 0; color: #9b2c20; font-size: 0.85rem; }

.admin-notice {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
  color: var(--cream-color);
  background: var(--forest-green-color);
  box-shadow: 0 0.6rem 2rem rgba(8, 23, 8, 0.25);
  font-size: 0.85rem;
}
.admin-notice--error { background: #792c22; }

@media (max-width: 640px) {
  .content-container { width: calc(100% - 5rem); }
  .hero__content { width: 42%; padding-bottom: 1.95rem; }
  .hero__location { left: 50%; font-size: 0.75rem; letter-spacing: 0.04em; }
  .hero__scroll-link { bottom: 1.5rem; }
  .section { padding: 4.5rem 0; }
  .editable-field--heading { align-items: flex-start; }
  .editable-field--contact { line-height: 1.5; }
  .admin-mode .about-text-block:not(.is-editing) { padding-right: 2.65rem; }
  .about-text-block__controls {
    top: 0;
    right: 0;
    flex-direction: column;
    transform: none;
  }
  .block-editor { padding: 0.75rem; }
  .block-editor__toolbar {
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem 0.25rem;
    overflow-x: visible;
    padding: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* L'apertura segue sempre lo scroll volontario. Riduciamo solo lo zoom. */
  .hero__landscape { transform: none; }
}
