/* Leopardi Holiday Home: galleria d'arte mediterranea */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f1e7;
  --paper: #fcfaf5;
  --ink: #1d1b18;
  --ink-2: #57514a;
  --line: rgba(29, 27, 24, 0.14);
  --lava: #1c1a17;
  --lava-2: #2a2723;
  --on-dark: #efe8da;
  --on-dark-2: #b9b0a1;
  --sea: #1d5b6c;
  --sea-deep: #164654;
  --sea-soft: #dde9e7;
  --ocra: #b5852c;
  --ocra-soft: #e9c983;
  --terra: #a6452f;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-sm: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lead: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  --fs-h3: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --fs-h2: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  --fs-h1: clamp(3rem, 1.6rem + 6.2vw, 7rem);

  --space: clamp(4.5rem, 3rem + 6vw, 9rem);
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --header-h: 76px;
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.06), 0 18px 40px -18px rgba(29, 27, 24, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--sea); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ocra); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.muted { color: var(--ink-2); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip:focus { left: 8px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* --- tipografia */
.kicker {
  display: inline-flex; align-items: center; gap: 0.75em;
  margin: 0 0 1.1rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ocra);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.h1, .h2, .h3, .hero__title {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.04;
}
.h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); margin-bottom: 1.5rem; }
.h2 { font-size: var(--fs-h2); font-weight: 350; }
.h2 em, .hero__title em { font-style: italic; color: var(--ocra); }
.h3 { font-size: var(--fs-h3); font-weight: 400; line-height: 1.12; }
.sec-head { max-width: 760px; margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem); }

/* --- bottoni */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.8em 1.5em;
  border: 1px solid var(--b); border-radius: 999px;
  background: transparent; color: var(--b);
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--b); color: var(--bg); }
.btn--accent { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn--accent:hover { background: var(--sea-deep); border-color: var(--sea-deep); color: #fff; }
.btn--sm { min-height: 40px; padding: 0.55em 1.15em; font-size: 0.76rem; }
.btn--line {
  border: 0; border-bottom: 1px solid currentColor; border-radius: 0; padding: 0.3em 0; min-height: 0;
  margin-top: 0.5rem;
}
.btn--line:hover { background: none; color: var(--sea); }
.btn .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.linklike { background: none; border: 0; padding: 0; text-align: left; text-decoration: underline; text-underline-offset: 0.2em; }

/* --- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.5); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 50px; height: 50px; object-fit: contain; }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-display); font-size: 1.45rem; letter-spacing: 0.01em; }
.brand__sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-2); margin-top: 5px; }
.brand--light, .brand--light:hover { color: var(--on-dark); }
.brand--light .brand__sub { color: var(--on-dark-2); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); }
.nav__list { display: flex; gap: clamp(14px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav__list a {
  position: relative; text-decoration: none;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ocra);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--ink); }
.nav__list a:hover::after, .nav__list a[aria-current="true"]::after { transform: scaleX(1); }
.nav__aside { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; gap: 2px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; }
.lang a { padding: 6px 7px; text-decoration: none; color: var(--ink-2); border-radius: 3px; }
.lang a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ocra); }
.burger { display: none; }

@media (max-width: 1023px) {
  .burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 0 12px; background: none; border: 0; position: relative; z-index: 3;
  }
  .burger span { display: block; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 32px;
    padding: 32px var(--gutter) max(32px, env(safe-area-inset-bottom));
    background: var(--bg);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__list a {
    display: block; padding: 18px 0;
    font-family: var(--f-display); font-size: clamp(1.7rem, 6vw, 2.4rem); font-weight: 350;
    letter-spacing: 0; text-transform: none;
  }
  .nav__list a::after { display: none; }
  .nav__aside { justify-content: space-between; }
  .lang { font-size: 0.9rem; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) {
  .brand__mark { width: 42px; height: 42px; }
  .brand__name { font-size: 1.25rem; }
}

/* --- hero */
.hero { position: relative; padding-block: clamp(2.5rem, 2rem + 4vw, 6rem) var(--space); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -12vw; top: -18vw; width: 62vw; height: 62vw; max-width: 900px; max-height: 900px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(181, 133, 44, 0.16), rgba(181, 133, 44, 0));
  pointer-events: none;
}
.hero__in { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2.5rem, 5vw, 6rem); align-items: center; }
.hero__title { font-size: var(--fs-h1); font-weight: 300; line-height: 0.95; margin-bottom: 1.6rem; }
.hero__title em { font-weight: 300; }
.hero__tagline { font-family: var(--f-display); font-style: italic; font-size: var(--fs-lead); color: var(--ink-2); max-width: 30ch; margin-bottom: 0.6rem; }
.hero__place { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2.2rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terra); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art { justify-self: center; width: 100%; max-width: 440px; }
.frame {
  position: relative; aspect-ratio: 3 / 4;
  background: var(--paper); padding: clamp(10px, 1.4vw, 16px); box-shadow: var(--shadow);
  outline: 1px solid rgba(181, 133, 44, 0.45); outline-offset: 10px;
}
.hero__slide { position: absolute; inset: clamp(10px, 1.4vw, 16px); margin: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide figcaption {
  position: absolute; left: 0; bottom: -2px; transform: translateY(100%);
  padding-top: 14px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2);
}
.hero__dots { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; }
.hero__dots span { width: 18px; height: 2px; background: var(--line); transition: background 0.4s, width 0.4s var(--ease); }
.hero__dots span.is-active { width: 34px; background: var(--ocra); }

@media (max-width: 899px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__art { max-width: 380px; }
}

/* --- introduzione galleria */
.intro { padding-block: var(--space); background: var(--paper); border-block: 1px solid var(--line); }
.intro__in { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 7rem); }
.intro__body { font-size: var(--fs-lead); line-height: 1.6; }
.intro__body a { color: var(--sea); }
.intro__note {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-family: var(--f-display); font-style: italic; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.35;
}
.intro__note strong { font-weight: 400; }
@media (max-width: 899px) { .intro__in { grid-template-columns: 1fr; } }

/* --- appartamenti */
.apartments { padding-block: var(--space); }
.apt {
  --c: var(--sea);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 6rem); align-items: center;
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
  border-top: 1px solid var(--line);
}
.apt--sicilia { --c: var(--terra); }
.apt--rock { --c: var(--ocra); }
.apt:nth-of-type(even) .apt__media { order: 2; }
.apt__mosaic {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px;
  width: 100%; aspect-ratio: 5 / 4.4; padding: 0; border: 0; background: none; cursor: zoom-in;
}
.apt__mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.5s; }
.apt__mosaic .m0 { grid-row: 1 / 3; }
.apt__mosaic:hover img { filter: saturate(1.08); }
.apt__mosaic { overflow: hidden; }
.apt__num { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--c); margin-bottom: 0.9rem; }
.apt .h3 { margin-bottom: 1rem; }
.apt__cap { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 1.5rem; }
.prose { color: var(--ink-2); }
.prose p { margin-bottom: 0.9em; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 1.4em; margin-bottom: 0.45em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.7em; height: 1px; background: var(--c, var(--ocra)); }
@media (max-width: 899px) {
  .apt { grid-template-columns: 1fr; }
  .apt:nth-of-type(even) .apt__media { order: 0; }
}

/* --- il nostro spirito */
.spirit { background: var(--lava); color: var(--on-dark); padding-block: var(--space); text-align: center; }
.spirit__in { max-width: 900px; }
.spirit__mark { width: 92px; height: 92px; margin: 0 auto 1.8rem; object-fit: contain; }
.spirit .kicker { justify-content: center; color: var(--ocra-soft); }
.spirit .kicker::before { display: none; }
.spirit__quote { margin: 1.8rem 0 0; font-family: var(--f-display); font-weight: 300; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2.1rem); line-height: 1.4; color: var(--on-dark); }
.spirit__quote p { margin: 0; }

/* --- galleria */
.gallery { padding-block: var(--space); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.chip {
  min-height: 40px; padding: 0.5em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.masonry { columns: 4 240px; column-gap: 12px; }
.g-item { display: block; margin-bottom: 12px; break-inside: avoid; overflow: hidden; background: var(--paper); cursor: zoom-in; }
.g-item img { width: 100%; transition: transform 0.7s var(--ease), opacity 0.4s; }
.g-item:hover img { transform: scale(1.035); }
.g-item[hidden] { display: none; }
@media (max-width: 560px) { .masonry { columns: 2; column-gap: 8px; } .g-item { margin-bottom: 8px; } }

/* --- arte */
.art { background: var(--sea-soft); padding-block: var(--space); overflow: hidden; }
.art__in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.art__media { position: relative; padding-bottom: 12%; }
.art__a { width: 78%; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); }
.art__b { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; object-fit: cover; border: 10px solid var(--paper); box-shadow: var(--shadow); }
.art__text { font-family: var(--f-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.4; margin: 1.5rem 0 1rem; }
.art .kicker { color: var(--sea); }
@media (max-width: 899px) { .art__in { grid-template-columns: 1fr; } .art__media { max-width: 520px; } }

/* --- posizione */
.location { padding-block: var(--space); }
.loc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); margin-bottom: clamp(2.5rem, 4vw, 4rem); }
.loc__col .h3 { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.map { position: relative; aspect-ratio: 16 / 7; min-height: 320px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px; gap: 4px;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(29, 27, 24, 0.05) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(29, 27, 24, 0.05) 39px 40px),
    var(--paper);
}
.map__ph > .ico { width: 34px; height: 34px; color: var(--terra); margin-bottom: 8px; }
.map__addr { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.3; }
.map__note { max-width: 52ch; font-size: var(--fs-sm); color: var(--ink-2); }
.map__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-width: 760px) { .loc__grid { grid-template-columns: 1fr; } .map { aspect-ratio: auto; min-height: 380px; } }

/* --- contatti */
.contact { background: var(--lava); color: var(--on-dark); padding-block: var(--space); }
.contact__in { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(2rem, 6vw, 7rem); align-items: end; }
.contact .kicker { color: var(--ocra-soft); }
.contact .h2 { margin-bottom: 1.6rem; }
.contact .h2 em { color: var(--ocra-soft); }
.contact__text p { color: var(--on-dark-2); max-width: 62ch; margin-bottom: 2rem; }
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list li { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 1px solid rgba(239, 232, 218, 0.14); }
.contact__list .lbl { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark-2); }
.contact__list a, .contact__list span:not(.lbl) { font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--ocra-soft); }
@media (max-width: 899px) { .contact__in { grid-template-columns: 1fr; } }

/* --- footer */
.site-footer { background: #141210; color: var(--on-dark-2); padding-top: clamp(3.5rem, 6vw, 5.5rem); font-size: 0.93rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: clamp(2rem, 4vw, 4rem); padding-bottom: 3rem; }
.site-footer__brand p { margin-top: 1.4rem; max-width: 36ch; }
.f-title { font-family: var(--f-body); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark); margin-bottom: 1.1rem; }
.f-list { list-style: none; margin: 0; padding: 0; }
.f-list li { margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .site-footer .linklike:hover { color: var(--ocra-soft); }
.site-footer .linklike { text-decoration: none; color: inherit; }
.social { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-top: 0.6rem; border: 1px solid rgba(239, 232, 218, 0.25); border-radius: 50%; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 1.6rem; border-top: 1px solid rgba(239, 232, 218, 0.12); font-size: 0.8rem; }
.site-footer__bottom p { margin: 0; }
@media (max-width: 899px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* --- pagine legali */
.legal { padding-block: clamp(3rem, 6vw, 6rem) var(--space); }
.legal__body { color: var(--ink-2); }
.legal__body .lead { font-size: var(--fs-lead); color: var(--ink); }
.legal__body h2 { font-family: var(--f-display); font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); color: var(--ink); margin: 2.6rem 0 0.9rem; }
.legal__body h3 { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 1.6rem 0 0.5rem; }
.legal__body ul { padding-left: 1.2em; }
.legal__body li { margin-bottom: 0.5em; }
.legal__body a { color: var(--sea); }
.legal__body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.92rem; display: block; overflow-x: auto; }
.legal__body th, .legal__body td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 120px; }
.legal__body th { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: var(--paper); }
.legal__body code { font-size: 0.88em; background: var(--paper); padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; }
.legal__date { margin-top: 3rem; font-size: var(--fs-sm); }
.notfound .btn { margin: 0.5rem 0.4rem 0 0; }

/* --- banner consenso */
.consent {
  position: fixed; z-index: 80; left: 16px; bottom: 16px; width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 24px 24px 20px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem; line-height: 1.55;
}
.consent[hidden] { display: none; }
.consent__title { font-family: var(--f-display); font-size: 1.35rem; margin: 0 28px 0.6rem 0; }
.consent p { color: var(--ink-2); }
.consent a { color: var(--sea); }
.consent__x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; }
.consent__x:hover { background: var(--bg); }
.consent__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.consent__actions [hidden] { display: none; }
.consent__prefs { display: grid; gap: 12px; margin: 0 0 16px; padding: 14px 0; border-block: 1px solid var(--line); }
.consent__prefs[hidden] { display: none; }
.toggle { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__ui { position: relative; width: 40px; height: 22px; margin-top: 2px; border-radius: 999px; background: #cfc7b8; transition: background 0.2s; }
.toggle__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.toggle input:checked + .toggle__ui { background: var(--sea); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.toggle input:disabled + .toggle__ui { opacity: 0.55; }
.toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--ocra); outline-offset: 2px; }
.toggle small { color: var(--ink-2); }
@media (max-width: 560px) { .consent { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 20px 18px 16px; } }

/* --- lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(17, 15, 13, 0.96); color: var(--on-dark);
}
.lightbox::backdrop { background: rgba(17, 15, 13, 0.9); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in 0.3s var(--ease); }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 72px 56px; max-width: 100%; }
.lightbox__fig img { max-width: min(92vw, 1400px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -30px #000; }
.lightbox__fig figcaption { max-width: 70ch; text-align: center; font-size: 0.88rem; color: var(--on-dark-2); }
.lightbox__count { position: absolute; top: 22px; left: 24px; margin: 0; font-size: 0.75rem; letter-spacing: 0.2em; color: var(--on-dark-2); }
.lb-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(239, 232, 218, 0.22); background: rgba(17, 15, 13, 0.4); color: var(--on-dark); }
.lb-btn:hover { background: var(--on-dark); color: var(--lava); }
.lb-btn .ico { width: 22px; height: 22px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox__fig { padding: 64px 8px 96px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* --- animazioni */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .reveal { animation: rise 1s var(--ease) both; }
.hero .reveal:nth-child(2) { animation-delay: 0.08s; }
.hero .reveal:nth-child(3) { animation-delay: 0.16s; }
.hero .reveal:nth-child(4) { animation-delay: 0.22s; }
.hero .reveal:nth-child(5) { animation-delay: 0.3s; }
.hero__art.reveal { animation-delay: 0.2s; animation-duration: 1.3s; }
.reveal.is-pending { opacity: 0; transform: translateY(28px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }

@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; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .g-item:hover img { transform: none; }
}

@media print {
  .site-header, .consent, .lightbox, .map, .hero__art { display: none !important; }
  body { background: #fff; }
}
